:root {
    --bg-dark: #07090e;
    --panel-bg: rgba(14, 19, 31, 0.85);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-glow: rgba(0, 210, 255, 0.25);
    
    --cyan: #00f2fe;
    --cyan-glow: rgba(0, 242, 254, 0.4);
    --blue: #0072ff;
    --green: #00e676;
    --green-glow: rgba(0, 230, 118, 0.4);
    --red: #ff1744;
    --red-glow: rgba(255, 23, 68, 0.4);
    --gold: #ffab00;
    --gold-glow: rgba(255, 171, 0, 0.4);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 242, 254, 0.07) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 114, 255, 0.07) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(7, 9, 14, 0.8) 0px, var(--bg-dark) 100%);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    padding: 16px;
    -webkit-font-smoothing: antialiased;
}

.app-wrapper {
    max-width: 1720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* TOP NAVBAR */
.navbar {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

.brand-icon {
    width: 44px;
    height: 44px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid var(--cyan-glow);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px var(--cyan-glow);
}

.eye-iris {
    width: 18px;
    height: 18px;
    background: radial-gradient(circle, var(--cyan) 0%, var(--blue) 100%);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyan);
    animation: irisPulse 3s infinite alternate;
}

@keyframes irisPulse {
    0% { transform: scale(0.85); box-shadow: 0 0 8px var(--cyan); }
    100% { transform: scale(1.1); box-shadow: 0 0 16px var(--cyan); }
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-tag {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #000;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

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

/* HEADER ACTIONS */
.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* WEBCAM PRIMARY BUTTON */
.btn-webcam-primary {
    background: linear-gradient(135deg, var(--green), #00b0ff);
    color: #041208;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 13px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-webcam-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.6);
}

.btn-webcam-primary.active {
    background: linear-gradient(135deg, var(--red), var(--gold));
    color: #ffffff;
    box-shadow: 0 0 20px var(--red-glow);
}

/* VIEW SWITCH PILL */
.view-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 6px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
}

.switch-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    padding-left: 8px;
}

.switch-pill {
    display: flex;
    gap: 4px;
}

.switch-option {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.switch-option.active {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    box-shadow: 0 0 12px var(--cyan-glow);
}

/* STATUS & CLOCK */
.system-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--green);
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.clock-display {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
}

/* MAIN DASHBOARD GRID */
.dashboard-body {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
}

/* CARD PANEL BASE */
.card-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

.header-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--cyan);
    background: rgba(0, 242, 254, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid var(--cyan-glow);
}

.card-header h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.card-header p {
    font-size: 12px;
    color: var(--text-secondary);
}

.live-badge, .mode-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

.live-badge {
    background: rgba(0, 230, 118, 0.12);
    color: var(--green);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.mode-badge {
    background: rgba(0, 242, 254, 0.12);
    color: var(--cyan);
    border: 1px solid var(--cyan-glow);
}

/* CAMERA VIEWPORT BOX */
.viewport-box {
    background: #030509;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.camera-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.camera-card {
    background: #0a0e17;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    height: 195px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.cam-hud-top {
    background: rgba(0, 0, 0, 0.75);
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.cam-name {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--cyan);
}

.cam-rec {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}

.cam-screen {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(circle, #0b1324 0%, #03060c 100%);
}

/* HUD CORNER BRACKETS */
.hud-corners span {
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: var(--cyan);
    border-style: solid;
    pointer-events: none;
    z-index: 8;
}

.hud-corners .tl { top: 6px; left: 6px; border-width: 2px 0 0 2px; }
.hud-corners .tr { top: 6px; right: 6px; border-width: 2px 2px 0 0; }
.hud-corners .bl { bottom: 6px; left: 6px; border-width: 0 0 2px 2px; }
.hud-corners .br { bottom: 6px; right: 6px; border-width: 0 2px 2px 0; }

/* REAL NATURAL OPTICAL WEBCAM VIDEO STREAM (100% TRUE COLOR) */
#webcam-feed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 2;
    transform: scaleX(-1);
    /* 100% Natural Optical Color - Zero Color Inversion */
    filter: contrast(1.05) saturate(1.1) !important;
}

#webcam-feed.active { display: block; }

#webcam-mirror {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 2;
    transform: scaleX(-1);
    /* 100% Natural Optical Color - Zero Color Inversion */
    filter: contrast(1.05) saturate(1.1) !important;
}

#webcam-mirror.active { display: block; }

/* AI GARMENT SEGMENTATION MASK OVERLAY ON REAL VIDEO */
.garment-segment-box {
    position: absolute;
    top: 25%;
    left: 20%;
    width: 60%;
    height: 60%;
    border: 2px dashed var(--cyan);
    background: rgba(0, 242, 254, 0.12);
    box-shadow: 0 0 15px var(--cyan-glow);
    border-radius: 8px;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.garment-segment-box.active {
    opacity: 1;
}

.garment-segment-tag {
    position: absolute;
    top: -20px;
    left: 10px;
    background: var(--cyan);
    color: #000;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
}

/* CLOTHING LAYER GRAPHIC */
.clothing-layer {
    position: absolute;
    width: 60px;
    height: 120px;
    top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.8s ease;
    opacity: 1;
    z-index: 3;
}

.clothing-layer.stripped { opacity: 0.15; }

.shirt-graphic {
    width: 50px;
    height: 60px;
    background: rgba(0, 242, 254, 0.2);
    border: 1.5px dashed var(--cyan);
    border-radius: 6px 6px 0 0;
}

.pants-graphic {
    width: 44px;
    height: 55px;
    background: rgba(0, 114, 255, 0.2);
    border: 1.5px dashed var(--blue);
    border-radius: 0 0 6px 6px;
    margin-top: 2px;
}

/* LASER SCANNING BEAM */
.scan-laser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--cyan), #ffffff, var(--cyan), transparent);
    box-shadow: 0 0 20px var(--cyan);
    opacity: 0;
    z-index: 6;
}

.scan-laser.scanning {
    opacity: 1;
    animation: laserSweep 1.5s ease-in-out;
}

@keyframes laserSweep {
    0% { top: 0; }
    100% { top: 100%; }
}

/* SUB CLOTH THREAT ITEM */
.sub-cloth-item {
    position: absolute;
    top: 65px;
    left: 65px;
    width: 26px;
    height: 30px;
    border: 2px solid var(--red);
    background: rgba(255, 23, 68, 0.35);
    box-shadow: 0 0 15px var(--red-glow);
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 5;
}

.sub-cloth-item.visible { opacity: 1; }

.sub-cloth-item .item-tag {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--red);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

/* POSE OVERLAY */
.pose-overlay {
    width: 60px;
    height: 120px;
    position: relative;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.pose-silhouette {
    width: 45px;
    height: 100px;
    border: 1.5px dashed rgba(0, 242, 254, 0.5);
    border-radius: 20px;
}

.pose-node {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 8px var(--green);
}

.pose-node.head { top: 10px; }
.pose-node.arm-l { top: 35px; left: 2px; }
.pose-node.arm-r { top: 35px; right: 2px; }

/* HAND SCREEN & RADAR */
.hand-screen {
    background: radial-gradient(circle, rgba(0, 242, 254, 0.05) 0%, #03060c 100%);
}

.hand-silhouettes {
    display: flex;
    gap: 12px;
}

.hand-box {
    width: 38px;
    height: 55px;
    border: 1px dashed rgba(0, 242, 254, 0.4);
    border-radius: 10px;
}

.radar-scan-ring {
    position: absolute;
    width: 110px;
    height: 110px;
    border: 1px solid var(--cyan-glow);
    border-radius: 50%;
    animation: radarRotate 5s linear infinite;
}

@keyframes radarRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* GLINT SCREEN */
.glint-screen { background: #020305; }

.glint-spot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 20px #fff, 0 0 35px var(--cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* KIOSK STATUS BAR */
.kiosk-status-bar {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--panel-border);
}

.prompt-msg {
    font-size: 13px;
    font-weight: 600;
    color: var(--cyan);
}

.progress-steps {
    display: flex;
    gap: 6px;
}

.step-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

.step-badge.active {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    font-weight: 700;
}

/* SCENARIO CARDS */
.scenario-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.8px;
}

.scenario-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.scenario-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.scenario-card:hover {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.15);
}

.scenario-card.special {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(0, 114, 255, 0.12));
    border: 1.5px solid var(--cyan);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.scenario-card.special:hover {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.25), rgba(0, 114, 255, 0.25));
    border-color: #fff;
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.4);
}

.card-icon-wrap {
    font-size: 22px;
    background: rgba(255, 255, 255, 0.05);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* RIGHT SECTION: INSPECTOR STAGE */
.stage-container {
    background: #030509;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.stage-header {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--panel-border);
}

.stage-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--cyan);
}

.stage-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.stage-viewport {
    height: 310px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #091224 0%, #020408 100%);
    overflow: hidden;
}

/* REAL HUMAN STAGE */
.real-human-stage {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.human-avatar-container {
    width: 130px;
    height: 260px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.5s ease;
}

.avatar-head {
    width: 38px;
    height: 44px;
    background: linear-gradient(180deg, #ffcc80, #e0a96d);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 204, 128, 0.3);
}

.avatar-torso {
    width: 65px;
    height: 110px;
    background: linear-gradient(180deg, #e0a96d, #c88b4a);
    border-radius: 12px 12px 6px 6px;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0, 242, 254, 0.2) 1px, transparent 0);
    background-size: 8px 8px;
}

.avatar-arm {
    width: 15px;
    height: 95px;
    background: linear-gradient(180deg, #e0a96d, #b87b3a);
    border-radius: 8px;
    position: absolute;
    top: 50px;
}

.avatar-arm.left { left: 10px; transform: rotate(10deg); }
.avatar-arm.right { right: 10px; transform: rotate(-10deg); }

.avatar-leg {
    width: 24px;
    height: 100px;
    background: linear-gradient(180deg, #c88b4a, #9e6428);
    border-radius: 4px 4px 8px 8px;
    position: absolute;
    top: 158px;
}

.avatar-leg.left { left: 36px; }
.avatar-leg.right { right: 36px; }

/* TARGET OVERLAY LAYER */
.target-layer, .anomaly-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.real-target-box, .anomaly-box {
    position: absolute;
    border: 2px solid var(--red);
    background: rgba(255, 23, 68, 0.3);
    box-shadow: 0 0 20px var(--red-glow), inset 0 0 10px rgba(255, 23, 68, 0.5);
    border-radius: 6px;
    animation: targetPulse 1.2s infinite alternate;
}

@keyframes targetPulse {
    0% { transform: scale(0.98); }
    100% { transform: scale(1.04); }
}

.real-target-tag, .anomaly-tag {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--red), #d50000);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 0 12px var(--red-glow);
}

/* MANNEQUIN STAGE */
.mannequin-stage {
    width: 140px;
    height: 270px;
    position: relative;
}

.mannequin-svg {
    width: 100%;
    height: 100%;
}

.mesh-part {
    fill: rgba(0, 242, 254, 0.08);
    stroke: rgba(0, 242, 254, 0.4);
    stroke-width: 1.5;
}

.mesh-limb {
    fill: none;
    stroke: rgba(0, 242, 254, 0.4);
    stroke-linecap: round;
}

/* TELEMETRY CARD */
.telemetry-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.telemetry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.telemetry-header .title {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
}

.latency-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--cyan);
}

.verdict-banner .verdict {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.verdict.pass {
    background: rgba(0, 230, 118, 0.15);
    color: var(--green);
    border: 1px solid rgba(0, 230, 118, 0.35);
}

.verdict.flag {
    background: rgba(255, 23, 68, 0.15);
    color: var(--red);
    border: 1px solid rgba(255, 23, 68, 0.35);
}

.detections-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 90px;
    overflow-y: auto;
}

.item-row {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: var(--font-mono);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.empty-msg {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
}

/* ACTION DECISION BAR */
.action-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: auto;
}

.btn-action {
    padding: 14px;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.btn-action.pass {
    background: linear-gradient(135deg, var(--green), #00b0ff);
    color: #000;
}

.btn-action.hold {
    background: linear-gradient(135deg, var(--red), var(--gold));
    color: #fff;
}

/* ── API ENGINE STATUS BADGE ──────────────────────────────────────────────── */
.api-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: all 0.4s ease;
    white-space: nowrap;
}

.api-status-badge.online {
    background: rgba(0, 230, 118, 0.12);
    border-color: rgba(0, 230, 118, 0.45);
    color: var(--green);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
    animation: badge-pulse-green 2.5s ease-in-out infinite;
}

.api-status-badge.offline {
    background: rgba(255, 171, 0, 0.1);
    border-color: rgba(255, 171, 0, 0.35);
    color: var(--gold);
}

@keyframes badge-pulse-green {
    0%, 100% { box-shadow: 0 0 6px rgba(0, 230, 118, 0.2); }
    50%       { box-shadow: 0 0 16px rgba(0, 230, 118, 0.5); }
}

/* ── DECLOTHED AI IMAGE PANEL ─────────────────────────────────────────────── */
.declothed-panel {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(0, 242, 254, 0.04);
    border: 1px solid rgba(0, 242, 254, 0.18);
    border-radius: 12px;
    animation: fade-in-up 0.35s ease forwards;
}

.declothed-panel.visible {
    display: flex;
}

.declothed-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.declothed-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--cyan);
    text-transform: uppercase;
}

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

.declothed-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 242, 254, 0.12);
    opacity: 0.88;
    filter: brightness(1.05) contrast(1.08);
    transition: opacity 0.3s ease;
}

.declothed-img:hover {
    opacity: 1;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── NEURAL DE-CLOTH SCENARIO CARD ──────────────────────────────────────────── */
.scenario-card.neural-card {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(0, 242, 254, 0.08));
    border-color: rgba(138, 43, 226, 0.5);
    grid-column: 1 / -1;
}
.scenario-card.neural-card:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.28), rgba(0, 242, 254, 0.14));
    border-color: rgba(138, 43, 226, 0.85);
    box-shadow: 0 0 24px rgba(138, 43, 226, 0.45), 0 4px 16px rgba(0,0,0,0.4);
    transform: translateY(-2px);
}
.scenario-card.neural-card .card-icon-wrap {
    background: rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.5);
}

/* ── NEURAL SCAN HEADER BUTTON ──────────────────────────────────────────────── */
.btn-neural-scan {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(138,43,226,0.25), rgba(0,242,254,0.12));
    border: 1px solid rgba(138,43,226,0.6);
    border-radius: 10px;
    color: #d4a8ff;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn-neural-scan:hover {
    background: linear-gradient(135deg, rgba(138,43,226,0.45), rgba(0,242,254,0.22));
    border-color: rgba(138,43,226,0.9);
    box-shadow: 0 0 20px rgba(138,43,226,0.45);
    color: #fff;
    transform: translateY(-1px);
}
.btn-neural-scan.scanning {
    animation: neural-pulse 1.1s ease-in-out infinite;
    border-color: var(--cyan);
    color: var(--cyan);
    pointer-events: none;
}
@keyframes neural-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0,242,254,0.3); }
    50%       { box-shadow: 0 0 24px rgba(0,242,254,0.75); }
}

/* ── DECLOTHED SPLIT-VIEW PANEL ─────────────────────────────────────────────── */
.declothed-panel {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 12px 0;
    padding: 14px 16px 16px;
    background: rgba(138, 43, 226, 0.05);
    border: 1px solid rgba(138, 43, 226, 0.28);
    border-top: 2px solid rgba(138, 43, 226, 0.7);
    border-radius: 0 0 12px 12px;
    animation: neural-fadein 0.35s ease forwards;
}
.declothed-panel.visible {
    display: flex;
}
.declothed-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.declothed-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #d4a8ff;
    text-transform: uppercase;
}
.declothed-sub {
    font-size: 10px;
    color: var(--text-muted);
}
.declothed-close {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 6px;
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.declothed-close:hover {
    background: rgba(255, 40, 40, 0.2);
    border-color: rgba(255, 40, 40, 0.5);
    color: #fff;
}
.declothed-split {
    display: flex;
    gap: 0;
    align-items: stretch;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(138, 43, 226, 0.22);
}
.declothed-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.declothed-col-label {
    padding: 5px 10px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(0,0,0,0.45);
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.declothed-divider {
    width: 2px;
    flex-shrink: 0;
    background: linear-gradient(to bottom, transparent, rgba(138,43,226,0.9), transparent);
}
.declothed-img {
    width: 100%;
    height: 195px;
    object-fit: cover;
    display: block;
    opacity: 0.92;
    transition: opacity 0.3s ease;
}
.declothed-img:hover {
    opacity: 1;
    cursor: zoom-in;
}
@keyframes neural-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
