:root {
    --bg-base: #07090e;
    --bg-card: rgba(14, 20, 32, 0.72);
    --bg-card-hover: rgba(19, 28, 44, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.25);
    
    --primary: #00f0ff;
    --primary-glow: rgba(0, 240, 255, 0.4);
    --success: #00ff88;
    --success-glow: rgba(0, 255, 136, 0.35);
    --warning: #ffb800;
    --warning-glow: rgba(255, 184, 0, 0.35);
    --danger: #ff3366;
    --danger-glow: rgba(255, 51, 102, 0.45);
    
    --text-main: #f0f4fc;
    --text-muted: #8b9bb4;
    --text-dim: #4e5e78;
    
    --font-ui: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

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

body {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(0, 255, 136, 0.04) 0%, transparent 45%),
        linear-gradient(180deg, #07090e 0%, #0a0d16 100%);
    color: var(--text-main);
    font-family: var(--font-ui);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Glass panel utility */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

/* AUTHENTICATION OVERLAY & MODAL */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 14, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.auth-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.auth-card {
    width: 90%;
    max-width: 420px;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.15);
    animation: modalPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cyber-shield-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid var(--primary);
    border-radius: 50%;
    color: var(--primary);
    margin-bottom: 1.2rem;
    box-shadow: 0 0 20px var(--primary-glow);
}

.auth-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.8rem;
}

.auth-form .input-group {
    text-align: left;
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.auth-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    animation: shake 0.4s ease;
}

.auth-error.hidden {
    display: none;
}

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

.auth-hint {
    margin-top: 1.2rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.auth-hint code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary);
    font-family: var(--font-mono);
}

/* BUTTONS */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #00d2ff 0%, #00f0ff 100%);
    color: #040810;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px var(--primary-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0, 240, 255, 0.08);
}

/* TOP NAVIGATION */
.dashboard-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem 2rem;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    position: relative;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(0, 255, 136, 0.08));
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.watchdog-brand-sigil {
    width: 32px;
    height: 32px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.7));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

.brand-logo:hover .watchdog-brand-sigil {
    transform: scale(1.15);
    filter: drop-shadow(0 0 16px rgba(0, 240, 255, 1));
}

.official-watchdog-sigil {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.8));
    animation: sigilPulse 2.5s infinite alternate ease-in-out;
}

@keyframes sigilPulse {
    0% { filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6)); transform: scale(0.97); }
    100% { filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.95)); transform: scale(1.03); }
}

.logo-pulse {
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 1px solid var(--primary);
    opacity: 0.4;
    animation: pulseRing 2s infinite;
}

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

.brand-info h1 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-info h1 span {
    color: var(--primary);
}

.sub-badge {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* STATUS PILL */
.status-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-online {
    background: rgba(0, 255, 136, 0.12);
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--success);
}
.status-online .status-indicator {
    background: var(--success);
    box-shadow: 0 0 10px var(--success-glow);
    animation: blinkOnline 1.5s infinite;
}

.status-offline {
    background: rgba(255, 51, 102, 0.12);
    border-color: rgba(255, 51, 102, 0.3);
    color: var(--danger);
}
.status-offline .status-indicator {
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger-glow);
}

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

.status-sub {
    font-size: 0.75rem;
    opacity: 0.75;
    font-family: var(--font-mono);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 8px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* BANNER STRIP */
.banner-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.8rem;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.machine-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2.2rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.meta-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-main);
}

.active-focus-card {
    flex: 1;
    min-width: 280px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 240, 255, 0.18);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.1rem;
}

.focus-label {
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.radar-dot {
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    animation: blinkOnline 1.2s infinite;
}

.focus-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* GAUGES GRID */
.gauges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    padding: 1.4rem;
}

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

.card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-badge {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

.gauge-content {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.gauge-ring-container {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gauge-val {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.gauge-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.cores-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 120px;
    overflow-y: auto;
}

.core-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
}

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

.core-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.4s;
}

/* Metric Bar Group (RAM & Disk) */
.metric-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--text-main);
}

.bar-labels.sub {
    color: var(--text-dim);
    font-size: 0.7rem;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.warning-fill {
    background: var(--warning);
}

/* NETWORK CARD */
.net-stats-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.net-metric-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.net-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.net-icon.download {
    background: rgba(0, 240, 255, 0.15);
    color: var(--primary);
}

.net-icon.upload {
    background: rgba(0, 255, 136, 0.15);
    color: var(--success);
}

.net-direction {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.net-speed {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-main);
}

.net-mini-graph-container canvas {
    width: 100%;
    height: 45px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

/* SPLIT ROW: CHARTS & TOP PROCESSES */
.split-row {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 980px) {
    .split-row {
        grid-template-columns: 1fr;
    }
}

.chart-panel, .process-panel, .events-panel {
    padding: 1.4rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    gap: 1rem;
}

.panel-title-group h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.panel-subtitle {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.chart-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-color.cpu { background: var(--primary); }
.legend-color.ram { background: var(--success); }

.chart-container canvas {
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-sm);
}

/* SEARCH INPUT */
.search-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.85rem;
    color: var(--text-main);
    font-size: 0.82rem;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
}

/* CYBER TABLE */
.table-scroll-container {
    max-height: 220px;
    overflow-y: auto;
}

.cyber-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.cyber-table th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: #0f1624;
}

.cyber-table td {
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
}

.cyber-table tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.proc-name {
    color: #ffffff;
    font-weight: 600;
}

.proc-high {
    color: var(--danger);
    font-weight: 700;
}

/* EVENTS PANEL & STREAM */
.title-with-pulse {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.event-filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pill-filters {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.filter-pill {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-pill.active {
    background: var(--primary);
    color: #050a12;
    font-weight: 700;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid rgba(255, 51, 102, 0.4);
    color: var(--danger);
    font-size: 0.75rem;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-danger:hover {
    background: rgba(255, 51, 102, 0.15);
}

.events-list-container {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.event-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    border-left: 3px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    animation: slideIn 0.25s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.event-row.ev-info { border-left-color: var(--primary); }
.event-row.ev-process-start { border-left-color: var(--success); }
.event-row.ev-process-stop { border-left-color: #8b9bb4; }
.event-row.ev-window { border-left-color: #d175ff; }
.event-row.ev-warning { border-left-color: var(--warning); background: rgba(255, 184, 0, 0.05); }
.event-row.ev-critical { border-left-color: var(--danger); background: rgba(255, 51, 102, 0.08); }

.ev-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ev-tag {
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
}

.ev-tag.TAG-PROCESS_START { background: rgba(0, 255, 136, 0.15); color: var(--success); }
.ev-tag.TAG-PROCESS_STOP { background: rgba(255, 255, 255, 0.1); color: #abb9ce; }
.ev-tag.TAG-WINDOW { background: rgba(209, 117, 255, 0.15); color: #d175ff; }
.ev-tag.TAG-SYSTEM_ALERT { background: rgba(255, 184, 0, 0.15); color: var(--warning); }
.ev-tag.TAG-CONNECTION { background: rgba(255, 51, 102, 0.18); color: var(--danger); }
.ev-tag.TAG-AGENT { background: rgba(0, 240, 255, 0.15); color: var(--primary); }

.ev-msg {
    color: var(--text-main);
}

.ev-time {
    color: var(--text-dim);
    font-size: 0.72rem;
    flex-shrink: 0;
}

.empty-event-notice {
    padding: 2rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* FOOTER */
.bottom-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* SCREEN MONITOR PANEL */
.screen-monitor-panel {
    padding: 1.4rem;
    margin-bottom: 1.5rem;
}

.screen-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    animation: blinkOnline 1.5s infinite;
}

.screen-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.monitor-target-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.target-select-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cyber-select {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: var(--radius-sm);
    color: #00f0ff;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 5px 10px;
    outline: none;
    cursor: pointer;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.cyber-select:hover, .cyber-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.cyber-select option {
    background: #080d18;
    color: var(--text-main);
    padding: 6px;
}

.btn-sm {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 6px;
}

.refresh-rate-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.refresh-rate-selector select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 4px 8px;
    outline: none;
    cursor: pointer;
}

.refresh-rate-selector select:focus {
    border-color: var(--primary);
}

.screen-display-wrapper {
    position: relative;
    background: #04060a;
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: var(--radius-sm);
    min-height: 260px;
    max-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.08);
}

.screen-placeholder {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 0.6rem;
    opacity: 0.7;
}

.placeholder-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    margin-top: 0.4rem;
    display: block;
}

.remote-screen-view {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.25s ease;
}

.remote-screen-view:hover {
    transform: scale(1.006);
}

.remote-screen-view.hidden,
.screen-placeholder.hidden {
    display: none;
}

.screen-overlay-bar {
    position: absolute;
    bottom: 0;
    inset-inline: 0;
    background: linear-gradient(0deg, rgba(4, 7, 14, 0.9) 0%, rgba(4, 7, 14, 0) 100%);
    padding: 1.2rem 1rem 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

.screen-meta-chip, .screen-focus-chip {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    background: rgba(10, 16, 28, 0.85);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 4px;
    color: var(--text-muted);
    backdrop-filter: blur(8px);
}

.screen-focus-chip {
    color: var(--primary);
    border-color: rgba(0, 240, 255, 0.3);
}

/* FULLSCREEN OVERLAY MODAL */
.fullscreen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 8, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.fullscreen-overlay.active {
    display: flex;
}

.fullscreen-box {
    width: 96vw;
    max-width: 1600px;
    height: 94vh;
    background: #060910;
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.2);
}

.fullscreen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.4rem;
    border-bottom: 1px solid var(--border-color);
    background: #090e18;
}

.fs-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.fs-meta-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: rgba(0, 240, 255, 0.12);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.fs-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-fs {
    background: rgba(255, 51, 102, 0.15);
    border: 1px solid rgba(255, 51, 102, 0.4);
    color: var(--danger);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-close-fs:hover {
    background: var(--danger);
    color: #fff;
}

.fullscreen-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020306;
    overflow: hidden;
    padding: 0.5rem;
}

.fullscreen-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* ==========================================================================
   LIVE STREAM & 30-MINUTE CCTV DVR TIMELINE STYLES
   ========================================================================== */

.stream-badge-live, .stream-badge-dvr {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: fadeIn 0.3s ease;
}

.stream-badge-live {
    background: rgba(0, 255, 136, 0.12);
    border: 1px solid rgba(0, 255, 136, 0.4);
    color: var(--secondary);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.15);
}

.stream-badge-dvr {
    background: rgba(255, 184, 0, 0.12);
    border: 1px solid rgba(255, 184, 0, 0.4);
    color: #ffb800;
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.15);
}

/* Mode Switcher Pills */
.stream-mode-pills {
    display: flex;
    background: rgba(8, 14, 24, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
    gap: 3px;
}

.mode-pill {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.mode-pill:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.mode-pill.active {
    background: rgba(0, 240, 255, 0.15);
    color: var(--primary);
    font-weight: 600;
    box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.2);
}

.neon-dot-pulse {
    width: 7px;
    height: 7px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
    animation: livePulse 1.4s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #00ff88; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

/* DVR Timeline Controls Panel */
.dvr-panel-wrapper {
    background: rgba(6, 10, 18, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    animation: slideDown 0.3s ease;
}

.dvr-panel-wrapper.hidden {
    display: none;
}

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

.dvr-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.dvr-status-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dvr-playback-icon {
    font-size: 1.1rem;
}

.dvr-headline {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 600;
}

.dvr-badge-offset {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: rgba(255, 184, 0, 0.15);
    color: #ffb800;
    border: 1px solid rgba(255, 184, 0, 0.35);
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 700;
}

.dvr-meta-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dvr-meta-item {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(14, 22, 38, 0.8);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 4px;
}

/* Timeline Scrubber Slider */
.dvr-scrubber-box {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.timeline-bound-label {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-dim);
    font-weight: 600;
    flex-shrink: 0;
}

.scrubber-track-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    height: 28px;
}

#dvr-scrubber {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #111a2c;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: background 0.2s;
}

#dvr-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #ffffff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

#dvr-scrubber::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 18px rgba(0, 240, 255, 1);
}

#dvr-scrubber::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #ffffff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
    cursor: pointer;
}

.scrubber-progress-fill {
    position: absolute;
    left: 0;
    top: 10px;
    height: 8px;
    background: linear-gradient(90deg, #00f0ff, #00ff88);
    border-radius: 4px;
    pointer-events: none;
    z-index: 1;
    width: 100%;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

/* DVR Actions Row */
.dvr-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.dvr-playback-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-dvr {
    background: rgba(14, 22, 38, 0.9);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-dvr:hover {
    background: rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.4);
    color: var(--primary);
}

.btn-dvr-play {
    background: rgba(0, 240, 255, 0.18);
    border-color: rgba(0, 240, 255, 0.45);
    color: #fff;
    font-weight: 700;
    padding: 6px 16px;
}

.btn-dvr-play:hover {
    background: var(--primary);
    color: #03060c;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.btn-dvr-snap {
    background: rgba(14, 22, 38, 0.9);
}

/* Speed selector */
.dvr-speed-btns {
    display: flex;
    align-items: center;
    gap: 4px;
}

.speed-label {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-dim);
    margin-right: 4px;
}

.btn-speed {
    background: rgba(10, 16, 28, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-speed:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-speed.active {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}

/* Return Group / GO LIVE Button */
.dvr-return-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-dvr-live {
    background: linear-gradient(135deg, #00ff88, #00b35c);
    border: 1px solid #00ff88;
    color: #03060c;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.35);
    transition: all 0.2s ease;
}

.btn-dvr-live:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.6);
}

.live-dot-pulse {
    width: 8px;
    height: 8px;
    background: #03060c;
    border-radius: 50%;
    animation: livePulse 1.2s infinite;
}
