﻿:root {
    /* Color Palette - Solid Purple / Violet Unified Theme */
    --primary-green: #e10600;
    --primary-green-hover: #f87171;
    --bg-sidebar: #991b1b; /* Solid dark violet sidebar */
    --bg-sidebar-hover: #b91c1c; /* Solid purple hover */
    --bg-main: #7f1d1d; /* Solid deep royal purple background */
    --bg-card: #581c87; /* Solid vibrant purple card */
    
    --text-dark: #ffffff; /* Crisp pure white text */
    --text-muted: #fee2e2; /* Soft lavender high-contrast text */
    --text-light: #ffffff;
    
    --danger: #FF4757; /* Vibrant crimson red */
    --warning: #FFA502; /* Rich amber orange */
    --border-color: rgba(255, 255, 255, 0.2); /* Clean white border accent */
    
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-floating: 0 16px 40px rgba(0, 0, 0, 0.4);
    
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
    --radius-pill: 0px;
}

/* Background Grid Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 80%),
                linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 28px 28px, 28px 28px;
    pointer-events: none;
    z-index: -1;
}

/* Solid Purple Premium Card Component */
.premium-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0px !important;
    padding: 32px;
    box-shadow: var(--shadow-md) !important;
    color: #ffffff !important;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.premium-card:hover {
    background: #6b21a8 !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4) !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Neo Tech', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main) !important;
    color: #ffffff !important;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================
   TOP BAR (Solid Dark Purple Header)
   ============================ */
.top-bar {
    width: 100%;
    height: 80px;
    background-color: #2e0249 !important;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 6px var(--primary-green));
}

.top-bar-brand {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    font-family: 'Neo Tech', 'Neo Tech KLAVATO', sans-serif;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-status {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(65, 105, 225, 0.08);
    padding: 6px 14px;
    border-radius: 0px !important;
    border: 1px solid rgba(65, 105, 225, 0.2);
}

.top-bar-status span {
    animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
    0% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); filter: drop-shadow(0 0 6px #4169E1); }
    100% { opacity: 0.4; transform: scale(0.9); }
}

/* ============================
   APP BODY (sidebar + content below top bar)
   ============================ */
.app-body {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

/* ============================
   SIDEBAR (Left Column - Glass, Collapsible)
   ============================ */
.sidebar {
    width: 240px;
    background: #991b1b !important;
    color: #ffffff !important;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: 0;
    overflow: hidden;
    padding: 0;
}

.sidebar.collapsed .nav-menu {
    opacity: 0;
}

.nav-menu {
    list-style: none;
    padding: 16px 0;
    flex-grow: 1;
    overflow-y: visible;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 0px !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: #fee2e2;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: #b91c1c;
    color: #FFFFFF;
    transform: translateX(4px);
    border-left-color: #f87171;
}

.nav-item.active {
    background: #b91c1c !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-left: 4px solid #f87171 !important;
    color: #FFFFFF !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.nav-item .nav-icon {
    margin-right: 16px;
    font-size: 18px;
}

/* ============================
   MAIN LAYOUT (Flexible Container)
   ============================ */
.main-wrapper {
    flex-grow: 1;
    display: block;
    height: 100%;
    overflow-y: auto;
}

.main-content {
    padding: 40px;
    display: none; /* Pages toggle this to block */
}

.main-content.active {
    display: block;
}

/* ============================
   NESTED SUBMENU STYLES
   ============================ */
.submenu-caret {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.nav-item.open .submenu-caret {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding: 4px 0;
    margin: 0 12px 8px 12px;
    background-color: rgba(0, 0, 0, 0.12);
    border-radius: 0px !important;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.submenu .nav-item {
    padding: 10px 16px 10px 24px;
    margin: 2px 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    border-radius: 0px !important;
    border-left: none;
}

.submenu .nav-item::before {
    content: '•';
    color: rgba(255, 255, 255, 0.3);
    margin-right: 8px;
    font-size: 12px;
}

.submenu .nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    transform: translateX(2px);
}

.submenu .nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    font-weight: 600;
}

.submenu .nav-item.active::before {
    color: var(--primary-green);
}

/* ============================
   HERO / CENTER STAGE
   ============================ */
.hero-container {
    background-color: var(--bg-card);
    border-radius: 0px !important;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.hero-image-container {
    width: 180px;
    height: 140px;
    margin: 0 auto 30px;
    position: relative;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.5;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================
   HAMBURGER MENU BUTTON
   ============================ */
.hamburger-btn {
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 0px !important;
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: rgba(255,255,255,0.1);
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #FFFFFF;
    border-radius: 0px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================
   BUTTONS
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 28px;
    border-radius: 0px !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.btn-primary {
    background: linear-gradient(135deg, #00d656 0%, #00b344 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(0, 214, 86, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00e05a 0%, #00bf49 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 214, 86, 0.28);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 214, 86, 0.15);
}

.btn-outline {
    background-color: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-dark);
}

.btn-outline:hover {
    border-color: var(--text-dark);
    background-color: rgba(0,0,0,0.02);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

/* ============================
   RIGHT WIDGET CARDS
   ============================ */
.widget-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0px !important;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}

.widget-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #d0d4d8;
    transform: translateY(-2px);
}

.widget-icon {
    width: 48px;
    height: 48px;
    border-radius: 0px !important;
    background-color: rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 1px solid var(--border-color);
}

.widget-icon.alert {
    background-color: rgba(230, 57, 70, 0.1);
    border-color: rgba(230, 57, 70, 0.2);
    color: var(--danger);
}

.widget-icon.safe {
    background-color: rgba(65, 105, 225, 0.1);
    border-color: rgba(65, 105, 225, 0.2);
}

.widget-content {
    flex-grow: 1;
}

.widget-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.widget-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.widget-arrow {
    color: var(--text-muted);
    font-size: 20px;
}

/* ============================
   DEVICES & BOTTOM BANNERS
   ============================ */
.devices-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.devices-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.devices-icons .icons-wrapper {
    font-size: 24px;
    display: flex;
    gap: 4px;
    color: var(--text-dark);
}

.add-device-btn {
    width: 32px;
    height: 32px;
    border-radius: 0px !important;
    border: 1px solid var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
}

.alert-banner {
    margin: 24px auto 0;
    max-width: 800px;
    background-color: #fff9f0;
    border-left: 4px solid var(--warning);
    padding: 16px 20px;
    border-radius: 0px !important;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-banner p {
    font-size: 14px;
    font-weight: 500;
}

.alert-banner strong {
    color: #b75e11;
}

/* ============================
   SUB-PAGES (Scanner, Settings, etc)
   ============================ */
.page-header {
    margin-bottom: 32px;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.page-header p {
    color: var(--text-muted);
    margin-top: 8px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 0px !important;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.data-table th, .data-table td {
    padding: 18px 24px;
    text-align: left;
    border-bottom: 1px solid rgba(65, 105, 225, 0.08);
}

.data-table th {
    background: rgba(13, 17, 24, 0.6);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(65, 105, 225, 0.15);
}

.data-table tr:hover {
    background-color: rgba(65, 105, 225, 0.04);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Forms */
.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.light-input {
    flex-grow: 1;
    padding: 12px 16px;
    border-radius: 0px !important;
    border: 1px solid rgba(65, 105, 225, 0.15);
    background: var(--bg-card);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.light-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 12px rgba(65, 105, 225, 0.2);
}

/* Toggles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 0px !important;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 0px !important;
}

input:checked + .slider {
    background-color: var(--primary-green);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 0px !important;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}
.badge-success { background: rgba(65, 105, 225, 0.15); color: #09b844; }
.badge-danger { background: rgba(230, 57, 70, 0.15); color: var(--danger); }
.badge-warning { background: rgba(244, 162, 97, 0.15); color: #c46d21; }

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--bg-sidebar);
    color: white;
    padding: 16px 24px;
    border-radius: 0px !important;
    box-shadow: var(--shadow-floating);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Utility */
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Custom thin auto-hiding scrollbar matching Antigravity IDE styles */
.sidebar::-webkit-scrollbar {
    width: 3px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0px !important;
    transition: background 0.2s ease;
}
.sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   MINIMALIST PREMIUM DESIGN SYSTEM OVERRIDES (Cyber Facelift Overhaul)
   ========================================================================== */

/* Glassmorphic Cyber Cards */
.premium-card {
    background: rgba(22, 28, 42, 0.45) !important;
    border: 1px solid rgba(65, 105, 225, 0.15) !important;
    border-radius: 0px !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    transform: none;
}

.premium-card:hover {
    border-color: rgba(65, 105, 225, 0.45) !important;
    background-color: rgba(27, 34, 52, 0.6) !important;
    transform: translateY(-4px) scale(1.008) !important;
    box-shadow: 0 12px 40px rgba(65, 105, 225, 0.15), 0 8px 32px 0 rgba(0, 0, 0, 0.4) !important;
}

/* Custom Cyber Alert Banners */
.alert-banner {
    background: rgba(65, 105, 225, 0.05) !important;
    border: 1px solid rgba(65, 105, 225, 0.15) !important;
    border-radius: 0px !important;
    color: #e8edf5 !important;
    box-shadow: 0 4px 16px rgba(65, 105, 225, 0.04) !important;
}

/* Cyber Matrix Buttons (Vibrant Purple Gradients) */
.btn {
    border-radius: 0px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: none !important;
    text-transform: uppercase;
    font-size: 13px !important;
}

.btn-primary {
    background: linear-gradient(135deg, #e10600 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(225, 6, 0, 0.3) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 24px rgba(225, 6, 0, 0.45) !important;
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.02) !important;
    border: 1.5px solid rgba(225, 6, 0, 0.35) !important;
    color: #e8edf5 !important;
}

.btn-outline:hover {
    border-color: #e10600 !important;
    background-color: rgba(225, 6, 0, 0.12) !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.3) !important;
}

/* Custom Scan action button style for Scanner Card */
.btn-scan-action {
    background: rgba(225, 6, 0, 0.08) !important;
    border: 1.5px solid rgba(225, 6, 0, 0.35) !important;
    color: #e8edf5 !important;
    border-radius: 0px !important;
    padding: 10px 32px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-scan-action:hover {
    border-color: #e10600 !important;
    background: rgba(225, 6, 0, 0.18) !important;
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.3);
    transform: translateY(-2px);
}

/* Glowing Trusted Advisor Ring */
#score-ring-svg {
    filter: drop-shadow(0 0 8px #e10600) !important;
}

/* Cyber standard toggle switch slider */
.toggle-switch {
    width: 48px;
    height: 24px;
}

.slider {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.slider:before {
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #FFFFFF !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

input:checked + .slider {
    background-color: #4169E1 !important;
    box-shadow: 0 0 8px rgba(65, 105, 225, 0.5);
}

input:checked + .slider:before {
    transform: translateX(24px) !important;
    background-color: #FFFFFF !important;
}

/* Scan stages progress icon styles */
.stage-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 14px;
    margin-right: 4px;
}

.stage-icon.pending {
    color: rgba(255, 255, 255, 0.25);
}

.stage-icon.active {
    color: #4169E1;
    animation: spin 1.2s linear infinite;
    filter: drop-shadow(0 0 3px #4169E1);
}

.stage-icon.completed {
    color: #4169E1;
    font-weight: bold;
    filter: drop-shadow(0 0 3px #4169E1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sonar Pulser Rings */
.pulsing-ring {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1.5px solid rgba(65, 105, 225, 0.35);
    border-radius: 0px !important;
    animation: sonarPulse 2.2s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes sonarPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.85;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Screen Laser Scanline */
.screen-scanline {
    stroke: #4169E1;
    stroke-width: 1.5px;
    opacity: 0.8;
    filter: drop-shadow(0 0 3px #4169E1);
    animation: scanline 2.8s ease-in-out infinite;
}

@keyframes scanline {
    0% { transform: translateY(-4px); }
    50% { transform: translateY(11px); }
    100% { transform: translateY(-4px); }
}

/* Premium Scan Controls */
.btn-scan-pause {
    border-color: rgba(65, 105, 225, 0.3) !important;
    color: #e8edf5 !important;
    transition: all 0.2s ease;
}
.btn-scan-pause:hover {
    background: rgba(65, 105, 225, 0.08) !important;
    border-color: #4169E1 !important;
    box-shadow: 0 0 15px rgba(65, 105, 225, 0.2);
}
.btn-scan-pause.active {
    background: #4169E1 !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-scan-cancel {
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #e8edf5 !important;
    transition: all 0.2s ease;
}
.btn-scan-cancel:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: #EF4444 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

/* ==========================================
   YOUR PROTECTION SCORE ENHANCEMENTS
   ========================================== */
.protection-score-card {
    background: linear-gradient(135deg, #e10600 0%, #008b8c 100%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 0px !important;
    padding: 32px 36px !important;
    margin-bottom: 36px !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(225, 6, 0, 0.25) !important;
}

.score-bar-container {
    width: 100%;
    height: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0px !important;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.score-bar-fill {
    height: 100%;
    border-radius: 0px !important;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 24px 24px;
    animation: progress-bar-stripes 1.5s linear infinite;
}

@keyframes progress-bar-stripes {
    from { background-position: 24px 0; }
    to { background-position: 0 0; }
}

.glowing-score-value {
    font-size: 42px !important;
    font-weight: 800;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
    text-shadow: 0 0 15px rgba(65, 105, 225, 0.4);
    transition: text-shadow 0.3s ease;
}

/* ==========================================
   LIGHT MODE OVERRIDES
   ========================================== */
body.light-mode {
    --bg-main: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-sidebar-hover: rgba(65, 105, 225, 0.08);
    --bg-card: #ffffff;
    
    --text-dark: #000000;
    --text-muted: #1a1a1a;
    --text-light: #000000;
    --border-color: rgba(65, 105, 225, 0.25);
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
    --shadow-floating: 0 16px 40px rgba(65, 105, 225, 0.12);
}

/* Light mode matrix grid */
/* ==========================================
   UNIFIED SOLID PURPLE / VIOLET CARDS & PANELS
   ========================================== */
.protection-score-card {
    background: linear-gradient(135deg, #b91c1c 0%, #581c87 100%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 0px !important;
    padding: 32px 36px !important;
    margin-bottom: 36px !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35) !important;
    color: #ffffff !important;
}

.protection-score-card strong,
.protection-score-card h3,
.protection-score-card span,
.protection-score-card div,
.protection-score-card p,
.protection-score-card a {
    color: #ffffff !important;
}

/* Light Input Fields (Solid Purple Fill with White Text) */
.light-input {
    background: #991b1b !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-size: 15px;
    outline: none;
    border-radius: 0px !important;
    padding: 12px 16px;
}

.light-input::placeholder {
    color: #fee2e2 !important;
    opacity: 0.7;
}

.light-input:focus {
    border-color: #f87171 !important;
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.4) !important;
}

/* Data Tables (Solid Purple Rows & Headers) */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #581c87 !important;
    border-radius: 0px !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.data-table th {
    background: #991b1b !important;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fee2e2 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
    padding: 18px 24px;
}

.data-table td {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.data-table tr:hover {
    background-color: #6b21a8 !important;
}

/* SVG Icon Strokes (Bright Crisp White & Neon Purple) */
.main-content svg path,
.main-content svg circle,
.main-content svg line,
.main-content svg polyline {
    stroke-opacity: 1 !important;
}

/* GLOBAL SHARP RECTANGLES RESET */
.premium-card, .protection-score-card, .card, .stat-card, .modal-content, .btn, button, input, select, textarea, .badge, .toast, .nav-item, .hero-card, .control-card, div[style*="border-radius"] {
    border-radius: 0px !important;
}

/* FORCED SOLID PURPLE OVERRIDE FOR ALL CARDS & SUBMODULES */
.premium-card,
[style*="background:#1f222b"],
[style*="background: #1f222b"],
[style*="background:#0d1117"],
[style*="background: #0d1117"],
div[style*="background:#1f222b"],
div[style*="background: #1f222b"] {
    background: #581c87 !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.premium-card:hover {
    background: #6b21a8 !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
}

/* Device Security Hub Header Black Text Override */
#page-device-overview .page-header h2,
#page-device-overview .page-header p,
#page-device-overview .page-header strong,
#page-device-overview #device-header-name {
    color: #000000 !important;
}

/* High Contrast Text Visibility */
.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6,
.main-content strong, .main-content b, .main-content label,
.premium-card h1, .premium-card h2, .premium-card h3, .premium-card h4, .premium-card strong, .premium-card b {
    color: #ffffff !important;
}

.main-content p, .main-content small, .premium-card p {
    color: #fee2e2 !important;
}

/* Ensure SVG icons inside cards are clearly visible in white / light lavender */
.premium-card svg [stroke="#e10600"],
.premium-card svg [stroke="#4169E1"] {
    stroke: #ffffff !important;
}

.premium-card svg [fill="#e10600"],
.premium-card svg [fill="#4169E1"] {
    fill: #ffffff !important;
}

/* REMOVE ALL SHADOW EFFECTS FOR ONLINE PROTECTION HUB */
#page-online-overview,
#page-online-overview *,
#page-online-overview .premium-card,
#page-online-overview .premium-card:hover {
    box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

