/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #000000;
    --bg-elevated: #0f0f0f;
    --bg-card: #111111;
    --border: #1f1f1f;
    --text: #f97316;
    --text-muted: #a0a0a0;
    --text-dim: #606060;
    --accent: #f97316;
    --accent-hover: #ea580c;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* ── Product Select Screen ────────────────────────────────────────────────── */
.psel-screen {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(2px);
}

.psel-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    padding: 24px;
    width: 100%;
    max-width: 700px;
}

.psel-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    margin-bottom: 4px;
}

.psel-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.psel-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.3px;
}

.psel-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.psel-cards {
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.psel-card {
    flex: 1;
    min-width: 220px;
    max-width: 290px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px 28px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, background 0.15s;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.psel-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.03);
    opacity: 0;
    transition: opacity 0.15s;
}

.psel-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    background: #161616;
}

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

.psel-card:active {
    transform: translateY(0);
}

.psel-card-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 14px;
}

.psel-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.psel-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

.psel-card-arrow {
    color: var(--text-dim);
    margin-top: 4px;
    transition: transform 0.15s, color 0.15s;
}

.psel-card:hover .psel-card-arrow {
    transform: translateX(4px);
    color: var(--text);
}

/* ── Landing Page ─────────────────────────────────────────────────────────── */
.landing-screen {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    background: var(--bg);
}

/* Nav */
.lp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.lp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-logo-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

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

/* Buttons */
.lp-btn-primary {
    padding: 8px 18px;
    background: var(--text);
    border: 1px solid var(--text);
    border-radius: 6px;
    color: var(--bg);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.lp-btn-primary:hover {
    opacity: 0.88;
}

.lp-btn-ghost {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.lp-btn-ghost:hover {
    border-color: rgba(255,255,255,0.3);
    color: var(--text);
}

/* Sections */
.lp-section {
    padding: 72px 48px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.lp-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
    width: 100%;
}

/* Hero */
.lp-hero {
    padding: 96px 48px 80px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.lp-hero-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.lp-hero-title {
    font-size: 72px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text);
    margin-bottom: 24px;
}

.lp-hero-sub {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 12px;
    max-width: 520px;
    line-height: 1.5;
}

.lp-hero-desc {
    font-size: 14px;
    color: var(--text-dim);
    max-width: 480px;
    line-height: 1.7;
    margin-bottom: 36px;
}

.lp-hero-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Feature grid */
.lp-section-label {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 32px;
}

.lp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.lp-card {
    background: var(--bg);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.15s;
}

.lp-card:hover {
    background: var(--bg-elevated);
}

.lp-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.lp-card-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Statement */
.lp-statement-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.lp-statement {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    max-width: 600px;
    line-height: 1.2;
}

.lp-statement-sub {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 420px;
    line-height: 1.7;
}

/* Numbered pillars */
.lp-pillars {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.lp-pillar {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding: 36px 0;
    border-bottom: 1px solid var(--border);
}

.lp-pillar:first-child {
    padding-top: 48px;
}

.lp-pillar:last-child {
    border-bottom: none;
    padding-bottom: 48px;
}

.lp-pillar-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    flex-shrink: 0;
    padding-top: 3px;
    width: 28px;
}

.lp-pillar-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lp-pillar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.lp-pillar-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Footer */
.lp-footer {
    border-top: 1px solid var(--border);
    padding: 56px 48px 40px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.lp-footer-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.lp-footer-tag {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.lp-footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.lp-footer-copy {
    font-size: 12px;
    color: var(--text-dim);
}

/* Mobile */
@media (max-width: 768px) {
    .lp-nav     { padding: 16px 20px; }
    .lp-hero    { padding: 64px 20px 48px; }
    .lp-section { padding: 48px 20px; }
    .lp-footer  { padding: 40px 20px 32px; }

    .lp-hero-title  { font-size: 42px; }
    .lp-hero-sub    { font-size: 15px; }
    .lp-statement   { font-size: 26px; }

    .lp-grid { grid-template-columns: 1fr; }

    .lp-footer-cta    { flex-direction: column; align-items: flex-start; }
    .lp-footer-bottom { flex-direction: column; gap: 6px; }
}

/* Auth Screen */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: var(--bg-card);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
}

.auth-tab {
    padding: 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: rgba(255,255,255,0.05);
    border-color: var(--border);
    color: var(--text);
}

.auth-content {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.auth-content.active {
    display: block;
}

.auth-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 32px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.password-group {
    display: flex;
    gap: 8px;
}

.password-group input {
    flex: 1;
}

.btn-eye {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-eye:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-submit {
    padding: 8px 16px;
    background: #f97316;
    border: 1px solid #c2410c;
    border-radius: 6px;
    color: #111111;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
}

.btn-submit:hover {
    background: #ea580c;
    border-color: #9a3412;
}

/* Dashboard */
.dashboard {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 13px;
    font-weight: 600;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-dim);
}

.btn-menu {
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-menu:hover {
    background: var(--bg-card);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 8px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0 12px;
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.nav-link:hover {
    background: var(--bg-card);
    color: var(--text);
}

.nav-link.active {
    background: var(--bg-card);
    color: var(--text);
}

.nav-link svg {
    flex-shrink: 0;
}

.badge-risky {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: #ef4444;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    position: relative;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.user-badge:hover {
    background: var(--bg-card);
}

.user-emoji {
    font-size: 24px;
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
}

.user-role {
    font-size: 11px;
    color: var(--text-dim);
}

.user-menu-icon {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.user-badge:hover .user-menu-icon {
    color: var(--text);
}

/* User Menu Dropdown */
.user-menu {
    position: absolute;
    bottom: 100%;
    left: 8px;
    right: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 8px;
    display: none;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.user-menu.active {
    display: flex;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.user-menu-item:hover {
    background: var(--bg-elevated);
}

.user-menu-item svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.user-menu-item:hover svg {
    color: var(--text);
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Product Switch (sidebar footer) ─────────────────────────────────────── */
.product-switch-wrap {
    position: relative;
    margin-bottom: 4px;
}

.product-switch-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: rgba(255,255,255,0.78);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    text-align: left;
}

.product-switch-btn:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.28);
    color: #f97316;
}

.product-switch-btn span { flex: 1; }

.product-switch-btn.open {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.28);
    color: #f97316;
}

#productChevron { transition: transform .2s; flex-shrink: 0; }

.product-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    display: none;
    flex-direction: column;
    box-shadow: 0 -4px 16px rgba(0,0,0,.5);
    z-index: 200;
}

.product-menu.open { display: flex; }

.product-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.product-menu-item:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

.product-menu-item.active {
    color: var(--text);
    background: rgba(255,255,255,.06);
}

.product-menu-item svg { flex-shrink: 0; }

.admin-product-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    padding: 3px;
    width: fit-content;
}

.admin-ptab {
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255,255,255,0.62);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    padding: 6px 16px;
    transition: background .15s, color .15s;
}

.admin-ptab:hover { color: #f97316; background: rgba(255,255,255,.08); }

.admin-ptab.active {
    background: rgba(255,255,255,.16);
    color: #f97316;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.breadcrumb-item {
    color: var(--text-muted);
}

.breadcrumb-sep {
    color: var(--text-dim);
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    font-weight: 500;
}

.info-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.info-value {
    font-weight: 600;
    font-size: 13px;
}

.badge {
    background: var(--bg-elevated);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Circle */
.circle-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 20px auto;
}

.circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--bg-elevated);
    stroke-width: 12;
}

.circle-progress {
    fill: none;
    stroke: var(--text-dim);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s;
}

.circle-progress.active {
    stroke: var(--accent);
}

.circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.circle-main {
    font-size: 20px;
    font-weight: 700;
}

.circle-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.card-footer {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
}

.card-footer a {
    color: var(--accent);
    text-decoration: underline;
}

/* Graph */
.graph-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.graph-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.graph-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

#chart {
    width: 100%;
    height: 200px;
}

.graph-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-top: 12px;
    justify-content: center;
}

.legend-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

/* Redeem */
.redeem-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    max-width: 600px;
}

.redeem-card label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.redeem-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    margin-bottom: 4px;
}

.redeem-input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-redeem {
    margin-top: 16px;
    padding: 8px 16px;
    background: #f97316;
    border: 1px solid #c2410c;
    border-radius: 6px;
    color: #111111;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-redeem:hover {
    background: #ea580c;
    border-color: #9a3412;
}

/* Settings */
.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    max-width: 800px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-row label {
    font-size: 13px;
    font-weight: 500;
}

.setting-input-group {
    display: flex;
    gap: 8px;
}

.setting-input {
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 12px;
    min-width: 300px;
}

.setting-input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-icon {
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* ── Graph header ─────────────────────────────────────────────────────────── */
.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.total-injections-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

#chart {
    width: 100%;
    height: 200px;
    display: block;
}

/* ── Admin Switch Button ──────────────────────────────────────────────────── */
.admin-switch-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    transition: all 0.2s;
    text-align: left;
}

.admin-switch-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
    color: var(--accent);
}

.admin-switch-btn.active {
    background: rgba(255,255,255,0.06);
    border-color: var(--accent);
    color: var(--accent);
}

.admin-switch-btn svg {
    flex-shrink: 0;
}

/* ── Admin Toolbar ────────────────────────────────────────────────────────── */
.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-generate-key {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f97316;
    border: 1px solid #c2410c;
    border-radius: 6px;
    color: #111111;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-generate-key:hover {
    background: #ea580c;
    border-color: #9a3412;
}

.btn-danger-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #dc2626;
    border: 1px solid #b91c1c;
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-toolbar:hover {
    background: #b91c1c;
    border-color: #991b1b;
}

.btn-impersonate {
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.4);
    background: rgba(244, 114, 182, 0.08);
}

.btn-impersonate:hover {
    background: rgba(244, 114, 182, 0.18);
    border-color: #f472b6;
    color: #fbcfe8;
}

.btn-promote {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
}

.btn-promote:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: #f59e0b;
    color: #fcd34d;
}

.status-role-user {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.status-role-admin {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.admin-stats-row {
    display: flex;
    gap: 24px;
}

.admin-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.admin-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.admin-stat-active  { color: #22c55e; }
.admin-stat-unused  { color: var(--accent); }
.admin-stat-expired { color: #ef4444; }

.admin-stat-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ── Admin Table ──────────────────────────────────────────────────────────── */
.admin-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.table-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 32px 16px !important;
}

/* Key cell */
.key-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.key-mono {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.btn-copy {
    padding: 4px 6px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.btn-copy:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-unused      { background: rgba(255,255,255,0.08); color: var(--accent); }
.status-active      { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }
.status-expired     { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.status-undetected  { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }

/* HWID cell */
.hwid-cell {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    color: var(--text-muted);
    cursor: default;
}

.text-dim {
    color: var(--text-dim);
}

/* Action buttons */
.action-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid #c2410c;
    background: #f97316;
    color: #111111;
    white-space: nowrap;
}

.btn-extend {
    color: #111111;
    border-color: #c2410c;
    background: #f97316;
}

.btn-extend:hover {
    background: #ea580c;
    border-color: #9a3412;
}

.btn-reset-hwid {
    color: #111111;
    background: #f97316;
    border-color: #c2410c;
}

.btn-reset-hwid:hover {
    background: #ea580c;
    border-color: #9a3412;
}

.btn-delete {
    color: #ffffff;
    border-color: #b91c1c;
    background: #dc2626;
}

.btn-delete:hover {
    background: #b91c1c;
    border-color: #991b1b;
}

.btn-primary {
    background: #f97316 !important;
    border-color: #c2410c !important;
    color: #111111 !important;
}

.btn-primary:hover {
    background: #ea580c !important;
    border-color: #9a3412 !important;
}

.btn-disabled {
    opacity: 0.35;
    cursor: not-allowed !important;
}

/* ── Inject Page ──────────────────────────────────────────────────────────── */
.inject-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 420px;
}

.inject-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.inject-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.3s;
}

.inject-status-dot.dot-online {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.55);
}

.inject-status-dot.dot-offline {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.btn-inject {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: #f97316;
    color: #111111;
    border: 1px solid #c2410c;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s, transform 0.1s;
    letter-spacing: 0.02em;
}

.btn-inject:hover:not(:disabled) {
    background: #ea580c;
    border-color: #9a3412;
    transform: translateY(-1px);
}

.btn-inject:active:not(:disabled) {
    transform: translateY(0);
}

.btn-inject-disabled,
.btn-inject:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.inject-hint {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

/* ── Toast Notification ───────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

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

.toast.toast-success {
    background: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.toast.toast-error {
    background: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ── Inject page fields ───────────────────────────────────────────────────── */
.inject-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.inject-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inject-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inject-input {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    font-family: 'Consolas', 'Courier New', monospace;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.inject-input:focus {
    border-color: var(--accent);
}

.btn-browser {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.btn-browser:hover {
    border-color: var(--accent);
    color: var(--text);
}

.btn-browser:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 420px;
    max-width: 90vw;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}

.modal-close:hover { color: var(--text); }

.modal-body {
    padding: 18px;
}

.modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
}

.btn-cancel {
    background: var(--bg-elevated) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border) !important;
}

.btn-cancel:hover {
    color: var(--text) !important;
    border-color: #3f3f3f !important;
}

/* ── Ban badge ───────────────────────────────────────────────────────────────── */
.status-banned {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}

/* ── Audit feed ──────────────────────────────────────────────────────────────── */
.audit-feed {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    max-height: 600px;
    overflow-y: auto;
    padding: 8px 0;
}

.audit-empty {
    padding: 16px 16px;
    color: var(--text-dim);
    font-family: inherit;
}

.audit-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 4px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    line-height: 1.5;
}

.audit-row:last-child { border-bottom: none; }

.audit-ts {
    color: var(--text-dim);
    min-width: 80px;
    flex-shrink: 0;
}

.audit-action {
    font-weight: 600;
    min-width: 140px;
    flex-shrink: 0;
}

.audit-actor {
    color: var(--text-muted);
    min-width: 80px;
    flex-shrink: 0;
}

/* ── Sessions table tweak ────────────────────────────────────────────────────── */
.admin-stat-sessions {
    color: #22c55e;
}

/* ── Password change form ────────────────────────────────────────────────────── */
#passwordChangeForm {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    margin-top: 8px;
}

/* ── Screen Viewer ───────────────────────────────────────────────────────────── */
.screen-viewer {
    display: flex;
    flex-direction: column;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.screen-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.screen-viewer-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.screen-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: screen-pulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes screen-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.screen-viewer-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.screen-fps {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: 'Courier New', monospace;
    min-width: 48px;
    text-align: right;
}

.screen-close-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #dc2626;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.screen-close-btn:hover { background: #b91c1c; }

.screen-canvas {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

.screen-waiting {
    padding: 60px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ── Password requirements list ──────────────────────────────────────────────── */
.pwd-requirements {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--text-dim);
}
.pwd-requirements li {
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pwd-requirements li::before {
    content: "✗";
    color: #ef4444;
    font-weight: 700;
    width: 12px;
    flex-shrink: 0;
}
.pwd-requirements li.req-met { color: var(--text-muted); }
.pwd-requirements li.req-met::before { content: "✓"; color: #22c55e; }

/* ── Mobile overlay ───────────────────────────────────────────────────────────── */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 199;
}
.mobile-overlay.visible { display: block; }

/* ── Mobile hamburger button (hidden on desktop) ────────────────────────────── */
.btn-mobile-menu {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
}
.btn-mobile-menu:hover { background: var(--surface-2); color: var(--text); }

/* ── Responsive breakpoint ───────────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Show hamburger in header */
    .btn-mobile-menu { display: flex; }

    /* Header: flex row, hamburger left, breadcrumb right */
    .header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
    }
    .breadcrumb { flex: 1; min-width: 0; }
    .breadcrumb-item { font-size: 0.8rem; }

    /* Sidebar becomes a fixed off-canvas drawer */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }
    .sidebar.mobile-open { transform: translateX(0); }

    /* Main takes the full viewport width */
    .main { width: 100%; min-width: 0; }

    /* Content padding tighter on mobile */
    .content { padding: 14px; }

    /* Page title smaller */
    .page-title { font-size: 18px; margin-bottom: 16px; }

    /* Cards: single column */
    .cards { grid-template-columns: 1fr; gap: 12px; }

    /* Setting rows stack vertically */
    .setting-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .setting-input { min-width: unset; width: 100%; }
    .setting-input-group { width: 100%; flex-direction: column; align-items: flex-start; }
    .setting-input-group .setting-input { width: 100%; }

    /* Admin toolbar wraps and stacks */
    .admin-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .admin-toolbar-left, .admin-toolbar-right { flex-wrap: wrap; gap: 8px; }
    .admin-search { width: 100%; min-width: unset; }

    /* Stats row wraps */
    .admin-stats-row { flex-wrap: wrap; gap: 12px; }
    .admin-stat { flex: 1 1 calc(50% - 12px); min-width: 120px; }

    /* Bulk actions bar */
    .bulk-bar { flex-wrap: wrap; gap: 8px; }

    /* Modal nearly full width */
    .modal-box { width: 95vw; padding: 20px; }

    /* Generate key form */
    .generate-form { flex-direction: column; }
    .generate-form .setting-input { width: 100%; }

    /* Auth screen already has padding; just ensure inputs don't overflow */
    .auth-container { padding: 24px 18px; }

    /* Configs page publish card */
    .config-publish-card { padding: 16px; }
    .config-search-bar { flex-direction: column; }
    .config-search-bar input { width: 100%; }

    /* Audit log rows — truncate long tokens */
    .audit-value {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Inject buttons wrap */
    .inject-buttons { flex-wrap: wrap; }
    .inject-btn { flex: 1 1 calc(50% - 8px); }

    /* Gambling — stack on mobile */
    .rps-btn { padding: 14px 16px; min-width: 64px; }
    .bj-card { width: 38px; height: 54px; font-size: 0.85rem; }
}

/* ── Gambling ─────────────────────────────────────────────────────────────────── */
.gambling-balance-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.gambling-chips-display {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.chip-coin { font-size: 1.2rem; }
.chip-count {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.chip-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    align-self: flex-end;
    margin-bottom: 2px;
}

.gambling-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.gtab {
    padding: 7px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.gtab:hover { background: var(--bg-elevated); color: var(--text); }
.gtab.active {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    color: var(--accent);
    font-weight: 600;
}

.gambling-game {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

.gambling-bet-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.bet-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.gambling-result {
    min-height: 28px;
    margin-top: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    padding: 6px 12px;
}
.result-win  { color: #22c55e; background: rgba(34,197,94,0.08); }
.result-lose { color: #ef4444; background: rgba(239,68,68,0.08); }
.result-push { color: #eab308; background: rgba(234,179,8,0.08); }

/* Roulette Wheel */
.roulette-wheel-wrap {
    display: flex;
    justify-content: center;
    padding-top: 12px;
    margin-bottom: 12px;
}
#rouletteCanvas {
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 8px 32px rgba(0,0,0,0.6);
    cursor: default;
}

/* Blackjack */
.bj-table {
    background: rgba(0,70,25,0.25);
    border: 1px solid rgba(34,197,94,0.12);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}
.bj-section { margin-bottom: 12px; }
.bj-section:last-child { margin-bottom: 0; }
.bj-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.bj-value { color: var(--accent); font-size: 0.85rem; margin-left: 4px; }
.bj-cards  { display: flex; gap: 8px; flex-wrap: wrap; min-height: 68px; }
.bj-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 12px 0;
}
.bj-card {
    width: 44px;
    height: 64px;
    background: #fff;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.15;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    flex-shrink: 0;
}
.bj-card-back {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: rgba(255,255,255,0.35);
    font-size: 1.2rem;
    font-weight: 400;
}
.bj-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Minesweeper */
.mines-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
    justify-content: center;
}
.mines-mult {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.mines-mult-label { font-size: 0.8rem; color: var(--text-dim); }

.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 12px;
    max-width: 340px;
}
.mine-cell {
    aspect-ratio: 1;
    border-radius: 6px;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mine-hidden    { background: var(--bg-elevated); border: 1px solid var(--border); }
.mine-hidden:hover { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.2); }
.mine-safe      { background: rgba(34,197,94,0.2);  border: 1px solid rgba(34,197,94,0.4);  color: #22c55e; cursor: default; }
.mine-bomb      { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3);  cursor: default; }
.mine-exploded  { background: rgba(239,68,68,0.4);  border: 1px solid #ef4444;              cursor: default; }

/* Rock Paper Scissors */
.rps-choices {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.rps-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 24px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 80px;
}
.rps-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}
.rps-emoji { font-size: 2rem; }
.rps-name  { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.rps-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* RPS Battle Animation */
.rps-battle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 16px 0 20px;
}
.rps-fighter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.rps-fighter-emoji {
    font-size: 3.6rem;
    line-height: 1;
    min-width: 64px;
    text-align: center;
    display: block;
}
.rps-fighter-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    text-transform: uppercase;
}
.rps-vs {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    padding-bottom: 22px;
}

@keyframes rpsSlideIn {
    from { opacity: 0; transform: translateX(-32px) scale(0.55); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes rpsFlipReveal {
    0%   { opacity: 0; transform: rotateY(90deg) scale(0.5); }
    55%  { transform: rotateY(-12deg) scale(1.2); }
    100% { opacity: 1; transform: rotateY(0deg) scale(1); }
}
@keyframes rpsWinGlow {
    0%   { background: transparent; }
    30%  { background: rgba(34,197,94,0.07); }
    100% { background: transparent; }
}
@keyframes rpsLoseShake {
    0%, 100% { transform: translateX(0); }
    15%       { transform: translateX(-9px); }
    30%       { transform: translateX(9px); }
    45%       { transform: translateX(-7px); }
    60%       { transform: translateX(7px); }
    75%       { transform: translateX(-4px); }
    90%       { transform: translateX(4px); }
}

.rps-slide-in  { animation: rpsSlideIn   0.42s cubic-bezier(0.34,1.56,0.64,1) both; }
.rps-flip-in   { animation: rpsFlipReveal 0.48s cubic-bezier(0.34,1.56,0.64,1) both; }
.rps-win-glow  { animation: rpsWinGlow   0.9s ease-out both; }
.rps-lose-shake { animation: rpsLoseShake 0.55s ease-out both; }

/* ── Wireframe canvas ─────────────────────────────────────────────────────── */
#wireframeCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}
.auth-screen,
#forceChangeScreen,
#dashboard,
.landing-screen {
    position: relative;
    z-index: 1;
}
#toast, .modal-overlay {
    z-index: 1000;
}
