/* ============================================
   PROJECT PALP - SURVEILLANCE DASHBOARD v3
   styles.css
   
   Themes: Tactical (war room), HOD (House of Dynamite)
   Modes: Dark, Light
   Responsive: Mobile, Tablet, Desktop, TV
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES (THEME SYSTEM)
   ============================================ */

:root {
    /* DEFCON Colors (consistent across themes) */
    --defcon-5: #6C8EBF;
    --defcon-4: #6FBFA1;
    --defcon-3: #F2D675;
    --defcon-2: #F5B97A;
    --defcon-1: #E07A73;
    
    /* Typography */
    --font-display: 'Orbitron', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   DARK MODE - TACTICAL THEME (Default)
   ============================================ */

[data-theme="dark"][data-style="tactical"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --border-color: #2a2a2a;
    --text-primary: #f0f0f0;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent-live: #00ff88;
    --card-text: #000000;
    --card-text-secondary: rgba(0, 0, 0, 0.6);
    --card-overlay: rgba(0, 0, 0, 0.15);
    --settings-bg: #1a1a1a;
    --settings-border: #333333;
    --show-scanlines: 1;
    --show-vignette: 1;
    --show-forecast: flex;
    --font-main: var(--font-display);
    --number-weight: 900;
    --label-spacing: 10px;
}

/* ============================================
   LIGHT MODE - TACTICAL THEME
   ============================================ */

[data-theme="light"][data-style="tactical"] {
    --bg-primary: #e8e8e8;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --border-color: #d0d0d0;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent-live: #00aa55;
    --card-text: #000000;
    --card-text-secondary: rgba(0, 0, 0, 0.5);
    --card-overlay: rgba(255, 255, 255, 0.1);
    --settings-bg: #ffffff;
    --settings-border: #e0e0e0;
    --show-scanlines: 0;
    --show-vignette: 0;
    --show-forecast: flex;
    --font-main: var(--font-display);
    --number-weight: 900;
    --label-spacing: 10px;
}

/* ============================================
   DARK MODE - HOD THEME (House of Dynamite)
   Minimal, cinematic, film-inspired
   ============================================ */

[data-theme="dark"][data-style="hod"] {
    --bg-primary: #000000;
    --bg-secondary: #000000;
    --bg-card: transparent;
    --border-color: transparent;
    --text-primary: #ffffff;
    --text-secondary: #666666;
    --text-muted: #444444;
    --accent-live: #E07A73;
    --card-text: #000000;
    --card-text-secondary: rgba(0, 0, 0, 0.7);
    --card-overlay: transparent;
    --settings-bg: #111111;
    --settings-border: #333333;
    --show-scanlines: 0;
    --show-vignette: 0;
    --show-forecast: none;
    --font-main: var(--font-body);
    --number-weight: 400;
    --label-spacing: 4px;
}

/* ============================================
   LIGHT MODE - HOD THEME
   ============================================ */

[data-theme="light"][data-style="hod"] {
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-card: transparent;
    --border-color: transparent;
    --text-primary: #000000;
    --text-secondary: #888888;
    --text-muted: #aaaaaa;
    --accent-live: #E07A73;
    --card-text: #000000;
    --card-text-secondary: rgba(0, 0, 0, 0.6);
    --card-overlay: transparent;
    --settings-bg: #f5f5f5;
    --settings-border: #e0e0e0;
    --show-scanlines: 0;
    --show-vignette: 0;
    --show-forecast: none;
    --font-main: var(--font-body);
    --number-weight: 400;
    --label-spacing: 4px;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-body);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color var(--transition-smooth);
}

/* ============================================
   CRT EFFECTS (Tactical Theme Only)
   ============================================ */

.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
    opacity: var(--show-scanlines);
    transition: opacity var(--transition-smooth);
}

.vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
    pointer-events: none;
    z-index: 999;
    opacity: var(--show-vignette);
    transition: opacity var(--transition-smooth);
}

/* ============================================
   SETTINGS PANEL
   ============================================ */

/* Settings toggle uses .header-btn styles */

.settings-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 280px;
    background: var(--settings-bg);
    border: 1px solid var(--settings-border);
    border-radius: 12px;
    padding: 0;
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--transition-fast);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.settings-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--settings-border);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    color: var(--text-secondary);
}

.settings-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.settings-close:hover {
    color: var(--text-primary);
}

.settings-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--settings-border);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.settings-options {
    display: flex;
    gap: 8px;
}

.mode-btn, .theme-btn {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.theme-btn {
    flex-direction: column;
    padding: 12px;
    gap: 4px;
}

.mode-btn:hover, .theme-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.mode-btn.active, .theme-btn.active {
    background: var(--defcon-5);
    border-color: var(--defcon-5);
    color: #000;
}

.theme-name {
    font-weight: 600;
    letter-spacing: 1px;
}

.theme-desc {
    font-size: 9px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-btn[data-style="hod"] .theme-desc {
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.theme-btn[data-style="hod"]:hover .theme-desc {
    opacity: 0.7;
}

.content-btn {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 20px;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.content-btn:hover {
    background: var(--defcon-4);
    border-color: var(--defcon-4);
    color: #000;
}

.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.settings-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   DASHBOARD CONTAINER
   ============================================ */

.dashboard-container {
    width: 100%;
    max-width: 1728px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

/* ============================================
   TOP BAR
   ============================================ */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    transition: all var(--transition-smooth);
}

[data-style="hod"] .top-bar {
    background: transparent;
    border-color: transparent;
    padding: 16px 0;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--accent-live);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-live); }
    50% { opacity: 0.6; box-shadow: 0 0 0 4px transparent; }
}

.status-text strong {
    color: var(--text-primary);
}

.current-day {
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 3px;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-text-badge {
    font-family: var(--font-display);
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--card-text-secondary);
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    transition: all var(--transition-smooth);
}

[data-style="hod"] .status-text-badge {
    display: none;
}

.header-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    font-size: 14px;
}

.header-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.header-btn#logToggle:hover {
    color: var(--defcon-1);
    border-color: var(--defcon-1);
}

.header-btn#settingsToggle:hover {
    transform: rotate(45deg);
}

.current-time {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    letter-spacing: 1px;
}

/* ============================================
   LOCK SCREEN
   ============================================ */

.lock-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lock-content {
    text-align: center;
    padding: 40px;
}

.lock-icon {
    font-size: 64px;
    color: var(--defcon-1);
    margin-bottom: 24px;
}

.lock-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 8px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lock-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.lock-input-wrapper {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.lock-input {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 24px;
    font-family: var(--font-mono);
    font-size: 18px;
    letter-spacing: 4px;
    color: var(--text-primary);
    text-align: center;
    width: 240px;
    transition: all 0.3s ease;
}

.lock-input:focus {
    outline: none;
    border-color: var(--defcon-4);
    box-shadow: 0 0 0 4px rgba(111, 191, 161, 0.2);
}

.lock-input::placeholder {
    color: var(--text-muted);
    letter-spacing: 2px;
}

.lock-submit {
    background: var(--defcon-4);
    border: none;
    border-radius: 8px;
    width: 56px;
    height: 56px;
    color: #000;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lock-submit:hover {
    background: var(--defcon-3);
    transform: scale(1.05);
}

.lock-error {
    color: var(--defcon-1);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    height: 20px;
}

.lock-input.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

/* ============================================
   DEFCON CARD
   ============================================ */

.defcon-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--defcon-5);
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    transition: background-color var(--transition-smooth), border-radius var(--transition-smooth);
    min-height: 500px;
}

[data-style="hod"] .defcon-card {
    border-radius: 20px;
}

.defcon-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 30%,
        transparent 70%,
        var(--card-overlay) 100%
    );
    pointer-events: none;
}

.defcon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 40px;
}

/* Tactical content - visible in tactical, hidden in HOD */
.tactical-content {
    display: flex;
}

[data-style="hod"] .tactical-content {
    display: none;
}

/* HOD content - hidden in tactical, visible in HOD */
.hod-content {
    display: none;
}

[data-style="hod"] .hod-content {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
}

/* HOD Inline DEFCON Display */
.hod-defcon-display {
    display: flex;
    align-items: baseline;
    gap: 30px;
}

.hod-label {
    font-family: var(--font-body);
    font-size: clamp(80px, 15vw, 180px);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 8px;
    color: var(--card-text);
    line-height: 1;
}

.hod-number {
    font-family: var(--font-body);
    font-size: clamp(80px, 15vw, 180px);
    font-weight: 400;
    line-height: 1;
    color: var(--card-text);
}

/* Hide countdown and probability in HOD */
[data-style="hod"] .countdown-container {
    display: none;
}

[data-style="hod"] .probability-tag {
    display: none;
}

.defcon-label {
    font-family: var(--font-main);
    font-size: clamp(24px, 5vw, 40px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--label-spacing);
    color: var(--card-text-secondary);
    margin-bottom: -10px;
    z-index: 2;
    transition: all var(--transition-smooth);
}

[data-style="hod"] .defcon-label {
    font-weight: 400;
    opacity: 0.7;
}

.defcon-number {
    font-family: var(--font-main);
    font-size: clamp(150px, 35vw, 300px);
    font-weight: var(--number-weight);
    line-height: 1;
    color: var(--card-text);
    z-index: 1;
    transition: all var(--transition-smooth);
}

.probability-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.15);
    padding: 12px 28px;
    border-radius: 50px;
    margin-top: 20px;
    font-size: clamp(12px, 2vw, 18px);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.prob-label {
    color: var(--card-text-secondary);
    font-weight: 400;
}

.prob-value {
    color: var(--card-text);
    font-weight: 700;
    font-family: var(--font-mono);
}

/* Countdown */
.countdown-container {
    text-align: center;
    padding: 30px;
    color: var(--card-text);
}

.timer-label {
    font-size: clamp(10px, 1.5vw, 14px);
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--card-text-secondary);
    margin-bottom: 8px;
}

.timer-digits {
    font-family: var(--font-main);
    font-size: clamp(36px, 8vw, 60px);
    font-weight: var(--number-weight);
    letter-spacing: -1px;
    font-feature-settings: "tnum";
    transition: all var(--transition-smooth);
}

[data-style="hod"] .timer-digits {
    font-weight: 300;
}

.timer-sub {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--card-text-secondary);
    margin-top: 8px;
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

[data-style="hod"] .card-footer {
    display: none;
}

.target-badge, .last-seen, .data-source {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--card-text-secondary);
}

.badge-value, .seen-value {
    color: var(--card-text);
    font-weight: 600;
}

.source-dot {
    width: 6px;
    height: 6px;
    background: var(--card-text);
    border-radius: 50%;
    opacity: 0.5;
}

/* ============================================
   FULLSCREEN MODE (HOD wall display)
   ============================================ */

/* Fullscreen toggle only meaningful in HOD */
#fullscreenToggle {
    display: none;
}

[data-style="hod"] #fullscreenToggle {
    display: flex;
}

/* Floating exit affordance — only while fullscreen is active */
.fs-exit {
    display: none;
}

body.fs-active .fs-exit {
    display: flex;
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform var(--transition-fast);
}

/* Exit control appears only after cursor move / touch, then fades out */
body.fs-active.fs-show-controls .fs-exit {
    opacity: 0.85;
    pointer-events: auto;
}

body.fs-active .fs-exit:hover {
    opacity: 1;
    transform: scale(1.08);
}

/* Strip all chrome down to the bare DEFCON display */
body.fs-active {
    overflow: hidden;
}

/* Hide the cursor on the wall display until there's interaction */
body.fs-active:not(.fs-show-controls) {
    cursor: none;
}

body.fs-active .top-bar,
body.fs-active .forecast-bar,
body.fs-active .tscan-bar,
body.fs-active .card-footer,
body.fs-active .countdown-container,
body.fs-active .scanlines,
body.fs-active .vignette {
    display: none !important;
}

body.fs-active .dashboard-container {
    padding: 0;
    gap: 0;
    max-width: none;
    height: 100vh;
    height: 100dvh;
}

body.fs-active .defcon-card {
    border-radius: 0 !important;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    padding: min(4vw, 56px);
}

/* Blow the DEFCON display up to fill the screen — keep "DEFCON N" on one line */
body.fs-active .hod-defcon-display {
    gap: min(2.5vw, 36px);
    max-width: 100%;
    flex-wrap: nowrap;
    white-space: nowrap;
    justify-content: center;
}

body.fs-active .hod-label,
body.fs-active .hod-number {
    /* JS measures the screen and sets --fs-size to fill it; formula is the fallback */
    font-size: var(--fs-size, min(13vw, 70vh));
    letter-spacing: min(0.5vw, 6px);
}

/* ============================================
   FORECAST BAR (Tactical Theme Only)
   ============================================ */

.forecast-bar {
    display: var(--show-forecast);
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-smooth);
}

.forecast-section {
    min-width: 150px;
}

.forecast-right {
    text-align: right;
}

.forecast-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.forecast-day, .forecast-status {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.forecast-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--defcon-5);
    padding: 16px 32px;
    border-radius: 8px;
    transition: background-color var(--transition-smooth);
}

.pill-text {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.pill-number {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.8);
}

.pill-prob {
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    font-family: var(--font-mono);
}

/* ============================================
   T-SCAN TIMELINE
   ============================================ */

.tscan-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 30px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-smooth);
}

.tscan-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 250px;
}

.tscan-nav,
.tscan-today {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tscan-nav:hover,
.tscan-today:hover {
    border-color: var(--defcon-4);
    color: var(--text-primary);
}

.tscan-date-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 130px;
}

.tscan-date {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
}

.tscan-pill {
    min-width: 178px;
    justify-content: center;
}

.tscan-status-line {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.tscan-intel {
    border: 1px solid var(--defcon-4);
    border-radius: 4px;
    padding: 3px 6px;
    color: var(--defcon-4);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

[data-style="hod"] .tscan-bar {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 24px 20px;
    justify-content: center;
    gap: 18px;
}

[data-style="hod"] .tscan-section,
[data-style="hod"] .tscan-pill,
[data-style="hod"] .tscan-right .forecast-label,
[data-style="hod"] .tscan-intel {
    display: none;
}

[data-style="hod"] .tscan-controls {
    min-width: 0;
    gap: 18px;
}

[data-style="hod"] .tscan-date-wrap {
    min-width: 110px;
}

[data-style="hod"] .tscan-date {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 3px;
}

[data-style="hod"] .tscan-nav,
[data-style="hod"] .tscan-today {
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    border-radius: 0;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
}

[data-style="hod"] .tscan-today {
    font-size: 12px;
}

[data-style="hod"] .tscan-status-line {
    justify-content: center;
}

[data-style="hod"] .forecast-status {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 3px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Animations removed - pulse was too distracting */

@keyframes blink-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.blink-animation {
    animation: blink-text 1s ease-in-out infinite;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Large Desktop / TV */
@media (min-width: 1800px) {
    .dashboard-container {
        padding: 40px;
        gap: 30px;
    }
    
    .defcon-number {
        font-size: 350px;
    }
    
    .top-bar, .forecast-bar, .tscan-bar {
        padding: 24px 40px;
    }
}

/* Desktop */
@media (max-width: 1400px) {
    .defcon-number {
        font-size: 250px;
    }
    
    .timer-digits {
        font-size: 48px;
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
    .dashboard-container {
        padding: 16px;
        gap: 16px;
    }
    
    .defcon-card {
        border-radius: 24px;
        min-height: 400px;
    }
    
    .defcon-number {
        font-size: 180px;
    }
    
    .card-footer {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
        padding: 16px 24px;
    }
    
    .forecast-bar, .tscan-bar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .forecast-section {
        min-width: auto;
    }
    
    .forecast-right {
        text-align: center;
    }

    .tscan-controls {
        min-width: 0;
    }

    .tscan-status-line {
        justify-content: center;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 16px;
    }
    
    .status-left {
        order: 2;
    }
    
    .status-center {
        order: 1;
    }
    
    .status-right {
        order: 3;
    }
    
    .defcon-number {
        font-size: 140px;
    }
    
    .defcon-label {
        font-size: 20px;
    }
    
    .probability-tag {
        flex-direction: column;
        gap: 4px;
        padding: 12px 24px;
    }
    
    .timer-digits {
        font-size: 40px;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .settings-panel {
        right: 10px;
        left: 10px;
        width: auto;
    }
    
    /* HOD responsive */
    .hod-defcon-display {
        gap: 20px;
    }
    
    .hod-label {
        font-size: 80px;
    }
    
    .hod-number {
        font-size: 80px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .dashboard-container {
        padding: 12px;
        gap: 12px;
    }
    
    .top-bar {
        border-radius: 8px;
        font-size: 10px;
    }
    
    .defcon-card {
        border-radius: 16px;
        min-height: 350px;
    }
    
    [data-style="hod"] .defcon-card {
        border-radius: 12px;
    }
    
    /* HOD mobile */
    .hod-defcon-display {
        flex-direction: row;
        gap: 15px;
    }
    
    .hod-label {
        font-size: 50px;
        letter-spacing: 4px;
    }
    
    .hod-number {
        font-size: 50px;
    }
    
    .defcon-content {
        padding: 24px;
    }
    
    .defcon-number {
        font-size: 100px;
    }
    
    .defcon-label {
        font-size: 16px;
        letter-spacing: 4px;
    }
    
    .probability-tag {
        font-size: 11px;
        padding: 10px 20px;
    }
    
    .countdown-container {
        padding: 20px;
    }
    
    .timer-digits {
        font-size: 32px;
    }
    
    .timer-label, .timer-sub {
        font-size: 9px;
    }
    
    .forecast-bar, .tscan-bar {
        border-radius: 8px;
        padding: 16px;
    }
    
    .forecast-pill {
        padding: 12px 20px;
        gap: 8px;
    }

    .tscan-date-wrap {
        min-width: 110px;
    }

    .tscan-date {
        font-size: 15px;
    }

    .tscan-nav,
    .tscan-today {
        width: 32px;
        height: 32px;
    }
    
    .pill-number {
        font-size: 28px;
    }
    
    .header-btn {
        width: 32px;
        height: 32px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .defcon-number {
        font-size: 80px;
    }
    
    .timer-digits {
        font-size: 28px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .dashboard-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .top-bar {
        width: 100%;
        flex-direction: row;
    }
    
    .defcon-card {
        flex: 2;
        min-height: auto;
        border-radius: 16px;
    }
    
    .defcon-content {
        padding: 16px;
    }
    
    .defcon-number {
        font-size: 80px;
    }
    
    .countdown-container {
        padding: 12px;
    }
    
    .card-footer {
        display: none;
    }
    
    .forecast-bar, .tscan-bar {
        flex: 1;
        flex-direction: column;
        min-width: 200px;
    }
}

/* TV / Large Display */
@media (min-width: 1920px) and (min-height: 1000px) {
    html {
        font-size: 18px;
    }
    
    .dashboard-container {
        padding: 60px;
        gap: 40px;
    }
    
    .defcon-card {
        border-radius: 60px;
    }
    
    .defcon-number {
        font-size: 400px;
    }
    
    .timer-digits {
        font-size: 80px;
    }
}

/* ============================================
   LOG ENTRY MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.log-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 420px;
    background: var(--settings-bg);
    border: 1px solid var(--settings-border);
    border-radius: 16px;
    z-index: 1101;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.log-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.log-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--settings-border);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.log-modal-header i {
    margin-right: 10px;
    color: var(--defcon-1);
}

.log-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: color var(--transition-fast);
    border-radius: 50%;
}

.log-modal-close:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

.log-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.log-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-field label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 600;
}

.log-field input[type="date"],
.log-field input[type="time"],
.log-field input[type="text"] {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.log-field input:focus {
    outline: none;
    border-color: var(--defcon-4);
    box-shadow: 0 0 0 3px rgba(111, 191, 161, 0.2);
}

.log-preview {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    padding: 14px 16px;
}

.log-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.log-preview-header span {
    color: var(--defcon-4);
    font-size: 11px;
    font-weight: 700;
}

.log-preview-header strong {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}

.log-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.log-preview-item {
    min-width: 0;
}

.log-preview-item.full {
    grid-column: 1 / -1;
}

.log-preview-key {
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.log-preview-value {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.log-status-options {
    display: flex;
    gap: 10px;
}

.log-status-btn {
    flex: 1;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.log-status-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.log-status-btn.active[data-status="1"] {
    background: var(--defcon-1);
    border-color: var(--defcon-1);
    color: #000;
}

.log-status-btn.active[data-status="0"] {
    background: var(--defcon-5);
    border-color: var(--defcon-5);
    color: #000;
}

.log-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--settings-border);
}

.log-cancel-btn {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 20px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.log-cancel-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.log-submit-btn {
    flex: 2;
    background: var(--defcon-4);
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    color: #000;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.log-submit-btn:hover {
    background: var(--defcon-3);
    transform: translateY(-1px);
}

.log-submit-btn:active {
    transform: translateY(0);
}

.log-feedback {
    padding: 0 24px 20px;
    font-size: 12px;
    text-align: center;
    min-height: 20px;
}

.log-feedback.success {
    color: var(--defcon-4);
}

.log-feedback.error {
    color: var(--defcon-1);
}

/* Print */
@media print {
    .scanlines, .vignette, .header-btn, .settings-panel, .modal-overlay, .log-modal {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .defcon-card {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
