html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    background:
        radial-gradient(circle at 25% 22%, rgba(255, 102, 71, 0.12), transparent 20%),
        radial-gradient(circle at 75% 24%, rgba(90, 163, 255, 0.13), transparent 22%),
        linear-gradient(90deg, #40070a 0%, #7f1015 18%, #b8181e 40%, #0c1019 50%, #0b2242 60%, #0c3d87 82%, #08234c 100%);
    background-attachment: fixed;
}

/* LANDING PAGE */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 18px 22px;
    box-sizing: border-box;
}

.hero-lockup {
    text-align: center;
    padding-top: 4px;
    margin-bottom: 24px;
}

.patch-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.patch-logo {
    width: min(170px, 42vw);
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,0.38));
}

.title-lockup,
.game-brand-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    line-height: 1;
    text-shadow: 0 5px 18px rgba(0,0,0,0.38);
}

.title-fire,
.title-ems {
    font-size: clamp(42px, 8vw, 84px);
    font-weight: 900;
    letter-spacing: 2px;
    color: #f7fbff;
}

.title-icon,
.title-plus {
    font-size: clamp(28px, 5vw, 56px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.title-plus {
    color: #88c7ff;
    text-shadow: 0 0 18px rgba(88, 174, 255, 0.25);
}

.flame-icon {
    filter: drop-shadow(0 0 16px rgba(255, 101, 52, 0.25));
}

.title-sub,
.game-brand-sub {
    margin-top: 6px;
    font-size: clamp(14px, 2vw, 22px);
    font-weight: 800;
    letter-spacing: 8px;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 3px 10px rgba(0,0,0,0.35);
    text-align: center;
}

.mode-wrapper {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: stretch;
}

.mode {
    min-height: 380px;
    border-radius: 26px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: stretch;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 18px 38px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.07);
    transition: transform .18s ease, box-shadow .18s ease;
    position: relative;
}

.mode:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.08);
}

.mode.fire {
    background:
        radial-gradient(circle at 50% 22%, rgba(255, 176, 76, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.12)),
        linear-gradient(135deg, #54070a 0%, #8e1014 30%, #d32025 72%, #731014 100%);
}

.mode.emt {
    background:
        radial-gradient(circle at 50% 22%, rgba(138, 203, 255, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.12)),
        linear-gradient(135deg, #071731 0%, #0b2f67 30%, #1765d8 72%, #0a2c60 100%);
}

.mode-content {
    width: 100%;
    padding: 34px 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(10,10,14,0.08), rgba(10,10,14,0.26));
    text-align: center;
}

.icon {
    width: 96px;
    max-width: 30%;
    height: auto;
    margin-bottom: 16px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.28));
}

.mode-content h2 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 900;
    text-shadow: 0 4px 14px rgba(0,0,0,0.32);
}

.mode-content p {
    margin: 0 0 24px;
    max-width: 470px;
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    color: rgba(255,255,255,0.93);
}

.mode-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    padding: 15px 24px;
    border-radius: 15px;
    background: linear-gradient(180deg, rgba(15,15,20,0.58), rgba(10,10,14,0.88));
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 12px 24px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 900;
    letter-spacing: .3px;
}

.auth {
    text-align: center;
    padding-top: 18px;
    font-size: clamp(18px, 2.4vw, 28px);
    font-weight: 700;
    text-shadow: 0 3px 12px rgba(0,0,0,0.34);
}

.auth a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 10px;
}

.auth a:hover {
    text-decoration: underline;
}

.auth span {
    opacity: .72;
}

/* GAMEPLAY */
body.game-shell {
    min-height: 100vh;
    overflow-x: hidden;
    color: #f4f7fb;
}

body.game-shell.mode-fire {
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 110, 80, 0.18), transparent 24%),
        radial-gradient(circle at 82% 80%, rgba(255, 150, 72, 0.08), transparent 22%),
        linear-gradient(180deg, #2a0607 0%, #160304 38%, #090102 100%) !important;
}

body.game-shell.mode-emt {
    background:
        radial-gradient(circle at 18% 16%, rgba(90, 170, 255, 0.18), transparent 24%),
        radial-gradient(circle at 82% 80%, rgba(110, 210, 255, 0.09), transparent 22%),
        linear-gradient(180deg, #06172c 0%, #03101d 38%, #02070d 100%) !important;
}

.game-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-topbar {
    display: grid;
    grid-template-columns: 120px 1fr 160px;
    gap: 16px;
    align-items: center;
    padding: 18px 22px 10px;
}

.game-back-btn {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #f5f8fb;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
    font-weight: 700;
}

.game-brand-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.game-top-logo {
    width: 62px;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.32));
}

.game-brand-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-brand-line .title-fire,
.game-brand-line .title-ems {
    font-size: clamp(28px, 3.5vw, 44px);
}

.game-brand-line .title-icon,
.game-brand-line .title-plus {
    font-size: clamp(22px, 2.2vw, 32px);
}

.game-brand-sub {
    letter-spacing: 6px;
    font-size: 12px;
}

.game-mode-chip {
    justify-self: end;
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.5px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}

.chip-fire {
    background: linear-gradient(135deg, rgba(160, 20, 20, 0.92), rgba(110, 8, 10, 0.92));
}

.chip-emt {
    background: linear-gradient(135deg, rgba(19, 88, 194, 0.92), rgba(8, 44, 101, 0.92));
}

.game-stage {
    flex: 1;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 22px;
    padding: 16px 22px 22px;
    box-sizing: border-box;
}

.game-side-panel,
.game-main-panel {
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 22px 44px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
}

.game-side-panel {
    padding: 26px 22px;
    box-sizing: border-box;
}

.side-fire {
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 151, 92, 0.15), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.16)),
        linear-gradient(180deg, #5b0a0d 0%, #360507 58%, #1c0203 100%);
}

.side-emt {
    background:
        radial-gradient(circle at 50% 18%, rgba(126, 196, 255, 0.18), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.16)),
        linear-gradient(180deg, #0d2f61 0%, #081d3d 58%, #03101f 100%);
}

.side-icon-shell {
    width: 108px;
    height: 108px;
    border-radius: 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.side-mode-icon {
    width: 70px;
    height: auto;
    display: block;
}

.side-mode-title {
    margin: 0 0 12px;
    text-align: center;
    font-size: 34px;
    font-weight: 900;
}

.side-mode-copy {
    margin: 0 0 22px;
    text-align: center;
    line-height: 1.7;
    color: rgba(255,255,255,0.92);
}

.difficulty-stack {
    display: grid;
    gap: 12px;
}

.difficulty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    min-height: 52px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    font-weight: 800;
    letter-spacing: 0.3px;
}

.difficulty-btn.active {
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
    border-color: rgba(255,255,255,0.18);
}

.game-main-panel {
    background: linear-gradient(180deg, rgba(9,11,16,0.80), rgba(5,6,10,0.92));
    padding: 22px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.scenario-header-card,
.scenario-step-card,
.choices-shell {
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.scenario-header-card {
    padding: 20px 20px 18px;
}

.scenario-kicker,
.step-label,
.choices-label,
.dispatch-pill {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.7px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.68);
}

.scenario-title {
    margin: 10px 0 10px;
    font-size: clamp(30px, 3.8vw, 46px);
    line-height: 1.08;
}

.scenario-subtitle {
    margin: 0;
    color: rgba(255,255,255,0.87);
    line-height: 1.7;
}

.dispatch-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.dispatch-pill {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
}

.dispatch-audio {
    width: min(360px, 100%);
}

.scenario-step-card {
    padding: 18px;
}

.step-content {
    margin-top: 12px;
    font-size: clamp(18px, 2.1vw, 24px);
    line-height: 1.7;
    color: #f7fbff;
}

.choices-shell {
    padding: 18px;
}

.choice-grid {
    margin-top: 14px;
    display: grid;
    gap: 14px;
}

.choice-btn {
    width: 100%;
    text-align: left;
    padding: 18px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    box-shadow: 0 14px 28px rgba(0,0,0,0.20);
}

body.mode-fire .choice-btn {
    background: linear-gradient(135deg, #a51217 0%, #d52228 52%, #7f0f13 100%);
}

body.mode-emt .choice-btn {
    background: linear-gradient(135deg, #0d4dae 0%, #1772ef 52%, #0b356f 100%);
}

.choice-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.16);
}

.loading-card,
.choice-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    border-radius: 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .game-stage {
        grid-template-columns: 1fr;
    }

    .game-topbar {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .game-back-btn,
    .game-mode-chip {
        justify-self: center;
    }
}

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

    .landing {
        padding-bottom: 24px;
    }

    .mode {
        min-height: 320px;
    }
}

@media (max-width: 520px) {
    .landing {
        padding: 16px 12px 18px;
    }

    .patch-logo {
        width: min(138px, 38vw);
    }

    .title-lockup,
    .game-brand-line {
        gap: 8px;
    }

    .title-sub,
    .game-brand-sub {
        letter-spacing: 5px;
    }

    .mode-content {
        padding: 26px 18px;
    }

    .icon {
        width: 82px;
    }

    .mode-button {
        min-width: 0;
        width: 100%;
    }

    .auth a {
        margin: 0 6px;
    }

    .game-topbar {
        padding: 14px 12px 6px;
        gap: 10px;
    }

    .game-stage {
        padding: 12px;
        gap: 14px;
    }

    .game-top-logo {
        width: 52px;
    }

    .game-brand-line .title-fire,
    .game-brand-line .title-ems {
        font-size: 22px;
    }

    .game-brand-line .title-icon,
    .game-brand-line .title-plus {
        font-size: 18px;
    }

    .side-mode-title {
        font-size: 28px;
    }

    .scenario-title {
        font-size: 28px;
    }

    .step-content {
        font-size: 18px;
    }

    .choice-btn {
        font-size: 16px;
    }
}


.dispatch-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.dispatch-play-btn:hover {
    border-color: rgba(255,255,255,0.18);
}

.dispatch-status {
    min-height: 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.78);
}

body.mode-fire .dispatch-play-btn {
    background: linear-gradient(135deg, rgba(180, 28, 28, 0.92), rgba(120, 14, 14, 0.92));
}

body.mode-emt .dispatch-play-btn {
    background: linear-gradient(135deg, rgba(19, 88, 194, 0.92), rgba(8, 44, 101, 0.92));
}


/* ADMIN COMMAND CENTER */
body.admin-shell {
    background:
        radial-gradient(circle at 20% 12%, rgba(196, 38, 38, 0.16), transparent 22%),
        radial-gradient(circle at 82% 18%, rgba(62, 132, 255, 0.16), transparent 24%),
        linear-gradient(180deg, #0d1119 0%, #080b12 42%, #05070d 100%);
    background-attachment: fixed;
}

.wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(6, 8, 14, 0.74);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 34px rgba(0,0,0,0.22);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
}

.brand-block {
    min-width: 0;
}

.eyebrow {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: rgba(255,255,255,0.66);
    margin-bottom: 6px;
}

.brand {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.1;
}

.brand-subline {
    margin: 8px 0 0;
    max-width: 760px;
    color: rgba(255,255,255,0.78);
    line-height: 1.6;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.user-chip,
.ghost-btn,
.admin-nav-btn,
.mode-pill,
.outcome-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.06);
    box-shadow: 0 10px 22px rgba(0,0,0,0.16);
    font-size: 14px;
    font-weight: 800;
}

.ghost-btn:hover,
.admin-nav-btn:hover {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.10);
}

.admin-header {
    background:
        radial-gradient(circle at top right, rgba(198, 168, 107, .06), transparent 20%),
        linear-gradient(180deg, rgba(40, 48, 44, 0.96) 0%, rgba(31, 38, 35, 0.96) 100%);
}

.admin-header-inner {
    align-items: flex-start;
}

.admin-top-actions {
    max-width: 520px;
}

.admin-nav-wrap {
    padding-bottom: 16px;
}

.admin-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-nav-btn.active {
    background: linear-gradient(135deg, #b31217 0%, #d32f2f 56%, #861313 100%);
    border-color: rgba(255,255,255,0.18);
}

.page-shell {
    padding: 28px 0 34px;
}

.admin-page-shell {
    padding-top: 24px;
}

.panel-card,
.admin-hero-card,
.admin-action-card,
.admin-login-card {
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 22px 44px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
}

.panel-card,
.admin-login-card {
    background: linear-gradient(180deg, rgba(9,11,16,0.82), rgba(5,6,10,0.92));
    padding: 24px;
}

.admin-panel-card h2,
.admin-login-card h2,
.admin-hero-card h2,
.admin-action-card h3 {
    margin-top: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.86);
    margin-bottom: 14px;
}

.admin-hero-card {
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
    gap: 22px;
    background:
        radial-gradient(circle at top right, rgba(255, 117, 92, 0.10), transparent 24%),
        radial-gradient(circle at bottom left, rgba(87, 156, 255, 0.10), transparent 26%),
        linear-gradient(180deg, rgba(14,18,26,0.94), rgba(7,10,16,0.96));
}

.admin-hero-card p,
.admin-panel-copy,
.admin-action-card p,
.admin-login-card p {
    color: rgba(255,255,255,0.82);
    line-height: 1.7;
}

.admin-kpi-grid,
.admin-card-grid,
.admin-page-grid {
    display: grid;
    gap: 18px;
}

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

.admin-kpi-card {
    border-radius: 20px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.08);
}

.admin-kpi-card span {
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.62);
    margin-bottom: 8px;
}

.admin-kpi-card strong {
    font-size: clamp(28px, 4vw, 44px);
}

.admin-card-grid {
    margin-top: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-action-card {
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(198, 168, 107, .06), transparent 20%),
        linear-gradient(180deg, #28302c 0%, #1f2623 100%);
    text-decoration: none;
    color: #fff;
}

.admin-card-kicker {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.7px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.64);
    margin-bottom: 10px;
}

.admin-card-cta {
    display: inline-flex;
    margin-top: 10px;
    min-height: 42px;
    align-items: center;
    padding: 0 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #b31217 0%, #d32f2f 56%, #861313 100%);
    font-weight: 800;
}

.admin-page-grid {
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
    align-items: start;
}

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

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

.stack-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: rgba(255,255,255,0.92);
}

.stack-form input,
.stack-form select,
.stack-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.stack-form textarea {
    resize: vertical;
    min-height: 120px;
}

.stack-form input::placeholder,
.stack-form textarea::placeholder {
    color: rgba(255,255,255,0.42);
}

.stack-form option {
    color: #111;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .3px;
    background: linear-gradient(135deg, #b31217 0%, #d32f2f 56%, #861313 100%);
    box-shadow: 0 14px 28px rgba(0,0,0,0.22);
}

.action-btn.subtle {
    background: rgba(255,255,255,0.08);
}

.action-btn.danger {
    background: linear-gradient(135deg, #8f1014 0%, #c71a20 56%, #6a0d10 100%);
}

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

.admin-table-wrap {
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.admin-data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.admin-data-table th,
.admin-data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-data-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.66);
}

.mode-pill-fire {
    background: linear-gradient(135deg, rgba(179,18,23,.92), rgba(110,12,12,.92));
}

.mode-pill-emt {
    background: linear-gradient(135deg, rgba(19,88,194,.92), rgba(8,44,101,.92));
}

.outcome-good {
    background: linear-gradient(135deg, rgba(23, 135, 84, 0.92), rgba(15, 88, 54, 0.92));
}

.outcome-neutral {
    background: linear-gradient(135deg, rgba(118, 118, 118, 0.92), rgba(78, 78, 78, 0.92));
}

.outcome-bad {
    background: linear-gradient(135deg, rgba(179,18,23,.92), rgba(110,12,12,.92));
}

.admin-alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.10);
}

.admin-alert.success {
    background: rgba(22, 134, 85, 0.22);
}

.admin-alert.error {
    background: rgba(179, 18, 23, 0.24);
}

.checkbox-row,
.admin-checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.checkbox-row input,
.admin-checkbox-row input {
    width: 18px;
    height: 18px;
    padding: 0;
}

.admin-login-shell {
    max-width: 560px;
    margin: 0 auto;
}

.site-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(6,8,14,0.72);
    padding: 18px 0 22px;
    color: rgba(255,255,255,0.72);
}

@media (max-width: 980px) {
    .header-inner,
    .admin-header-inner,
    .admin-hero-card,
    .admin-page-grid,
    .admin-card-grid {
        grid-template-columns: 1fr;
    }

    .header-inner,
    .admin-header-inner {
        display: grid;
    }

    .header-actions,
    .admin-top-actions {
        justify-content: flex-start;
    }

    .admin-kpi-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .wrap {
        width: min(100% - 20px, 1280px);
    }

    .page-shell {
        padding: 16px 0 22px;
    }

    .panel-card,
    .admin-login-card,
    .admin-hero-card,
    .admin-action-card {
        padding: 18px;
        border-radius: 20px;
    }

    .admin-data-table {
        min-width: 560px;
    }

    .ghost-btn,
    .admin-nav-btn,
    .user-chip,
    .mode-pill,
    .outcome-pill {
        min-height: 38px;
        padding: 0 12px;
        font-size: 13px;
    }
}


.status-success,.status-error{display:none;}
.form-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.voice-preview-block,.scenario-audio-meta,.scenario-edit-head,.scenario-manage-stack{display:grid;gap:12px;}
.voice-preview-block,.scenario-audio-meta{padding:16px;border-radius:16px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);}
.voice-preview-title,.scenario-edit-id{font-size:12px;font-weight:900;letter-spacing:1.5px;text-transform:uppercase;color:rgba(255,255,255,.68);}
.voice-preview-copy{color:rgba(255,255,255,.78);line-height:1.6;}
.voice-preview-actions{display:flex;gap:10px;flex-wrap:wrap;}
.scenario-manage-stack{margin-top:16px;}
.scenario-edit-card{padding:20px;border-radius:20px;background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));border:1px solid rgba(255,255,255,.08);box-shadow:inset 0 1px 0 rgba(255,255,255,.04);}
.scenario-edit-head{grid-template-columns:minmax(0,1fr) auto;align-items:center;}
.scenario-edit-name{font-size:22px;font-weight:900;line-height:1.2;}
.scenario-audio-meta strong{display:block;margin-bottom:6px;}
.admin-audio-preview{width:min(360px,100%);margin-top:10px;}
.check-row{display:flex;gap:10px;align-items:flex-start;}
.check-row input{width:18px;height:18px;min-width:18px;margin-top:2px;}
@media (max-width: 760px){.form-grid-2,.scenario-edit-head{grid-template-columns:1fr;}}

/* OpenAI TTS admin patch */
.action-btn-fire{background:linear-gradient(135deg,#7b1113 0%,#b51b1f 55%,#6a0f12 100%);border-color:rgba(255,120,120,.28);}
.action-btn-fire:hover{transform:translateY(-1px);filter:brightness(1.04);}
.scenario-head-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.tts-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;color:rgba(255,255,255,.82);}
@media (max-width:760px){.scenario-head-actions,.tts-meta-grid{grid-template-columns:1fr;display:grid;}}
