/* ==========================================================================
   AEGISCAM - CYBER SECURITY DARK DESIGN SYSTEM & MULTI-CAM GRID
   ========================================================================== */

:root {
    /* Color Tokens */
    --bg-base: #07090e;
    --bg-surface: #0f1420;
    --bg-card: #151c2c;
    --bg-card-hover: #1c263c;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(0, 243, 255, 0.3);
    
    --primary: #00f3ff;
    --primary-glow: rgba(0, 243, 255, 0.25);
    --accent: #00ff88;
    --accent-glow: rgba(0, 255, 136, 0.25);
    --danger: #ff0055;
    --danger-glow: rgba(255, 0, 85, 0.3);
    --warning: #ffaa00;

    --text-main: #f0f4f8;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 243, 255, 0.15);

    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow-x: hidden;
    line-height: 1.5;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, rgba(0, 243, 255, 0.05) 0%, transparent 60%);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: rgba(15, 20, 32, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    position: relative;
    width: 38px;
    height: 38px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    border: 1px solid var(--primary);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

.brand-text .title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    display: block;
    line-height: 1;
}

.brand-text .accent {
    color: var(--primary);
}

.brand-text .subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Mode Navigation Tabs */
.mode-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    gap: 2px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    background: var(--primary);
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.offline {
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.1);
}
.status-badge.offline .dot { background: var(--text-dim); }

.status-badge.online {
    color: var(--accent);
    border-color: rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.1);
}
.status-badge.online .dot { 
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: blink 1.5s infinite;
}

.status-badge.stealth {
    color: var(--primary);
    border-color: rgba(0, 243, 255, 0.3);
    background: rgba(0, 243, 255, 0.1);
}
.status-badge.stealth .dot { background: var(--primary); }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ==========================================================================
   MAIN CONTENT VIEWS
   ========================================================================== */

.main-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.view-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view-panel.active {
    display: block;
}

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

/* BUTTONS & CONTROLS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 243, 255, 0.4);
}

.btn-secondary {
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary);
    border-color: var(--border-accent);
}
.btn-secondary:hover {
    background: rgba(0, 243, 255, 0.2);
}

.btn-dark {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border-color);
}
.btn-dark:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-warning {
    background: rgba(255, 170, 0, 0.15);
    color: var(--warning);
    border-color: rgba(255, 170, 0, 0.4);
}
.btn-warning:hover {
    background: rgba(255, 170, 0, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 20px var(--danger-glow);
}

.btn-stealth {
    background: #111;
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.btn-full { width: 100%; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.75rem; border-radius: var(--radius-sm); }

/* ==========================================================================
   VIEW 1: MODE SELECTOR SPLASH
   ========================================================================== */

.hero-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-card);
    max-width: 900px;
    margin: 2rem auto;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.hero-card h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.role-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.role-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.role-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.camera-icon { background: rgba(0, 243, 255, 0.1); color: var(--primary); }
.monitor-icon { background: rgba(0, 255, 136, 0.1); color: var(--accent); }

.role-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.role-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.pill {
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   VIEW 2: CAMERA NODE VIEW
   ========================================================================== */

.camera-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .camera-layout { grid-template-columns: 1fr; }
}

.camera-viewport-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.viewport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.viewport-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--danger);
    animation: blink 1s infinite;
}

.telemetry-bar {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

#camera-video, #remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#motion-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.motion-overlay-banner {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(-50px);
    background: var(--danger);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
    box-shadow: 0 5px 20px var(--danger-glow);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.motion-overlay-banner.active {
    transform: translateX(-50%) translateY(0);
}

.strobe-overlay {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.strobe-overlay.active {
    animation: strobeFlash 0.15s infinite;
}

@keyframes strobeFlash {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0; }
}

.camera-controls-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

/* PAIRING CARD */
.pairing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.pairing-code-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.code-label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.code-display {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    user-select: all;
}

.copy-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.stealth-info-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 0.85rem;
}

.info-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.text-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--warning);
}

.style-mb { margin-bottom: 1rem; }

/* ==========================================================================
   VIEW 3: MULTI-CAMERA MONITOR SECURITY DASHBOARD
   ========================================================================== */

.monitor-layout {
    display: grid;
    grid-template-columns: 2.4fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .monitor-layout { grid-template-columns: 1fr; }
}

.monitor-main-col, .monitor-side-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.connect-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-glow);
}

.connect-form {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0 0.75rem 0;
    flex-wrap: wrap;
}

.form-control {
    flex: 1;
    min-width: 160px;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.saved-cams-chips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cam-chip {
    padding: 0.25rem 0.65rem;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.cam-chip:hover {
    background: var(--primary);
    color: #000;
}

/* MULTI-CAMERA GRID STYLES */
.camera-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.25rem;
}

.camera-grid-view.single-focus {
    grid-template-columns: 1fr;
}

.empty-grid-card {
    grid-column: 1 / -1;
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-grid-card h3 { color: var(--text-main); }
.empty-grid-card p { max-width: 500px; font-size: 0.9rem; color: var(--text-muted); }

/* CAMERA GRID NODE CARD */
.cam-grid-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.cam-grid-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
}

.cam-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.cam-grid-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--primary);
}

.cam-grid-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #05070a;
}

.cam-grid-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cam-grid-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    gap: 0.5rem;
}

.cam-controls-group {
    display: flex;
    gap: 0.4rem;
}

/* SETTINGS CARD */
.settings-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

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

.setting-item label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

/* SNAPSHOTS GALLERY */
.gallery-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.snapshots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    max-height: 380px;
    overflow-y: auto;
    margin-top: 1rem;
    padding-right: 0.25rem;
}

.empty-gallery-state {
    grid-column: 1 / -1;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.empty-icon { font-size: 2rem; }

.snapshot-item {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #000;
    cursor: pointer;
}

.snapshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.snapshot-item:hover img {
    transform: scale(1.08);
}

.snapshot-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--primary);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    font-family: var(--font-mono);
    padding: 1px 4px;
    border-radius: 2px;
}

.snapshot-time {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.75);
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--text-main);
    text-align: center;
}

/* ACTIVITY LOG */
.log-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.activity-log-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.log-entry {
    display: flex;
    gap: 0.75rem;
    padding: 0.4rem 0.6rem;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid var(--text-dim);
    border-radius: 4px;
}

.log-entry.sys { border-color: var(--primary); }
.log-entry.alert { border-color: var(--danger); background: rgba(255, 0, 85, 0.1); }
.log-entry.cmd { border-color: var(--accent); }

.log-time { color: var(--text-dim); min-width: 60px; }
.log-msg { color: var(--text-main); }

/* ==========================================================================
   VIEW 4: OUTDOOR SETUP GUIDE
   ========================================================================== */

.guide-hero {
    text-align: center;
    max-width: 800px;
    margin: 1.5rem auto 3rem auto;
}

.guide-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.guide-hero p {
    color: var(--text-muted);
}

.guide-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
}

.guide-num {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(0, 243, 255, 0.15);
    margin-bottom: 0.5rem;
}

.guide-content h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.guide-content ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.guide-content li strong {
    color: #fff;
}

/* ==========================================================================
   STEALTH BLACKOUT SCREEN OVERLAY
   ========================================================================== */

.stealth-blackout {
    position: fixed;
    inset: 0;
    background: #000 !important;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
}

.stealth-blackout.active {
    display: flex;
}

.stealth-notice {
    text-align: center;
    color: rgba(255, 255, 255, 0.15);
    font-family: var(--font-mono);
    pointer-events: none;
}

.stealth-eye { font-size: 3rem; display: block; margin-bottom: 1rem; opacity: 0.2; }
.stealth-sub { font-size: 0.8rem; margin-top: 0.5rem; }
.stealth-unlock { font-size: 0.7rem; color: rgba(0, 243, 255, 0.3); margin-top: 2rem; }

/* ==========================================================================
   BADGE STYLES (Bug #8 fix)
   ========================================================================== */

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-mono);
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-accent {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* ==========================================================================
   TOAST NOTIFICATION (Bug #3 fix - proper fixed positioning)
   ========================================================================== */

.aegis-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    background: var(--primary);
    color: #000;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-mono);
    z-index: 100000;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    white-space: nowrap;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aegis-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================================================
   PASSWORD SECURITY GATE / LOCKSCREEN OVERLAY
   ========================================================================== */

.auth-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(15, 20, 32, 0.98), rgba(7, 9, 14, 1));
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.auth-gate-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-gate-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 243, 255, 0.25);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.8);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    animation: authCardPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes authCardPop {
    0% { transform: scale(0.9) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.auth-icon-wrap {
    width: 72px;
    height: 72px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.auth-gate-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
    letter-spacing: 1px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
    font-family: var(--font-mono);
}

.auth-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.auth-input {
    width: 100%;
    padding: 0.9rem 3rem 0.9rem 1.25rem;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 3px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: var(--primary);
    border-radius: var(--radius-md);
}

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.btn-pwd-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn-pwd-eye:hover {
    opacity: 1;
}

.auth-remember-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-remember-row .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.auth-error {
    background: rgba(255, 0, 85, 0.15);
    border: 1px solid var(--danger);
    color: #ff6b8b;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.auth-btn {
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}

.auth-default-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.auth-default-hint code {
    color: var(--accent);
    background: rgba(0, 255, 136, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

/* ==========================================================================
   CAMERA GRID PAUSED OVERLAY
   ========================================================================== */

.cam-paused-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-mono);
    pointer-events: none;
    letter-spacing: 1.5px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.35);
    animation: pausePulse 2s infinite ease-in-out;
}

@keyframes pausePulse {
    0%, 100% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.96); }
}



.btn-accent { background: var(--accent); color: #000; box-shadow: 0 4px 20px var(--accent-glow); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(0, 255, 136, 0.4); }
