/**
 * FER STUDIO — HIGH-PRECISION NEURAL VISION COCKPIT
 * Pro Max UI/UX Design System (Zero AI-Slop, Industrial Ergonomics, 100vh Workstation)
 * Skripsi Ahmad Atouf Atthariq (2104111010069) - Teknik Komputer USK
 */

/* ==========================================================================
   1. Design Tokens & Variables
   ========================================================================== */
:root {
    /* Base Color Architecture */
    --bg-cockpit: #080A10;
    --bg-surface: rgba(15, 20, 32, 0.72);
    --bg-surface-elevated: rgba(20, 27, 43, 0.82);
    --bg-viewport: #04060A;
    --bg-inset: rgba(10, 14, 22, 0.85);

    /* Hairline Precision Borders */
    --border-hairline: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --border-active: rgba(56, 189, 248, 0.45);
    
    /* Typography */
    --font-ui: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-data: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

    /* Text Hierarchy */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-dim: #475569;

    /* Emotion Spectrum Tokens */
    --color-happy: #10B981;
    --color-happy-glow: rgba(16, 185, 129, 0.25);
    --color-happy-bg: rgba(16, 185, 129, 0.10);

    --color-neutral: #F59E0B;
    --color-neutral-glow: rgba(245, 158, 11, 0.25);
    --color-neutral-bg: rgba(245, 158, 11, 0.10);

    --color-sad: #F43F5E;
    --color-sad-glow: rgba(244, 63, 94, 0.25);
    --color-sad-bg: rgba(244, 63, 94, 0.10);

    /* Interactive & Brand Accents */
    --accent-sky: #38BDF8;
    --accent-indigo: #6366F1;
    --accent-blue: #2563EB;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    /* Shadows & Glows */
    --shadow-panel: 0 4px 20px -2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --shadow-viewport: 0 8px 32px -4px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --shadow-btn-tactile: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   2. Reset & App Shell
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.hidden {
    display: none !important;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-cockpit);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 13px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.studio-cockpit-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: 
        radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.12), transparent 60%),
        radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.08), transparent 50%),
        var(--bg-cockpit);
}

/* Scrollbar refinement */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   3. Top Application Command Ribbon (56px)
   ========================================================================== */
.studio-header {
    height: 56px;
    flex-shrink: 0;
    background: rgba(10, 14, 24, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border-hairline);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 100;
}

/* Brand Group */
.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-monogram {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-sky);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

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

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

.brand-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.brand-subtag {
    font-family: var(--font-data);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: var(--accent-sky);
}

.brand-caption {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Center Tactile Mode Navigation */
.mode-navigation-bar {
    display: flex;
    align-items: center;
    background: rgba(14, 19, 31, 0.9);
    padding: 3px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-hairline);
    gap: 4px;
}

.nav-segment-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-segment-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-segment-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-segment-btn.active svg {
    color: var(--accent-sky);
}

/* Right Telemetry Chips */
.header-telemetry {
    display: flex;
    align-items: center;
    gap: 12px;
}

.telemetry-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34D399;
    font-family: var(--font-data);
    font-size: 11.5px;
    font-weight: 600;
}

.indicator-dot-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 10px #10B981;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.student-author-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-hairline);
}

.author-label {
    font-family: var(--font-data);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-sky);
}

.author-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

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

/* ==========================================================================
   4. Main 3-Zone Ergonomic Cockpit Floor
   ========================================================================== */
.cockpit-grid-workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 360px;
    gap: 16px;
    padding: 16px;
    height: calc(100vh - 56px);
    overflow: hidden;
}

/* Panels Base Styling */
.panel-section {
    background: var(--bg-surface);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-panel);
}

.section-title-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-data);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.section-title-bar svg {
    color: var(--accent-sky);
}

.section-subtext {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* ==========================================================================
   5. ZONE 1: LEFT CONTROL & PARAMETER DECK
   ========================================================================== */
.cockpit-left-deck {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    overflow-y: auto;
    padding-right: 2px;
}

/* Environmental Simulation Card */
.env-sim-card {
    flex-shrink: 0;
}

.env-button-matrix {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.env-select-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    background: rgba(14, 19, 31, 0.6);
    border: 1px solid var(--border-hairline);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.env-select-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.env-select-item.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sim-radio-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sim-radio-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s ease;
}

.env-select-item.active .sim-radio-circle {
    border-color: var(--accent-sky);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.env-select-item.active .sim-radio-dot {
    background: var(--accent-sky);
}

.env-item-info {
    display: flex;
    flex-direction: column;
}

.env-item-info strong {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.env-item-info span {
    font-size: 10.5px;
    color: var(--text-muted);
}

.btn-open-matrix-bench {
    width: 100%;
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(37, 99, 235, 0.18));
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38BDF8;
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.btn-open-matrix-bench:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(37, 99, 235, 0.3));
    border-color: rgba(56, 189, 248, 0.6);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
}

/* Studio Tools Card */
.studio-tools-card {
    flex-shrink: 0;
}

.tool-actions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-actions-list.hidden {
    display: none;
}

.tool-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.tool-action-btn svg {
    color: var(--accent-sky);
    flex-shrink: 0;
}

.tool-action-btn.btn-danger-action {
    color: #FDA4AF;
    background: rgba(244, 63, 94, 0.08);
    border-color: rgba(244, 63, 94, 0.25);
}

.tool-action-btn.btn-danger-action:hover {
    background: rgba(244, 63, 94, 0.16);
    color: #FFF;
}

.tool-action-btn.btn-danger-action svg {
    color: var(--color-sad);
}

/* Model Specs Compact Deck */
.model-specs-compact {
    margin-top: auto;
}

.mini-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.mini-spec-box {
    background: rgba(10, 14, 22, 0.7);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    padding: 7px 8px;
    display: flex;
    flex-direction: column;
}

.spec-k {
    font-family: var(--font-data);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.spec-v {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

.mini-spec-box.highlight-green {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.06);
}

.mini-spec-box.highlight-green .spec-v {
    color: var(--color-happy);
}

/* ==========================================================================
   6. ZONE 2: CENTER HIGH-PRECISION VIEWPORT STAGE
   ========================================================================== */
.cockpit-center-viewport {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

.viewport-stage-container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-viewport);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-viewport);
}

/* Top Telemetry HUD Bar inside Viewport */
.viewport-hud-header {
    position: absolute;
    top: 12px;
    left: 14px;
    right: 14px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.feed-status-badge {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(10, 14, 22, 0.78);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #64748B;
    transition: all 0.3s ease;
}

.status-live-dot.live-active {
    background: #10B981;
    box-shadow: 0 0 10px #10B981;
}

.status-label {
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.feed-metrics-cluster {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.metric-hud-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    background: rgba(10, 14, 22, 0.78);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-tag {
    font-family: var(--font-data);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.hud-num {
    font-family: var(--font-data);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Viewport Layers */
.viewport-layer {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #030508;
    overflow: hidden;
}

.viewport-layer.hidden {
    display: none;
}

/* 1. Webcam Stream Layer */
.webcam-layer video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.webcam-layer video.unmirrored {
    transform: scaleX(1);
}

.webcam-layer canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 10;
}

/* =========================================================================
   Simulasi Variabel Kondisi Lingkungan (Proposal Skripsi Tabel 3.3)
   ========================================================================= */
/* 1. Kondisi Cahaya Rendah (< 50 Lux - Underexposure) */
.webcam-layer video.filter-dim,
img.filter-dim {
    filter: brightness(0.38) contrast(0.85) saturate(0.8);
}

/* 2. Kondisi Cahaya Terang (> 300 Lux - Overexposure Glare) */
.webcam-layer video.filter-bright,
img.filter-bright {
    filter: brightness(1.45) contrast(1.22) saturate(1.1);
}

/* 3. Kondisi Jarak Dekat (30 cm – 50 cm) */
.webcam-layer video.filter-close.mirrored {
    transform: scaleX(-1) scale(1.35);
}
.webcam-layer video.filter-close.unmirrored,
.webcam-layer video.filter-close:not(.mirrored) {
    transform: scaleX(1) scale(1.35);
}
img.filter-close {
    transform: scale(1.25);
}

/* 4. Kondisi Jarak Jauh (150 cm – 200 cm) */
.webcam-layer video.filter-far.mirrored {
    transform: scaleX(-1) scale(0.68);
}
.webcam-layer video.filter-far.unmirrored,
.webcam-layer video.filter-far:not(.mirrored) {
    transform: scaleX(1) scale(0.68);
}
img.filter-far {
    transform: scale(0.72);
}

/* Tactical Viewfinder Reticle */
.tactical-viewfinder {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease;
}

.tactical-viewfinder.hidden {
    opacity: 0;
    pointer-events: none;
}

.viewfinder-brackets {
    position: relative;
    width: 65%;
    max-width: 480px;
    aspect-ratio: 4 / 3;
    border: 1px dashed rgba(56, 189, 248, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.vf-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--accent-sky);
    border-style: solid;
    border-width: 0;
    pointer-events: none;
}

.vf-corner.tl { top: -1px; left: -1px; border-top-width: 2.5px; border-left-width: 2.5px; border-top-left-radius: 6px; }
.vf-corner.tr { top: -1px; right: -1px; border-top-width: 2.5px; border-right-width: 2.5px; border-top-right-radius: 6px; }
.vf-corner.bl { bottom: -1px; left: -1px; border-bottom-width: 2.5px; border-left-width: 2.5px; border-bottom-left-radius: 6px; }
.vf-corner.br { bottom: -1px; right: -1px; border-bottom-width: 2.5px; border-right-width: 2.5px; border-bottom-right-radius: 6px; }

.vf-center-cross {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
}

.vf-center-cross::before, .vf-center-cross::after {
    content: '';
    position: absolute;
    background: rgba(56, 189, 248, 0.4);
}

.vf-center-cross::before {
    top: 6px;
    left: 0;
    right: 0;
    height: 1.5px;
}

.vf-center-cross::after {
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1.5px;
}

/* Standby Curtain */
.viewport-standby-curtain {
    position: absolute;
    inset: 0;
    z-index: 30;
    background: rgba(4, 6, 11, 0.92);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.standby-tactile-card {
    max-width: 440px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.standby-lens-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-xl);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-sky);
    margin-bottom: 20px;
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.15);
}

.standby-tactile-card h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.standby-tactile-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 24px;
}

.tactile-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFF;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4), var(--shadow-btn-tactile);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tactile-launch-btn:hover {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    transform: translateY(-1.5px);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.55), var(--shadow-btn-tactile);
}

.tactile-launch-btn:active {
    transform: translateY(0);
}

/* 2. Upload Layer */
.upload-layer {
    padding: 24px;
}

.studio-dropzone-box {
    width: 100%;
    max-width: 580px;
    padding: 48px 32px;
    border: 1.5px dashed rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-xl);
    background: rgba(15, 20, 32, 0.4);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-dropzone-box:hover {
    border-color: var(--accent-sky);
    background: rgba(56, 189, 248, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.dropzone-visual-aperture {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-sky);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.studio-dropzone-box:hover .dropzone-visual-aperture {
    transform: scale(1.08);
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
}

.studio-dropzone-box h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.studio-dropzone-box p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 22px;
    max-width: 440px;
}

.dropzone-browse-btn {
    padding: 10px 22px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    box-shadow: var(--shadow-btn-tactile);
}

/* Active Upload Frame (Clean 1:1 Display) */
.upload-active-frame {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

.upload-active-frame.hidden {
    display: none;
}

.image-viewport-box {
    position: relative;
    display: inline-block;
    max-width: 90%;
    max-height: 85%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
    background: #000;
}

.image-viewport-box img {
    display: block;
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.image-viewport-box canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* 3. Presets Layer */
.presets-deck-container {
    width: 100%;
    max-width: 860px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.presets-intro-text h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.presets-intro-text p {
    font-size: 12.5px;
    color: var(--text-muted);
}

.presets-interactive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.preset-glass-card {
    background: rgba(14, 19, 31, 0.7);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-panel);
}

.preset-glass-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.preset-media-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #0B0E17;
    overflow: hidden;
}

.preset-media-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    transition: transform 0.3s ease;
}

.preset-glass-card:hover .preset-media-box img {
    transform: scale(1.05);
}

.preset-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: var(--font-data);
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
}

.badge-happy { background: rgba(16, 185, 129, 0.25); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-neutral { background: rgba(245, 158, 11, 0.25); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-sad { background: rgba(244, 63, 94, 0.25); color: #FB7185; border: 1px solid rgba(244, 63, 94, 0.4); }

.preset-meta-box {
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.preset-meta-box h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.preset-meta-box p {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.preset-trigger-btn {
    width: 100%;
    padding: 7px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-glass-card:hover .preset-trigger-btn {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
    color: var(--accent-sky);
}

/* ==========================================================================
   7. ZONE 3: RIGHT TELEMETRY & NEURAL BIOMETRIC INSPECTOR
   ========================================================================== */
.cockpit-right-inspector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    overflow-y: auto;
    padding-right: 2px;
}

.inspector-card {
    background: var(--bg-surface);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-panel);
}

.card-eyebrow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.eyebrow-title {
    font-family: var(--font-data);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.eyebrow-sub {
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

.speed-pill {
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--accent-sky);
}

/* Hero Emotion Panel */
.hero-emotion-panel {
    border-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.emotion-display-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

/* Circular Precision Arc Gauge */
.circular-meter-wrapper {
    position: relative;
    width: 84px;
    height: 84px;
    flex-shrink: 0;
}

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

.arc-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 7;
}

.arc-value {
    fill: none;
    stroke: var(--color-neutral);
    stroke-width: 7;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.35s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
}

.arc-interior-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.arc-confidence-num {
    font-family: var(--font-data);
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.arc-confidence-lbl {
    font-family: var(--font-data);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Headline Block */
.emotion-headline-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.glyph-and-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.biometric-vector-glyph {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.dominant-emotion-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.confidence-rank-pill {
    display: inline-block;
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
}

/* FACS Diagnostic Callout */
.facs-diagnostic-callout {
    background: rgba(10, 14, 22, 0.8);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.facs-title-tag {
    font-family: var(--font-data);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.facs-explanation-text {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Softmax Probability Distribution */
.softmax-distribution-panel {
    flex-shrink: 0;
}

.softmax-bars-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.softmax-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.label-group {
    display: flex;
    align-items: center;
    gap: 7px;
}

.emotion-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-happy { background: var(--color-happy); box-shadow: 0 0 8px var(--color-happy); }
.dot-neutral { background: var(--color-neutral); box-shadow: 0 0 8px var(--color-neutral); }
.dot-sad { background: var(--color-sad); box-shadow: 0 0 8px var(--color-sad); }

.emotion-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.facs-code-tag {
    font-family: var(--font-data);
    font-size: 9.5px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.probability-value {
    font-family: var(--font-data);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.meter-rail {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.meter-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-happy { background: linear-gradient(90deg, #059669, #10B981); }
.fill-neutral { background: linear-gradient(90deg, #D97706, #F59E0B); }
.fill-sad { background: linear-gradient(90deg, #E11D48, #F43F5E); }

.softmax-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-data);
    font-size: 9px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-hairline);
    padding-top: 8px;
}

/* Academic Thesis Accreditation Card */
.thesis-accreditation-card {
    margin-top: auto;
    border-color: rgba(56, 189, 248, 0.2);
    background: linear-gradient(180deg, rgba(15, 20, 32, 0.8), rgba(12, 16, 26, 0.9));
}

.thesis-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-data);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--accent-sky);
    margin-bottom: 8px;
}

.thesis-formal-title {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 10px;
    font-style: italic;
}

.thesis-student-footer {
    display: flex;
    flex-direction: column;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
    border-top: 1px solid var(--border-hairline);
    padding-top: 6px;
}

.thesis-student-footer span:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* Dynamic State Themes for Dominant Card */
.state-happy {
    border-color: rgba(16, 185, 129, 0.4) !important;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.1), var(--bg-surface)) !important;
}
.state-happy .dominant-emotion-text { color: #34D399; }
.state-happy .arc-value { stroke: #10B981; }

.state-neutral {
    border-color: rgba(245, 158, 11, 0.4) !important;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.1), var(--bg-surface)) !important;
}
.state-neutral .dominant-emotion-text { color: #FBBF24; }
.state-neutral .arc-value { stroke: #F59E0B; }

.state-sad {
    border-color: rgba(244, 63, 94, 0.4) !important;
    background: radial-gradient(circle at top right, rgba(244, 63, 94, 0.1), var(--bg-surface)) !important;
}
.state-sad .dominant-emotion-text { color: #FB7185; }
.state-sad .arc-value { stroke: #F43F5E; }

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATION SYSTEM
   Ergonomic Mobile UX, Reordered Views, Touch Targets, Modal Adaptations
   ========================================================================== */

@media (max-width: 1200px) {
    .cockpit-grid-workspace {
        grid-template-columns: 260px minmax(0, 1fr) 320px;
    }
}

@media (max-width: 960px) {
    .studio-cockpit-app {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .studio-header {
        position: sticky;
        top: 0;
        z-index: 100;
        height: auto;
        min-height: 56px;
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-telemetry .student-author-chip {
        display: none; /* Disembunyikan dari header agar tidak sesak, kartu akreditasi lengkap ada di deck bawah */
    }

    .cockpit-grid-workspace {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 12px;
        gap: 14px;
        overflow: visible;
    }

    /* ERGONOMIC MOBILE RE-ORDER: KAMERA DI ATAS, PREDIKSI DI TENGAH, PARAMETER DI BAWAH */
    .cockpit-center-viewport {
        order: 1;
        width: 100%;
        height: auto;
    }

    .cockpit-right-inspector {
        order: 2;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .cockpit-left-deck {
        order: 3;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .viewport-stage-container {
        width: 100%;
        aspect-ratio: 4 / 3;
        min-height: 300px;
        max-height: 60vh;
    }

    .presets-interactive-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .studio-header {
        padding: 8px 12px;
    }

    .brand-caption {
        display: none;
    }

    .brand-name {
        font-size: 14px;
    }

    .brand-subtag {
        font-size: 8.5px;
        padding: 1px 5px;
    }

    .header-brand {
        gap: 8px;
    }

    .brand-monogram {
        width: 30px;
        height: 30px;
    }

    /* Mode Navigation di baris bawah header mobile */
    .mode-navigation-bar {
        order: 3;
        width: 100%;
        justify-content: space-around;
        padding: 3px;
        margin-top: 2px;
    }

    .nav-segment-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 6px;
        font-size: 11.5px;
        gap: 6px;
        min-height: 38px;
    }

    .header-telemetry {
        margin-left: auto;
    }

    .telemetry-pill {
        padding: 4px 9px;
        font-size: 10.5px;
    }

    /* Viewport HUD di mobile */
    .viewport-hud-header {
        top: 8px;
        left: 8px;
        right: 8px;
        gap: 6px;
    }

    .feed-status-badge {
        padding: 4px 8px;
    }

    .status-label {
        font-size: 9px;
    }

    .feed-metrics-cluster {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: flex-end;
    }

    .metric-hud-item {
        padding: 3px 6px;
        gap: 4px;
    }

    .hud-tag {
        font-size: 8px;
    }

    .hud-num {
        font-size: 9.5px;
    }

    .hud-condition-chip .condition-val {
        max-width: 85px;
    }

    /* Standby overlay */
    .standby-tactile-card {
        padding: 18px 14px;
        max-width: 90%;
    }

    .standby-tactile-card h3 {
        font-size: 15px;
    }

    .standby-tactile-card p {
        font-size: 11px;
    }

    .tactile-launch-btn {
        padding: 10px 18px;
        font-size: 12.5px;
        width: 100%;
        justify-content: center;
    }

    /* Hero Emotion Display */
    .emotion-display-hero {
        gap: 14px;
    }

    .hero-circular-gauge {
        width: 84px;
        height: 84px;
        min-width: 84px;
    }

    .dominant-emotion-text {
        font-size: 17px;
    }

    .dominant-tier-badge {
        font-size: 10px;
    }

    /* Tool Actions Buttons Touch Target */
    .tool-actions-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .tool-action-btn {
        padding: 10px 8px;
        font-size: 11.5px;
        justify-content: center;
        min-height: 42px;
    }

    .tool-action-btn.btn-perm-help {
        grid-column: span 2;
    }

    /* Modal Matriks Pengujian Skripsi di Mobile */
    .matrix-modal-backdrop {
        padding: 8px;
        align-items: flex-end;
    }

    .matrix-modal-card {
        max-height: 94vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .matrix-modal-header {
        padding: 14px 16px;
    }

    .matrix-title-text h3 {
        font-size: 13.5px;
    }

    .matrix-title-text p {
        font-size: 10.5px;
    }

    .matrix-modal-body {
        padding: 14px 16px;
        gap: 16px;
    }

    .decision-eval-banner {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .bench-metrics-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .bench-metric-card {
        padding: 10px 12px;
    }

    .bench-card-val {
        font-size: 18px;
    }

    .trial-inputs-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ground-truth-radio-group {
        display: flex;
        gap: 6px;
    }

    .gt-btn {
        min-height: 40px;
        font-size: 12px;
    }

    .btn-record-trial {
        width: 100%;
        min-height: 44px;
        font-size: 12.5px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .confusion-matrix-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .matrix-modal-footer {
        flex-direction: column-reverse;
        padding: 12px 16px;
        gap: 10px;
    }

    .matrix-modal-footer .footer-left-actions,
    .matrix-modal-footer > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .btn-export-csv,
    .btn-sim-auto,
    .btn-secondary-bench {
        width: 100%;
        min-height: 40px;
        justify-content: center;
        text-align: center;
    }

    /* Modal Izin Kamera */
    .permission-modal-backdrop {
        padding: 10px;
        align-items: flex-end;
    }

    .permission-modal-card {
        max-height: 94vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .perm-modal-body {
        padding: 16px;
    }

    .perm-modal-footer {
        flex-direction: column;
        padding: 12px 16px;
    }

    .btn-primary-perm,
    .btn-secondary-perm {
        width: 100%;
        justify-content: center;
        min-height: 42px;
    }

    /* Presets Grid di Layar Ponsel */
    .presets-interactive-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .cockpit-grid-workspace {
        padding: 8px;
        gap: 10px;
    }

    .viewport-stage-container {
        border-radius: var(--radius-md);
        min-height: 260px;
        aspect-ratio: 4 / 3;
    }

    .nav-segment-btn span {
        font-size: 10.5px;
    }

    .emotion-display-hero {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .hero-meta-summary {
        align-items: center;
    }

    .dominant-confidence-tag {
        justify-content: center;
    }

    .dominant-facs-desc {
        text-align: center;
    }

    .card-eyebrow-row {
        margin-bottom: 8px;
    }

    .tool-actions-list {
        grid-template-columns: 1fr;
    }

    .tool-action-btn.btn-perm-help {
        grid-column: 1;
    }

    .mini-specs-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }

    .spec-v {
        font-size: 10px;
    }

    .thesis-formal-title {
        font-size: 10.5px;
    }
}

/* ==========================================================================
   CAMERA PERMISSION & TROUBLESHOOTING MODAL STYLING
   ========================================================================== */
.btn-perm-help {
    border-color: rgba(245, 158, 11, 0.25) !important;
    color: #F59E0B !important;
}

.btn-perm-help:hover {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
}

.permission-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(3, 5, 10, 0.85);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.permission-modal-backdrop.hidden {
    display: none !important;
}

.permission-modal-card {
    width: 100%;
    max-width: 540px;
    background: #0B0F19;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.perm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-hairline);
    background: rgba(14, 20, 32, 0.6);
}

.perm-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
    font-family: var(--font-data);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.perm-modal-badge.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #F59E0B;
}

.perm-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.perm-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.perm-modal-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.perm-modal-body h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0;
}

.perm-modal-body p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.perm-steps-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.perm-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 10px 14px;
}

.step-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: var(--accent-sky);
    font-family: var(--font-data);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.step-content strong {
    font-size: 12.5px;
    color: var(--text-primary);
}

.step-content span {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

.perm-diagnostic-box {
    background: rgba(0, 0, 0, 0.45);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.diag-label {
    font-family: var(--font-data);
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.diag-status {
    font-family: var(--font-data);
    font-size: 9.5px;
    color: #10B981;
}

.perm-diagnostic-box code {
    font-family: var(--font-data);
    font-size: 11px;
    color: #F87171;
    word-break: break-all;
}

.perm-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(14, 20, 32, 0.6);
    border-top: 1px solid var(--border-hairline);
}

.btn-primary-perm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFF;
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: all 0.2s ease;
}

.btn-primary-perm:hover {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    transform: translateY(-1px);
}

.btn-secondary-perm {
    padding: 9px 16px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary-perm:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ==========================================================================
   ENVIRONMENTAL TESTING FILTERS (PROPOSAL V5 - TABEL 3.3)
   ========================================================================== */

/* Kondisi 1: Cahaya Rendah (< 50 Lux) - Simulasi Ruang Redup / Temaram */
.filter-dim {
    filter: brightness(0.42) contrast(1.15) saturate(0.85) !important;
}

/* Kondisi 2: Cahaya Terang (> 300 Lux) - Simulasi Overexposure / Lampu Terang */
.filter-bright {
    filter: brightness(1.68) contrast(0.92) saturate(1.1) !important;
}

/* Kondisi 3: Jarak Dekat (30 cm - 50 cm) - Wajah dominan close-up */
.filter-close {
    transform: scale(1.35) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Kondisi 4: Jarak Jauh (150 cm - 200 cm) - Wajah kecil & resolusi rendah */
.filter-far {
    transform: scale(0.62) !important;
    filter: blur(0.45px) contrast(0.95) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Tombol Buka Matriks Benchmarking Skripsi */
.btn-open-matrix-bench {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.22));
    border: 1px solid rgba(56, 189, 248, 0.38);
    border-radius: var(--radius-md);
    color: var(--accent-sky);
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.15);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-open-matrix-bench:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.38), rgba(14, 165, 233, 0.38));
    border-color: rgba(56, 189, 248, 0.7);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.25);
}

.btn-open-matrix-bench svg {
    color: var(--accent-sky);
    flex-shrink: 0;
}

/* Sub-label tag pada item radio simulasi */
.sim-target-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-hairline);
    font-family: var(--font-data);
    font-size: 9.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 3px;
}

.env-select-item.active .sim-target-tag {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--accent-sky);
}

/* HUD Chips untuk Kondisi Aktif dan Target V5 */
.hud-condition-chip .condition-val {
    font-size: 11px !important;
    color: var(--accent-sky) !important;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hud-threshold-chip .target-val {
    font-size: 11px !important;
    color: #10B981 !important;
}

/* ==========================================================================
   MODAL MATRIKS PENGUJIAN SKRIPSI (PROPOSAL BAB III - TABEL 3.3)
   ========================================================================== */
.matrix-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 12, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.matrix-modal-backdrop.open {
    display: flex;
    opacity: 1;
}

.matrix-modal-card {
    background: var(--bg-surface);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 980px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: matrixModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes matrixModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.matrix-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-hairline);
    background: rgba(14, 20, 32, 0.7);
}

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

.matrix-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-sky);
    flex-shrink: 0;
}

.matrix-title-text h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    letter-spacing: -0.01em;
}

.matrix-title-text p {
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 0;
}

.matrix-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.matrix-modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #EF4444;
}

/* Modal Body Scrollable */
.matrix-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Decision Evaluation Banner (Subbab 3.2 Butir 8) */
.decision-eval-banner {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 78, 59, 0.12));
    border: 1px solid rgba(16, 185, 129, 0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.decision-eval-banner.failing {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(127, 29, 29, 0.12));
    border-color: rgba(239, 68, 68, 0.28);
}

.eval-info-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eval-badge-status {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-data);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #10B981;
}

.decision-eval-banner.failing .eval-badge-status {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.45);
    color: #EF4444;
}

.eval-criteria-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.eval-criteria-desc strong {
    color: var(--text-primary);
}

/* Live Benchmarking Scorecards Grid */
.bench-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.bench-metric-card {
    background: var(--bg-sub);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bench-card-label {
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bench-card-val {
    font-family: var(--font-data);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.bench-card-target {
    font-size: 10.5px;
    color: var(--text-muted);
}

.bench-card-target.passed {
    color: #10B981;
}

.bench-card-target.failed {
    color: #EF4444;
}

/* Matriks Tabel Resmi Proposal V5 (Tabel 3.3) */
.section-block-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-block-title span.badge-num {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-sky);
    padding: 1px 7px;
    border-radius: var(--radius-full);
    font-family: var(--font-data);
    font-size: 10.5px;
}

.thesis-matrix-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    background: var(--bg-sub);
}

.thesis-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    text-align: left;
}

.thesis-matrix-table th {
    background: rgba(14, 20, 32, 0.85);
    color: var(--text-muted);
    font-family: var(--font-data);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-hairline);
    white-space: nowrap;
}

.thesis-matrix-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    vertical-align: middle;
}

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

.table-cond-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--accent-sky);
}

.table-progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 140px;
}

.table-progress-track {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.table-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563EB, #10B981);
    transition: width 0.3s ease;
}

.table-progress-text {
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 36px;
}

/* Pencatat Percobaan Langsung (Trial Recorder Deck) */
.trial-recorder-deck {
    background: var(--bg-sub);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trial-inputs-grid {
    display: grid;
    grid-template-columns: 1.4fr 1.6fr 1.5fr auto;
    gap: 14px;
    align-items: end;
}

.trial-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trial-input-label {
    font-family: var(--font-data);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
}

.trial-select {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 11.5px;
}

.trial-select:focus {
    outline: none;
    border-color: var(--accent-sky);
}

.ground-truth-radio-group {
    display: flex;
    gap: 6px;
}

.gt-btn {
    flex: 1;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gt-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.gt-btn.active.gt-happy {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.6);
    color: #10B981;
}

.gt-btn.active.gt-neutral {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.6);
    color: #F59E0B;
}

.gt-btn.active.gt-sad {
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.6);
    color: #F43F5E;
}

.live-inference-preview {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-data);
    font-size: 11px;
}

.btn-record-trial {
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #10B981, #059669);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFF;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-record-trial:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

/* Confusion Matrix 3x3 Grid */
.confusion-matrix-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
}

.cm-table-box {
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    background: var(--bg-sub);
    padding: 14px;
}

.cm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    text-align: center;
}

.cm-table th {
    padding: 6px;
    color: var(--text-muted);
    font-family: var(--font-data);
    font-weight: 700;
}

.cm-table td {
    padding: 8px 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cm-cell-val {
    font-family: var(--font-data);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.cm-cell-diag {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.cm-cell-diag .cm-cell-val {
    color: #10B981;
}

.class-metrics-box {
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    background: var(--bg-sub);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.class-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.class-name-badge {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-scores {
    font-family: var(--font-data);
    color: var(--text-secondary);
    display: flex;
    gap: 12px;
}

/* Modal Footer Actions */
.matrix-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: rgba(14, 20, 32, 0.7);
    border-top: 1px solid var(--border-hairline);
}

.footer-left-actions {
    display: flex;
    gap: 10px;
}

.btn-secondary-bench {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary-bench:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-sim-auto {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--accent-sky);
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sim-auto:hover {
    background: rgba(14, 165, 233, 0.22);
    border-color: rgba(14, 165, 233, 0.6);
}

.btn-export-csv,
.btn-export-xlsx {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #10B981, #059669);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFF;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
}

.btn-export-xlsx:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.55);
}

/* Header Matrix Highlight Tab */
.btn-nav-matrix-highlight {
    background: rgba(14, 165, 233, 0.12) !important;
    border: 1px solid rgba(14, 165, 233, 0.4) !important;
    color: var(--accent-sky) !important;
}

.btn-nav-matrix-highlight:hover {
    background: rgba(14, 165, 233, 0.22) !important;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.3) !important;
}

/* Deck Action Cluster & Primary Start Test Button */
.deck-matrix-action-cluster {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.btn-primary-start-test {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #F59E0B, #D97706);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFF;
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
}

.btn-primary-start-test:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #D97706, #B45309);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

.btn-highlight-orange {
    border-color: rgba(245, 158, 11, 0.45) !important;
    color: #F59E0B !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

.btn-highlight-orange:hover {
    background: rgba(245, 158, 11, 0.2) !important;
}

/* Quick Testing Bar Above Viewfinder */
.quick-testing-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-hairline);
    z-index: 25;
    margin-top: 48px;
}

@media (max-width: 900px) {
    .quick-testing-strip {
        margin-top: 0;
    }
}

.btn-strip-start-test {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.3));
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #FECACA;
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-strip-start-test:hover {
    background: rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
    color: #FFF;
}

.pulse-indicator-red {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #EF4444;
    box-shadow: 0 0 8px #EF4444;
    animation: indicatorPulse 1.2s infinite ease-in-out;
}

.btn-strip-view-matrix {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-hairline);
    color: var(--accent-sky);
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.2s ease;
}

.btn-strip-view-matrix:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(14, 165, 233, 0.4);
}

/* Automated 30-Test Countdown Overlay */
.test-countdown-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 17, 32, 0.88);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

.test-countdown-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.15);
    padding: 24px 28px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.test-cond-tag-pill {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: var(--accent-sky);
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.test-counter-pill {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
}

.test-counter-pill strong {
    color: #FFF;
    font-size: 16px;
}

.test-prompt-expression-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    width: 100%;
}

.prompt-sub {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.prompt-target-name {
    font-family: var(--font-ui);
    font-size: 17px;
    font-weight: 800;
    color: #F59E0B;
    letter-spacing: 0.5px;
}

.countdown-circle-timer {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, rgba(15, 23, 42, 0.9) 70%);
    border: 3px solid rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px 0;
}

.countdown-big-num {
    font-family: var(--font-mono);
    font-size: 52px;
    font-weight: 900;
    color: #FFF;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.8);
}

.countdown-pulse {
    animation: countPulse 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.countdown-capture {
    font-size: 38px;
    animation: capturePulse 0.4s ease-out;
}

@keyframes countPulse {
    0% { transform: scale(0.6); opacity: 0; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1.0); opacity: 1; }
}

@keyframes capturePulse {
    0% { transform: scale(1.4); }
    100% { transform: scale(1.0); }
}

.camera-flash-effect {
    position: absolute;
    inset: 0;
    background: #FFF;
    z-index: 50;
    animation: flashFade 0.35s ease-out forwards;
    pointer-events: none;
}

@keyframes flashFade {
    0% { opacity: 0.85; }
    100% { opacity: 0; }
}

.test-last-capture-result {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-secondary);
    min-height: 22px;
}

.test-overlay-actions {
    margin-top: 6px;
    width: 100%;
}

.btn-stop-test {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #EF4444;
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-stop-test:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #FFF;
}

/* Transition Dialog Card (Requirement 5) */
.transition-dialog-card {
    background: linear-gradient(145deg, #1E293B, #0F172A);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(16, 185, 129, 0.2);
    padding: 30px;
    max-width: 480px;
    width: 90%;
    margin: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.trans-dialog-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.transition-dialog-card h3 {
    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: 800;
    color: #FFF;
    margin: 0;
}

.transition-dialog-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.trans-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin: 4px 0;
}

.tstat-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tstat-box .k {
    font-size: 10.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.tstat-box .v {
    font-family: var(--font-mono);
    font-size: 14px;
    color: #38BDF8;
    font-weight: 700;
}

.trans-dialog-prompt {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    width: 100%;
    font-size: 13.5px;
    color: #E2E8F0;
}

.trans-dialog-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}

.btn-trans-next {
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #10B981, #059669);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFF;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
}

.btn-trans-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}

.btn-trans-repeat {
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-trans-repeat:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #FFF;
}

.btn-trans-view {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--accent-sky);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* Export Identity Card in Matrix Modal */
.export-identity-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-top: 14px;
}

.export-identity-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 600px) {
    .export-identity-inputs {
        grid-template-columns: 1fr;
    }
}

.export-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.export-field label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.export-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: #FFF;
    font-family: var(--font-ui);
    font-size: 12.5px;
    transition: border-color 0.2s ease;
}

.export-input:focus {
    outline: none;
    border-color: var(--accent-sky);
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.3);
}


