/* Force Fortitude Branding - Modern Dark UI */

:root {
    --bg-dark: #050510;
    --bg-card: rgba(15, 15, 50, 0.7);
    --text-primary: #f0f9ff;
    --text-secondary: #94a3b8;
    --accent-color: #00e5ff;
    --accent-glow: 0 0 15px rgba(0, 229, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --border-color: rgba(0, 229, 255, 0.1);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

body.dark-mode {
    background-color: var(--bg-dark) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', 'Lato', sans-serif !important;
}

/* Sidebar */
body.dark-mode #sidebar {
    background: var(--bg-card) !important;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode #sidebar .sidebar-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode #sidebar ul.components {
    border-bottom: none !important;
}

body.dark-mode #sidebar ul li a {
    color: var(--text-secondary) !important;
    background: transparent !important;
}

body.dark-mode #sidebar ul li a:hover,
body.dark-mode #sidebar ul li.active>a,
body.dark-mode a[aria-expanded="true"] {
    color: var(--accent-color) !important;
    background: rgba(0, 229, 255, 0.1) !important;
    border-left: 3px solid var(--accent-color);
}

.nav-section-label {
    padding: 20px 25px 5px;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #138496 !important;
    opacity: 1;
    font-weight: 800;
}

/* Navbar */
body.dark-mode .navbar {
    background-color: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .navbar .btn-outline-light {
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

body.dark-mode .navbar .btn-outline-light:hover {
    background-color: var(--accent-color) !important;
    color: white !important;
}

/* Cards */
body.dark-mode .card {
    background: var(--bg-card) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 229, 255, 0.15) !important;
    border-color: var(--accent-color) !important;
}

body.dark-mode .card .head,
body.dark-mode .card .footer {
    border-color: var(--border-color) !important;
    background-color: transparent !important;
}

body.dark-mode .card .icon-big i {
    color: var(--accent-color) !important;
    text-shadow: var(--accent-glow);
}

body.dark-mode .card .content .number {
    color: var(--text-primary) !important;
}

body.dark-mode .card .content p,
body.dark-mode .card .text-muted {
    color: var(--text-secondary) !important;
}

/* Tables */
body.dark-mode .table {
    color: var(--text-primary) !important;
}

body.dark-mode .table.bg-lighter-grey {
    background-color: var(--bg-card) !important;
}

body.dark-mode .table thead th {
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--accent-color) !important;
}

body.dark-mode .table td {
    border-top: 1px solid var(--border-color) !important;
}

/* Auth Login */
body.dark-mode .auth-content {
    background-color: var(--bg-dark) !important;
}

body.dark-mode .auth-content .card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--accent-color) !important;
    box-shadow: var(--accent-glow);
}

body.dark-mode .form-control {
    background-color: #1E293B !important;
    border: 1px solid var(--border-color) !important;
    color: #fff !important;
}

body.dark-mode .form-control:focus {
    background-color: #1E293B !important;
    border-color: var(--accent-color) !important;
    box-shadow: var(--accent-glow) !important;
}

body.dark-mode .btn-primary {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    box-shadow: var(--accent-glow);
}

body.dark-mode .btn-primary:hover {
    background-color: #0099D6 !important;
    border-color: #0099D6 !important;
}

/* Auth Page Overrides */
body.dark-mode .auth-content .card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

body.dark-mode .auth-content .form-control {
    background-color: #1E293B;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

body.dark-mode .auth-content .form-control::placeholder {
    color: var(--text-secondary);
}

/* Assessment Page & General Overrides */
body.dark-mode .box {
    background-color: var(--bg-card) !important;
    border-top: 3px solid var(--accent-color) !important;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5) !important;
    margin-bottom: 20px;
    border-radius: 3px;
    color: var(--text-primary) !important;
}

/* Fix for .box-body if it has inherited background */
body.dark-mode .box-body {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

body.dark-mode .nav-tabs .nav-link {
    color: var(--text-secondary) !important;
    border-color: transparent !important;
}

body.dark-mode .nav-tabs .nav-link:hover {
    color: var(--text-primary) !important;
    border-color: transparent !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .nav-tabs .nav-link.active {
    color: var(--accent-color) !important;
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) var(--border-color) var(--bg-card) !important;
    border-bottom: 1px solid var(--bg-card) !important;
}

body.dark-mode .nav-tabs {
    border-bottom: 1px solid var(--border-color) !important;
}

body.dark-mode select.form-control,
body.dark-mode textarea.form-control,
body.dark-mode input.form-control {
    background-color: #1E293B !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

body.dark-mode .text-muted {
    color: #94A3B8 !important;
}

body.dark-mode label {
    color: var(--text-primary) !important;
}

/* Light Mode Support */
body.light-mode {
    background-color: #FFFFFF !important;
    color: #333 !important;
    font-family: 'Inter', 'Lato', sans-serif !important;
}

/* Light Mode Sidebar */
body.light-mode #sidebar {
    background: #F3F3F3 !important;
    color: #333 !important;
    border-right: 1px solid #DEE2E6;
}

body.light-mode #sidebar .sidebar-header {
    background: #F3F3F3 !important;
    border-bottom: 1px solid #DEE2E6;
}

body.light-mode #sidebar .logo-text {
    color: #232F3E !important;
}

body.light-mode #sidebar ul li a {
    color: #444 !important;
}

body.light-mode #sidebar ul li a:hover,
body.light-mode #sidebar ul li.active>a {
    color: #0076B3 !important;
    background: rgba(0, 118, 179, 0.1) !important;
    border-left: 3px solid #0076B3;
}

body.light-mode #sidebar ul ul a {
    background: #E9E9E9 !important;
    color: #444 !important;
    border-left: none !important;
    padding-left: 2.5rem !important;
}

body.light-mode #sidebar ul ul a:hover {
    background: rgba(0, 118, 179, 0.1) !important;
    color: #0076B3 !important;
}

/* Consolidated light mode sidebar styles above */

body.light-mode #sidebar .nav-section-label {
    color: #138496 !important;
    opacity: 1 !important;
    font-weight: 800 !important;
    padding: 20px 25px 5px !important;
    font-size: 0.75em !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    display: block !important;
    background: rgba(19, 132, 150, 0.05);
    margin-top: 10px;
    border-bottom: 1px solid rgba(19, 132, 150, 0.1);
}

body.light-mode #sidebar .dropdown-toggle::after {
    color: #444 !important;
}

/* Light Mode Navbar - Nessus Dark Header Style */
body.light-mode .navbar {
    background-color: #232F3E !important;
    color: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .navbar-status.c-white {
    color: white !important;
}

body.light-mode .navbar .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

body.light-mode .navbar .nav-link:hover {
    color: white !important;
}

/* Light Mode Cards */
body.light-mode .card {
    background-color: #FFFFFF !important;
    border: 1px solid #DEE2E6 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .card .head {
    border-bottom: 1px solid #DEE2E6 !important;
}

body.light-mode .card .content .number {
    color: #000 !important;
}

/* Light Mode Tables */
body.light-mode .table {
    color: #333 !important;
}

body.light-mode .table thead th {
    background-color: #F8F9FA !important;
    color: #232F3E !important;
    border-bottom: 2px solid #DEE2E6 !important;
}

body.light-mode .table td {
    border-top: 1px solid #EEE !important;
}

/* Light Mode Badges (Nessus Palette) */
body.light-mode .badge-danger,
body.light-mode .badge-critical,
body.light-mode .critical {
    background-color: #D43F3A !important;
    color: white !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
}

body.light-mode .badge-warning,
body.light-mode .badge-high,
body.light-mode .high {
    background-color: #F0AD4E !important;
    color: white !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
}

body.light-mode .badge-medium,
body.light-mode .medium {
    background-color: #FDC010 !important;
    color: black !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
}

body.light-mode .badge-success,
body.light-mode .badge-low,
body.light-mode .low {
    background-color: #5CB85C !important;
    color: white !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
}

body.light-mode .badge-info,
body.light-mode .informational {
    background-color: #0076B3 !important;
    color: white !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
}

/* Light Mode Forms */
body.light-mode .form-control {
    background-color: #FFFFFF !important;
    border: 1px solid #CCC !important;
    color: #333 !important;
}

body.light-mode .form-control:focus {
    border-color: #0076B3 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 118, 179, 0.25) !important;
}


/* Tab Overrides */
body.light-mode .nav-tabs .nav-link.active {
    border-bottom: 2px solid #0076B3 !important;
    color: #0076B3 !important;
}

/* Live Phantom Activity Stream */
.probe-monitor-card {
    background: radial-gradient(circle at center, rgba(1, 104, 164, 0.1) 0%, transparent 70%);
    position: relative;
    overflow: hidden;
}

.sonar-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    animation: sonarPulse 2s ease-out infinite;
}

@keyframes sonarPulse {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
    }

    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.probe-activity-list {
    max-height: 250px;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8em;
    color: var(--accent-color);
    scroll-behavior: smooth;
    border: 1px solid rgba(0, 181, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.probe-activity-list::-webkit-scrollbar {
    width: 4px;
}

.probe-activity-list::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.probe-item {
    padding: 4px 8px;
    border-bottom: 1px solid rgba(0, 181, 255, 0.05);
    animation: fadeInSlide 0.2s ease-out;
    cursor: pointer;
    transition: background 0.2s;
}

.probe-item:hover {
    background: rgba(0, 181, 255, 0.1);
}

.probe-detail-info {
    font-size: 0.8em;
    color: #94A3B8;
    margin-top: 2px;
    display: none;
    padding-left: 15px;
    border-left: 2px solid var(--accent-color);
}

.probe-item.expanded .probe-detail-info {
    display: block;
}

.monitor-expand-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 0.9em;
    opacity: 0.6;
    transition: opacity 0.2s;
    background: none;
    border: none;
    color: var(--accent-color);
}

.monitor-expand-btn:hover {
    opacity: 1;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Faraday Severity Flags */
.sev-flag {
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.sev-flag-critical {
    background-color: #9C27B0 !important;
}

.sev-flag-high {
    background-color: #E53935 !important;
}

.sev-flag-medium {
    background-color: #FB8C00 !important;
}

.sev-flag-low {
    background-color: #43A047 !important;
}

.sev-flag-info {
    background-color: #00ACC1 !important;
}

.table-faraday tr {
    position: relative;
    transition: background 0.2s;
}

.table-faraday tr.sev-critical {
    border-left: 5px solid #9C27B0 !important;
}

.table-faraday tr.sev-high {
    border-left: 5px solid #E53935 !important;
}

.table-faraday tr.sev-medium {
    border-left: 5px solid #FB8C00 !important;
}

.table-faraday tr.sev-low {
    border-left: 5px solid #43A047 !important;
}

.table-faraday tr.sev-info {
    border-left: 5px solid #00ACC1 !important;
}

.table-faraday td {
    vertical-align: middle;
}

/* HIGH SPECIFICITY OVERRIDES FOR HEADERS */
#sidebar ul.components li.nav-section-label,
body.dark-mode #sidebar ul.components li.nav-section-label,
body.light-mode #sidebar ul.components li.nav-section-label {
    color: #138496 !important;
    opacity: 1 !important;
    font-weight: 800 !important;
    display: block !important;
    visibility: visible !important;
}