/* Landing Page Styles — Spark Gradient Theme (matches escalens-frontend) */

/* Work Sans — self-hosted, TM brand font for product login/landing pages */
@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('./assets/fonts/WorkSans-Light.ttf') format('truetype');
}
@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./assets/fonts/WorkSans-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./assets/fonts/WorkSans-Medium.ttf') format('truetype');
}
@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./assets/fonts/WorkSans-SemiBold.ttf') format('truetype');
}
@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./assets/fonts/WorkSans-Bold.ttf') format('truetype');
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ── Spark Gradient Background ── */
/*
 * Exact match to screenshot:
 *   Black  — dominant, covers full top band + entire right half
 *   Red    — single concentrated dark crimson spotlight, lower-left
 *   Orange — not visible, removed
 *   Blue   — barely perceptible trace in far corners only
 *
 * Base = dark crimson spotlight + black top + black right
 * ::before = no-op (orange removed)
 * ::after  = near-invisible blue corner traces
 */
.gradient-bg {
    background:
        /* Red core — ~50% coverage */
        radial-gradient(ellipse 65% 65% at 42% 68%,
            rgba(215, 25, 32, 0.90) 0%,
            rgba(215, 25, 32, 0.50) 35%,
            rgba(215, 25, 32, 0.12) 60%,
            transparent             72%
        ),
        /* Red secondary — reduced spread */
        radial-gradient(ellipse 75% 60% at 48% 78%,
            rgba(215, 25, 32, 0.28) 0%,
            rgba(215, 25, 32, 0.08) 50%,
            transparent             68%
        ),
        /* Black — top band */
        radial-gradient(ellipse 130% 55% at 50% -5%,
            rgba(0, 0, 0, 1.00) 0%,
            rgba(0, 0, 0, 0.92) 40%,
            rgba(0, 0, 0, 0.55) 65%,
            transparent          85%
        ),
        /* Black — left-side darkening */
        radial-gradient(ellipse 45% 90% at -5% 50%,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.50) 45%,
            transparent          75%
        ),
        /* Black — right-side darkening */
        radial-gradient(ellipse 50% 90% at 105% 50%,
            rgba(0, 0, 0, 0.90) 0%,
            rgba(0, 0, 0, 0.55) 45%,
            transparent          75%
        ),
        /* Black base */
        #000000;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Orange — not visible in screenshot, removed */
.gradient-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

/* Blue — removed */
.gradient-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

.gradient-bg.admin-variant::after {
    background: transparent;
}

/* ── Subtle dot grid overlay ── */
.admin-dot-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 70%);
    animation: dotGridPulse 8s ease-in-out infinite;
}

@keyframes dotGridPulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.7; }
}

@keyframes spark-pulse {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* ── Entrance animations ── */
@keyframes fadeSlideLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeSlideRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@keyframes cardShimmer {
    0%, 100% { border-color: rgba(255, 255, 255, 0.1); }
    50%      { border-color: rgba(215, 25, 32, 0.25); }
}

@keyframes cardShimmerAdmin {
    0%, 100% { border-color: rgba(255, 255, 255, 0.1); }
    50%      { border-color: rgba(232, 69, 14, 0.25); }
}

.landing-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.landing-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    width: 100%;
}

.landing-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing-panel-left {
    gap: 2rem;
    text-align: left;
}

.landing-panel-left .brand-stack {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.landing-panel-left .brand-text {
    max-width: 520px;
}

/* ── Staggered entrance animations (matching frontend) ── */
.landing-panel-left .brand-text h1 {
    background: linear-gradient(90deg, #D71920 0%, #E03C20 30%, #F06A00 60%, #FF9500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeSlideLeft 0.8s ease-out 0.15s both;
}

.landing-panel-left .brand-text p {
    color: #FFFFFF;
    animation: fadeSlideLeft 0.8s ease-out 0.25s both;
}

/* Description paragraph below brand-stack */
.landing-panel-left > p {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.60), 0 2px 8px rgba(0, 0, 0, 0.40);
    animation: fadeSlideLeft 0.8s ease-out 0.4s both;
}

.landing-panel-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.interaction-card {
    width: 100%;
    max-width: 500px;
    padding: 0;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
    border: none;
}

.secure-access-card {
    position: relative;
    border-radius: 16px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeSlideRight 0.9s ease-out 0.3s both, cardShimmer 6s ease-in-out 2s infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.secure-access-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 20px rgba(215, 25, 32, 0.15);
}

/* Admin card uses blue shimmer */
.admin-variant .secure-access-card {
    animation: fadeSlideRight 0.9s ease-out 0.3s both, cardShimmerAdmin 6s ease-in-out 2s infinite;
}
.admin-variant .secure-access-card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 20px rgba(232, 69, 14, 0.15);
}

.secondary-cta {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.secondary-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(215, 25, 32, 0.3);
    color: #ffffff;
}

.secondary-cta:focus-visible {
    outline: 2px solid rgba(215, 25, 32, 0.45);
    outline-offset: 2px;
}

.secure-access-card::after {
    content: none; /* Removed — glassmorphism card doesn't need inner border */
}

.secure-access-copy {
    position: relative;
    z-index: 1;
    text-align: left;
}

.secure-access-eyebrow {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.secure-access-eyebrow .eyebrow-shield {
    width: 22px;
    height: 22px;
    color: #F59E0B;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.secure-access-midline {
    margin: 0.35rem 0 0;
    font-weight: 600;
    color: #FFFFFF;
}

.secure-access-description {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.language-toggle-shell {
    margin-top: 0.25rem;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.secure-permalink-alert {
    background: rgba(215, 25, 32, 0.12);
    border: 1px solid rgba(215, 25, 32, 0.3);
    border-radius: 0.85rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.secure-permalink-alert p {
    margin: 0;
}

.secure-access-card .sign-in-form {
    margin: 0;
}

.secure-access-card .support-region-section {
    margin-top: 0.5rem;
}

.sign-in-form {
    display: flex;
    flex-direction: column;
}

.sign-in-form > *:not(:last-child) {
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .landing-panels {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: center;
    }

    .landing-panel-left .brand-stack {
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 1023px) {
    .landing-panels {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .landing-panel-left {
        text-align: center;
        align-items: center;
    }

    .landing-panel-left .brand-stack {
        flex-direction: column;
    }
}

@media (max-width: 767px) {
    .landing-shell {
        padding: 1.5rem 1rem;
    }

    .secure-access-card {
        padding: 2rem 1.5rem;
        border-radius: 14px;
        gap: 1.25rem;
    }

    .language-toggle-container {
        width: 100%;
        justify-content: center;
    }

    .language-toggle {
        min-width: 0;
        width: 100%;
        max-width: 320px;
    }

    .language-option {
        font-size: 0.75rem;
        padding: 7px 8px;
        min-height: 34px;
    }
}

@media (max-width: 480px) {
    .landing-shell {
        padding: 1rem 0.85rem;
    }

    .interaction-card {
        max-width: 100%;
    }

    .secure-access-card {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
}

/* Language Toggle Styles */
.language-toggle-container {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 auto;
}

.landing-panel-right .language-toggle-container {
    margin-left: auto;
    margin-right: auto;
}

.language-toggle {
    position: relative;
    display: flex;
    gap: 0;
    width: 100%;
    min-width: 220px;
    padding: 3px;
    border-radius: 999px;
    background: transparent;
    overflow: hidden;
}

.language-option {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.35s ease, opacity 0.35s ease;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    opacity: 0.6;
    min-height: 38px;
}

.language-option:hover:not(.active) {
    color: rgba(255, 255, 255, 0.6);
    opacity: 0.8;
}

.language-option.active {
    color: #ffffff;
    opacity: 1;
}

.language-option-content {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.language-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.2));
}

.language-label {
    line-height: 1;
    letter-spacing: 0.05em;
    font-size: 0.78rem;
}

.language-label-jp {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic Pro", "Yu Gothic", "MS PGothic", sans-serif;
}

.language-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom UK Flag Icon - Clean, Modern, Minimalist Design */
.uk-flag-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #012169; /* Official UK flag blue */
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

/* White diagonal stripes (St Andrew's/St Patrick's crosses background) */
.uk-flag-icon::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        linear-gradient(45deg, transparent 47%, white 47%, white 53%, transparent 53%),
        linear-gradient(-45deg, transparent 47%, white 47%, white 53%, transparent 53%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Red diagonal stripes (St Patrick's Cross - offset) */
.uk-flag-icon .diagonal-red {
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        linear-gradient(45deg, transparent 48%, #C8102E 48%, #C8102E 52%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, #C8102E 48%, #C8102E 52%, transparent 52%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
}

/* St George's Cross - Horizontal white stripe */
.uk-flag-icon .horizontal-white {
    position: absolute;
    width: 100%;
    height: 24%;
    background: white;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1;
}

/* St George's Cross - Vertical white stripe */
.uk-flag-icon .vertical-white {
    position: absolute;
    width: 24%;
    height: 100%;
    background: white;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* St George's Cross - Horizontal red stripe */
.uk-flag-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 14%;
    background: #C8102E;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 2;
}

/* St George's Cross - Vertical red stripe */
.uk-flag-icon .vertical-cross {
    position: absolute;
    width: 14%;
    height: 100%;
    background: #C8102E;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

/* Custom Japanese Flag Icon */
.jp-flag-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    position: relative;
    flex-shrink: 0;
}

.jp-flag-icon::after {
    content: '';
    width: 12px;
    height: 12px;
    background: #BC002D; /* Official Japanese flag red */
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Dark background support for the flags */
.language-option.active .jp-flag-icon {
    background: white;
    border-color: rgba(255, 255, 255, 0.3);
}


.language-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc((100% - 6px) / 2);
    height: calc(100% - 6px);
    box-sizing: border-box;
    background: #D71920;
    border-radius: 999px;
    transition: left 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.35s ease,
                box-shadow 0.35s ease;
    box-shadow: 0 8px 20px rgba(215, 25, 32, 0.35), 0 4px 10px rgba(215, 25, 32, 0.15);
    z-index: 1;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform-origin: center;
    transform: scaleX(1);
}

.language-slider::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
    opacity: 0.9;
}

.language-slider.japan {
    left: calc(50% + 3px);
    background: #D71920;
    box-shadow: 0 8px 20px rgba(215, 25, 32, 0.35), 0 4px 10px rgba(215, 25, 32, 0.15);
}

.language-toggle.switching .language-slider {
    animation: language-slider-press 0.5s ease;
}

@keyframes language-slider-press {
    0% {
        transform: scaleX(0.96);
    }
    45% {
        transform: scaleX(1.04);
    }
    100% {
        transform: scaleX(1);
    }
}

/* Disabled state during language switch */
.language-option:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .mobile-padding { padding: 1rem; }
    .mobile-text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .mobile-text-base { font-size: 1rem; line-height: 1.5rem; }
    .mobile-text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .mobile-logo { height: 6rem; width: 6rem; }
    .mobile-button-text { font-size: 1rem; }
}

@media (max-width: 480px) {
    .mobile-padding { padding: 0.75rem; }
    .mobile-text-4xl { font-size: 1.875rem; line-height: 2.25rem; }
    .mobile-text-base { font-size: 0.875rem; line-height: 1.25rem; }
    .mobile-text-lg { font-size: 1rem; line-height: 1.5rem; }
    .mobile-logo { height: 5rem; width: 5rem; }
    .mobile-button-text { font-size: 0.875rem; }
}

/* Support Region Selection Styles */
.support-region-section {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.support-region-header {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    margin-bottom: 0.5rem;
}

.support-region-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.02em;
}

.support-region-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.2;
}

.support-region-hint,
.support-region-fallback {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.35rem;
}

.support-region-dropdown {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0.15rem 0 0;
}

.support-region-trigger {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.support-region-trigger:focus-visible {
    outline: none;
    border-color: #D71920;
    box-shadow: 0 0 0 2px rgba(215, 25, 32, 0.25);
}

.support-region-trigger-icon {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease;
}

/* ── Logo & Brand Styles ── */
.brand-logo {
    filter: drop-shadow(0 0 20px rgba(215, 25, 32, 0.3));
    animation: fadeSlideLeft 0.8s ease-out both, logoFloat 4s ease-in-out 1s infinite;
}

/* Sign-in button — TM Red (brand-primary) */
.sign-in-button {
    background: #D71920 !important;
    box-shadow: 0 10px 25px -3px rgba(215, 25, 32, 0.4);
    transition: all 0.3s ease;
}

.sign-in-button:hover:not(:disabled) {
    background: #B5141A !important;
    box-shadow: 0 20px 30px -5px rgba(215, 25, 32, 0.5);
}

/* ── Admin Feature Grid ── */
.admin-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.admin-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(215, 25, 32, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    animation: fadeSlideUp 0.6s ease-out both;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.admin-feature-item svg {
    color: #F87171;
    filter: drop-shadow(0 0 4px rgba(248, 113, 113, 0.3));
    transition: filter 0.25s ease, color 0.25s ease;
}

.admin-feature-item:nth-child(1) { animation-delay: 0.5s; }
.admin-feature-item:nth-child(2) { animation-delay: 0.65s; }
.admin-feature-item:nth-child(3) { animation-delay: 0.8s; }
.admin-feature-item:nth-child(4) { animation-delay: 0.95s; }

.admin-feature-item:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.10) 0%, rgba(215, 25, 32, 0.08) 100%);
    border-color: rgba(215, 25, 32, 0.35);
    box-shadow: 0 4px 20px rgba(215, 25, 32, 0.12), 0 0 8px rgba(215, 25, 32, 0.08);
}

.admin-feature-item:hover svg {
    color: #FCA5A5;
    filter: drop-shadow(0 0 8px rgba(248, 113, 113, 0.5));
}

.admin-feature-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.admin-feature-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 0.1rem;
}

.admin-feature-desc {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
}

/* ── Admin secure badge ── */
.admin-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.admin-secure-badge svg {
    width: 14px;
    height: 14px;
}

/* ── Admin back link ── */
.admin-back-link {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.admin-back-link:hover {
    color: #FF9500;
}

/* ── System Status Indicator ── */
.admin-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.7rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
}

.admin-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(52, 211, 153, 0.6); }
    50%      { opacity: 0.6; box-shadow: 0 0 10px rgba(52, 211, 153, 0.9); }
}

/* ── Version Footer ── */
.admin-version-footer {
    position: fixed;
    bottom: 1rem;
    right: 1.5rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    font-weight: 400;
    letter-spacing: 0.04em;
    z-index: 1;
    pointer-events: none;
}

/* ── Engineer authenticated card (dark theme) ── */
.engineer-auth-table {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.engineer-auth-table thead {
    background: rgba(255, 255, 255, 0.06);
}

.engineer-auth-table th {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8rem;
}

.engineer-auth-table td {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.engineer-auth-table tbody {
    --tw-divide-opacity: 1;
    --tw-divide-color: rgba(255, 255, 255, 0.08);
}

.engineer-auth-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.engineer-auth-table tbody .engineer-empty-cell {
    color: rgba(255, 255, 255, 0.5);
}

/* Engineer dashboard controls */
#engineer-case-count {
    color: rgba(255, 255, 255, 0.5);
}

#engineer-prev-page,
#engineer-next-page {
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
}

#engineer-page-info {
    color: rgba(255, 255, 255, 0.5);
}

.engineer-logout-link {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile admin features */
@media (max-width: 640px) {
    .admin-features-grid {
        grid-template-columns: 1fr;
    }
}

.support-region-dropdown.open .support-region-trigger-icon {
    transform: rotate(-180deg);
}

.support-region-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    padding: 0.5rem 0.4rem;
    z-index: 30;
    display: none;
}

.support-region-dropdown.open .support-region-menu {
    display: block;
}

.support-region-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 16px;
    width: 12px;
    height: 12px;
    background: rgba(20, 20, 20, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    transform: rotate(45deg);
}

.support-region-options {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    align-items: stretch;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.support-region-option {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    user-select: none;
    padding: 0.1rem 0.2rem;
}

.support-region-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #D71920;
}

.support-region-option span {
    line-height: 1.2;
}

/* Button disabled state */
.button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
