/* ================================================================
   SHOPHOSTING SECURITY DASHBOARD
   Cyberpunk "Hacking the Mainframe" Theme
   ================================================================
   Color system:
     --phosphor:    #00ff41  (terminal green - primary)
     --cyan:        #00d4ff  (info/accent blue)
     --amber:       #ffb800  (warnings)
     --crimson:     #ff0040  (danger/critical)
     --void:        #030606  (deepest black)
     --surface:     #0a0e0e  (card/panel bg)
     --surface-2:   #0f1414  (elevated surface)
     --muted:       #1a2222  (borders, rules)
     --dim:         #2a3535  (disabled text)
     --text:        #7a9a8a  (body text)
     --text-bright: #b0d0c0  (bright text)
   ================================================================ */

:root {
    --phosphor: #00ff41;
    --phosphor-dim: #00cc33;
    --phosphor-glow: rgba(0, 255, 65, 0.15);
    --phosphor-ghost: rgba(0, 255, 65, 0.05);
    --cyan: #00d4ff;
    --cyan-dim: #0099bb;
    --cyan-glow: rgba(0, 212, 255, 0.15);
    --amber: #ffb800;
    --amber-dim: #cc9300;
    --amber-glow: rgba(255, 184, 0, 0.15);
    --crimson: #ff0040;
    --crimson-dim: #cc0033;
    --crimson-glow: rgba(255, 0, 64, 0.15);
    --void: #030606;
    --surface: #0a0e0e;
    --surface-2: #0f1414;
    --surface-3: #141a1a;
    --muted: #1a2222;
    --dim: #2a3535;
    --text: #7a9a8a;
    --text-bright: #b0d0c0;

    --font-mono: 'Share Tech Mono', 'Courier New', monospace;
    --font-display: 'Orbitron', 'Share Tech Mono', monospace;
    --font-ui: 'Rajdhani', 'Share Tech Mono', sans-serif;

    --radius-sm: 2px;
    --radius-md: 4px;

    --glow-phosphor: 0 0 8px rgba(0, 255, 65, 0.4), 0 0 20px rgba(0, 255, 65, 0.1);
    --glow-cyan: 0 0 8px rgba(0, 212, 255, 0.4), 0 0 20px rgba(0, 212, 255, 0.1);
    --glow-crimson: 0 0 8px rgba(255, 0, 64, 0.4), 0 0 20px rgba(255, 0, 64, 0.1);
    --glow-amber: 0 0 8px rgba(255, 184, 0, 0.4), 0 0 20px rgba(255, 184, 0, 0.1);
}


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

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    background: var(--void);
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--phosphor);
    color: var(--void);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--void);
}
::-webkit-scrollbar-thumb {
    background: var(--muted);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--dim);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--phosphor); }


/* ================================================================
   CRT / SCANLINE / MATRIX OVERLAYS
   ================================================================ */

.crt-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background:
        radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.35) 100%);
}

.scanline-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    animation: scanline-drift 8s linear infinite;
}

@keyframes scanline-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

#matrix-rain {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.06;
}

.crt-flicker {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: var(--void);
    opacity: 1;
    animation: crt-boot 1.2s ease-out forwards;
}

@keyframes crt-boot {
    0% { opacity: 1; }
    20% { opacity: 0.8; }
    25% { opacity: 1; }
    40% { opacity: 0.6; }
    45% { opacity: 0.9; }
    60% { opacity: 0.3; }
    80% { opacity: 0.05; }
    100% { opacity: 0; pointer-events: none; }
}


/* ================================================================
   APP SHELL
   ================================================================ */

.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    z-index: 1;
}


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

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    height: 48px;
    background: var(--surface);
    border-bottom: 1px solid var(--muted);
    flex-shrink: 0;
    position: relative;
}

.topbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--phosphor-dim), transparent);
    opacity: 0.3;
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.topbar__icon {
    width: 28px;
    height: 28px;
    color: var(--phosphor);
    filter: drop-shadow(0 0 4px rgba(0,255,65,0.4));
    animation: icon-pulse 3s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(0,255,65,0.4)); }
    50% { filter: drop-shadow(0 0 8px rgba(0,255,65,0.7)); }
}

.topbar__title {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.topbar__title-main {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--phosphor);
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0,255,65,0.5);
    position: relative;
}

/* Glitch effect on title */
.topbar__title-main::before,
.topbar__title-main::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.topbar__title-main::before {
    color: var(--crimson);
    animation: glitch-1 4s infinite linear;
}

.topbar__title-main::after {
    color: var(--cyan);
    animation: glitch-2 4s infinite linear;
}

@keyframes glitch-1 {
    0%, 92%, 100% { opacity: 0; transform: none; }
    93% { opacity: 0.8; transform: translate(-2px, 1px); clip-path: inset(20% 0 60% 0); }
    94% { opacity: 0; }
    96% { opacity: 0.6; transform: translate(2px, -1px); clip-path: inset(60% 0 10% 0); }
    97% { opacity: 0; }
}

@keyframes glitch-2 {
    0%, 94%, 100% { opacity: 0; transform: none; }
    95% { opacity: 0.7; transform: translate(2px, -1px); clip-path: inset(40% 0 30% 0); }
    96% { opacity: 0; }
    98% { opacity: 0.5; transform: translate(-1px, 2px); clip-path: inset(10% 0 70% 0); }
    99% { opacity: 0; }
}

.topbar__title-sub {
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 400;
    color: var(--cyan);
    letter-spacing: 6px;
    text-transform: uppercase;
}


/* ================================================================
   NAVIGATION
   ================================================================ */

.topbar__nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 16px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--dim);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.2s;
    overflow: hidden;
    text-transform: uppercase;
}

.nav-link:hover {
    color: var(--text-bright);
    border-color: var(--muted);
    background: var(--phosphor-ghost);
}

.nav-link.active {
    color: var(--phosphor);
    border-color: var(--phosphor-dim);
    background: rgba(0, 255, 65, 0.05);
    text-shadow: 0 0 6px rgba(0,255,65,0.3);
}

.nav-link__icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-link__icon svg {
    width: 100%;
    height: 100%;
}

.nav-link__glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--phosphor);
    box-shadow: var(--glow-phosphor);
    transition: width 0.3s;
}

.nav-link.active .nav-link__glow,
.nav-link:hover .nav-link__glow {
    width: 60%;
}

.nav-link.active .nav-link__glow {
    width: 80%;
}


/* ================================================================
   TOP BAR RIGHT SECTION
   ================================================================ */

.topbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.topbar__status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--muted);
    border-radius: var(--radius-sm);
    font-size: 11px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dim);
    transition: all 0.3s;
}

.status-dot.green {
    background: var(--phosphor);
    box-shadow: 0 0 6px var(--phosphor);
    animation: dot-blink 2s infinite;
}

.status-dot.amber {
    background: var(--amber);
    box-shadow: 0 0 6px var(--amber);
    animation: dot-blink 1s infinite;
}

.status-dot.red {
    background: var(--crimson);
    box-shadow: 0 0 6px var(--crimson);
    animation: dot-blink 0.5s infinite;
}

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

.status-text {
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.topbar__admin {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

.admin-label {
    font-size: 9px;
    color: var(--dim);
    letter-spacing: 2px;
}

.admin-user {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--cyan);
    letter-spacing: 1px;
}

.btn-emergency {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--crimson);
    background: transparent;
    border: 1px solid var(--crimson);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-emergency:hover {
    background: var(--crimson-glow);
    box-shadow: var(--glow-crimson);
    text-shadow: 0 0 6px rgba(255,0,64,0.5);
}

.btn-emergency:active {
    transform: scale(0.97);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--dim);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-logout:hover {
    color: var(--crimson);
    border-color: var(--crimson-dim);
    background: var(--crimson-glow);
}


/* ================================================================
   THREAT LEVEL STRIP
   ================================================================ */

.threat-strip {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 16px;
    height: 36px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--muted);
    flex-shrink: 0;
    font-size: 11px;
    overflow: hidden;
}

.threat-strip__level {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.threat-strip__label {
    color: var(--dim);
    letter-spacing: 2px;
    font-size: 10px;
    text-transform: uppercase;
}

.threat-strip__value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2px;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    transition: all 0.4s;
}

.threat-strip__value.level-low {
    color: var(--phosphor);
    background: var(--phosphor-ghost);
    border: 1px solid rgba(0,255,65,0.2);
    text-shadow: 0 0 6px rgba(0,255,65,0.4);
}

.threat-strip__value.level-medium {
    color: var(--amber);
    background: var(--amber-glow);
    border: 1px solid rgba(255,184,0,0.2);
    text-shadow: 0 0 6px rgba(255,184,0,0.4);
    animation: threat-pulse-amber 2s infinite;
}

.threat-strip__value.level-high {
    color: var(--crimson);
    background: var(--crimson-glow);
    border: 1px solid rgba(255,0,64,0.2);
    text-shadow: 0 0 6px rgba(255,0,64,0.4);
    animation: threat-pulse-red 1.5s infinite;
}

.threat-strip__value.level-critical {
    color: #fff;
    background: var(--crimson);
    border: 1px solid var(--crimson);
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
    animation: threat-pulse-critical 0.8s infinite;
}

@keyframes threat-pulse-amber {
    0%, 100% { box-shadow: 0 0 4px rgba(255,184,0,0.2); }
    50% { box-shadow: 0 0 12px rgba(255,184,0,0.4); }
}

@keyframes threat-pulse-red {
    0%, 100% { box-shadow: 0 0 4px rgba(255,0,64,0.2); }
    50% { box-shadow: 0 0 16px rgba(255,0,64,0.5); }
}

@keyframes threat-pulse-critical {
    0%, 100% { box-shadow: 0 0 8px rgba(255,0,64,0.4); opacity: 1; }
    50% { box-shadow: 0 0 24px rgba(255,0,64,0.8); opacity: 0.85; }
}

.threat-strip__stats {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-chip__label {
    font-size: 10px;
    color: var(--dim);
    letter-spacing: 1px;
}

.stat-chip__value {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 1px;
    min-width: 20px;
    text-align: right;
}

.threat-strip__time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    line-height: 1.1;
}

.clock {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--phosphor);
    letter-spacing: 2px;
    text-shadow: 0 0 6px rgba(0,255,65,0.3);
}

.uptime {
    font-size: 9px;
    color: var(--dim);
    letter-spacing: 1px;
}


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

.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    position: relative;
}


/* ================================================================
   STATUS BAR (BOTTOM)
   ================================================================ */

.statusbar {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 28px;
    background: var(--surface);
    border-top: 1px solid var(--muted);
    flex-shrink: 0;
    font-size: 10px;
    letter-spacing: 1px;
    position: relative;
}

.statusbar::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--phosphor-dim), transparent);
    opacity: 0.2;
}

.statusbar__left,
.statusbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.statusbar__center {
    flex: 1;
    text-align: center;
    overflow: hidden;
}

.statusbar__item {
    color: var(--dim);
}

.statusbar__item span {
    color: var(--phosphor-dim);
    margin-left: 2px;
}

.statusbar__feed {
    color: var(--text);
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: feed-type 0.5s steps(40) forwards;
}

@keyframes feed-type {
    from { max-width: 0; }
    to { max-width: 100%; }
}


/* ================================================================
   REUSABLE COMPONENTS
   ================================================================ */

/* Panels */
.panel {
    background: var(--surface);
    border: 1px solid var(--muted);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--phosphor-dim), transparent);
    opacity: 0.2;
}

.panel--cyan::before {
    background: linear-gradient(90deg, transparent, var(--cyan-dim), transparent);
}

.panel--amber::before {
    background: linear-gradient(90deg, transparent, var(--amber-dim), transparent);
}

.panel--crimson::before {
    background: linear-gradient(90deg, transparent, var(--crimson-dim), transparent);
}

.panel__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--muted);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-bright);
    text-transform: uppercase;
}

.panel__header svg {
    width: 14px;
    height: 14px;
    color: var(--phosphor);
}

.panel__body {
    padding: 14px;
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid var(--muted);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-bright);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn:hover {
    border-color: var(--phosphor-dim);
    background: var(--phosphor-ghost);
    color: var(--phosphor);
}

.btn:active {
    transform: scale(0.97);
}

.btn--primary {
    border-color: var(--phosphor-dim);
    background: rgba(0, 255, 65, 0.08);
    color: var(--phosphor);
}

.btn--primary:hover {
    background: rgba(0, 255, 65, 0.15);
    box-shadow: var(--glow-phosphor);
}

.btn--danger {
    border-color: var(--crimson-dim);
    background: rgba(255, 0, 64, 0.08);
    color: var(--crimson);
}

.btn--danger:hover {
    background: rgba(255, 0, 64, 0.15);
    box-shadow: var(--glow-crimson);
}

.btn--danger:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
}

.btn--cancel {
    color: var(--dim);
    border-color: var(--dim);
}

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

.btn--cyan {
    border-color: var(--cyan-dim);
    background: rgba(0, 212, 255, 0.08);
    color: var(--cyan);
}

.btn--cyan:hover {
    background: rgba(0, 212, 255, 0.15);
    box-shadow: var(--glow-cyan);
}

.btn--sm {
    padding: 4px 10px;
    font-size: 11px;
}


/* Inputs */
.input {
    width: 100%;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--phosphor);
    background: var(--void);
    border: 1px solid var(--muted);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
    border-color: var(--phosphor-dim);
    box-shadow: 0 0 0 1px rgba(0,255,65,0.1), var(--glow-phosphor);
}

.input::placeholder {
    color: var(--dim);
}

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232a3535' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 30px;
    cursor: pointer;
}


/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    padding: 8px 12px;
    text-align: left;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
    border-bottom: 1px solid var(--muted);
    background: var(--surface-2);
}

.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(26, 34, 34, 0.5);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--phosphor-ghost);
}

.data-table tr:last-child td {
    border-bottom: none;
}


/* Severity badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge--low {
    color: var(--phosphor);
    background: var(--phosphor-ghost);
    border: 1px solid rgba(0,255,65,0.15);
}

.badge--medium {
    color: var(--amber);
    background: var(--amber-glow);
    border: 1px solid rgba(255,184,0,0.15);
}

.badge--high {
    color: var(--crimson);
    background: var(--crimson-glow);
    border: 1px solid rgba(255,0,64,0.15);
}

.badge--critical {
    color: #fff;
    background: rgba(255,0,64,0.3);
    border: 1px solid rgba(255,0,64,0.4);
    animation: badge-critical-pulse 1s infinite;
}

@keyframes badge-critical-pulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 8px rgba(255,0,64,0.3); }
}

.badge--info {
    color: var(--cyan);
    background: var(--cyan-glow);
    border: 1px solid rgba(0,212,255,0.15);
}

.badge--pass {
    color: var(--phosphor);
    background: var(--phosphor-ghost);
    border: 1px solid rgba(0,255,65,0.15);
}

.badge--warn {
    color: var(--amber);
    background: var(--amber-glow);
    border: 1px solid rgba(255,184,0,0.15);
}

.badge--fail {
    color: var(--crimson);
    background: var(--crimson-glow);
    border: 1px solid rgba(255,0,64,0.15);
}

.badge--active {
    color: var(--crimson);
    background: var(--crimson-glow);
    border: 1px solid rgba(255,0,64,0.2);
}

.badge--released {
    color: var(--phosphor);
    background: var(--phosphor-ghost);
    border: 1px solid rgba(0,255,65,0.15);
}

.badge--pending {
    color: var(--amber);
    background: var(--amber-glow);
    border: 1px solid rgba(255,184,0,0.15);
}

.badge--running {
    color: var(--cyan);
    background: var(--cyan-glow);
    border: 1px solid rgba(0,212,255,0.15);
    animation: badge-running 1.5s infinite;
}

@keyframes badge-running {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 6px rgba(0,212,255,0.3); }
}

.badge--completed {
    color: var(--phosphor);
    background: var(--phosphor-ghost);
    border: 1px solid rgba(0,255,65,0.15);
}


/* Progress bar */
.progress-bar {
    height: 4px;
    background: var(--muted);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-bar__fill {
    height: 100%;
    background: var(--phosphor);
    box-shadow: 0 0 8px rgba(0,255,65,0.5);
    border-radius: 2px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar__fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
    animation: progress-shimmer 1.5s infinite;
}

@keyframes progress-shimmer {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}


/* Terminal / log output */
.terminal {
    background: var(--void);
    border: 1px solid var(--muted);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    color: var(--phosphor-dim);
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal .line-timestamp {
    color: var(--dim);
    margin-right: 8px;
}

.terminal .line-severity-high {
    color: var(--crimson);
}

.terminal .line-severity-medium {
    color: var(--amber);
}

.terminal .line-severity-low {
    color: var(--phosphor);
}

.terminal .line-severity-info {
    color: var(--cyan);
}


/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.grid-sidebar {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
}

.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }


/* Spacers */
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }


/* Section headers */
.section-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-bright);
    text-transform: uppercase;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title svg {
    width: 16px;
    height: 16px;
    color: var(--phosphor);
}

.section-title .count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--cyan);
    margin-left: auto;
}


/* Form groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.form-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}


/* Text utilities */
.text-phosphor { color: var(--phosphor); }
.text-cyan { color: var(--cyan); }
.text-amber { color: var(--amber); }
.text-crimson { color: var(--crimson); }
.text-danger { color: var(--crimson); }
.text-dim { color: var(--dim); }
.text-muted { color: var(--text); }
.text-bright { color: var(--text-bright); }
.text-mono { font-family: var(--font-mono); }
.text-display { font-family: var(--font-display); }
.text-sm { font-size: 11px; }
.text-xs { font-size: 10px; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Large stat number */
.stat-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
    margin-top: 4px;
}


/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--dim);
}

.empty-state__icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state__text {
    font-size: 12px;
    letter-spacing: 1px;
}


/* ================================================================
   MODAL
   ================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 6, 6, 0.85);
    backdrop-filter: blur(4px);
}

.modal-panel {
    background: var(--surface);
    border: 1px solid var(--crimson-dim);
    border-radius: var(--radius-md);
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 0 40px rgba(255, 0, 64, 0.15);
    animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-panel__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--crimson);
    border-bottom: 1px solid var(--muted);
    text-transform: uppercase;
}

.warning-pulse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--crimson);
    color: #fff;
    font-weight: 900;
    font-size: 14px;
    border-radius: 50%;
    animation: warning-throb 1s infinite;
}

@keyframes warning-throb {
    0%, 100% { box-shadow: 0 0 4px rgba(255,0,64,0.3); }
    50% { box-shadow: 0 0 16px rgba(255,0,64,0.6); transform: scale(1.05); }
}

.modal-panel__body {
    padding: 18px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
}

.modal-panel__body p {
    margin-bottom: 10px;
}

.modal-panel__confirm {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--void);
    border: 1px solid var(--muted);
    border-radius: var(--radius-sm);
}

.confirm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-bright);
}

.confirm-check input {
    accent-color: var(--crimson);
}

.modal-panel__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--muted);
}


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

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--muted);
    border-top-color: var(--phosphor);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.typing-cursor::after {
    content: '_';
    animation: cursor-blink 0.8s step-end infinite;
    color: var(--phosphor);
}

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

/* Stagger-in animation for child elements */
.stagger-in > * {
    opacity: 0;
    animation: stagger-fade-in 0.4s ease-out forwards;
}

.stagger-in > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-in > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-in > *:nth-child(8) { animation-delay: 0.4s; }

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


/* ================================================================
   LOGIN PAGE (standalone, no base template)
   ================================================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-box {
    background: var(--surface);
    border: 1px solid var(--phosphor-dim);
    border-radius: var(--radius-md);
    padding: 32px;
    width: 380px;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.08);
    animation: login-appear 0.6s ease-out;
}

@keyframes login-appear {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--phosphor), transparent);
}

.login-box__title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 900;
    color: var(--phosphor);
    letter-spacing: 4px;
    text-align: center;
    text-shadow: 0 0 20px rgba(0,255,65,0.4);
    margin-bottom: 4px;
}

.login-box__subtitle {
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--cyan);
    letter-spacing: 6px;
    text-align: center;
    margin-bottom: 28px;
}

.login-box .form-group {
    margin-bottom: 16px;
}

.login-box .error {
    color: var(--crimson);
    font-size: 12px;
    text-align: center;
    margin-bottom: 16px;
    padding: 8px;
    border: 1px solid var(--crimson-dim);
    border-radius: var(--radius-sm);
    background: var(--crimson-glow);
}

.login-box .btn {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 3px;
}


/* ================================================================
   ERROR PAGE
   ================================================================ */

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.error-page__code {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 900;
    color: var(--crimson);
    text-shadow: 0 0 30px rgba(255,0,64,0.3);
    line-height: 1;
}

.error-page__message {
    font-size: 14px;
    color: var(--text);
    margin-top: 8px;
    letter-spacing: 2px;
}


/* ================================================================
   SCAN REPORT PAGES
   ================================================================ */

.report-header {
    margin-bottom: 1.5rem;
}

.report-header__back {
    display: inline-block;
    color: var(--cyan);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    transition: color 0.2s, text-shadow 0.2s;
}

.report-header__back:hover {
    color: var(--phosphor);
    text-shadow: 0 0 8px var(--phosphor);
}

.report-header__title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.report-header__id {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--text-bright);
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0,255,65,0.2);
}

.report-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.report-meta__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.report-meta__label {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.report-meta__value {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-bright);
    word-break: break-all;
}

/* Clickable scan links in tables */
.scan-link {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    cursor: pointer;
    transition: color 0.2s, text-shadow 0.2s, text-decoration-style 0.2s;
}

.scan-link:hover {
    text-shadow: 0 0 8px currentColor;
    text-decoration-style: solid;
    text-decoration-thickness: 2px;
}

/* Inline report button in scan tables */
.btn--report {
    display: inline-block;
    padding: 2px 10px;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn--report:hover {
    background: var(--cyan);
    color: var(--bg);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Collapsible panels in reports */
.report-collapsible {
    cursor: pointer;
    user-select: none;
}

.report-collapsible:hover {
    color: var(--cyan);
}

.report-collapsible__icon {
    float: right;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-dim);
}

.panel--collapsed .panel__body {
    display: none;
}

.panel--collapsed .report-collapsible__icon::after {
    content: '[+]';
}

.panel--collapsed .report-collapsible__icon {
    font-size: 0;
}

.panel--collapsed .report-collapsible__icon::after {
    font-size: 14px;
}

/* Threat row severity highlights */
.threat-row--critical {
    background: rgba(255, 0, 64, 0.08);
    border-left: 2px solid var(--crimson);
}

.threat-row--high {
    background: rgba(255, 0, 64, 0.05);
    border-left: 2px solid rgba(255, 0, 64, 0.5);
}

.threat-row--malware {
    background: rgba(255, 0, 64, 0.08);
}

/* Finding row severity highlights */
.finding-row[data-severity="critical"] {
    background: rgba(255, 0, 64, 0.1);
}

.finding-row[data-severity="high"] {
    background: rgba(255, 0, 64, 0.06);
}

.finding-row[data-severity="medium"] {
    background: rgba(255, 170, 0, 0.05);
}

/* Report filter dropdown */
.report-filter {
    display: inline-block;
}

/* Line severity colors in terminal output */
.line-timestamp {
    color: var(--text-dim);
    font-size: 11px;
}

.line-severity-info { color: var(--cyan); }
.line-severity-low { color: var(--phosphor); }
.line-severity-medium { color: var(--amber); }
.line-severity-high { color: var(--crimson); }
.line-severity-critical { color: var(--crimson); font-weight: bold; }


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

@media (max-width: 1200px) {
    .nav-link__text { display: none; }
    .nav-link__icon { width: 18px; height: 18px; }
    .nav-link { padding: 8px; }
    .threat-strip__stats { gap: 10px; }
    .grid-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .topbar__admin { display: none; }
    .threat-strip__time { display: none; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
