/* ============================================================
   PROJECT 713: THE NEDRY AUDIT
   Visual Design — Windows 3.1 Gray UI with Teal Desktop
   ============================================================ */

/* --- CSS Variables --- */
:root {
    /* Teal textured desktop background */
    --desktop-bg: #1a2e2e;
    --desktop-bg-light: #213838;
    --desktop-bg-gradient: linear-gradient(135deg, #0f1f1f 0%, #1a2e2e 40%, #1f3535 100%);
    
    /* CRT Green palette */
    --crt-green: #33ff33;
    --crt-green-bright: #55ff55;
    --crt-green-dim: #1a8c1a;
    --crt-green-dark: #0d4d0d;
    --crt-green-muted: #2a9e2a;
    
    /* Accent colors */
    --crt-amber: #ffb000;
    --crt-amber-dim: #996a00;
    --crt-red: #ff3333;
    --crt-cyan: #00cccc;
    --crt-cyan-dim: #008888;
    --crt-white: #ccddcc;
    --crt-yellow: #e8c840;
    
    /* Windows 3.1 gray chrome */
    --win-bg: #c0c0c0;
    --win-face: #c0c0c0;
    --win-light: #ffffff;
    --win-mid: #808080;
    --win-dark: #404040;
    --win-shadow: #000000;
    --win-titlebar-active: linear-gradient(90deg, #000080 0%, #1084d0 100%);
    --win-titlebar-inactive: linear-gradient(90deg, #808080 0%, #c0c0c0 100%);
    --win-title-text-active: #ffffff;
    --win-title-text-inactive: #c0c0c0;
    
    /* Explorer */
    --explorer-bg: #ffffff;
    --explorer-border: #808080;
    --explorer-text: #000000;
    
    /* Panels (dark content areas) */
    --bg-dark: #0a0e0e;
    --bg-panel: #111818;
    --bg-window: #0d120d;
    --border-green: #1a5c1a;
    --border-bright: #33aa33;
    --border-teal: #2a6666;
    
    /* Taskbar */
    --taskbar-bg: #c0c0c0;
    --taskbar-border: #808080;
    
    /* Fonts */
    --font-mono: 'Share Tech Mono', 'Courier New', monospace;
    --font-terminal: 'VT323', 'Courier New', monospace;
    --font-ui: 'Source Code Pro', 'Courier New', monospace;
    
    /* Effects */
    --phosphor-glow: 0 0 4px rgba(51, 255, 51, 0.4), 0 0 8px rgba(51, 255, 51, 0.15);
    --phosphor-glow-amber: 0 0 4px rgba(255, 176, 0, 0.4), 0 0 8px rgba(255, 176, 0, 0.15);
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: #000;
    font-family: var(--font-mono);
    color: var(--crt-green);
    cursor: default;
    user-select: none;
}

.hidden { display: none !important; }

/* --- CRT Barrel Curvature (whole screen) --- */
#crt-screen-wrap {
    width: 100%; height: 100%;
    position: fixed; top: 0; left: 0;
    /* Barrel distortion via perspective */
    overflow: hidden;
}

/* --- Scrollbar (Windows 3.1 style) --- */
::-webkit-scrollbar { width: 16px; }
::-webkit-scrollbar-track {
    background: var(--win-face);
    border-left: 1px solid var(--win-mid);
}
::-webkit-scrollbar-thumb {
    background: var(--win-face);
    border: 1px outset var(--win-light);
    box-shadow: inset -1px -1px 0 var(--win-dark), inset 1px 1px 0 var(--win-light);
}
::-webkit-scrollbar-thumb:hover {
    background: #d4d4d4;
}
::-webkit-scrollbar-button {
    height: 16px;
    background: var(--win-face);
    border: 1px outset var(--win-light);
}

/* ============================================================
   CRT OVERLAY — Subtle scanlines + Barrel curvature
   ============================================================ */
#crt-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 10000;
    /* Very subtle scanlines */
    background: repeating-linear-gradient(
        0deg, transparent, transparent 3px,
        rgba(0, 0, 0, 0.03) 3px, rgba(0, 0, 0, 0.03) 4px
    );
}

/* Barrel curvature via border-radius + vignette */
#crt-overlay::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.2) 100%);
    border-radius: 12px;
}

/* Curved screen edge effect */
#crt-overlay::after {
    content: ''; position: absolute; top: -2px; left: -2px;
    right: -2px; bottom: -2px;
    border: 3px solid rgba(0,0,0,0.8);
    border-radius: 18px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.2), inset 0 0 80px rgba(0,0,0,0.1);
    pointer-events: none;
}

/* ============================================================
   LOGIN SCREEN — Authentic IRIX terminal login
   ============================================================ */
#login-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #0a0a0a;
    display: flex; align-items: center; justify-content: center;
    z-index: 9000;
}

#login-content {
    text-align: center;
    width: 100%;
    max-width: 540px;
}

#login-logo-container {
    width: 240px;
    margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
}

#login-logo {
    width: 240px;
    height: 240px;
    image-rendering: pixelated;
    opacity: 0.7;
}

#login-title {
    font-family: var(--font-terminal);
    font-size: 28px;
    color: #88cc88;
    letter-spacing: 4px;
    margin-bottom: 4px;
    font-weight: normal;
}

#login-version {
    font-family: var(--font-terminal);
    font-size: 14px;
    color: #446644;
    letter-spacing: 2px;
    margin-bottom: 35px;
}

#login-form {
    padding: 0 40px;
    margin: 0 auto 25px;
    max-width: 460px;
}

.login-field {
    text-align: left;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-field label {
    font-family: var(--font-terminal);
    font-size: 16px;
    color: #88cc88;
    white-space: nowrap;
    min-width: 100px;
    letter-spacing: 1px;
}

.login-field input {
    flex: 1;
    height: 28px;
    background: #0a0a0a;
    border: 1px solid #335533;
    outline: none;
    font-family: var(--font-terminal);
    font-size: 16px;
    color: #88cc88;
    padding: 2px 6px;
    caret-color: #88cc88;
}

.login-field input:focus {
    border-color: #559955;
}

.login-field input[type="password"] {
    border-color: #335533;
    background: #0a0a0a;
}

#login-btn {
    font-family: var(--font-terminal);
    font-size: 14px;
    color: #88cc88;
    background: transparent;
    border: 1px solid #335533;
    padding: 5px 24px;
    cursor: pointer;
    letter-spacing: 2px;
    margin-top: 12px;
}

#login-btn:hover {
    border-color: #559955;
    color: #aaddaa;
}

#login-warning {
    font-family: var(--font-terminal);
    font-size: 13px;
    color: #88cc88;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

#login-alert {
    font-family: var(--font-terminal);
    font-size: 12px;
    color: #446644;
    letter-spacing: 1px;
}

/* Login footer — disclaimer + coffee */
#login-footer {
    position: fixed;
    bottom: 20px;
    left: 0; right: 0;
    text-align: center;
}

#login-disclaimer {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #334433;
    letter-spacing: 0.5px;
    line-height: 1.5;
    margin-bottom: 8px;
}

#login-coffee-btn {
    display: inline-block;
    font-family: var(--font-terminal);
    font-size: 12px;
    color: #557755;
    text-decoration: none;
    border: 1px solid #334433;
    padding: 4px 14px;
    letter-spacing: 1px;
    transition: color 0.2s, border-color 0.2s;
}

#login-coffee-btn:hover {
    color: #88cc88;
    border-color: #557755;
}

/* About dialog */
.about-dialog-body {
    padding: 16px;
    background: var(--win-face);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.about-title {
    font-family: var(--font-terminal);
    font-size: 16px;
    font-weight: bold;
    color: #225588;
    letter-spacing: 1px;
}

.about-version {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #666;
}

.about-divider {
    width: 100%;
    height: 1px;
    background: var(--win-dark);
    margin: 4px 0;
}

.about-credit {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #333;
}

.about-link {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #225588;
    text-decoration: none;
}
.about-link:hover {
    text-decoration: underline;
}

.about-disclaimer {
    font-family: var(--font-mono);
    font-size: 9px;
    color: #999;
    line-height: 1.4;
    margin-top: 4px;
}

/* ============================================================
   BOOT SEQUENCE
   ============================================================ */
#boot-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark);
    display: flex; align-items: flex-start; justify-content: flex-start;
    z-index: 9000;
    padding: 30px 40px;
    overflow: hidden;
}

#boot-content {
    width: 100%; max-width: 900px;
    display: flex; flex-direction: column;
    height: 100%;
}

#boot-text {
    font-family: var(--font-terminal);
    font-size: 15px; color: var(--crt-green);
    text-shadow: var(--phosphor-glow);
    line-height: 1.5; white-space: pre-wrap;
    flex: 1; overflow-y: hidden;
    display: flex; flex-direction: column; justify-content: flex-end;
}




/* ============================================================
   MAGIC WORD POPUP
   ============================================================ */
#magic-word-popup {
    position: fixed;
    bottom: 40px; right: 10px;
    width: 240px;
    z-index: 9500;
    border: 2px solid var(--crt-amber);
    background: var(--bg-dark);
    box-shadow: 0 0 20px rgba(255, 176, 0, 0.3), 2px 2px 0 rgba(0,0,0,0.5);
    animation: popup-shake 0.15s ease-in-out infinite;
}

#magic-word-header {
    background: var(--crt-amber);
    color: #000;
    font-family: var(--font-terminal);
    font-size: 13px;
    padding: 3px 8px;
    display: flex; align-items: center; gap: 6px;
    font-weight: bold;
}

.magic-word-icon { font-size: 14px; }

#magic-word-body {
    padding: 10px;
    text-align: center;
}

#magic-word-text {
    font-family: var(--font-terminal);
    font-size: 15px;
    color: var(--crt-green);
    text-shadow: var(--phosphor-glow);
    line-height: 1.3;
}

#lockout-timer {
    font-family: var(--font-terminal);
    font-size: 13px;
    color: var(--crt-amber);
    margin-top: 6px;
}

@keyframes popup-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* ============================================================
   DECODE PUZZLE
   ============================================================ */
#decode-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex; align-items: center; justify-content: center;
    z-index: 9500;
}

#decode-content {
    width: 85%; max-width: 1000px;
    border: 1px solid var(--border-bright); background: var(--bg-dark); padding: 20px;
}

#decode-header {
    font-family: var(--font-terminal); font-size: 18px;
    color: var(--crt-amber); text-shadow: var(--phosphor-glow-amber);
    text-align: center; margin-bottom: 20px;
    padding-bottom: 10px; border-bottom: 1px solid var(--border-green);
}

#decode-streams { display: flex; gap: 10px; margin-bottom: 15px; height: 350px; }

.decode-stream {
    flex: 1; border: 1px solid var(--border-green);
    background: var(--bg-panel); overflow: hidden;
}

.stream-label {
    font-family: var(--font-terminal); font-size: 12px;
    color: var(--crt-amber); background: rgba(26, 68, 68, 0.5);
    padding: 4px 8px; border-bottom: 1px solid var(--border-green);
}

.decode-stream pre {
    font-family: var(--font-terminal); font-size: 13px;
    color: var(--crt-green); text-shadow: var(--phosphor-glow);
    padding: 8px; line-height: 1.5; height: calc(100% - 28px); overflow-y: auto;
}

#decode-align-indicator {
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    min-width: 120px; gap: 10px;
}

#decode-status {
    font-family: var(--font-terminal); font-size: 16px;
    color: var(--crt-red); text-shadow: 0 0 8px rgba(255, 50, 50, 0.4);
    padding: 6px 12px; border: 1px solid var(--crt-red);
}

#decode-status.aligned {
    color: var(--crt-green); text-shadow: var(--phosphor-glow);
    border-color: var(--crt-green);
}

#decode-offset { font-family: var(--font-terminal); font-size: 14px; color: var(--crt-amber); }

#decode-controls {
    font-family: var(--font-terminal); font-size: 14px;
    color: var(--crt-green-dim); text-align: center;
    padding: 10px; border-top: 1px solid var(--border-green);
}

#decode-result {
    font-family: var(--font-terminal); font-size: 14px;
    color: var(--crt-green); text-shadow: var(--phosphor-glow);
    padding: 15px; margin-top: 10px;
    border: 1px solid var(--border-bright); background: var(--bg-panel);
}

/* ============================================================
   DESKTOP — Teal textured background
   ============================================================ */
#desktop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--desktop-bg);
    background: var(--desktop-bg-gradient);
    /* Subtle teal texture crosshatch */
    background-image:
        var(--desktop-bg-gradient),
        repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(255,255,255,0.008) 1px, rgba(255,255,255,0.008) 2px),
        repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(255,255,255,0.008) 1px, rgba(255,255,255,0.008) 2px);
}

/* JP Logo watermark */
#desktop-watermark {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

#watermark-logo {
    width: 350px; height: 350px;
    object-fit: contain;
    filter: grayscale(100%) brightness(1.5);
}

/* ============================================================
   DESKTOP ICONS
   ============================================================ */
#desktop-icons {
    position: absolute;
    top: 15px; left: 15px;
    display: flex; flex-direction: column;
    gap: 10px; z-index: 1;
}

.desktop-icon {
    display: flex; flex-direction: column;
    align-items: center; width: 80px;
    padding: 6px 4px; cursor: pointer;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: background 0.15s;
}

.desktop-icon:hover {
    background: rgba(51, 255, 51, 0.08);
    border-color: rgba(51, 255, 51, 0.2);
}

.desktop-icon span {
    font-family: var(--font-mono); font-size: 11px;
    color: var(--crt-green); text-shadow: var(--phosphor-glow);
    margin-top: 4px; text-align: center;
}

/* Icon graphics */
.icon-img {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}

.icon-folder-yellow {
    width: 44px; height: 32px;
    background: linear-gradient(180deg, #f0d050 0%, #d8b828 100%);
    border: 2px solid #a89020;
    border-radius: 0 3px 3px 3px;
    position: relative;
    box-shadow: 1px 2px 2px rgba(0,0,0,0.3);
}
.icon-folder-yellow::before {
    content: '';
    position: absolute; top: -7px; left: 0;
    width: 18px; height: 7px;
    background: #e8c840;
    border: 2px solid #a89020;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
}

/* System Computer — Win 3.1 style monitor */
.icon-system {
    width: 42px; height: 32px;
    background: #808080;
    border: 2px solid;
    border-color: #c0c0c0 #404040 #404040 #c0c0c0;
    position: relative;
    box-shadow: 1px 1px 0 #000;
}
/* Screen */
.icon-system::before {
    content: '';
    position: absolute;
    top: 3px; left: 4px; right: 4px; bottom: 5px;
    background: #003300;
    border: 2px solid;
    border-color: #404040 #c0c0c0 #c0c0c0 #404040;
}
/* Stand */
.icon-system::after {
    content: '';
    position: absolute;
    bottom: -7px; left: 50%;
    transform: translateX(-50%);
    width: 22px; height: 5px;
    background: #808080;
    border: 2px solid;
    border-color: #c0c0c0 #404040 #404040 #c0c0c0;
    border-top: none;
}

/* Security Log — Win 3.1 style notepad/clipboard */
.icon-alert-red {
    width: 32px; height: 40px;
    background: #ffffcc;
    border: 2px solid;
    border-color: #c0c0c0 #404040 #404040 #c0c0c0;
    position: relative;
    box-shadow: 1px 1px 0 #000;
}
/* Red header bar */
.icon-alert-red::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 8px;
    background: #cc0000;
    border-bottom: 1px solid #800000;
}
/* Exclamation */
.icon-alert-red::after {
    content: '!';
    position: absolute;
    top: -1px; left: 0; right: 0;
    text-align: center;
    font-family: var(--font-terminal);
    font-size: 11px; font-weight: bold;
    color: #fff;
    line-height: 8px;
}

/* InGen Security — Win 3.1 style shield/badge */
.icon-shield {
    width: 36px; height: 40px;
    background: #000080;
    clip-path: polygon(50% 0%, 100% 15%, 100% 60%, 50% 100%, 0% 60%, 0% 15%);
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
/* Inner face */
.icon-shield::before {
    content: '';
    position: absolute;
    width: 28px; height: 32px;
    top: 4px;
    background: #0000aa;
    clip-path: polygon(50% 0%, 100% 15%, 100% 60%, 50% 100%, 0% 60%, 0% 15%);
}
/* Star */
.icon-shield::after {
    content: '★';
    position: relative;
    z-index: 1;
    font-size: 16px;
    color: #ffff00;
    margin-top: 2px;
}

/* ── Security Toolkit Panel ── */
.security-toolkit-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    gap: 8px;
    background: var(--win-face);
}
.sec-toolkit-header {
    font-family: var(--font-terminal);
    font-size: 16px;
    font-weight: bold;
    color: #225588;
    letter-spacing: 1px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--win-dark);
    width: 100%;
    text-align: center;
}
.sec-toolkit-sub {
    font-family: var(--font-terminal);
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}
.sec-toolkit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}
.sec-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    font-family: var(--font-terminal);
    font-size: 20px;
    background: var(--win-face);
    border: 2px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    cursor: pointer;
}
.sec-btn span {
    font-size: 13px;
    color: #333;
}
.sec-btn:hover {
    background: #ddd;
}
.sec-btn:active {
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
}
.sec-toolkit-footer {
    font-family: var(--font-terminal);
    font-size: 11px;
    color: #999;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* ============================================================
   WINDOW SYSTEM — Windows 3.1 Beveled Gray
   ============================================================ */
.irix-window {
    position: absolute;
    min-width: 200px; min-height: 120px;
    background: var(--win-face);
    /* Win 3.1 3D border: light top-left, dark bottom-right */
    border: 2px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    box-shadow: 1px 1px 0 var(--win-shadow);
    display: flex; flex-direction: column;
    z-index: 100;
    outline: 1px solid var(--win-shadow);
}

.irix-window.focused {
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
}

.irix-window.maximized .resize-handle { display: none; }

/* Title bar — Windows 3.1 blue gradient */
.window-titlebar {
    display: flex; align-items: center;
    background: var(--win-titlebar-active);
    padding: 2px 3px; cursor: move;
    height: 22px; flex-shrink: 0;
}

.irix-window:not(.focused) .window-titlebar {
    background: var(--win-titlebar-inactive);
}

/* Dark variant for terminal */
.window-titlebar.dark {
    background: linear-gradient(90deg, #2a2a2a 0%, #505050 100%);
}
.irix-window:not(.focused) .window-titlebar.dark {
    background: var(--win-titlebar-inactive);
}

/* Navy variant for file navigator */
.window-titlebar.navy {
    background: var(--win-titlebar-active);
}

.window-titlebar-icon {
    width: 16px; height: 16px;
    margin-right: 4px;
    font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}

.window-title {
    flex: 1;
    font-family: var(--font-mono); font-size: 12px; font-weight: bold;
    color: var(--win-title-text-active);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    text-shadow: none;
}

.irix-window:not(.focused) .window-title {
    color: var(--win-title-text-inactive);
}

/* Window buttons — Windows 3.1 beveled gray squares */
.window-controls { display: flex; gap: 2px; }

.window-btn {
    width: 18px; height: 16px;
    border: 1px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    background: var(--win-face);
    color: #000;
    font-family: var(--font-terminal); font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; line-height: 1;
}

.window-btn:active {
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
}

.window-body {
    flex: 1; overflow: auto; padding: 0; position: relative;
    display: flex; flex-direction: column;
    /* Sunken 3D border inside */
    border: 2px solid;
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
    background: var(--bg-dark);
}

/* Explorer windows get light background */
.irix-window[data-type="explorer"] .window-body {
    background: var(--explorer-bg);
}

/* ============================================================
   RESIZE HANDLES
   ============================================================ */
.resize-handle { position: absolute; z-index: 10; }
.resize-r { top: 0; right: -4px; width: 6px; height: 100%; cursor: e-resize; }
.resize-b { bottom: -4px; left: 0; width: 100%; height: 6px; cursor: s-resize; }
.resize-l { top: 0; left: -4px; width: 6px; height: 100%; cursor: w-resize; }
.resize-t { top: -4px; left: 0; width: 100%; height: 6px; cursor: n-resize; }
.resize-br { bottom: -6px; right: -6px; width: 12px; height: 12px; cursor: se-resize; }
.resize-bl { bottom: -6px; left: -6px; width: 12px; height: 12px; cursor: sw-resize; }
.resize-tr { top: -6px; right: -6px; width: 12px; height: 12px; cursor: ne-resize; }
.resize-tl { top: -6px; left: -6px; width: 12px; height: 12px; cursor: nw-resize; }

/* ============================================================
   TERMINAL — Green-on-dark
   ============================================================ */
.terminal-body {
    padding: 8px;
    font-family: var(--font-terminal); font-size: 15px;
    color: var(--crt-green); text-shadow: var(--phosphor-glow);
    line-height: 1.4; cursor: text;
    height: 100%; overflow-y: auto;
    background: var(--bg-dark);
}

.terminal-output { white-space: pre-wrap; word-wrap: break-word; }

.terminal-input-line { display: flex; align-items: center; }

.terminal-prompt {
    color: var(--crt-green); white-space: nowrap; margin-right: 4px;
}

.terminal-input {
    background: transparent; border: none; outline: none;
    font-family: var(--font-terminal); font-size: 15px;
    color: var(--crt-green); text-shadow: var(--phosphor-glow);
    flex: 1; caret-color: var(--crt-green);
}

@keyframes cursor-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.output-error { color: var(--crt-red); }
.output-warning { color: var(--crt-amber); text-shadow: var(--phosphor-glow-amber); }
.output-info { color: var(--crt-cyan); }
.output-success { color: var(--crt-green); }
.output-dim { color: var(--crt-green-dim); }
.output-header { color: var(--crt-amber); text-shadow: var(--phosphor-glow-amber); }

/* ============================================================
   EXPLORER — Light bg, yellow 3D folder icons
   ============================================================ */
.exp-pathbar {
    display: flex; align-items: center;
    background: var(--win-face);
    border-bottom: 1px solid var(--win-mid);
    padding: 3px 8px;
    font-family: var(--font-mono); font-size: 12px;
    color: #000; gap: 6px;
}

.exp-pathbar-up {
    cursor: pointer; color: #000;
    font-size: 12px; padding: 1px 6px;
    border: 1px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    background: var(--win-face);
    font-family: var(--font-mono);
}
.exp-pathbar-up:hover { background: #d4d4d4; }
.exp-pathbar-up:active {
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
}

.exp-pathbar-text { color: #000; }

.exp-content {
    background: #fff;
    padding: 20px 15px;
    display: flex; flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    overflow-y: auto; height: calc(100% - 28px);
}

.exp-empty {
    padding: 20px; color: #888;
    font-family: var(--font-mono); font-size: 12px;
}

.exp-item {
    display: flex; flex-direction: column;
    align-items: center; width: 90px;
    padding: 8px 4px; cursor: pointer;
    border: 1px solid transparent; border-radius: 2px;
}
.exp-item:hover {
    background: #000080;
    border-color: #000080;
}
.exp-item:hover .exp-label { color: #fff; }

/* Yellow 3D folder icon */
.exp-folder-icon {
    width: 48px; height: 32px;
    background: linear-gradient(180deg, #f0d050 0%, #d8b828 50%, #c8a818 100%);
    border: 1px solid #a08820;
    border-radius: 0 2px 2px 2px;
    position: relative;
    box-shadow: 1px 2px 3px rgba(0,0,0,0.2);
}
.exp-folder-icon::before {
    content: '';
    position: absolute;
    top: -7px; left: 0;
    width: 20px; height: 7px;
    background: #e8c840;
    border: 1px solid #a08820;
    border-bottom: none;
    border-radius: 2px 2px 0 0;
}

/* File/document icon */
.exp-file-icon {
    width: 34px; height: 40px;
    background: #fff;
    border: 1px solid #000;
    position: relative;
}
.exp-file-icon::before {
    content: '';
    position: absolute; top: 0; right: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent #c0c0c0 transparent transparent;
}
.exp-file-icon::after {
    content: '';
    position: absolute; top: 0; right: 0;
    width: 8px; height: 8px;
    background: #fff;
    border-left: 1px solid #000;
    border-bottom: 1px solid #000;
}

.exp-label {
    font-family: var(--font-mono); font-size: 11px;
    color: #000; text-align: center;
    word-break: break-all; margin-top: 4px; line-height: 1.2;
}

/* ============================================================
   FILE NAVIGATOR — Image 2 match with Win 3.1 chrome
   ============================================================ */
.fn-menubar {
    display: flex; align-items: center;
    background: var(--win-face);
    border-bottom: 1px solid var(--win-mid);
    padding: 2px 0; flex-shrink: 0;
    font-family: var(--font-ui); font-size: 13px;
}
.fn-menu-item {
    padding: 2px 14px; color: #000; cursor: default;
}
.fn-menu-item u { text-decoration: underline; }
.fn-menu-item:hover {
    background: #000080; color: #fff;
}

.fn-toolbar {
    display: flex; align-items: center;
    background: var(--win-face);
    border-bottom: 1px solid var(--win-mid);
    padding: 3px 8px; gap: 8px; flex-shrink: 0;
}
.fn-toolbar-btn {
    font-family: var(--font-mono); font-size: 12px;
    background: var(--win-face);
    border: 1px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    padding: 2px 10px; color: #000; cursor: default;
}
.fn-toolbar-btn:hover { background: #d4d4d4; }
.fn-toolbar-btn:active {
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
}
.fn-searchbar {
    flex: 1; display: flex; align-items: center;
    background: #fff;
    border: 2px solid;
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
    padding: 1px 4px; gap: 4px;
}
.fn-search-icon { font-size: 12px; }
.fn-search-input {
    flex: 1; border: none; outline: none;
    font-family: var(--font-mono); font-size: 12px;
    color: #000; background: transparent;
}

.fn-main {
    display: flex; flex: 1; overflow: hidden;
}

.fn-sidebar {
    width: 150px; flex-shrink: 0;
    background: var(--win-face);
    border-right: 1px solid var(--win-mid);
    overflow-y: auto; padding: 2px 0;
    font-family: var(--font-mono); font-size: 11px;
    line-height: 1.4;
}
.fn-sidebar-item {
    display: flex; align-items: center;
    padding: 1px 4px; cursor: pointer;
    color: #000; gap: 2px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.fn-sidebar-item:hover { background: #d0d0d0; }
.fn-sidebar-item.active {
    background: #b8b8b8;
    color: #000;
}
.fn-sidebar-child { padding-left: 16px; }
.fn-sidebar-root { font-weight: normal; }
.fn-sidebar-icon { font-size: 10px; width: 14px; text-align: center; flex-shrink: 0; color: #444; }

.fn-resize-handle {
    width: 4px; flex-shrink: 0;
    background: var(--win-face);
    border-left: 1px solid var(--win-mid);
    border-right: 1px solid var(--win-mid);
    cursor: col-resize;
}
.fn-resize-handle:hover {
    background: #a0a0a0;
}

.fn-doc-area {
    flex: 1; display: flex; flex-direction: column;
    overflow: hidden;
}
.fn-doc-header {
    display: flex; justify-content: space-between;
    background: #000080; color: #c0c0ff;
    font-family: var(--font-mono); font-size: 11px;
    padding: 3px 8px; border-bottom: 1px solid #000050;
    flex-shrink: 0;
}

.fn-doc-content {
    flex: 1; overflow-y: auto;
    background: #0c1820;
    padding: 15px;
    font-family: var(--font-terminal); font-size: 14px;
    color: var(--crt-green); text-shadow: var(--phosphor-glow);
    line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;
}

.fn-doc-content::after {
    content: '█';
    color: var(--crt-green); animation: cursor-blink 1s infinite;
}

.fn-statusbar {
    display: flex; align-items: center;
    background: var(--win-face);
    border-top: 1px solid var(--win-mid);
    font-family: var(--font-mono); font-size: 11px;
    color: #000; flex-shrink: 0; height: 20px;
}
.fn-status-cell {
    padding: 0 10px;
    border-right: 1px solid var(--win-mid);
    height: 100%; display: flex; align-items: center;
}
.fn-status-cell:last-child { border-right: none; }
.fn-status-flex { flex: 1; }
.fn-status-green { color: #c88030; }

/* Detail list view — authentic 90s file manager layout */
.fn-detail-list {
    flex: 1; overflow-y: auto;
    background: #0c1820;
    font-family: var(--font-mono); font-size: 12px;
    color: var(--crt-green);
}

.fn-detail-header-row {
    display: flex;
    background: var(--win-face);
    color: #000;
    font-size: 11px; font-weight: bold;
    border-bottom: 2px solid;
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
    padding: 2px 0;
}

.fn-detail-row {
    display: flex;
    padding: 1px 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(51, 255, 51, 0.06);
}
.fn-detail-row:hover { background: rgba(51, 255, 51, 0.08); }
.fn-detail-row.selected { background: #000080; color: #fff; }

.fn-detail-name { flex: 2; padding: 1px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-detail-size { width: 70px; flex-shrink: 0; padding: 1px 8px; text-align: right; }
.fn-detail-date { width: 130px; flex-shrink: 0; padding: 1px 8px; }
.fn-detail-type { width: 50px; flex-shrink: 0; padding: 1px 8px; }

.doc-classified {
    color: var(--crt-green); font-weight: bold;
    background: rgba(51, 255, 51, 0.08);
    border: 1px solid var(--crt-green);
    padding: 3px 10px; display: inline-block;
    margin-bottom: 10px;
}

/* ============================================================
   CAMERA FEED — Top-right, actual camera image
   ============================================================ */
.cam-body {
    height: 100%; position: relative;
    background: #000; overflow: hidden;
}
.cam-image {
    width: 100%; height: 100%;
    object-fit: cover;
    /* Full B&W, crushed contrast, slight blur to kill sharpness */
    filter: grayscale(100%) contrast(1.4) brightness(0.7) blur(0.4px);
    opacity: 0.80;
}

/* ── Heavy scan lines (visible horizontal bars) ── */
.cam-body::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 1px,
        rgba(0, 0, 0, 0.25) 1px,
        rgba(0, 0, 0, 0.25) 2px
    );
    z-index: 2;
}

/* ── Dark vignette corners + subtle noise grain ── */
.cam-body::after {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.7) 100%);
    z-index: 3;
}

/* ── Rolling interlace bar (moves down the screen) ── */
.cam-body .cam-interlace {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 8px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255,255,255,0.04) 40%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 60%,
        transparent 100%
    );
    z-index: 4; pointer-events: none;
    animation: interlace-roll 4s linear infinite;
}
@keyframes interlace-roll {
    0% { top: -8px; }
    100% { top: 100%; }
}

/* ── Film grain / noise texture ── */
.cam-body .cam-grain {
    position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.15'/%3E%3C/svg%3E");
    z-index: 5; pointer-events: none;
    opacity: 0.5;
    animation: grain-shift 0.3s steps(4) infinite;
}
@keyframes grain-shift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2%, -1%); }
    50% { transform: translate(1%, 2%); }
    75% { transform: translate(-1%, -2%); }
    100% { transform: translate(2%, 1%); }
}

/* Static noise overlay (toggled via JS) */
.cam-static {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><rect fill="%23fff" opacity="0.04" x="0" y="0" width="1" height="1"/><rect fill="%23fff" opacity="0.04" x="1" y="1" width="1" height="1"/></svg>');
    background-size: 4px 4px;
    opacity: 0;
    z-index: 6;
    transition: opacity 0.1s;
    pointer-events: none;
}
.cam-static.active { opacity: 1; }

.cam-rec {
    position: absolute; top: 6px; right: 8px;
    font-family: var(--font-terminal); font-size: 12px;
    color: var(--crt-red); text-shadow: 0 0 4px rgba(255,50,50,0.6);
    z-index: 7;
    animation: rec-blink 1s infinite;
}
@keyframes rec-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0; } }

.cam-timestamp {
    position: absolute; bottom: 6px; left: 8px;
    font-family: var(--font-terminal); font-size: 10px;
    color: #ccc; text-shadow: 0 0 2px rgba(0,0,0,0.8);
    z-index: 7;
}

/* ============================================================
   TELEMETRY
   ============================================================ */
.telemetry-body {
    padding: 0; font-family: var(--font-terminal); font-size: 13px;
    height: 100%; display: flex; flex-direction: column;
    background: var(--bg-dark);
}

.telemetry-header {
    background: rgba(26, 68, 68, 0.5);
    color: var(--crt-amber); text-shadow: var(--phosphor-glow-amber);
    padding: 4px 8px; font-size: 11px;
    border-bottom: 1px solid var(--border-teal);
    text-transform: uppercase; letter-spacing: 1px;
}

.telemetry-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1px; background: var(--border-teal); flex: 1; overflow-y: auto;
}

.telemetry-cell { background: var(--bg-panel); padding: 8px; }

.telemetry-label {
    font-size: 10px; color: var(--crt-green-dim);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}

.telemetry-value {
    font-size: 20px; color: var(--crt-green); text-shadow: var(--phosphor-glow);
}

.telemetry-value.warning { color: var(--crt-amber); text-shadow: var(--phosphor-glow-amber); }

.telemetry-value.critical {
    color: var(--crt-red);
    text-shadow: 0 0 8px rgba(255, 50, 50, 0.4);
    animation: critical-pulse 1s infinite;
}

@keyframes critical-pulse { 0%, 70% { opacity: 1; } 71%, 100% { opacity: 0.4; } }

.telemetry-paddock-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 4px; padding: 8px;
}

.paddock-cell {
    background: var(--bg-dark); border: 1px solid var(--border-teal);
    padding: 4px; font-size: 9px; text-align: center;
}

.paddock-cell.active { border-color: var(--crt-green); }

.paddock-cell.breach {
    border-color: var(--crt-red); color: var(--crt-red);
    animation: critical-pulse 1s infinite;
}

.paddock-cell .paddock-name { color: var(--crt-green-dim); font-size: 8px; }
.paddock-cell .paddock-status { color: var(--crt-green); font-size: 10px; margin-top: 2px; }

.telemetry-feed {
    border-top: 1px solid var(--border-teal);
    background: var(--bg-dark); padding: 6px 8px;
    height: 120px; overflow-y: auto;
    font-size: 11px; color: var(--crt-green-dim); line-height: 1.4;
}

.feed-entry { margin-bottom: 2px; }
.feed-timestamp { color: var(--crt-amber); margin-right: 6px; }

/* ============================================================
   TASKBAR — Windows 3.1 Gray Beveled
   ============================================================ */
#taskbar {
    position: fixed; bottom: 0; left: 0;
    width: 100%; height: 32px;
    background: var(--win-face);
    border-top: 2px solid;
    border-color: var(--win-light) transparent transparent var(--win-light);
    display: flex; align-items: center;
    z-index: 5000;
    padding: 2px 4px;
}

#taskbar-start {
    padding: 0;
    height: 100%; display: flex; align-items: center;
    margin-right: 4px;
}

#start-button {
    font-family: var(--font-mono); font-size: 12px; font-weight: bold;
    color: #000;
    padding: 2px 10px; cursor: pointer;
    border: 1px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    background: var(--win-face);
    height: 24px; display: flex; align-items: center;
}

#start-button:hover { background: #d4d4d4; }
#start-button:active {
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
}

#taskbar-tabs {
    flex: 1; display: flex; align-items: center;
    gap: 2px; padding: 0 4px; overflow-x: auto;
}

.taskbar-tab {
    font-family: var(--font-mono); font-size: 11px;
    color: #000;
    padding: 3px 12px;
    border: 1px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    background: var(--win-face);
    cursor: pointer; white-space: nowrap;
    max-width: 160px; overflow: hidden; text-overflow: ellipsis;
    height: 22px; display: flex; align-items: center;
}

.taskbar-tab:hover { background: #d4d4d4; }

.taskbar-tab.active {
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
    background: #d8d8d8;
    font-weight: bold;
}

#taskbar-clock {
    font-family: var(--font-mono); font-size: 12px;
    color: #000;
    padding: 0 12px;
    border: 1px solid;
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
    height: 22px; display: flex; align-items: center;
    background: var(--win-face);
}

/* System Menu Popup */
.system-menu {
    position: absolute;
    bottom: 34px; left: 4px;
    background: var(--win-face);
    border: 2px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    padding: 2px;
    min-width: 180px;
    z-index: 6000;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}
.sys-menu-item {
    font-family: var(--font-mono); font-size: 12px;
    color: #000;
    padding: 4px 12px;
    cursor: pointer;
    white-space: nowrap;
}
.sys-menu-item:hover {
    background: #000080;
    color: #fff;
}
.sys-menu-divider {
    height: 1px;
    background: var(--win-dark);
    margin: 2px 4px;
}
.submenu-parent {
    position: relative;
    display: flex;
    justify-content: space-between;
}
.sys-submenu {
    display: none;
    position: absolute;
    left: 100%;
    bottom: -2px;
    background: var(--win-face);
    border: 2px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    padding: 2px;
    min-width: 180px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}
.submenu-parent:hover .sys-submenu {
    display: block;
}


/* ============================================================
   MAGIC WORD — "Ah ah ah, you didn't say the magic word!"
   ============================================================ */
.magic-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    z-index: 99999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start;
    cursor: not-allowed;
}
.magic-text-flood {
    width: 100%; padding: 20px;
    font-family: 'Chicago', 'Geneva', 'Helvetica', sans-serif;
    font-size: 14px; color: #fff;
    line-height: 1.4;
    word-wrap: break-word;
    overflow: hidden;
    max-height: 25%;
    text-align: center;
}
.magic-window {
    width: 420px;
    background: #fff;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    margin-top: 10px;
}
.magic-titlebar {
    background: #fff;
    border-bottom: 2px solid #000;
    height: 20px;
    display: flex; align-items: center;
    padding: 0 4px;
    gap: 4px;
}
.magic-close-box {
    width: 12px; height: 12px;
    border: 1px solid #000;
    flex-shrink: 0;
}
.magic-titlebar-lines {
    flex: 1;
    height: 10px;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px, transparent 1px,
        #000 1px, #000 2px,
        transparent 2px, transparent 3px
    );
}
.magic-title {
    font-family: 'Chicago', 'Geneva', 'Helvetica', sans-serif;
    font-size: 12px; font-weight: bold;
    color: #000;
    padding: 0 8px;
    white-space: nowrap;
}
.magic-infobar {
    background: #fff;
    border-bottom: 1px solid #000;
    font-family: 'Geneva', 'Helvetica', sans-serif;
    font-size: 10px; color: #000;
    padding: 2px 8px;
    display: flex; justify-content: space-between;
}
.magic-content {
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
    min-height: 300px;
}
.magic-nedry-img {
    max-width: 100%; max-height: 350px;
    image-rendering: auto;
}
.magic-scrollbar-h {
    height: 16px;
    background: #fff;
    border-top: 1px solid #000;
    background-image: 
        linear-gradient(to right, #000 1px, transparent 1px),
        linear-gradient(to right, transparent calc(100% - 16px), #000 calc(100% - 16px));
    background-size: 16px 100%, 100% 100%;
    background-repeat: no-repeat;
}

/* ============================================================
   LEDGER
   ============================================================ */
.ledger-body { display: flex; flex-direction: column; height: 100%; }

.ledger-toolbar {
    display: flex; gap: 4px; padding: 4px 8px;
    background: var(--win-face);
    border-bottom: 1px solid var(--win-mid);
}

.ledger-btn {
    font-family: var(--font-mono); font-size: 11px;
    color: #000; background: var(--win-face);
    border: 1px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    padding: 2px 10px; cursor: pointer;
}

.ledger-btn:hover { background: #d4d4d4; }

.ledger-textarea {
    flex: 1; background: var(--bg-dark); border: none; outline: none;
    color: var(--crt-green); text-shadow: var(--phosphor-glow);
    font-family: var(--font-terminal); font-size: 14px;
    padding: 10px; resize: none; line-height: 1.5;
}

/* ============================================================
   SUBMIT AUDIT
   ============================================================ */
.audit-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92); z-index: 9600;
    display: flex; align-items: center; justify-content: center;
}

.audit-content { width: 70%; max-width: 700px; font-family: var(--font-terminal); }

.audit-content pre {
    font-size: 14px; color: var(--crt-green);
    text-shadow: var(--phosphor-glow); line-height: 1.5; white-space: pre-wrap;
}

.audit-content .corporate-text {
    color: var(--crt-red); text-shadow: 0 0 6px rgba(255, 50, 50, 0.3);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-amber { color: var(--crt-amber); text-shadow: var(--phosphor-glow-amber); }
.text-red { color: var(--crt-red); }
.text-cyan { color: var(--crt-cyan); }
.text-dim { color: var(--crt-green-dim); }
.text-green { color: var(--crt-green); text-shadow: var(--phosphor-glow); }

::selection { background: rgba(0, 0, 128, 0.5); color: #fff; }

/* ============================================================
   EVIDENCE TRACKER WINDOW
   ============================================================ */
.evidence-tracker-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000;
    font-family: 'Courier New', monospace;
    color: var(--crt-green);
}

.evidence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.evidence-title {
    font-size: 11px;
    color: var(--crt-amber);
    text-shadow: var(--phosphor-glow-amber);
    letter-spacing: 1px;
}

.evidence-counter {
    font-size: 12px;
    color: var(--crt-green);
    text-shadow: var(--phosphor-glow);
    font-weight: bold;
}

.evidence-submit-bar {
    display: flex;
    padding: 6px;
    gap: 6px;
    background: #111;
    border-bottom: 1px solid #333;
}

.evidence-input {
    flex: 1;
    background: #0a0a0a;
    border: 1px solid #333;
    color: var(--crt-green);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 4px 8px;
    outline: none;
}

.evidence-input:focus {
    border-color: var(--crt-green);
    box-shadow: 0 0 4px var(--crt-green-dim);
}

.evidence-input::placeholder {
    color: #444;
}

.evidence-btn {
    background: #333;
    border: 2px outset #666;
    color: var(--crt-green);
    font-family: 'Courier New', monospace;
    font-size: 11px;
    padding: 3px 12px;
    cursor: pointer;
    letter-spacing: 1px;
}

.evidence-btn:active {
    border-style: inset;
}

.evidence-log {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    font-size: 11px;
    line-height: 1.5;
}

.evidence-log-header {
    color: #555;
    text-align: center;
    margin-bottom: 8px;
}

.evidence-entry {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dotted #222;
}

.evidence-entry-path {
    font-weight: bold;
    margin-bottom: 3px;
}

.evidence-entry-response {
    color: #888;
    padding-left: 16px;
    white-space: pre-wrap;
}

.evidence-critical .evidence-entry-path { color: var(--crt-green); text-shadow: var(--phosphor-glow); }
.evidence-critical .evidence-entry-response { color: var(--crt-green); }
.evidence-motive .evidence-entry-path { color: var(--crt-amber); }
.evidence-motive .evidence-entry-response { color: var(--crt-amber); opacity: 0.8; }
.evidence-irrelevant .evidence-entry-path { color: var(--crt-red); }
.evidence-irrelevant .evidence-entry-response { color: var(--crt-red); opacity: 0.8; }
.evidence-duplicate .evidence-entry-path { color: #666; }
.evidence-not_found .evidence-entry-path { color: #666; }
.evidence-directory .evidence-entry-path { color: #666; }

/* ============================================================
   TALK WINDOW (Unix talk utility)
   ============================================================ */
.talk-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000;
    font-family: 'Courier New', monospace;
    color: var(--crt-green);
}

.talk-header {
    padding: 4px 10px;
    background: #1a1a1a;
    color: var(--crt-green-dim);
    font-size: 11px;
    border-bottom: 1px solid #333;
    text-align: center;
}

.talk-split {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.talk-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.talk-label {
    padding: 3px 8px;
    background: #111;
    color: var(--crt-amber);
    font-size: 10px;
    border-bottom: 1px solid #222;
}

.talk-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--crt-green-dim), transparent);
}

.talk-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    font-size: 12px;
    line-height: 1.6;
}

.talk-msg {
    margin-bottom: 8px;
    color: var(--crt-green);
    text-shadow: var(--phosphor-glow);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.talk-msg.talk-player {
    color: var(--crt-cyan);
    text-shadow: 0 0 6px rgba(0, 205, 255, 0.3);
}

.talk-input-area {
    padding: 6px;
    background: #0a0a0a;
    border-top: 1px solid #333;
}

.talk-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--crt-cyan);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 4px;
    outline: none;
    caret-color: var(--crt-cyan);
}

.talk-input::placeholder {
    color: #333;
}

/* ============================================================
   MISSION BRIEFING POPUP
   ============================================================ */
.briefing-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease;
}

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

.briefing-window {
    width: 520px;
    max-width: 90vw;
    background: #c0c0c0;
    border: 2px outset #dfdfdf;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}

.briefing-titlebar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 3px 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
}

.briefing-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.briefing-text {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #000;
    background: #fff;
    border: 2px inset #888;
    padding: 12px;
    margin-bottom: 12px;
    width: 100%;
    max-height: 50vh;
    overflow-y: auto;
    white-space: pre-wrap;
    box-sizing: border-box;
}

.briefing-btn {
    background: #c0c0c0;
    border: 2px outset #dfdfdf;
    padding: 4px 24px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
}

.briefing-btn:active {
    border-style: inset;
}

.briefing-btn:focus {
    outline: 1px dotted #000;
    outline-offset: -4px;
}

/* ============================================================
   MOBILE RESTRICTION SCREEN
   Hidden on desktop, shown on screens < 900px
   ============================================================ */
#mobile-block {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #0a0a0a;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    /* Scanline overlay */
    background-image:
        repeating-linear-gradient(
            0deg, transparent, transparent 3px,
            rgba(0, 0, 0, 0.15) 3px, rgba(0, 0, 0, 0.15) 4px
        );
}

.mobile-block-inner {
    padding: 20px;
    text-align: center;
}

.mobile-block-ascii {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 15px;
    color: #33ff33;
    line-height: 1.3;
    text-align: left;
    display: inline-block;
    white-space: pre;
    margin: 0;
}

/* Warning triangles — amber/red */
.mb-warn {
    color: #ff6633;
    text-shadow: 0 0 6px rgba(255, 80, 30, 0.5);
}

/* ACCESS DENIED header — bright with pulse */
.mb-header {
    color: #ffffff;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.5),
        0 0 16px rgba(51, 255, 51, 0.3);
}

/* Org name — bright green */
.mb-org {
    color: #33ff33;
    text-shadow: 0 0 4px rgba(51, 255, 51, 0.4);
}

/* Body text — dimmer */
.mb-body {
    color: #22bb22;
    text-shadow: 0 0 3px rgba(51, 255, 51, 0.2);
}

/* Footer — dark green */
.mb-footer {
    color: #118811;
    text-shadow: 0 0 2px rgba(51, 255, 51, 0.15);
}

.mobile-block-cursor {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 16px;
    color: #33ff33;
    text-shadow: 0 0 4px rgba(51, 255, 51, 0.4);
    margin-top: 8px;
    text-align: left;
    animation: cursor-blink 1s step-end infinite;
}

@media (max-width: 900px) {
    #mobile-block {
        display: flex;
    }
    #crt-overlay,
    #login-screen,
    #boot-screen,
    #desktop,
    .briefing-overlay {
        display: none !important;
    }
}
