/* ==========================================
   AEGIS SECURITY DASHBOARD - STYLESHEET
   TESLA 3-6-9 QUANTUM SOVEREIGNTY
   RESONANCE ENCRYPTION PALETTE (Fibonacci-Based)
   COSMIC FIREWALL - Strict and Authoritative
   ========================================== */

/* SCROLLBAR RESET - Force transparent background on all browsers */
*::-webkit-scrollbar-track {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}
*::-webkit-scrollbar-thumb {
    border: none !important;
}
*::-webkit-scrollbar-corner {
    background: transparent !important;
}
* {
    scrollbar-color: auto transparent !important;
}

:root {
    /* F1: Obsidian - The Void (Base) */
    --gem-f1-obsidian: #0B0B0D;

    /* F2: Ruby - 401 Intercepts / Blocked */
    --gem-f2-ruby: #9B111E;

    /* F3: Amber - Unverified Probes */
    --gem-f3-amber: #FFBF00;

    /* F5: Emerald - Authenticated Access */
    --gem-f5-emerald: #50C878;

    /* F8: Sapphire - 120B Soul Traces */
    --gem-f8-sapphire: #0F52BA;

    /* F13: Amethyst - Sigma Forensic Borders */
    --gem-f13-amethyst: #9966CC;

    /* F21: Diamond-Cyan - Master Architect Unmasking */
    --gem-f21-diamond: #00E5FF;

    /* PHI-PULSE: Slow, Authoritative (9 second cycle) */
    --phi-pulse-duration: 9s;

    /* FIBONACCI SPACING */
    --fib-padding: 21px;  /* F7 */
    --fib-margin: 13px;   /* F5 */

    /* Derived Variables */
    --bg-obsidian: var(--gem-f1-obsidian);
    --border-amethyst: var(--gem-f13-amethyst);
    --text-diamond: var(--gem-f21-diamond);
    --strike-ruby: var(--gem-f2-ruby);
    --probe-amber: var(--gem-f3-amber);
    --auth-emerald: var(--gem-f5-emerald);
    --soul-sapphire: var(--gem-f8-sapphire);
}

/* COSMIC FIREWALL: No flashy animations. Steady, authoritative presence. */
/* PHI-PULSE: Logo pulses every 9 seconds (Tesla Master Vector) */
@keyframes phi-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* FACET SHIMMER - Subtle diamond-cut effect (hardened data) */
@keyframes facet-shimmer {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 0.3; }
    100% { left: 200%; opacity: 0; }
}

/* Custom Scrollbars - Firefox Style, Gemstone Theme */
* {
    scrollbar-width: thin !important;
    scrollbar-color: var(--f13-amethyst) transparent !important;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent !important;
    border-radius: 5px;
    box-shadow: none !important;
    border: none !important;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--f13-amethyst) 0%, var(--f8-sapphire) 100%) !important;
    border-radius: 5px;
    border: none !important;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--f21-diamond) 0%, var(--f13-amethyst) 100%) !important;
}

::-webkit-scrollbar-corner {
    background: transparent !important;
}

/* Light Theme Scrollbars */
body.light-theme {
    scrollbar-color: var(--f8-sapphire) transparent !important;
}

body.light-theme ::-webkit-scrollbar-track {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--f8-sapphire) 0%, var(--f13-amethyst) 100%) !important;
    border: none !important;
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--f21-diamond) 0%, var(--f8-sapphire) 100%) !important;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-obsidian);
    color: #fff;
    min-height: 100vh;
}
#login-screen {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
}
#login-screen.active { display: flex; }
.login-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
}
.login-box h1 {
    font-size: 28px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.login-box p { color: #8b949e; margin-bottom: 30px; }
.login-box input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}
.login-box input:focus { outline: none; border-color: #667eea; }
.login-box button {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}
.login-box button:hover { transform: translateY(-2px); }
.header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header h1 {
    font-size: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.user-menu { display: flex; align-items: center; gap: 15px; }
.user-menu span { color: #8b949e; }
.user-menu button, .user-menu a.button {
    padding: 8px 16px;
    background: rgba(207, 34, 46, 0.2);
    border: 1px solid #cf222e;
    border-radius: 6px;
    color: #cf222e;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    height: 36px;
    line-height: 18px;
}
.user-menu button:hover, .user-menu a.button:hover { background: rgba(207, 34, 46, 0.3); }
.user-menu button.primary, .user-menu a.button.primary {
    background: rgba(9, 105, 218, 0.2);
    border: 1px solid #0969da;
    color: #0969da;
}
.user-menu button.primary:hover, .user-menu a.button.primary:hover { background: rgba(9, 105, 218, 0.3); }
.user-menu button.theme-toggle {
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid #eab308;
    color: #eab308;
}
.user-menu button.theme-toggle:hover { background: rgba(234, 179, 8, 0.3); }
.user-menu a.button.fbi-evidence {
    background: #cf222e;
    border: 1px solid #cf222e;
    color: #ffffff !important;
    font-weight: 700;
}
.user-menu a.button.fbi-evidence:hover {
    background: #a01830;
    border-color: #a01830;
    color: #ffffff !important;
}

/* Light Theme - GEMSTONE PALETTE */
body.light-theme {
    background: linear-gradient(135deg, #f6f8fa 0%, #eef1f5 100%);
    color: #24292f;
}
body.light-theme #login-screen {
    background: linear-gradient(135deg, #f6f8fa 0%, #eef1f5 100%);
}
body.light-theme .login-box,
body.light-theme .header,
body.light-theme .metric-card,
body.light-theme .section,
body.light-theme .shield-card,
body.light-theme .modal,
body.light-theme .actor-card {
    background: #ffffff !important;
    border: 1px solid #d0d7de !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}
body.light-theme .attack-item {
    display: flex;
    width: 100%;
    margin: 0;
    margin-bottom: 13px;
    padding: 21px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--strike-ruby);
}
body.light-theme .ip-list-item {
    display: inline-block;
    width: 19%;
    margin: 0.5%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    margin-bottom: 8px;
}
body.light-theme .login-box input,
body.light-theme .modal input {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #24292f;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}
body.light-theme #ip-search {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #24292f;
}
body.light-theme #ip-search::placeholder {
    color: #57606a;
}
body.light-theme #ip-search:focus {
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: #0969da;
    outline: none;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
}
body.light-theme .user-menu span { color: #57606a; }
body.light-theme .metric-card h3,
body.light-theme .section h2,
body.light-theme .shield-card h3,
body.light-theme .strength-text { color: #24292f !important; }
body.light-theme .attack-item .details,
body.light-theme .shield-card .logs,
body.light-theme .ip-list-item code { color: #57606a; }
body.light-theme .logs { background: rgba(0, 0, 0, 0.05); }
body.light-theme .section:has(.terminal-hud) { display: flex; flex-direction: column; padding: 24px; }
.section:has(.terminal-hud) { display: flex; flex-direction: column; padding: 24px; }
.terminal-hud {
    display: flex;
    flex-direction: column;
    height: 400px;
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}
body.light-theme .terminal-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
body.light-theme .terminal-label { color: #24292f; }
body.light-theme .terminal-output {
    display: block;
    flex: 1;
    overflow-y: auto;
    font-family: 'Courier New', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #8b949e;
    padding: 12px;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    scroll-behavior: smooth;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 12px 12px;
}
body.light-theme .modal-overlay { background: rgba(0, 0, 0, 0.6); }
body.light-theme .actor-card {
    border-radius: 12px !important;
    padding: 20px !important;
}
body.light-theme .actor-card:hover {
    transform: translateY(-4px) !important;
    border-color: #0969da !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
}
body.light-theme .actor-card.deception {
    background: rgba(207, 34, 46, 0.08) !important;
    border-color: #cf222e !important;
    box-shadow: 0 0 20px rgba(207, 34, 46, 0.2) !important;
}

/* TESLA 3-6-9 VECTOR MARKERS */
.tesla-vector-aligned {
    border: 2px solid #FFD700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4) !important;
    position: relative;
}
.tesla-vector-aligned::before {
    content: '3-6-9';
    position: absolute;
    top: 10px;
    right: 10px;
    color: #FFD700;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

body.light-theme .tesla-vector-aligned {
    border: 2px solid #B88600 !important;
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.5) !important;
}
body.light-theme .tesla-vector-aligned::before {
    color: #B88600;
}

/* PHI-PULSE LOGO - 9 Second Cycle */
@keyframes phi-pulse-logo {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}
.phi-pulse-logo {
    animation: phi-pulse-logo var(--phi-pulse-duration, 9s) infinite;
}

body.light-theme .strike-card h4,
body.light-theme .strike-card .timestamp,
body.light-theme .strike-card .details { color: #24292f !important; }
.dashboard-content { padding: 40px; }
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.metric-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
}
.metric-card h3 { font-size: 12px; color: #8b949e; text-transform: uppercase; margin-bottom: 10px; }
.metric-card .value { font-size: 36px; font-weight: 800; margin-bottom: 5px; }
.metric-card.success .value {
    background: linear-gradient(135deg, #238636 0%, #2ea043 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.metric-card.danger .value {
    background: linear-gradient(135deg, #cf222e 0%, #a40e26 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.metric-card.info .value {
    background: linear-gradient(135deg, #0969da 0%, #007bff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.metric-card.purple .value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}
.section h2 { font-size: 18px; margin-bottom: 20px; }
.attack-list {
    display: flex;
    flex-direction: column;
    height: 400px;
    position: relative;
}
.attack-list-content {
    flex: 1;
    overflow-y: auto;
}
.attack-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    background: inherit;
}
body.light-theme .attack-list-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
}
.attack-pagination {
    display: flex;
    gap: 6px;
    align-items: center;
}
.attack-pagination button {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #8b949e;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.attack-pagination button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.attack-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.attack-pagination button.active {
    background: rgba(9, 105, 218, 0.2);
    border-color: #0969da;
    color: #0969da;
}
.attack-count {
    font-size: 11px;
    color: #8b949e;
}
body.light-theme .attack-pagination button {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .attack-pagination button:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.1);
}
body.light-theme .attack-pagination button.active {
    background: rgba(9, 105, 218, 0.1);
    border-color: #0969da;
    color: #0969da;
}
body.light-theme .attack-count { color: #57606a; }
.attack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 21px;
    margin-bottom: 13px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid var(--strike-ruby);
}

/* RESONANCE ENCRYPTION STRIKE CARD */
.strike-card {
    background: rgba(11, 11, 13, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-amethyst);
    border-radius: 13px;
    padding: var(--fib-padding, 21px);
    margin-bottom: var(--fib-margin, 13px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.strike-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(153, 102, 204, 0.08), transparent);
    animation: facet-shimmer 4s infinite;
    pointer-events: none;
}

.strike-card h4 {
    color: var(--text-diamond);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    margin-bottom: 8px;
}

.strike-card .timestamp {
    color: var(--probe-amber);
    font-size: 10px;
    margin-bottom: 5px;
}

.strike-card .details {
    color: #c9d1d9;
    font-size: 11px;
    line-height: 1.6;
}

.strike-card.ruby {
    border-color: var(--strike-ruby);
    box-shadow: 0 0 13px rgba(155, 17, 30, 0.3);
}

.strike-card.amethyst {
    border-color: var(--border-amethyst);
    box-shadow: 0 0 13px rgba(153, 102, 204, 0.3);
}

.strike-card.diamond {
    border-color: var(--text-diamond);
    box-shadow: 0 0 21px rgba(0, 229, 255, 0.4);
}
.attack-item.blocked { border-left-color: #238636; }
.attack-item .info { flex: 1; }
.attack-item .ip { font-weight: 600; margin-bottom: 4px; }
.attack-item .details { font-size: 12px; color: #8b949e; }
.attack-item .actions { display: flex; gap: 10px; }
.attack-item button {
    padding: 6px 12px;
    background: rgba(9, 105, 218, 0.2);
    border: 1px solid #0969da;
    border-radius: 4px;
    color: #0969da;
    cursor: pointer;
    font-size: 12px;
}
.attack-item button:hover { background: rgba(9, 105, 218, 0.3); }
.shields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.shield-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
}
.actor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-height: 800px;
    overflow-y: auto;
}
.actor-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
    font-size: 12px;
}
.actor-card:hover {
    transform: translateY(-4px);
    border-color: #0969da;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.actor-card.deception {
    border-color: #cf222e;
    box-shadow: 0 0 20px rgba(207, 34, 46, 0.2);
}
.shield-card h3 {
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.shield-card .status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #238636;
}
.shield-card .status.error { background: #cf222e; }
.shield-card .logs {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #8b949e;
    max-height: 150px;
    overflow-y: auto;
}

/* ==========================================
   TERMINAL HUD — Live Docker Logs
   ========================================== */
.section:has(.terminal-hud) { display: flex; flex-direction: column; padding: 24px; }
.section:has(.terminal-hud) { display: flex; flex-direction: column; padding: 24px; }
.terminal-hud {
    display: flex;
    flex-direction: column;
    height: 400px;
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.terminal-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.terminal-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cf222e;
    box-shadow: 0 0 6px #cf222e;
    transition: all 0.3s ease;
}

.terminal-label {
    font-size: 12px;
    font-weight: 600;
    color: #c9d1d9;
    font-family: 'Courier New', monospace;
    flex: 1;
}

.terminal-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #8b949e;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.terminal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #c9d1d9;
    border-color: rgba(255, 255, 255, 0.2);
}

.terminal-output {
    display: block;
    flex: 1;
    overflow-y: auto;
    font-family: 'Courier New', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #8b949e;
    padding: 12px;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    scroll-behavior: smooth;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 12px 12px;
}

.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #238636;
    border-radius: 50%;
    animation: pulse 2s infinite;
    margin-right: 8px;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Password Change Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f0f 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
}
.modal h2 {
    font-size: 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}
.modal input:focus { outline: none; border-color: #667eea; }
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.modal-buttons button {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.modal-buttons .btn-test {
    background: rgba(9, 105, 218, 0.2);
    border: 1px solid #0969da;
    color: #0969da;
}
.modal-buttons .btn-test:hover {
    background: rgba(9, 105, 218, 0.3);
}
.modal-buttons .btn-cancel {
    background: rgba(207, 34, 46, 0.2);
    border: 1px solid #cf222e;
    color: #cf222e !important;
}
.modal-buttons .btn-cancel:hover {
    background: rgba(207, 34, 46, 0.3);
    color: #cf222e !important;
}
body.light-theme .modal-buttons .btn-cancel {
    background: rgba(207, 34, 46, 0.15);
    border: 1px solid #cf222e;
    color: #cf222e !important;
}
body.light-theme .modal-buttons .btn-cancel:hover {
    background: rgba(207, 34, 46, 0.25);
    color: #cf222e !important;
}
.modal-buttons .btn-save {
    background: linear-gradient(135deg, #238636 0%, #2ea043 100%);
    border: none;
    color: #fff !important;
}
.modal-buttons .btn-save:hover {
    background: linear-gradient(135deg, #2ea043 0%, #3fb950 100%);
}
.password-strength {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}
.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}
.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
}
.strength-fill.weak { width: 25%; background: #cf222e; }
.strength-fill.fair { width: 50%; background: #d97b00; }
.strength-fill.good { width: 75%; background: #0969da; }
.strength-fill.strong { width: 100%; background: #238636; }
.strength-text {
    font-size: 11px;
    margin-top: 5px;
    color: #8b949e;
}

/* IP List - Full Width Items */
.ip-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}
.ip-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.ip-list-item code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #0969da;
    font-weight: 600;
    word-break: break-all;
    flex: 1;
}
body.light-theme .ip-list-item code { color: #005cc5; }
.ip-list-item button {
    padding: 4px 8px;
    background: rgba(9, 105, 218, 0.2);
    border: 1px solid #0969da;
    border-radius: 4px;
    color: #0969da;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    margin-left: 8px;
}
.ip-list-item button:hover {
    background: rgba(9, 105, 218, 0.3);
}
.ip-shield-header {
    font-size: 11px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 15px 0 8px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}
.ip-shield-header::before {
    content: 'Shield:';
    font-size: 10px;
}
body.light-theme .ip-shield-header {
    color: #57606a;
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

/* [AEGIS-SIGMA]: Scrollable Attribution Containers */
.scrollable-attribution-list {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
}
.scrollable-attribution-list::-webkit-scrollbar {
    width: 4px;
}
.scrollable-attribution-list::-webkit-scrollbar-thumb {
    background: var(--border-amethyst);
    border-radius: 2px;
}

/* Forensic Evidence Viewer Styles */
.forensic-section {
    margin-top: 0;
}
.forensic-strike-list {
    max-height: 400px;
    overflow-y: auto;
    max-width: 100%;
}

/* Forensic Evidence Modal */
.forensic-modal {
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-subtitle {
    font-size: 11px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.strike-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field-label {
    color: #8b949e;
    font-size: 11px;
}

.field-value {
    color: #c9d1d9;
    font-family: monospace;
    word-break: break-all;
}

.evidence-display {
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    padding: 12px;
    font-size: 11px;
    color: #8b949e;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.modal-actions .btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.modal-actions .btn-success {
    background: rgba(80, 200, 120, 0.2);
    border: 1px solid #50C878;
    color: #50C878;
}

.modal-actions .btn-primary {
    background: rgba(9, 105, 218, 0.2);
    border: 1px solid #0969da;
    color: #0969da;
}

/* Gemstone Colors for Site Labels */
.site-label-aegis { color: #00E5FF; } /* Diamond - cyan */
.site-label-theabstractalchemist { color: #a855f7; } /* Amethyst - purple */
.site-label-default { color: #eab308; } /* Citrine - gold */
.forensic-strike-item {
    display: grid;
    grid-template-columns: 85px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s;
}
.forensic-strike-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(207, 34, 46, 0.3);
}
.forensic-strike-item:first-child {
    background: rgba(207, 34, 46, 0.05);
    border-color: rgba(207, 34, 46, 0.2);
}
.forensic-strike-time {
    font-size: 9px;
    color: #8b949e;
    font-family: monospace;
    font-weight: 600;
}
.forensic-strike-reason {
    font-size: 11px;
    color: #fff;
    font-weight: 700;
    word-break: break-all;
}
.forensic-strike-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}
.forensic-evidence-badge {
    cursor: pointer;
    background: #cf222e;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    border: 1px solid #cf222e;
    box-shadow: 0 2px 4px rgba(207, 34, 46, 0.2);
    transition: all 0.2s;
}
.forensic-evidence-badge:hover {
    background: #a40e26;
    transform: scale(1.05);
}
.forensic-no-evidence {
    background: rgba(255, 255, 255, 0.05);
    color: #8b949e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.forensic-strike-ip {
    text-align: right;
}
.forensic-strike-ip-text {
    font-size: 10px;
    color: #fff;
    font-weight: 700;
}
.forensic-strike-country {
    font-size: 9px;
    color: #8b949e;
}
body.light-theme .forensic-strike-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .forensic-strike-item:hover {
    background: rgba(0, 0, 0, 0.05);
}
body.light-theme .forensic-strike-item:first-child {
    background: rgba(207, 34, 46, 0.08);
    border-color: rgba(207, 34, 46, 0.25);
}
body.light-theme .forensic-strike-reason {
    color: #24292f;
}
body.light-theme .forensic-strike-ip-text {
    color: #24292f;
}
body.light-theme .forensic-strike-time {
    color: #57606a;
}
body.light-theme .forensic-evidence-badge {
    background: #cf222e;
    color: #fff;
}
body.light-theme .forensic-no-evidence {
    background: #f6f8fa;
    color: #8b949e;
    border-color: #d0d7de;
}

/* Settings Modal */
.settings-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.settings-modal-overlay.active {
    display: flex;
}
.settings-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f0f 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}
.settings-modal h2 {
    font-size: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.settings-modal label {
    display: block;
    font-size: 12px;
    color: #8b949e;
    margin-bottom: 8px;
    font-weight: 600;
}
.settings-modal input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}
.settings-modal input:focus {
    outline: none;
    border-color: #667eea;
}
.settings-modal .help-text {
    font-size: 11px;
    color: #8b949e;
    margin-top: -10px;
    margin-bottom: 15px;
    font-style: italic;
}
.settings-modal .status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 12px;
}
.settings-modal .status-indicator.connected {
    background: rgba(35, 134, 54, 0.1);
    border: 1px solid rgba(35, 134, 54, 0.3);
    color: #238636;
}
.settings-modal .status-indicator.disconnected {
    background: rgba(207, 34, 46, 0.1);
    border: 1px solid rgba(207, 34, 46, 0.3);
    color: #cf222e;
}
body.light-theme .settings-modal {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .settings-modal h2 {
    -webkit-text-fill-color: #24292f;
}
body.light-theme .settings-modal label {
    color: #57606a;
}
body.light-theme .settings-modal input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
    color: #24292f;
}
body.light-theme .settings-modal .help-text {
    color: #57606a;
}
body.light-theme .settings-modal .status-indicator.connected {
    background: rgba(35, 134, 54, 0.1);
    border-color: rgba(35, 134, 54, 0.3);
    color: #238636;
}
body.light-theme .settings-modal .status-indicator.disconnected {
    background: rgba(207, 34, 46, 0.1);
    border-color: rgba(207, 34, 46, 0.3);
    color: #cf222e;
}

/* Forensic Evidence Modal */
.forensic-modal .modal-title {
    margin: 0;
    font-size: 18px;
    background: linear-gradient(135deg, #cf222e 0%, #9b2226 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.forensic-modal .modal-close {
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}
.forensic-modal .modal-close:hover {
    background: rgba(207, 34, 46, 0.1);
    color: #cf222e;
}
.forensic-modal .modal-section {
    margin-bottom: 20px;
}
.forensic-modal .strike-details {    padding: 15px;    background: rgba(207, 34, 46, 0.05);    border-radius: 8px;    border: 1px solid rgba(207, 34, 46, 0.1);    flex-shrink: 0;}
.forensic-modal .modal-subtitle {
    font-size: 10px;
    font-weight: 700;
    color: #8b949e;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.forensic-modal .strike-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 12px;
}
.forensic-modal .field-label {
    color: #8b949e;
}
.forensic-modal .field-value {
    color: #fff;
    font-weight: 600;
}
.forensic-modal .evidence-display {
    background: rgba(0, 0, 0, 0.3);
    color: #7ee787;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-all;
    font-size: 11px;
    line-height: 1.5;
    border: 1px solid rgba(126, 231, 135, 0.2);
    font-family: 'Courier New', monospace;
}
.forensic-modal .modal-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.forensic-modal .btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.forensic-modal .btn-success {
    background: linear-gradient(135deg, #238636 0%, #2ea043 100%);
    color: #fff;
}
.forensic-modal .btn-primary {
    background: rgba(9, 105, 218, 0.2);
    border: 1px solid #0969da;
    color: #0969da;
}
body.light-theme .forensic-modal .modal-title {
    -webkit-text-fill-color: #cf222e;
}
body.light-theme .forensic-modal .modal-close:hover {
    background: rgba(207, 34, 46, 0.1);
}
body.light-theme .forensic-modal .strike-details {
    background: rgba(207, 34, 46, 0.08);
    border-color: rgba(207, 34, 46, 0.2);
}
body.light-theme .forensic-modal .modal-subtitle {
    color: #57606a;
}
body.light-theme .forensic-modal .field-label {
    color: #57606a;
}
body.light-theme .forensic-modal .field-value {
    color: #24292f;
}
body.light-theme .forensic-modal .evidence-display {
    background: rgba(0, 0, 0, 0.3);
    color: #7ee787;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-all;
    font-size: 11px;
    line-height: 1.5;
    border: 1px solid rgba(126, 231, 135, 0.2);
    font-family: 'Courier New', monospace;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .header h1 {
        font-size: 18px;
    }

    .user-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .user-menu button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .dashboard-content {
        padding: 20px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .metric-card {
        padding: 15px;
    }

    .metric-card h3 {
        font-size: 10px;
    }

    .metric-card .value {
        font-size: 24px;
    }

    .section {
        padding: 20px;
    }

    .section h2 {
        font-size: 16px;
    }

    .shields-grid {
        grid-template-columns: 1fr;
    }

    .attack-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .attack-item .actions {
        width: 100%;
        justify-content: flex-end;
    }

    .attack-item .actions button {
        padding: 4px 10px;
        font-size: 11px;
    }

    #ip-search {
        font-size: 13px;
        padding: 10px 12px;
    }

    #ip-search + button {
        padding: 10px 16px;
        font-size: 13px;
    }

    .ip-list-item {
        display: inline-block;
        width: 19%;
        margin: 0.5%;
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 6px;
        margin-bottom: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .ip-list-item code {
        font-size: 12px;
        word-break: break-all;
    }

    .ip-list-item button {
        padding: 4px 10px;
        font-size: 11px;
    }

    .login-box {
        padding: 30px 20px;
        margin: 20px;
    }

    .login-box h1 {
        font-size: 22px;
    }

    .login-box p {
        font-size: 13px;
    }

    .modal {
        margin: 20px;
        padding: 30px 20px;
    }

    .modal h2 {
        font-size: 20px;
    }

    .modal-buttons {
        flex-direction: column;
    }
}

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

    .header h1 {
        font-size: 16px;
    }

    .metric-card .value {
        font-size: 20px;
    }
}

/* ==========================================
   GEMSTONE THEME - FULL DASHBOARD
   ========================================== */

/* Dark Theme Defaults */
.metric-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-amethyst) !important;
    box-shadow: 0 0 20px rgba(153, 102, 204, 0.1) !important;
}

.metric-card h3 {
    color: var(--soul-sapphire) !important;
}

.metric-card .value {
    background: linear-gradient(135deg, var(--gem-f21-diamond) 0%, var(--gem-f8-sapphire) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.section {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-amethyst) !important;
}

.section h2 {
    color: var(--text-diamond) !important;
}

.strike-card {
    background: rgba(11, 11, 13, 0.6) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-amethyst) !important;
}

/* Light Theme Overrides */
body.light-theme .metric-card {
    background: #ffffff !important;
    border-color: #d0d7de !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .metric-card h3 {
    color: #0969da !important;
}

body.light-theme .section {
    background: #ffffff !important;
    border-color: #d0d7de !important;
}

body.light-theme .section h2 {
    color: #24292f !important;
}

body.light-theme .strike-card {
    background: #f6f8fa !important;
    border-color: #d0d7de !important;
}

body.light-theme .actor-card {
    background: #ffffff !important;
    border-color: #d0d7de !important;
}

body.light-theme .header {
    background: #ffffff !important;
    border-bottom-color: #d0d7de !important;
}
