/* ═══════════════════════════════════════════════════════════════
   ARGUS CORE — Production Design System
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg-base: #06091a;
    --bg-surface: rgba(15, 23, 42, 0.85);
    --bg-elevated: rgba(30, 41, 59, 0.7);
    --bg-card: rgba(17, 24, 39, 0.95);
    --border: rgba(51, 65, 85, 0.5);
    --border-glow: rgba(59, 130, 246, 0.3);
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --green: #10b981;
    --green-dim: rgba(16, 185, 129, 0.15);
    --red: #ef4444;
    --red-dim: rgba(239, 68, 68, 0.15);
    --yellow: #f59e0b;
    --yellow-dim: rgba(245, 158, 11, 0.15);
    --text-1: #f1f5f9;
    --text-2: #94a3b8;
    --text-3: #64748b;
    --radius: 16px;
    --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base);
    color: var(--text-1);
    height: 100dvh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ═══ APP SHELL ═══ */
#app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    background: linear-gradient(180deg, #0a1128 0%, #06091a 100%);
}

/* ═══ HEADER ═══ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(10, 17, 40, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.header-left { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}
.logo-icon i { color: white; width: 20px; height: 20px; }
.header-text h1 { font-size: 0.95rem; font-weight: 800; letter-spacing: 1.5px; }
.header-subtitle { font-size: 0.65rem; color: var(--text-3); font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }

.status-pill {
    display: flex; align-items: center; gap: 6px;
    background: var(--green-dim); border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 5px 12px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 700; color: var(--green);
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 7px; height: 7px; background: var(--green); border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ═══ MAIN CONTENT ═══ */
main { flex: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
main::-webkit-scrollbar { display: none; }
section { display: none; min-height: 100%; flex-direction: column; }
section.active { display: flex; }

/* ═══ FEED TAB ═══ */
.live-stream-wrapper { padding: 16px 16px 0; }
.live-stream-container {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border-glow);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.08);
    background: #000;
}
.live-stream-container.offline { min-height: 180px; }
.live-stream-player { width: 100%; display: block; max-height: 220px; object-fit: cover; }
.live-badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(239, 68, 68, 0.85); backdrop-filter: blur(8px);
    padding: 4px 10px; border-radius: 6px;
    font-size: 0.65rem; font-weight: 800; color: white;
    display: flex; align-items: center; gap: 5px; letter-spacing: 1px;
}
.live-badge .pulse-dot { background: white; width: 5px; height: 5px; }
.stream-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 8px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.stream-label { font-size: 0.7rem; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 6px; }

.section-title {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px 8px;
}
.section-title h3 { font-size: 0.85rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 1px; }
.icon-btn { background: none; border: none; color: var(--text-3); cursor: pointer; padding: 4px; }
.icon-btn i { width: 18px; height: 18px; }

#events-container { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }

.skeleton-loader {
    height: 120px; border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.event-card {
    background: var(--bg-card); border-radius: var(--radius-sm);
    overflow: hidden; border: 1px solid var(--border);
    transition: transform 0.2s;
}
.event-card:active { transform: scale(0.98); }
.event-img { width: 100%; height: 180px; object-fit: cover; background: #111827; display: block; }
.event-body { padding: 14px; }
.event-meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.75rem; color: var(--text-3); margin-bottom: 10px;
}
.threat-badge {
    padding: 3px 10px; border-radius: 6px; font-weight: 700; font-size: 0.65rem;
    letter-spacing: 0.5px; text-transform: uppercase;
}
.bg-high { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.bg-medium { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.bg-low { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }

.report-section { margin-top: 10px; }
.report-label { font-size: 0.7rem; font-weight: 600; color: var(--accent); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.report-text { font-size: 0.82rem; line-height: 1.45; color: var(--text-2); }

/* ═══ CHAT TAB (VOICE-FIRST) ═══ */
.voice-conversation {
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 20px 0; gap: 16px;
}

.voice-header {
    text-align: center;
}
.voice-header-icon {
    width: 40px; height: 40px; border-radius: 12px; margin: 0 auto 10px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 24px rgba(59,130,246,0.25);
}
.voice-header-icon i { color: white; width: 20px; height: 20px; }
.voice-header h3 { font-size: 1rem; font-weight: 700; }
.voice-header p { font-size: 0.75rem; color: var(--text-3); margin-top: 4px; transition: color 0.4s; }

/* ─── THE ORB ─── */
.voice-orb-container {
    position: relative; width: 160px; height: 160px;
    display: flex; align-items: center; justify-content: center;
    margin: 8px 0;
}

.orb-ring {
    position: absolute; border-radius: 50%;
    border: 1.5px solid rgba(59,130,246,0.15);
    transition: all 0.6s cubic-bezier(0.4,0,0.2,1);
}
.orb-ring-outer { width: 160px; height: 160px; }
.orb-ring-mid   { width: 130px; height: 130px; }
.orb-ring-inner { width: 105px; height: 105px; }

.voice-orb {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f, #1a2744);
    border: 2px solid rgba(59,130,246,0.3);
    color: var(--accent); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 2;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 0 30px rgba(59,130,246,0.15), inset 0 0 20px rgba(59,130,246,0.05);
}
.voice-orb i { width: 28px; height: 28px; transition: all 0.3s; }
.voice-orb:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(59,130,246,0.25);
}
.voice-orb:active { transform: scale(0.95); }

.hidden { display: none !important; }
.spin { animation: orbSpin 1.2s linear infinite; }
@keyframes orbSpin { to { transform: rotate(360deg); } }

/* ─── ORB STATE: LISTENING ─── */
.voice-orb-container.listening .voice-orb {
    background: linear-gradient(135deg, #3b1a1a, #2a1020);
    border-color: rgba(239,68,68,0.5);
    color: var(--red);
    box-shadow: 0 0 40px rgba(239,68,68,0.25), inset 0 0 20px rgba(239,68,68,0.08);
}
.voice-orb-container.listening .orb-ring {
    border-color: rgba(239,68,68,0.2);
}
.voice-orb-container.listening .orb-ring-outer {
    animation: orbPulseListenOuter 2s ease-in-out infinite;
}
.voice-orb-container.listening .orb-ring-mid {
    animation: orbPulseListenMid 2s ease-in-out infinite 0.3s;
}
.voice-orb-container.listening .orb-ring-inner {
    animation: orbPulseListenInner 2s ease-in-out infinite 0.6s;
}
@keyframes orbPulseListenOuter {
    0%, 100% { transform: scale(1); opacity: 0.3; border-color: rgba(239,68,68,0.15); }
    50% { transform: scale(1.12); opacity: 0.8; border-color: rgba(239,68,68,0.4); }
}
@keyframes orbPulseListenMid {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.9; }
}
@keyframes orbPulseListenInner {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.08); opacity: 1; }
}

/* ─── ORB STATE: THINKING ─── */
.voice-orb-container.thinking .voice-orb {
    background: linear-gradient(135deg, #2a1a3e, #1a1030);
    border-color: rgba(139,92,246,0.5);
    color: #a78bfa;
    box-shadow: 0 0 40px rgba(139,92,246,0.25), inset 0 0 20px rgba(139,92,246,0.08);
}
.voice-orb-container.thinking .orb-ring {
    border-color: rgba(139,92,246,0.25);
    animation: orbThinkSpin 3s linear infinite;
}
.voice-orb-container.thinking .orb-ring-mid { animation-duration: 2.5s; animation-direction: reverse; }
.voice-orb-container.thinking .orb-ring-inner { animation-duration: 2s; }
@keyframes orbThinkSpin {
    0% { transform: rotate(0deg); border-color: rgba(139,92,246,0.15); }
    50% { border-color: rgba(139,92,246,0.5); }
    100% { transform: rotate(360deg); border-color: rgba(139,92,246,0.15); }
}

/* ─── ORB STATE: SPEAKING ─── */
.voice-orb-container.speaking .voice-orb {
    background: linear-gradient(135deg, #0a2e1a, #0d1f14);
    border-color: rgba(16,185,129,0.5);
    color: var(--green);
    box-shadow: 0 0 40px rgba(16,185,129,0.25), inset 0 0 20px rgba(16,185,129,0.08);
}
.voice-orb-container.speaking .orb-ring {
    border-color: rgba(16,185,129,0.2);
}
.voice-orb-container.speaking .orb-ring-outer {
    animation: orbPulseSpeakOuter 1.5s ease-in-out infinite;
}
.voice-orb-container.speaking .orb-ring-mid {
    animation: orbPulseSpeakMid 1.5s ease-in-out infinite 0.15s;
}
.voice-orb-container.speaking .orb-ring-inner {
    animation: orbPulseSpeakInner 1.5s ease-in-out infinite 0.3s;
}
@keyframes orbPulseSpeakOuter {
    0%, 100% { transform: scale(1); border-color: rgba(16,185,129,0.15); }
    50% { transform: scale(1.06); border-color: rgba(16,185,129,0.35); }
}
@keyframes orbPulseSpeakMid {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes orbPulseSpeakInner {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* ─── LIVE TRANSCRIPT ─── */
.voice-transcript {
    min-height: 24px; text-align: center;
    font-size: 0.85rem; color: var(--text-2);
    max-width: 90%; line-height: 1.5;
}
.voice-transcript .interim { color: var(--text-3); font-style: italic; }

/* ─── AGENT RESPONSE ─── */
.voice-response {
    width: 100%; padding: 16px;
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border);
    animation: fadeSlideUp 0.4s ease-out;
}
.voice-response.hidden { display: none; }
.voice-response-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px; font-size: 0.78rem; font-weight: 700; color: var(--accent);
}
.voice-response-header i { width: 16px; height: 16px; }
.voice-response p { font-size: 0.85rem; line-height: 1.55; color: var(--text-2); }

.typing-cursor {
    color: var(--accent); animation: cursorBlink 0.8s step-end infinite;
    font-weight: 300;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

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

/* ─── SPEAKING WAVEFORM ─── */
.speaking-waves {
    display: flex; align-items: center; justify-content: center;
    gap: 2px; height: 24px; margin-top: 12px; padding-top: 10px;
    border-top: 1px solid var(--border);
}
.speaking-waves.hidden { display: none; }
.speaking-waves span {
    width: 3px; background: var(--green); border-radius: 3px;
    animation: speakWave 0.8s ease-in-out infinite;
}
.speaking-waves span:nth-child(1)  { height: 4px;  animation-delay: 0s; }
.speaking-waves span:nth-child(2)  { height: 8px;  animation-delay: 0.05s; }
.speaking-waves span:nth-child(3)  { height: 14px; animation-delay: 0.1s; }
.speaking-waves span:nth-child(4)  { height: 20px; animation-delay: 0.15s; }
.speaking-waves span:nth-child(5)  { height: 16px; animation-delay: 0.2s; }
.speaking-waves span:nth-child(6)  { height: 10px; animation-delay: 0.25s; }
.speaking-waves span:nth-child(7)  { height: 6px;  animation-delay: 0.3s; }
.speaking-waves span:nth-child(8)  { height: 14px; animation-delay: 0.35s; }
.speaking-waves span:nth-child(9)  { height: 20px; animation-delay: 0.4s; }
.speaking-waves span:nth-child(10) { height: 12px; animation-delay: 0.45s; }
.speaking-waves span:nth-child(11) { height: 8px;  animation-delay: 0.5s; }
.speaking-waves span:nth-child(12) { height: 16px; animation-delay: 0.55s; }
.speaking-waves span:nth-child(13) { height: 20px; animation-delay: 0.6s; }
.speaking-waves span:nth-child(14) { height: 10px; animation-delay: 0.65s; }
.speaking-waves span:nth-child(15) { height: 4px;  animation-delay: 0.7s; }

@keyframes speakWave {
    0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* ─── VOICE OPTIONS ─── */
.voice-options {
    display: flex; justify-content: center; padding: 4px 0;
}
.voice-option-toggle {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; font-size: 0.78rem; color: var(--text-3);
}
.voice-option-toggle input { display: none; }
.option-slider {
    width: 36px; height: 20px; background: var(--border);
    border-radius: 20px; position: relative; transition: background 0.3s;
}
.option-slider::before {
    content: ''; position: absolute; width: 14px; height: 14px;
    left: 3px; top: 3px; background: white; border-radius: 50%; transition: 0.3s;
}
.voice-option-toggle input:checked + .option-slider {
    background: var(--accent);
}
.voice-option-toggle input:checked + .option-slider::before {
    transform: translateX(16px);
}

/* ─── CHAT DIVIDER ─── */
.chat-divider {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; color: var(--text-3); font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}
.chat-divider::before, .chat-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── CHAT HISTORY ─── */
#chat-history { flex: 1; padding: 12px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; max-height: 200px; }

.chat-message { display: flex; gap: 10px; align-items: flex-start; }
.chat-message.user { flex-direction: row-reverse; }
.avatar {
    width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-elevated); border: 1px solid var(--border);
}
.avatar i { width: 16px; height: 16px; }
.chat-message.agent .avatar { color: var(--accent); }
.chat-message.user .avatar { background: var(--accent); color: white; border-color: var(--accent); }

.message-bubble {
    background: var(--bg-card); padding: 12px 14px; border-radius: 14px;
    font-size: 0.85rem; line-height: 1.5; max-width: 80%;
    border: 1px solid var(--border);
}
.chat-message.user .message-bubble {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: white; border: none;
}

.chat-input-area {
    padding: 12px 16px; background: var(--bg-surface);
    backdrop-filter: blur(20px); border-top: 1px solid var(--border);
    display: flex; gap: 10px;
}
.chat-input-area input {
    flex: 1; background: var(--bg-base); border: 1px solid var(--border);
    padding: 12px 16px; border-radius: 24px; color: white; outline: none;
    font-size: 0.85rem; transition: border-color 0.2s; font-family: inherit;
}
.chat-input-area input:focus { border-color: var(--accent); }
.chat-input-area button {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: white; border: none; width: 44px; height: 44px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 15px rgba(59,130,246,0.3);
    transition: transform 0.15s;
}
.chat-input-area button:active { transform: scale(0.92); }

/* ═══ ALERTS TAB ═══ */
.alerts-hero {
    text-align: center; padding: 24px 20px 16px;
    background: linear-gradient(180deg, rgba(239,68,68,0.06) 0%, transparent 100%);
}
.alerts-hero-icon {
    width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--yellow), var(--red));
    display: flex; align-items: center; justify-content: center;
}
.alerts-hero-icon i { color: white; width: 24px; height: 24px; }
.alerts-hero h3 { font-size: 1rem; font-weight: 700; }
.alerts-count { font-size: 0.75rem; color: var(--text-3); }

#alerts-container { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }

.alert-row {
    background: var(--bg-card); border-radius: var(--radius-sm); padding: 14px;
    display: flex; flex-direction: column; gap: 6px;
    border-left: 3px solid var(--green); border-right: 1px solid var(--border);
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.alert-row.high { border-left-color: var(--red); }
.alert-row.medium { border-left-color: var(--yellow); }
.alert-top { display: flex; justify-content: space-between; align-items: center; }
.alert-risk { font-weight: 700; font-size: 0.8rem; }
.alert-time { font-size: 0.7rem; color: var(--text-3); }
.alert-report { font-size: 0.8rem; color: var(--text-2); line-height: 1.4; }
.alert-orchestrator { font-size: 0.75rem; color: var(--text-3); font-style: italic; }

/* ═══ SETTINGS TAB ═══ */
.settings-hero {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; border-bottom: 1px solid var(--border);
}
.settings-hero h3 { font-size: 1rem; font-weight: 700; }
.save-status { font-size: 0.75rem; color: var(--green); }

.settings-scroll { padding: 16px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }

.settings-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 16px;
    border: 1px solid var(--border);
}
.card-header {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.85rem; font-weight: 700; margin-bottom: 14px;
}
.card-icon { color: var(--accent); width: 18px; height: 18px; }

.toggle-row { display: flex; gap: 10px; }
.toggle-option { flex: 1; cursor: pointer; }
.toggle-option input { display: none; }
.toggle-card {
    background: var(--bg-base); border: 2px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px; transition: all 0.25s;
}
.toggle-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.toggle-card-top i { width: 16px; height: 16px; color: var(--text-3); }
.toggle-card strong { font-size: 0.8rem; }
.toggle-card p { font-size: 0.72rem; color: var(--text-3); line-height: 1.4; }
.toggle-option input:checked + .toggle-card {
    border-color: var(--accent); background: var(--accent-glow);
    box-shadow: 0 0 20px rgba(59,130,246,0.1);
}
.toggle-option input:checked + .toggle-card .toggle-card-top i { color: var(--accent); }

.switch-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 0.85rem; }
.switch { position: relative; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; inset: 0; background: var(--border);
    border-radius: 24px; cursor: pointer; transition: 0.3s;
}
.slider::before {
    content: ''; position: absolute; width: 18px; height: 18px;
    left: 3px; bottom: 3px; background: white; border-radius: 50%;
    transition: 0.3s;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.field-label { font-size: 0.75rem; color: var(--text-3); margin-top: 12px; display: block; margin-bottom: 6px; }
.field-input {
    width: 100%; background: var(--bg-base); border: 1px solid var(--border);
    padding: 11px 14px; border-radius: var(--radius-sm); color: white; outline: none;
    font-size: 0.85rem; font-family: inherit; transition: border-color 0.2s;
}
.field-input:focus { border-color: var(--accent); }

.range-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.range-row input[type="range"] {
    flex: 1; -webkit-appearance: none; height: 4px;
    background: var(--border); border-radius: 4px; outline: none;
}
.range-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px;
    background: var(--accent); border-radius: 50%; cursor: pointer;
    box-shadow: 0 0 8px rgba(59,130,246,0.4);
}
.range-val { font-size: 0.78rem; color: var(--accent); font-weight: 600; min-width: 68px; text-align: right; }

.save-btn {
    width: 100%; padding: 14px; border: none; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: white; font-size: 0.9rem; font-weight: 700; font-family: inherit;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 20px rgba(59,130,246,0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}
.save-btn:active { transform: scale(0.97); }
.save-btn i { width: 18px; height: 18px; }

.version-tag { text-align: center; font-size: 0.7rem; color: var(--text-3); padding: 16px 0 24px; }

/* ═══ BOTTOM NAV ═══ */
.bottom-nav {
    display: flex; background: rgba(10, 17, 40, 0.95);
    backdrop-filter: blur(20px); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 10px 0 8px; background: none; border: none;
    color: var(--text-3); cursor: pointer; transition: color 0.2s;
    position: relative;
}
.nav-item i { width: 20px; height: 20px; }
.nav-item span { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.3px; }
.nav-item.active { color: var(--accent); }
.nav-item.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 24px; height: 2px; background: var(--accent); border-radius: 0 0 2px 2px;
}

/* ═══ THREAT OVERLAY ═══ */
.threat-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(239, 68, 68, 0.15); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    animation: threatFlash 0.5s ease;
}
.threat-overlay.hidden { display: none; }
.threat-content { text-align: center; }
.threat-icon { color: var(--red); width: 64px; height: 64px; animation: threatPulse 1s infinite; }
.threat-content h2 { font-size: 1.5rem; font-weight: 800; color: var(--red); margin: 12px 0 8px; letter-spacing: 2px; }
.threat-content p { color: var(--text-2); font-size: 0.85rem; max-width: 280px; }

@keyframes threatFlash {
    0%, 50%, 100% { background: rgba(239,68,68,0.15); }
    25%, 75% { background: rgba(239,68,68,0.3); }
}
@keyframes threatPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
