:root {
    --page-bg: #050914;
    --panel: rgba(12, 20, 37, 0.86);
    --panel-strong: rgba(13, 24, 45, 0.94);
    --panel-soft: rgba(18, 31, 55, 0.72);
    --line: rgba(126, 158, 216, 0.15);
    --line-strong: rgba(77, 130, 255, 0.34);
    --text: #f7fbff;
    --muted: #9eabc2;
    --dim: #62708a;
    --blue: #1167ff;
    --blue-soft: rgba(17, 103, 255, 0.18);
    --green: #19d36b;
    --green-soft: rgba(25, 211, 107, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page-bg);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", Arial, sans-serif;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(5, 9, 20, 0.12), rgba(5, 9, 20, 0.9) 620px, #050914 100%),
        url("hatter.png") top center / cover no-repeat fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 55% 9%, rgba(28, 103, 255, 0.28), transparent 29%),
        linear-gradient(90deg, rgba(5, 9, 20, 0.92), rgba(5, 9, 20, 0.34) 42%, rgba(5, 9, 20, 0.88));
    z-index: -1;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(5, 9, 20, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-container {
    width: min(1580px, calc(100% - 64px));
    min-height: 98px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex: 0 0 auto;
}

.brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(17, 103, 255, 0.44));
}

.brand-copy {
    display: grid;
    line-height: 1;
}

.brand-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-subtitle {
    margin-top: 8px;
    color: var(--green);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
}

.nav-links {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
    align-self: stretch;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #b8c2d6;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 160ms ease;
}

.nav-link i {
    color: #9eabc2;
    font-size: 16px;
}

.nav-link:hover,
.nav-link.active,
.nav-link.active i {
    color: var(--blue);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--blue);
    box-shadow: 0 0 22px rgba(17, 103, 255, 0.9);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-box {
    position: relative;
    width: 260px;
}

.search-box input {
    width: 100%;
    height: 44px;
    padding: 0 48px 0 18px;
    color: var(--text);
    background: rgba(10, 17, 31, 0.86);
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
}

.search-box input:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(17, 103, 255, 0.1);
}

.search-box i {
    position: absolute;
    right: 18px;
    top: 50%;
    color: #a6b2c8;
    transform: translateY(-50%);
}

.icon-button,
.profile-button,
.mobile-menu-button {
    border: 0;
    color: var(--text);
    cursor: pointer;
}

.icon-button {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: transparent;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    color: #bdc8dc;
}

.profile-button {
    min-width: 142px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    text-align: left;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(17, 103, 255, 0.14);
    border: 1px solid rgba(17, 103, 255, 0.34);
    overflow: hidden;
}

.profile-avatar img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.profile-copy {
    display: grid;
    gap: 4px;
}

.profile-copy strong {
    font-size: 14px;
}

.profile-copy span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #91a0b9;
    font-size: 12px;
}

.profile-copy i {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: var(--green);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    background: rgba(12, 20, 37, 0.9);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.hero {
    position: relative;
    min-height: 260px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 9, 20, 0.08), rgba(5, 9, 20, 0.92));
}

.hero-inner {
    position: relative;
    width: min(1280px, calc(100% - 64px));
    min-height: 260px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 42px;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(38px, 4vw, 54px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0;
    text-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
}

.hero-copy p {
    max-width: 620px;
    margin: 14px 0 22px;
    color: #c4cede;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a9b4c9;
    font-size: 14px;
}

.breadcrumb a {
    text-decoration: none;
}

.breadcrumb i {
    color: #6f7d95;
    font-size: 11px;
}

.forum-stats {
    min-width: 420px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 24px 22px;
    background: rgba(12, 20, 37, 0.8);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.forum-stats article {
    display: grid;
    justify-items: center;
    gap: 7px;
    text-align: center;
}

.forum-stats i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--blue);
    font-size: 22px;
}

.forum-stats .online-symbol {
    color: var(--green);
    font-size: 15px;
}

.forum-stats strong {
    font-size: 18px;
}

.forum-stats span {
    color: #b7c1d5;
    font-size: 13px;
}

.page-shell {
    width: min(1280px, calc(100% - 64px));
    margin: 0 auto 44px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
}

.forum-board,
.sidebar {
    display: grid;
    align-content: start;
    gap: 14px;
}

.section-panel,
.side-card,
.action-strip {
    background: linear-gradient(180deg, rgba(15, 26, 47, 0.9), rgba(10, 18, 33, 0.86));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.panel-header {
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
}

.panel-header h2,
.side-card h2 {
    margin: 0;
    color: var(--blue);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.panel-lead {
    margin: 0;
    padding: 12px 20px 16px;
    font-size: 13px;
    line-height: 1.45;
    color: #8b98ae;
    border-bottom: 1px solid rgba(126, 158, 216, 0.11);
}

.category-row {
    min-height: 98px;
    display: grid;
    grid-template-columns: 56px minmax(220px, 1fr) 184px 260px;
    align-items: center;
    gap: 18px;
    padding: 0 18px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid rgba(126, 158, 216, 0.11);
    transition: background 160ms ease, border-color 160ms ease;
}

.category-row:last-child {
    border-bottom: 0;
}

.category-row:hover {
    background: rgba(17, 103, 255, 0.07);
}

.category-icon,
.strip-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 8px;
    font-size: 24px;
}

.category-info {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.category-info strong {
    font-size: 16px;
}

.category-info small,
.empty-latest,
.strip-copy small {
    color: #aeb9cd;
    font-size: 13px;
}

.category-counts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-left: 1px solid rgba(126, 158, 216, 0.1);
    border-right: 1px solid rgba(126, 158, 216, 0.1);
}

.category-counts span {
    display: grid;
    justify-items: center;
    gap: 2px;
}

.category-counts strong {
    font-size: 17px;
    font-weight: 600;
}

.category-counts small {
    color: #8f9bb2;
    font-size: 12px;
}

.latest-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.latest-cell i {
    color: #5f718f;
}

.action-strip {
    min-height: 72px;
    display: grid;
    grid-template-columns: 50px 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
}

.strip-copy {
    display: grid;
    gap: 2px;
}

.primary-action,
.square-action {
    height: 42px;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, #1fc46c, #128948);
    box-shadow: 0 10px 24px rgba(18, 137, 72, 0.22);
    transition: transform 140ms ease, filter 140ms ease;
}

.primary-action {
    min-width: 150px;
    padding: 0 20px;
    font-weight: 700;
}

.square-action {
    width: 42px;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.primary-action:hover,
.square-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.side-card {
    padding: 20px;
}

.side-card h2 {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.empty-state {
    min-height: 178px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
    color: #aeb9cd;
}

.empty-state.compact {
    min-height: 168px;
}

.empty-state i {
    color: var(--blue);
    font-size: 26px;
}

.empty-state strong {
    color: var(--text);
    font-size: 14px;
}

.empty-state span {
    max-width: 230px;
    color: #8d9ab1;
    font-size: 13px;
}

.side-link {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #3683ff;
    text-decoration: none;
    background: rgba(17, 103, 255, 0.08);
    border: 1px solid rgba(77, 130, 255, 0.16);
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 50;
    max-width: min(520px, calc(100% - 32px));
    padding: 12px 16px;
    color: var(--text);
    background: rgba(10, 18, 33, 0.96);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transform: translate(-50%, 24px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.category-row.hidden {
    display: none;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.auth-shell {
    width: min(460px, 100%);
}

.auth-card {
    padding: 34px;
    background: linear-gradient(180deg, rgba(15, 26, 47, 0.94), rgba(10, 18, 33, 0.9));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.auth-brand {
    margin-bottom: 30px;
}

.auth-heading h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1;
}

.auth-heading p {
    margin: 12px 0 26px;
    color: #aeb9cd;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form label {
    display: grid;
    gap: 8px;
}

.auth-form label span {
    color: #d6deee;
    font-size: 13px;
    font-weight: 700;
}

.auth-form input {
    height: 46px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(5, 9, 20, 0.72);
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: none;
}

.auth-form input:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(17, 103, 255, 0.1);
}

.full-action {
    width: 100%;
    margin-top: 4px;
}

.full-action:disabled {
    cursor: wait;
    opacity: 0.72;
}

.auth-message {
    min-height: 20px;
    margin: 0;
    color: #aeb9cd;
    font-size: 13px;
}

.auth-message.error {
    color: #ff6b7a;
}

.auth-message.success {
    color: var(--green);
}

.auth-switch {
    margin: 22px 0 0;
    color: #aeb9cd;
    text-align: center;
}

.auth-switch a {
    color: #4b8dff;
    font-weight: 800;
    text-decoration: none;
}

.content-shell {
    width: min(1280px, calc(100% - 64px));
    margin: 42px auto 52px;
}

.narrow-shell {
    width: min(860px, calc(100% - 64px));
}

.two-column-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
}

.compact-hero {
    min-height: 210px;
}

.compact-hero .hero-inner {
    min-height: 210px;
}

.padded-panel {
    padding: 24px;
}

.page-title,
.form-title {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.1;
}

.form-title {
    font-size: 22px;
}

.page-lead,
.muted-copy {
    margin: 0 0 24px;
    color: #aeb9cd;
}

.portal-grid,
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.card-grid {
    grid-template-columns: repeat(3, 1fr);
}

.feature-card,
.info-card {
    min-height: 180px;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 22px;
    color: var(--text);
    text-decoration: none;
    background: linear-gradient(180deg, rgba(15, 26, 47, 0.9), rgba(10, 18, 33, 0.86));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
}

.feature-card:hover {
    border-color: var(--line-strong);
    background: linear-gradient(180deg, rgba(20, 36, 66, 0.94), rgba(10, 18, 33, 0.9));
}

.feature-card i,
.info-card i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 8px;
    font-size: 22px;
}

.info-card.danger i {
    color: #ff5365;
    background: rgba(255, 83, 101, 0.14);
}

.feature-card strong,
.info-card strong {
    font-size: 18px;
}

.feature-card span,
.info-card span {
    color: #aeb9cd;
    font-size: 14px;
}

.portal-form {
    display: grid;
    gap: 16px;
}

.portal-form label {
    display: grid;
    gap: 8px;
}

.portal-form label span {
    color: #d6deee;
    font-size: 13px;
    font-weight: 700;
}

.portal-form input,
.portal-form textarea,
.portal-form select {
    width: 100%;
    padding: 12px 14px;
    color: var(--text);
    background: rgba(5, 9, 20, 0.72);
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: none;
}

.portal-form textarea {
    resize: vertical;
    min-height: 130px;
}

.portal-form input:focus,
.portal-form textarea:focus,
.portal-form select:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(17, 103, 255, 0.1);
}

.quick-list,
.status-list,
.rule-list {
    display: grid;
    gap: 12px;
}

.quick-list a,
.status-list span,
.rule-list article {
    display: grid;
    gap: 4px;
    padding: 14px;
    color: var(--text);
    text-decoration: none;
    background: rgba(17, 103, 255, 0.07);
    border: 1px solid rgba(77, 130, 255, 0.16);
    border-radius: 6px;
}

.status-list span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rule-list article span {
    color: #aeb9cd;
    font-size: 14px;
}

.segmented {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 22px;
    padding: 4px;
    background: rgba(5, 9, 20, 0.58);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.segmented button {
    min-width: 120px;
    height: 38px;
    padding: 0 16px;
    color: #aeb9cd;
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 800;
}

.segmented button.active {
    color: var(--text);
    background: var(--blue-soft);
}

.faction-panel {
    display: none;
}

.faction-panel.active {
    display: block;
}

.ucp-page .navbar {
    position: relative;
}

.ucp-login-shell {
    min-height: calc(100vh - 98px);
    display: grid;
    place-items: center;
    padding: 40px 18px;
}

.ucp-login-card {
    width: min(460px, 100%);
}

.ucp-shell {
    width: min(1600px, 100%);
    min-height: calc(100vh - 98px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    background: rgba(5, 9, 20, 0.5);
}

/* Why: our author rule `display:grid` overrides the UA default for `[hidden]`, so the dashboard <main> stayed in layout and appeared below the login card when scrolling. */
.ucp-login-shell[hidden],
.ucp-shell[hidden] {
    display: none !important;
}

.ucp-menu [hidden],
.ucp-view[hidden],
[data-admin-only][hidden],
[data-owner-only][hidden] {
    display: none !important;
}

.ucp-sidebar {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 20px 16px;
    background: rgba(4, 10, 22, 0.84);
    border-right: 1px solid var(--line);
}

.ucp-brand {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.ucp-label {
    display: grid;
    gap: 5px;
    color: #7f8ca5;
    font-weight: 800;
    text-transform: uppercase;
}

.ucp-label strong {
    color: var(--green);
    font-size: 13px;
    text-transform: none;
}

.ucp-menu {
    display: grid;
    gap: 5px;
}

.ucp-menu a,
.ucp-menu button {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 14px;
    color: #c2cce0;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    text-align: left;
}

.ucp-menu i {
    width: 22px;
    color: #b3bfd5;
    font-size: 17px;
    text-align: center;
}

.ucp-menu .active,
.ucp-menu a:hover,
.ucp-menu button:hover {
    color: #fff;
    background: rgba(17, 103, 255, 0.18);
    border-color: rgba(17, 103, 255, 0.5);
    box-shadow: inset 3px 0 0 var(--blue);
}

.ucp-menu .active i,
.ucp-menu a:hover i,
.ucp-menu button:hover i {
    color: var(--blue);
}

.ucp-status {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    padding: 18px;
    background: rgba(9, 17, 31, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.ucp-status span {
    color: #8896af;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ucp-status strong {
    color: #eef4ff;
    font-size: 16px;
    font-weight: 600;
}

.ucp-status i {
    width: 12px;
    height: 12px;
    display: inline-block;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--green);
}

.ucp-main {
    min-width: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.02);
}

.ucp-topbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 28px;
    background: rgba(5, 11, 24, 0.7);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.ucp-topbar > strong {
    color: var(--blue);
    font-size: 14px;
}

.ucp-top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ucp-icon-button,
.ucp-user {
    border: 0;
    color: var(--text);
    background: transparent;
    cursor: pointer;
}

.ucp-icon-button {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #d6e1f2;
    font-size: 19px;
}

.ucp-icon-button.has-badge span {
    position: absolute;
    right: 3px;
    top: 2px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--green);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}

.ucp-icon-button span[hidden] {
    display: none;
}

.ucp-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ucp-user span {
    display: grid;
    gap: 3px;
    text-align: left;
}

.ucp-user small {
    color: #9da9bd;
}

.ucp-content {
    padding: 26px 28px 30px;
}

.ucp-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 22px;
}

.ucp-heading h1 {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 1;
    text-transform: uppercase;
}

.ucp-heading h1 span {
    color: var(--blue);
}

.character-picker {
    min-width: 320px;
    display: grid;
    gap: 8px;
}

.character-picker span {
    color: #9da9bd;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.character-picker select {
    min-height: 44px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(8, 16, 30, 0.92);
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: none;
}

.ucp-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    color: #ffd6dd;
    background: rgba(255, 83, 101, 0.11);
    border: 1px solid rgba(255, 83, 101, 0.28);
    border-radius: var(--radius);
}

.ucp-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ucp-card {
    min-height: 220px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(13, 24, 44, 0.9), rgba(8, 16, 30, 0.85));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(12px);
}

.ucp-card h2 {
    margin: 0 0 18px;
    color: var(--blue);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.activity-card,
.vehicle-card,
.quick-card {
    grid-column: span 2;
}

.inventory-card {
    grid-column: 1 / -1;
}

.ucp-inventory-lead {
    margin: -8px 0 14px;
    font-size: 12px;
    line-height: 1.45;
    color: #8b98ae;
}

.ucp-inventory-lead code {
    font-size: 11px;
    color: #b8c4d9;
}

.character-body {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.character-model {
    min-height: 150px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: #aeb9cd;
    background: radial-gradient(circle, rgba(77, 130, 255, 0.14), rgba(255, 255, 255, 0.02));
    border-radius: 50px;
}

.character-model i {
    color: #d9e5f6;
    font-size: 54px;
}

.character-model span {
    font-size: 12px;
}

.character-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.character-title strong {
    font-size: 22px;
}

.character-title span {
    padding: 6px 10px;
    color: #9ff6c3;
    background: var(--green-soft);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 800;
}

.character-lines dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.character-lines div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(126, 158, 216, 0.1);
}

.character-lines dt {
    color: #aeb9cd;
}

.character-lines dd {
    margin: 0;
    color: #4b8dff;
    text-align: right;
}

.ucp-wide-action {
    width: 100%;
    min-height: 40px;
    margin-top: 14px;
    color: #d7e2f4;
    background: rgba(17, 103, 255, 0.08);
    border: 1px solid rgba(77, 130, 255, 0.18);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}

.money-row,
.property-row,
.activity-row,
.vehicle-row {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(126, 158, 216, 0.1);
}

.money-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
}

.money-row i,
.property-row i,
.activity-row i,
.vehicle-row i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: rgba(25, 211, 107, 0.12);
    border-radius: 50%;
    font-size: 20px;
}

.money-row:nth-of-type(2) i,
.property-row i,
.vehicle-row i {
    color: var(--blue);
    background: var(--blue-soft);
}

.money-row span,
.property-row span {
    color: #b8c3d6;
}

.money-row strong {
    color: var(--green);
    font-size: 23px;
}

.money-row:nth-of-type(2) strong {
    color: var(--blue);
}

.money-row button {
    height: 34px;
    padding: 0 14px;
    color: #dbe6f6;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
}

.property-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    padding: 11px 12px;
    margin-bottom: 4px;
    background: rgba(17, 103, 255, 0.05);
    border: 1px solid rgba(126, 158, 216, 0.09);
    border-radius: 6px;
}

.property-row strong {
    font-size: 22px;
}

.stats-card {
    display: grid;
    align-content: start;
}

.level-ring {
    width: 106px;
    height: 106px;
    margin: 2px auto 18px;
    display: grid;
    place-items: center;
    align-content: center;
    background: conic-gradient(var(--blue) 72%, rgba(77, 130, 255, 0.14) 0);
    border-radius: 50%;
    box-shadow: inset 0 0 0 12px rgba(7, 14, 27, 0.95);
}

.level-ring strong {
    font-size: 25px;
}

.level-ring span {
    color: #aeb9cd;
    font-size: 12px;
    text-transform: uppercase;
}

.stat-bars {
    display: grid;
    gap: 14px;
}

.stat-bars label {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px 12px;
    color: #b9c5d8;
    font-size: 13px;
}

.stat-bars b {
    font-weight: 500;
}

.stat-bars i {
    grid-column: 1 / 3;
    height: 7px;
    background: rgba(126, 158, 216, 0.16);
    border-radius: 999px;
    overflow: hidden;
}

.stat-bars em {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--blue), #38a2ff);
    border-radius: inherit;
}

.activity-list,
.vehicle-list {
    display: grid;
    gap: 0;
}

.activity-row,
.vehicle-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
}

.activity-row span,
.vehicle-row span {
    display: grid;
    gap: 3px;
}

.activity-row small,
.vehicle-row small,
.activity-row time,
.vehicle-row em {
    color: #95a2b8;
    font-size: 12px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-actions a,
.quick-actions button {
    min-height: 112px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #d6e0f0;
    text-decoration: none;
    background: rgba(17, 103, 255, 0.06);
    border: 1px solid rgba(126, 158, 216, 0.12);
    border-radius: 6px;
    cursor: pointer;
}

.quick-actions i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 50%;
    font-size: 22px;
}

.quick-actions a:nth-child(3) i,
.quick-actions button:nth-child(5) i {
    color: #a855f7;
    background: rgba(168, 85, 247, 0.14);
}

.quick-actions a:nth-child(4) i {
    color: #38a2ff;
    background: rgba(56, 162, 255, 0.14);
}

.quick-actions button:nth-child(6) i {
    color: #ff5365;
    background: rgba(255, 83, 101, 0.14);
}

.ucp-empty {
    min-height: 88px;
    display: grid;
    place-items: center;
    color: #93a0b7;
    text-align: center;
}

@media (max-width: 1320px) {
    .nav-container,
    .hero-inner,
    .page-shell {
        width: min(1120px, calc(100% - 36px));
    }

    .nav-links {
        gap: 14px;
    }

    .search-box {
        width: 210px;
    }

    .category-row {
        grid-template-columns: 56px minmax(220px, 1fr) 170px;
    }

    .latest-cell {
        grid-column: 2 / 4;
        padding-bottom: 18px;
    }

    .ucp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-card,
    .vehicle-card,
    .quick-card {
        grid-column: span 1;
    }
}

@media (max-width: 1080px) {
    .nav-container {
        min-height: 82px;
    }

    .mobile-menu-button {
        display: grid;
        place-items: center;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .navbar.menu-open .nav-links,
    .navbar.menu-open .nav-actions {
        display: flex;
    }

    .navbar.menu-open .nav-container {
        flex-wrap: wrap;
        padding: 14px 0;
    }

    .navbar.menu-open .nav-links {
        width: 100%;
        order: 3;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .navbar.menu-open .nav-link {
        min-height: 42px;
    }

    .navbar.menu-open .nav-link.active::after {
        display: none;
    }

    .navbar.menu-open .nav-actions {
        width: 100%;
        order: 4;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 36px 0;
    }

    .forum-stats {
        min-width: 0;
        width: 100%;
    }

    .page-shell {
        grid-template-columns: 1fr;
    }

    .two-column-content,
    .portal-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }

    .ucp-shell {
        grid-template-columns: 1fr;
    }

    .ucp-sidebar {
        display: none;
    }

    .ucp-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .character-picker {
        min-width: 0;
    }
}

@media (max-width: 720px) {
    .brand-title {
        font-size: 22px;
    }

    .brand-subtitle {
        font-size: 13px;
    }

    .brand-logo {
        width: 48px;
        height: 48px;
    }

    .forum-stats {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 18px;
    }

    .category-row {
        grid-template-columns: 48px minmax(0, 1fr);
        min-height: 0;
        padding: 16px;
    }

    .category-icon,
    .strip-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .category-counts,
    .latest-cell {
        grid-column: 1 / 3;
    }

    .category-counts {
        padding-top: 12px;
        border-left: 0;
        border-right: 0;
        border-top: 1px solid rgba(126, 158, 216, 0.1);
    }

    .latest-cell {
        padding: 0;
    }

    .action-strip {
        grid-template-columns: 44px 1fr 44px;
    }

    .primary-action {
        grid-column: 1 / 4;
        width: 100%;
    }

    .square-action {
        grid-column: 3;
        grid-row: 1;
    }

    .content-shell,
    .narrow-shell {
        width: min(100% - 36px, 100%);
    }

    .segmented {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .ucp-content {
        padding: 20px 16px;
    }

    .ucp-topbar {
        padding: 0 16px;
    }

    .ucp-top-actions .ucp-icon-button {
        display: none;
    }

    .ucp-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .character-body,
    .money-row {
        grid-template-columns: 1fr;
    }

    .money-row button {
        width: 100%;
    }
}

/* --- Főoldal hub --- */
.home-hub {
    display: grid;
    gap: 28px;
}

.home-section-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.home-section-lead {
    margin: 0 0 14px;
    color: #9aa8bf;
    font-size: 14px;
    line-height: 1.5;
}

.home-news-list {
    margin: 0;
    padding-left: 20px;
    color: #c5d0e3;
    font-size: 14px;
    line-height: 1.55;
}

.home-launcher-block .home-download-btn {
    display: inline-flex;
    margin-top: 8px;
    text-decoration: none;
    align-items: center;
    justify-content: center;
}

.home-quick-grid {
    margin-top: 0;
}

/* --- UCP bővített nézetek --- */
.ucp-view-head h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--text);
}

.ucp-view-head p {
    margin: 0 0 18px;
    color: #8b98ae;
    font-size: 13px;
    line-height: 1.45;
}

.ucp-placeholder-block {
    padding: 22px;
    background: linear-gradient(180deg, rgba(13, 24, 44, 0.88), rgba(8, 16, 30, 0.82));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: #aeb9cd;
    font-size: 14px;
    line-height: 1.55;
}

.ucp-placeholder-block h2 {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ucp-inline-link {
    color: #4b8dff;
}

.text-action {
    border: 0;
    padding: 0;
    color: #8fb8ff;
    background: transparent;
    font-weight: 800;
    cursor: pointer;
}

.text-action:hover {
    color: #fff;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.admin-grid .ucp-card {
    min-height: 260px;
}

.ucp-list-panel {
    display: grid;
    gap: 10px;
}

.request-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    background: rgba(5, 9, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.request-row span {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.request-row strong,
.request-row small {
    overflow-wrap: anywhere;
}

.request-row strong {
    color: #fff;
    font-size: 13px;
}

.request-row small {
    color: #8b98ae;
    font-size: 12px;
}

.request-row em {
    flex: 0 0 auto;
    padding: 5px 8px;
    color: #9fd1ff;
    background: rgba(77, 141, 255, 0.13);
    border: 1px solid rgba(77, 141, 255, 0.28);
    border-radius: 999px;
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
}

.download-card {
    max-width: 460px;
}

.download-card .primary-action {
    text-decoration: none;
}

.sql-browser {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 14px;
    min-height: 520px;
}

.sql-sidebar,
.sql-main {
    background: linear-gradient(180deg, rgba(13, 24, 44, 0.9), rgba(8, 16, 30, 0.86));
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.sql-sidebar {
    padding: 12px;
    overflow: auto;
}

.sql-sidebar h3 {
    margin: 12px 8px 8px;
    color: #8fb8ff;
    font-size: 12px;
    text-transform: uppercase;
}

.sql-sidebar button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    padding: 8px;
    color: #dce7f7;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
}

.sql-sidebar button:hover {
    background: rgba(77, 141, 255, 0.12);
}

.sql-sidebar span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.sql-sidebar small {
    color: #7f8ca5;
}

.sql-main {
    min-width: 0;
    overflow: hidden;
}

.sql-toolbar {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
}

.sql-toolbar span {
    color: #8b98ae;
    font-size: 12px;
}

.sql-table-wrap {
    overflow: auto;
    max-height: 620px;
}

.sql-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.sql-table-wrap th,
.sql-table-wrap td {
    max-width: 260px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #dce7f7;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.sql-table-wrap th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #8fb8ff;
    background: #08101e;
    font-weight: 800;
}

.ucp-char-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ucp-char-slot {
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(5, 9, 20, 0.55);
}

.ucp-char-slot.is-active {
    border-color: rgba(17, 103, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(17, 103, 255, 0.2);
}

.ucp-char-slot h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #fff;
}

.ucp-char-slot-meta {
    margin: 0 0 12px;
    font-size: 12px;
    color: #8b98ae;
}

.ucp-char-slot dl {
    margin: 0;
    display: grid;
    gap: 8px;
    font-size: 13px;
}

.ucp-char-slot dt {
    color: #7f8ca5;
    font-weight: 700;
}

.ucp-char-slot dd {
    margin: 0;
    color: #e2e9f4;
}

.vehicle-row.ucp-veh-detail em {
    font-style: normal;
    font-size: 11px;
    line-height: 1.35;
    text-align: right;
    max-width: 200px;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .sql-browser {
        grid-template-columns: 1fr;
    }

    .ucp-char-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ucp-content {
        padding: 18px 14px 24px;
    }

    .ucp-topbar {
        padding: 0 12px;
        gap: 8px;
    }

    .ucp-top-actions {
        gap: 6px;
    }

    .ucp-user small,
    .ucp-user .fa-chevron-down {
        display: none;
    }

    .ucp-heading {
        align-items: stretch;
    }

    .character-picker {
        min-width: 0;
        width: 100%;
    }

    .ucp-card {
        min-height: auto;
        padding: 15px;
    }

    .character-body {
        grid-template-columns: 1fr;
    }

    .character-model {
        min-height: 110px;
        border-radius: 12px;
    }

    .request-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .request-row em {
        align-self: flex-start;
    }

    .sql-toolbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px;
    }
}
