:root {
    --bg: #0b1220;
    --bg-elevated: #0f1728;
    --surface: #111a2b;
    --surface-2: #162235;
    --surface-3: #1b2a42;

    --border: #23324a;
    --border-strong: #314766;

    --text: #e8eef8;
    --text-soft: #c9d6ea;
    --muted: #8fa1ba;

    --primary: #4f8cff;
    --primary-hover: #6aa0ff;

    --gold: #d4a94d;
    --gold-soft: rgba(212, 169, 77, 0.14);

    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.15);

    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.16);

    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.14);

    --info: #38bdf8;
    --info-soft: rgba(56, 189, 248, 0.16);

    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.26);
    --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.18);

    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --content-width: 1680px;
    --sidebar-width: 220px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(79, 140, 255, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 25%),
        linear-gradient(180deg, #0b1220 0%, #0a101b 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    border-right: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(180deg, rgba(17,26,43,0.96), rgba(10,16,27,0.96));
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 12px 18px;
    margin-bottom: 18px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    display: block;
    background: linear-gradient(180deg, rgba(79,140,255,0.22), rgba(79,140,255,0.10));
    border: 1px solid rgba(79,140,255,0.30);
    box-shadow: 0 8px 20px rgba(79,140,255,0.16);
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-title {
    font-size: 1.05rem;
    font-weight: 800;
}

.brand-subtitle {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    color: var(--text-soft);
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
    color: var(--text);
}

.nav-link.active {
    background: linear-gradient(180deg, rgba(79,140,255,0.20), rgba(79,140,255,0.10));
    border-color: rgba(79,140,255,0.28);
    color: #f5f9ff;
    box-shadow: 0 10px 22px rgba(79,140,255,0.12);
}

.nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: -2px 0 4px 40px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.08);
}

.nav-sublink {
    display: block;
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 760;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-sublink:hover,
.nav-sublink.active {
    color: var(--text);
    background: rgba(79,140,255,0.12);
}

.nav-link-danger:hover {
    background: rgba(239,68,68,0.10);
    border-color: rgba(239,68,68,0.18);
    color: #fee2e2;
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    text-align: center;
    font-size: 1.08rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.22));
    flex-shrink: 0;
}

.main-content {
    padding: 28px;
    width: 100%;
}

.page-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
}

.topbar {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.eyebrow {
    font-size: 0.78rem;
    color: var(--primary-hover);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-title {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.user-chip {
    min-width: 220px;
    padding: 10px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-sm);
}

.user-chip-label {
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
}

.user-chip-name {
    margin-top: 4px;
    font-weight: 800;
    color: var(--text);
}

body.beta-mode {
    position: relative;
    overflow-x: hidden;
}

body.beta-mode::before {
    content: "BETA";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: clamp(96px, 12vw, 220px);
    font-weight: 900;
    letter-spacing: 0.28em;
    color: rgba(239, 68, 68, 0.07);
    text-shadow: 0 0 2px rgba(239, 68, 68, 0.05);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 0;
}

body.beta-mode .app-shell {
    position: relative;
    z-index: 1;
}

.beta-ribbon {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 2001;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(185, 28, 28, 0.94);
    color: #fff7ed;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    box-shadow: 0 12px 24px rgba(127, 29, 29, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.user-chip-meta {
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(245,158,11,0.22), rgba(239,68,68,0.12));
    border: 1px solid rgba(245,158,11,0.34);
    box-shadow: var(--shadow-sm);
}

.impersonation-banner strong,
.impersonation-banner span {
    display: block;
}

.impersonation-banner span {
    margin-top: 3px;
    color: var(--text-soft);
}

.hero-banner {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 26px;
    background:
        linear-gradient(135deg, rgba(79,140,255,0.20), rgba(79,140,255,0.06)),
        linear-gradient(180deg, rgba(22,34,53,0.98), rgba(17,26,43,0.98));
    border: 1px solid rgba(79,140,255,0.16);
    box-shadow: var(--shadow-lg);
}

.card {
    background:
        linear-gradient(180deg, rgba(22,34,53,0.98), rgba(17,26,43,0.98));

    border: 1px solid rgba(79, 140, 255, 0.18);
    border-radius: var(--radius-xl);

    box-shadow:
        0 12px 28px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.card + .card {
    margin-top: 18px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 0;
    border-bottom: 1px solid rgba(79,140,255,0.12);
    padding-bottom: 14px;
}

.card-title {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
}

.card-subtitle {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.92rem;
}

.card-body {
    padding: 22px 24px 24px;
}

.text-gold {
    color: #f2d187;
}

.glow-gold {
    text-shadow: 0 0 10px rgba(212,169,77,0.4);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: var(--shadow-sm);
}

.stat-label {
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.stat-foot {
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 700;
    color: white;
    transition: transform 0.08s ease, filter 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(180deg, var(--primary-hover), var(--primary));
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 10px 22px rgba(79,140,255,0.22);
}

.btn-secondary {
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border-color: rgba(255,255,255,0.08);
}

.btn-success {
    background: linear-gradient(180deg, #34d399, var(--success));
    box-shadow: 0 10px 22px rgba(34,197,94,0.18);
}

.btn-warning {
    background: linear-gradient(180deg, #fbbf24, var(--warning));
    color: #111827;
    box-shadow: 0 10px 22px rgba(245,158,11,0.18);
}

.btn-danger {
    background: linear-gradient(180deg, #f87171, var(--danger));
    box-shadow: 0 10px 22px rgba(239,68,68,0.18);
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
    border: 1px solid transparent;
}

.pill-success {
    color: #bbf7d0;
    background: var(--success-soft);
    border-color: rgba(34,197,94,0.24);
}

.pill-warning {
    color: #fde68a;
    background: var(--warning-soft);
    border-color: rgba(245,158,11,0.26);
}

.pill-danger {
    color: #fecaca;
    background: var(--danger-soft);
    border-color: rgba(239,68,68,0.24);
}

.pill-info {
    color: #bae6fd;
    background: var(--info-soft);
    border-color: rgba(56,189,248,0.24);
}

.pill-gold {
    color: #f4dfaa;
    background: var(--gold-soft);
    border-color: rgba(212,169,77,0.26);
}

.pill-neutral {
    color: var(--text-soft);
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

.table-shell {
    overflow: visible;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

.table-scroll {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.table thead th {
    text-align: left;
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    padding: 16px 18px;
    background: rgba(255,255,255,0.025);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.table tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: middle;
}

.table tbody tr {
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.03),
        rgba(255,255,255,0.015)
    );

    border: 1px solid rgba(255,255,255,0.05);
}

.table tbody tr:hover {
    background: rgba(79,140,255,0.10);
    box-shadow: 0 6px 16px rgba(79,140,255,0.15);
}

.btn-success {
    box-shadow: 0 0 12px rgba(34,197,94,0.4);
}

.btn-warning {
    box-shadow: 0 0 12px rgba(245,158,11,0.4);
}

.cell-title {
    font-weight: 800;
    color: var(--text);
}

.cell-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.muted {
    color: var(--muted);
}

.site-footer {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 26px;
    padding: 18px 2px 6px;
    color: var(--muted);
    font-size: 0.92rem;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.site-footer-heading {
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.site-footer-empty {
    color: var(--muted);
    font-size: 0.9rem;
}

.downloads-panel {
    padding: 22px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.025);
}

.downloads-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.downloads-panel-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.3rem;
}

.downloads-panel-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.download-card {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(13, 22, 38, 0.82);
}

.download-logo {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(79,140,255,0.16);
    border: 1px solid rgba(79,140,255,0.22);
    color: #dbeafe;
    font-size: 1.4rem;
    font-weight: 900;
}

.download-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.download-card-body {
    min-width: 0;
}

.download-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

.download-card p {
    margin: 6px 0 0;
    color: var(--text-soft);
    line-height: 1.45;
    font-size: 0.92rem;
}

.download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.download-button {
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 40px;
}

.download-card-captcha {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
}

.download-card-captcha label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.download-card-captcha input {
    width: 100%;
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(9, 14, 24, 0.74);
    color: var(--text);
}

.download-card-captcha input:focus {
    outline: none;
    border-color: rgba(79,140,255,0.50);
    box-shadow: 0 0 0 3px rgba(79,140,255,0.12);
}

.download-card-captcha .download-button:disabled {
    cursor: not-allowed;
    opacity: 1;
    color: var(--muted);
    background: rgba(148,163,184,0.16);
    border-color: rgba(148,163,184,0.18);
    box-shadow: none;
}

.downloads-empty {
    padding: 22px;
    border-radius: 14px;
    border: 1px dashed rgba(255,255,255,0.14);
    color: var(--muted);
    text-align: center;
}

.download-gate-panel {
    max-width: 520px;
}

.download-gate-form {
    display: grid;
    gap: 14px;
}

.download-gate-question {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(79,140,255,0.14);
    border: 1px solid rgba(79,140,255,0.24);
    color: var(--text);
    font-weight: 900;
}

.site-footer-version {
    margin-left: auto;
    padding-left: 14px;
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.site-footer a:hover {
    color: var(--text);
}

.login-shell {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 48px);
}

.login-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-footer-wrap {
    margin-top: auto;
    padding-top: 28px;
}

.login-footer-wrap .site-footer {
    justify-content: center;
    margin-top: 0;
    padding-top: 0;
}

.legal-body {
    min-height: 100vh;
}

.onboarding-body {
    min-height: 100vh;
}

.onboarding-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.onboarding-lang-switch {
    justify-content: center;
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 18px;
}

.onboarding-hero {
    overflow: hidden;
}

.onboarding-intro {
    margin: 14px 0 0;
    color: var(--text-soft);
    max-width: 760px;
    line-height: 1.7;
}

.onboarding-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.onboarding-fact {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.onboarding-fact-label {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.onboarding-fact-value {
    margin-top: 8px;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text);
    overflow-wrap: anywhere;
}

.onboarding-section-grid,
.onboarding-role-grid,
.onboarding-detail-grid {
    display: grid;
    gap: 18px;
    margin-top: 18px;
    align-items: stretch;
}

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

.onboarding-role-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.onboarding-step-card,
.onboarding-role-card {
    min-height: 100%;
}

.onboarding-detail-grid > .card,
.onboarding-section-grid > .card,
.onboarding-role-grid > .card {
    min-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

.onboarding-section-grid > .card .card-body,
.onboarding-role-grid > .card .card-body,
.onboarding-detail-grid > .card .card-body {
    flex: 1;
}

.onboarding-list {
    margin: 0;
    padding-left: 20px;
    color: var(--text-soft);
}

.onboarding-list li + li {
    margin-top: 10px;
}

.onboarding-role-text {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.onboarding-command-list {
    display: grid;
    gap: 12px;
}

.onboarding-command-item {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.onboarding-command-item code {
    display: inline-block;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(79,140,255,0.12);
    border: 1px solid rgba(79,140,255,0.24);
    color: #dbeafe;
    font-weight: 800;
}

.legal-page-wrap {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 32px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.legal-hero {
    margin-bottom: 22px;
}

.legal-intro {
    margin: 12px 0 0;
    color: var(--muted);
    max-width: 720px;
    line-height: 1.6;
}

.legal-card {
    padding: 26px 30px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(22,34,53,0.98), rgba(17,26,43,0.98));
    border: 1px solid rgba(79, 140, 255, 0.18);
    box-shadow:
        0 12px 28px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.legal-section + .legal-section {
    margin-top: 24px;
}

.legal-section h2 {
    margin: 0 0 10px;
    font-size: 1.08rem;
}

.legal-section p,
.legal-section li {
    color: var(--text-soft);
    line-height: 1.7;
}

.legal-section p {
    margin: 0 0 10px;
}

.legal-section ul {
    margin: 0;
    padding-left: 20px;
}

.legal-footer-wrap {
    margin-top: auto;
    padding-top: 18px;
}

.legal-footer-wrap .site-footer {
    justify-content: center;
    margin-top: 0;
    padding-top: 0;
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .onboarding-role-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .main-content {
        padding: 20px;
    }

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

    .onboarding-section-grid,
    .onboarding-detail-grid,
    .onboarding-facts {
        grid-template-columns: 1fr;
    }
}

.details-panel {
    padding: 14px;
}

.details-table {
    table-layout: auto;
    width: 100%;
}

.details-table th,
.details-table td {
    padding: 9px 10px;
    font-size: 0.92rem;
}

.details-table th {
    font-size: 0.8rem;
}

.details-table td:nth-child(7),
.details-table td:nth-child(8) {
    max-width: 220px;
    word-break: break-word;
}

.details-table td:nth-child(9) {
    white-space: normal;
}
.details-table td:nth-child(10) { white-space: nowrap; } /* Report */

.details-table th:nth-child(9),
.details-table th:nth-child(10) {
    white-space: nowrap;
}

/* UpgradeView darf deutlich breiter sein als normale Admin-Seiten */
.upgradeview-page .page-wrap {
    max-width: none;
    width: 100%;
    padding-right: 12px;
}

.upgradeview-page .main-content {
    padding: 18px 12px 18px 18px;
}

.upgradeview-page .table-shell {
    overflow: visible;
}

.upgradeview-page .table {
    min-width: 0;
}

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

    .page-title {
        font-size: 1.55rem;
    }

    .card-header,
    .card-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .site-footer {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .legal-card {
        padding: 22px 20px;
    }
}

@media (max-width: 980px) {
    .upgradeview-page .page-wrap {
        max-width: calc(100vw - 32px);
    }
}

.public-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-shell {
    flex: 1;
    width: min(980px, calc(100vw - 32px));
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 48px 0 24px;
}

.public-hero {
    width: 100%;
    padding: 36px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(56,189,248,0.16), transparent 30%),
        linear-gradient(180deg, rgba(22,34,53,0.96), rgba(17,26,43,0.98));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-lg);
}

.public-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    letter-spacing: -0.04em;
}

.public-hero p {
    max-width: 720px;
    color: var(--text-soft);
    line-height: 1.6;
}

.public-card {
    margin-top: 24px;
}

.public-user-chip {
    display: inline-block;
    margin-top: 12px;
}

.server-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.server-choice {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
}

.server-choice:hover {
    border-color: rgba(79,140,255,0.40);
    background: rgba(79,140,255,0.08);
}

.server-choice input {
    accent-color: var(--primary);
}

.server-choice strong,
.server-choice small {
    display: block;
}

.server-choice small {
    margin-top: 3px;
    color: var(--muted);
}

.public-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.btn-large {
    padding: 13px 18px;
}

.btn-discord {
    gap: 10px;
}

.btn-discord .discord-mark {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.alert {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.08);
}

.alert-danger {
    color: #fecaca;
    background: var(--danger-soft);
    border-color: rgba(239,68,68,0.22);
}

.empty-state {
    margin-top: 18px;
    padding: 18px;
    border-radius: var(--radius-md);
    color: var(--muted);
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.14);
}

.public-footer {
    width: min(980px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 0 0 24px;
}

.landing-page {
    background:
        radial-gradient(circle at 16% 18%, rgba(79,140,255,0.18), transparent 28%),
        radial-gradient(circle at 84% 34%, rgba(56,189,248,0.12), transparent 26%),
        radial-gradient(circle at 58% 88%, rgba(212,169,77,0.08), transparent 22%),
        linear-gradient(180deg, #070d18 0%, #0b1220 100%);
}

.landing-lang-switch {
    position: fixed;
    top: 22px;
    right: 24px;
    z-index: 20;
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(7,13,24,0.72);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
}

.landing-lang-switch a {
    min-width: 42px;
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--text-soft);
    text-align: center;
    font-weight: 900;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    border: 1px solid transparent;
}

.landing-lang-switch a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

.landing-lang-switch a.active {
    color: #f8fbff;
    background: linear-gradient(180deg, rgba(79,140,255,0.34), rgba(79,140,255,0.14));
    border-color: rgba(79,140,255,0.42);
}

.landing-shell {
    flex: 1;
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 28px;
    align-items: center;
    padding: 56px 0 30px;
}

.landing-topper {
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
    min-height: 214px;
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 28px 70px rgba(0,0,0,0.35);
    background: #0b1220;
}

.landing-topper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.landing-topper::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7,13,24,0.88), rgba(7,13,24,0.34) 48%, rgba(7,13,24,0.78)),
        radial-gradient(circle at 76% 38%, rgba(79,140,255,0.22), transparent 34%);
}

.landing-topper-copy {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 214px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 34px;
}

.landing-topper-copy span {
    color: var(--primary-hover);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 900;
}

.landing-topper-copy strong {
    margin-top: 8px;
    color: #f8fbff;
    font-size: clamp(1.8rem, 4vw, 3.6rem);
    line-height: 0.92;
    letter-spacing: -0.055em;
    text-shadow: 0 16px 34px rgba(0,0,0,0.42);
}

.landing-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    padding: 42px;
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(79,140,255,0.18), rgba(56,189,248,0.06)),
        url("/static/img/brand/raider_tools_banner_fixed.png") center/cover,
        linear-gradient(180deg, rgba(22,34,53,0.98), rgba(17,26,43,0.98));
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: var(--shadow-lg);
}

.landing-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7,13,24,0.94), rgba(7,13,24,0.62) 56%, rgba(7,13,24,0.32)),
        radial-gradient(circle at 74% 24%, rgba(79,140,255,0.28), transparent 32%);
    pointer-events: none;
}

.landing-hero > * {
    position: relative;
    z-index: 1;
}

.landing-brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    padding: 8px 12px 8px 8px;
    margin-bottom: 80px;
    border-radius: 999px;
    background: rgba(7,13,24,0.62);
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--text);
    font-weight: 900;
    letter-spacing: 0.02em;
}

.landing-brand img {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    object-fit: cover;
}

.landing-hero h1 {
    max-width: 720px;
    margin: 0 0 18px;
    font-size: clamp(2.5rem, 6vw, 5.3rem);
    line-height: 0.9;
    letter-spacing: -0.065em;
}

.landing-hero p {
    max-width: 610px;
    margin: 0;
    color: var(--text-soft);
    font-size: 1.08rem;
    line-height: 1.65;
}

.landing-actions {
    display: grid;
    gap: 14px;
}

.landing-card {
    position: relative;
    overflow: hidden;
    min-height: 116px;
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 22px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(22,34,53,0.92), rgba(12,20,34,0.94));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-md);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.landing-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    opacity: 0;
    background: radial-gradient(circle at 18% 50%, rgba(79,140,255,0.32), transparent 34%);
    transition: opacity 0.18s ease;
}

.landing-card > * {
    position: relative;
    z-index: 1;
}

.landing-card:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(79,140,255,0.46);
    box-shadow: 0 20px 44px rgba(79,140,255,0.16), var(--shadow-md);
}

.landing-card:hover::before {
    opacity: 1;
}

.landing-card-primary {
    border-color: rgba(79,140,255,0.36);
    background:
        linear-gradient(135deg, rgba(79,140,255,0.20), rgba(56,189,248,0.08)),
        linear-gradient(180deg, rgba(22,34,53,0.96), rgba(12,20,34,0.96));
}

.landing-card-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #f8fbff;
    font-size: 1.35rem;
    font-weight: 950;
    background: linear-gradient(180deg, rgba(79,140,255,0.24), rgba(79,140,255,0.10));
    border: 1px solid rgba(79,140,255,0.34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 24px rgba(0,0,0,0.18);
}

.discord-mark {
    width: 28px;
    height: 28px;
    display: block;
}

.landing-card strong,
.landing-card small {
    display: block;
}

.landing-card strong {
    font-size: 1.12rem;
    color: var(--text);
}

.landing-card small {
    margin-top: 6px;
    color: var(--text-soft);
    line-height: 1.45;
}

.landing-card em {
    color: var(--primary-hover);
    font-style: normal;
    font-weight: 850;
}

.report-password-form {
    max-width: 560px;
    margin: 28px auto 0;
}

.report-password-card {
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    cursor: default;
}

.report-password-copy {
    min-width: 0;
}

.report-password-input {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(79,140,255,0.22);
    background: rgba(9, 15, 27, 0.82);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.report-password-input:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.7);
    background: rgba(8, 13, 23, 0.96);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.14);
}

.report-password-input::placeholder {
    color: rgba(203, 213, 225, 0.55);
}

.report-password-submit {
    align-items: center;
}

.report-discord-card {
    text-decoration: none;
}

.report-discord-card .landing-card-icon {
    background: linear-gradient(180deg, rgba(88, 101, 242, 0.32), rgba(88, 101, 242, 0.14));
    border-color: rgba(88, 101, 242, 0.42);
}

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

    .landing-topper {
        min-height: 180px;
    }

    .landing-topper-copy {
        min-height: 180px;
        padding: 24px;
    }

    .landing-hero {
        min-height: 420px;
    }
}

@media (max-width: 620px) {
    .landing-lang-switch {
        top: 12px;
        right: 12px;
    }

    .landing-hero {
        padding: 28px;
    }

    .landing-brand {
        margin-bottom: 54px;
    }

    .landing-card {
        grid-template-columns: 48px 1fr;
    }

    .landing-card em {
        grid-column: 2;
    }

    .report-password-card {
        grid-template-columns: 48px 1fr;
    }

    .report-password-input {
        grid-column: 1 / -1;
    }
}

.ops-news-banner {
    margin-top: 18px;
    margin-bottom: 24px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: linear-gradient(135deg, rgba(22, 101, 52, 0.28), rgba(15, 23, 42, 0.82));
    color: #dcfce7;
    box-shadow: 0 14px 32px rgba(0,0,0,0.18);
}

.toast-root {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 240px;
    max-width: min(420px, calc(100vw - 36px));
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 36px rgba(0,0,0,0.28);
    color: #f8fafc;
    font-weight: 700;
    line-height: 1.45;
    transform: translateY(10px);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.96), rgba(21, 128, 61, 0.92));
    border-color: rgba(134, 239, 172, 0.28);
}

.toast-error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.96), rgba(153, 27, 27, 0.92));
    border-color: rgba(252, 165, 165, 0.24);
}

.toast-info {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(30, 64, 175, 0.92));
    border-color: rgba(147, 197, 253, 0.24);
}

.ops-news-banner strong {
    margin-right: 10px;
    color: #bbf7d0;
}

.ops-news-banner-maintenance {
    border-color: rgba(251, 191, 36, 0.38);
    background: linear-gradient(135deg, rgba(146, 64, 14, 0.34), rgba(15, 23, 42, 0.86));
    color: #fef3c7;
}

.ops-news-banner-maintenance strong {
    color: #fde68a;
}
