/* ═══════════════════════════════════════════════════════
   WAKER — DARK THEME  (GitBook Dark)
   Flat charcoal surfaces · muted borders · blue accent
   Activate:  document.documentElement.setAttribute('data-theme','dark')
   ═══════════════════════════════════════════════════════ */

/* ── Variables ── */
[data-theme="dark"] {
    --waker-green:                    #4B9CF5;
    --waker-red:                      #F47067;
    --waker-dark-green:               #1F2022;
    --waker-black:                    #191919;
    --waker-white:                    #E2E2E2;
    --black-transparent:              rgba(25, 25, 25, 0.92);
    --black-transparent-button:       rgba(75, 156, 245, 0.1);
    --black-transparent-button-hover: rgba(75, 156, 245, 0.18);
    --glass-border:                   rgba(255, 255, 255, 0.07);
    --glass-glow:                     rgba(75, 156, 245, 0.08);
}

/* ── Body ── */
[data-theme="dark"] .custom-background {
    background: #191919;
    background-attachment: fixed;
    color: #E2E2E2;
}

/* ── Base text ── */
[data-theme="dark"] body                           { color: #E2E2E2; }
[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4,
[data-theme="dark"] h5, [data-theme="dark"] h6    { color: #E8E8E8; }
[data-theme="dark"] p                              { color: #CFCFCF; }
[data-theme="dark"] small                          { color: rgba(226, 226, 226, 0.5); }
[data-theme="dark"] a                              { color: #E2E2E2; }
[data-theme="dark"] a:hover                        { color: #4B9CF5; }
[data-theme="dark"] .lead                          { color: #E2E2E2; }
[data-theme="dark"] .text-bright                   { color: #F0F0F0; }

/* ── Navbar ── */
[data-theme="dark"] .custom-navbar-styling-hover {
    background: #1F2022;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}
[data-theme="dark"] .custom-navbar-styling-hover:hover {
    background: #1F2022;
}

/* ── Sidebar ── */
[data-theme="dark"] #waker-sidebar {
    background: #1F2022;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: none;
}
[data-theme="dark"] #waker-sidebar .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .sb-brand-name    { color: #4B9CF5; }
[data-theme="dark"] .sb-avatar        { background: rgba(75, 156, 245, 0.12); border-color: rgba(75, 156, 245, 0.3); color: #4B9CF5; }
[data-theme="dark"] .sb-user-name     { color: #E2E2E2; }
[data-theme="dark"] .sb-user-role     { color: rgba(226, 226, 226, 0.38); }
[data-theme="dark"] .sb-section-label { color: rgba(226, 226, 226, 0.32); }
[data-theme="dark"] .sb-divider       { background: rgba(255, 255, 255, 0.06); height: 1px; }
[data-theme="dark"] .sb-status-row    { color: rgba(226, 226, 226, 0.5); }
[data-theme="dark"] .sb-status-ok     { background: #4B9CF5; box-shadow: 0 0 6px rgba(75, 156, 245, 0.55); }

[data-theme="dark"] .sb-item          { color: rgba(226, 226, 226, 0.7); }
[data-theme="dark"] .sb-item i        { color: rgba(226, 226, 226, 0.35); }
[data-theme="dark"] .sb-item:hover,
[data-theme="dark"] .sb-item:focus-visible { background: rgba(75, 156, 245, 0.10); color: #4B9CF5; }
[data-theme="dark"] .sb-item:hover i  { color: #4B9CF5; }
[data-theme="dark"] .sb-item.is-active { background: rgba(75, 156, 245, 0.12); color: #4B9CF5; border-left-color: #4B9CF5; }
[data-theme="dark"] .sb-item.is-active i { color: #4B9CF5; }

[data-theme="dark"] .sb-badge         { background: rgba(75, 156, 245, 0.1); border-color: rgba(75, 156, 245, 0.22); color: #7BB8F8; }
[data-theme="dark"] .sb-badge-red     { background: rgba(244, 112, 103, 0.1); border-color: rgba(244, 112, 103, 0.25); color: #F47067; }
[data-theme="dark"] .sb-foot          { background: #1A1B1C; border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* ── Page footer ── */
[data-theme="dark"] .sb-footer-bar {
    background: #1F2022;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: none;
    color: rgba(226, 226, 226, 0.6);
}

/* ── Toggle open button ── */
[data-theme="dark"] .sb-open-btn {
    background: #252628;
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(226, 226, 226, 0.5);
    backdrop-filter: none;
}
[data-theme="dark"] .sb-open-btn:hover {
    background: #2C2E30;
    border-color: rgba(75, 156, 245, 0.4);
    color: #4B9CF5;
}

/* ── Glass surfaces  (flat GitBook-style cards) ── */
[data-theme="dark"] .glass-card,
[data-theme="dark"] .glass-card-lg,
[data-theme="dark"] .glass-card-sm,
[data-theme="dark"] .glass-card-neutral {
    background: #242527;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: none;
    color: #E2E2E2;
}

[data-theme="dark"] .glass-panel {
    background: #202224;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
    color: #E2E2E2;
}

[data-theme="dark"] .icon-badge {
    background: #2A2C2E;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

[data-theme="dark"] .info-box {
    background: #202224;
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #CFCFCF;
}

[data-theme="dark"] .status-indicator {
    background: #242527;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

[data-theme="dark"] .glass-divider {
    background: rgba(255, 255, 255, 0.07);
}

/* ── Buttons ── */
[data-theme="dark"] .btn-waker {
    background: rgba(75, 156, 245, 0.12);
    border: 1px solid rgba(75, 156, 245, 0.35);
    color: #7BB8F8;
    box-shadow: none;
}
[data-theme="dark"] .btn-waker:hover {
    background: rgba(75, 156, 245, 0.22);
    box-shadow: none;
    color: #B8D8FD;
}
[data-theme="dark"] .btn-export {
    background: #2A2C2E;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(226, 226, 226, 0.7);
}
[data-theme="dark"] .btn-export:hover {
    background: #303234;
    color: #E2E2E2;
}

/* ── Waker colour utilities ── */
[data-theme="dark"] .waker-green   { color: #4B9CF5; }
[data-theme="dark"] .waker-red     { color: #F47067; }
[data-theme="dark"] .waker-yellow  { color: #E5A540; }
[data-theme="dark"] .waker-gray    { color: rgba(226, 226, 226, 0.4); }
[data-theme="dark"] .waker-white   { color: #E2E2E2; }

/* ── Badges & labels ── */
[data-theme="dark"] .stat-badge {
    color: rgba(226, 226, 226, 0.7);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .glass-badge {
    background: rgba(75, 156, 245, 0.1);
    border-color: rgba(75, 156, 245, 0.25);
    color: #7BB8F8;
}

/* ── List items ── */
[data-theme="dark"] .list-item {
    background: #242527;
    border-left: 3px solid rgba(75, 156, 245, 0.4);
    color: #E2E2E2;
}
[data-theme="dark"] .list-item.severity-critical { background: rgba(244,112,103,0.07); border-left-color: #F47067; }
[data-theme="dark"] .list-item.severity-high     { background: rgba(229,165,64,0.07);  border-left-color: #E5A540; }
[data-theme="dark"] .list-item.severity-medium   { background: rgba(75,156,245,0.06);  border-left-color: rgba(75,156,245,0.5); }

/* ── Inputs ── */
[data-theme="dark"] .glass-input {
    background: #242527;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: #E2E2E2;
    box-shadow: none;
}
[data-theme="dark"] .glass-input:focus {
    border-color: rgba(75, 156, 245, 0.5);
    background: #282A2C;
    box-shadow: 0 0 0 3px rgba(75, 156, 245, 0.1);
}
[data-theme="dark"] .glass-input::placeholder { color: rgba(226, 226, 226, 0.28); }

[data-theme="dark"] .search-input {
    background: #242527;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: #E2E2E2;
}
[data-theme="dark"] .search-input input          { color: #E2E2E2; }
[data-theme="dark"] .search-input input::placeholder { color: rgba(226, 226, 226, 0.28); }
[data-theme="dark"] .search-input:focus-within {
    border-color: rgba(75, 156, 245, 0.45);
    box-shadow: 0 0 0 3px rgba(75, 156, 245, 0.08);
}

/* ── Tables ── */
[data-theme="dark"] .table > thead > tr > th {
    background-color: #232527;
    color: #4B9CF5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .table > tbody > tr > td {
    background-color: #1F2022;
    color: #E2E2E2;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Modals ── */
[data-theme="dark"] .modal-content {
    --bs-modal-bg:                   #1F2022;
    --bs-modal-border-color:         rgba(255, 255, 255, 0.12);
    --bs-modal-header-border-color:  rgba(255, 255, 255, 0.08);
    --bs-modal-footer-border-color:  rgba(255, 255, 255, 0.08);
    --bs-modal-color:                #E2E2E2;
}
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-body,
[data-theme="dark"] .modal-footer {
    background: #1F2022;
    color: #E2E2E2;
}
[data-theme="dark"] .custom-waker-styled-modal {
    background: #1F2022;
    color: #E2E2E2;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .modal-content .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}
[data-theme="dark"] .modal label { color: #E2E2E2; }
[data-theme="dark"] .modal .bg-white { background-color: #2A2C2E !important; }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #2A2C2E;
    border-color: rgba(255, 255, 255, 0.1);
    color: #E2E2E2;
}
[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23E2E2E2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #2C2E30;
    border-color: rgba(75, 156, 245, 0.45);
    color: #E2E2E2;
    box-shadow: 0 0 0 0.2rem rgba(75, 156, 245, 0.1);
}
[data-theme="dark"] .form-control::placeholder { color: rgba(226, 226, 226, 0.35); }

/* ── Theme switcher pill ── */
[data-theme="dark"] .theme-switcher {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.09);
    backdrop-filter: none;
}
[data-theme="dark"] .theme-btn               { color: rgba(226, 226, 226, 0.4); }
[data-theme="dark"] .theme-btn:hover         { background: rgba(255, 255, 255, 0.07); color: #E2E2E2; }
[data-theme="dark"] .theme-btn.active        { background: rgba(75, 156, 245, 0.14); color: #4B9CF5; box-shadow: none; }

/* ── Sidebar dropdown ── */
[data-theme="dark"] .sb-chevron                { color: rgba(226,226,226,0.3); }
[data-theme="dark"] .sb-dropdown-toggle[aria-expanded="true"] .sb-chevron { color: #4B9CF5; }
[data-theme="dark"] .sb-item-child             { color: rgba(226,226,226,0.5); }
[data-theme="dark"] .sb-item-child i           { color: rgba(226,226,226,0.28); }
[data-theme="dark"] .sb-item-child:hover,
[data-theme="dark"] .sb-item-child:focus-visible { background: rgba(75,156,245,0.08); color: #4B9CF5; }
[data-theme="dark"] .sb-item-child:hover i     { color: #4B9CF5; }
[data-theme="dark"] .sb-item-child.is-active   { background: rgba(75,156,245,0.1); color: #4B9CF5; }
[data-theme="dark"] .sb-item-child.is-active i { color: #4B9CF5; }

/* ── Glass table ── */
[data-theme="dark"] .glass-table-wrapper {
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: none;
}
[data-theme="dark"] .glass-table thead tr th {
    background: #232527;
    color: #4B9CF5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 13px 16px;
}
[data-theme="dark"] .glass-table tbody tr td {
    background: #1F2022;
    color: #E2E2E2;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 11px 16px;
}
[data-theme="dark"] .glass-table tbody tr:hover td {
    background: #252729;
    color: #F0F0F0;
}
[data-theme="dark"] .glass-table tbody tr:last-child td { border-bottom: none; }
[data-theme="dark"] .glass-table .form-check-input {
    background-color: #2A2C2E;
    border-color: rgba(255,255,255,0.18);
}
[data-theme="dark"] .glass-table .form-check-input:checked {
    background-color: #4B9CF5;
    border-color: #4B9CF5;
}

/* ── Scan group accordion ── */
[data-theme="dark"] .scan-group-toggle         { color: #E2E2E2; border-color: rgba(255,255,255,0.18); }
[data-theme="dark"] .scan-group-toggle:hover   { background: rgba(75,156,245,0.12); border-color: rgba(75,156,245,0.38); color: #4B9CF5; }
[data-theme="dark"] .scan-sub-row td           { background: #222426 !important; }
[data-theme="dark"] .scan-sub-row td:first-child { border-left-color: rgba(75,156,245,0.3) !important; }
[data-theme="dark"] .glass-table tbody tr.scan-sub-row:hover td { background: #272A2C !important; }

/* ── Scan status badge colours ── */
[data-theme="dark"] .scan-badge-running   { background: rgba(75,156,245,0.14);  color: #4B9CF5; }
[data-theme="dark"] .scan-badge-completed { background: rgba(75,156,245,0.1);   color: #7BB8F8; }
[data-theme="dark"] .scan-badge-stopped   { background: rgba(244,112,103,0.14); color: #F47067; }
[data-theme="dark"] .scan-badge-scheduled { background: rgba(229,165,64,0.14);  color: #E5A540; }
[data-theme="dark"] .scan-badge-queued    { background: rgba(128,128,128,0.1);  color: rgba(200,200,200,0.6); }
[data-theme="dark"] .scan-badge-context   { background: rgba(196,181,253,0.14); color: #c4b5fd; }
[data-theme="dark"] .scan-pulse           { background: #4B9CF5; }

/* ── Danger icon button ── */
[data-theme="dark"] .btn-icon-danger {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(226,226,226,0.28);
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s ease;
}
[data-theme="dark"] .btn-icon-danger:hover {
    background: rgba(244,112,103,0.1);
    border-color: rgba(244,112,103,0.25);
    color: #F47067;
}
[data-theme="dark"] .btn-icon {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(226,226,226,0.28);
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s ease;
}
[data-theme="dark"] .btn-icon:hover {
    background: rgba(75,156,245,0.1);
    border-color: rgba(75,156,245,0.25);
    color: #4B9CF5;
}

/* ── custom-waker-styled-button for dark theme ── */
[data-theme="dark"] .custom-waker-styled-button {
    background: rgba(75,156,245,0.1);
    border: 1px solid rgba(75,156,245,0.3);
    color: #7BB8F8;
}
[data-theme="dark"] .custom-waker-styled-button:hover {
    background: rgba(75,156,245,0.18);
    border-color: rgba(75,156,245,0.5);
    color: #B8D8FD;
}

/* ── Toast ── */
[data-theme="dark"] .waker-toast {
    background: #242527;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    color: #E2E2E2;
}
[data-theme="dark"] .waker-toast-close { color: rgba(226,226,226,0.4); }
[data-theme="dark"] .waker-toast-body  { color: rgba(226,226,226,0.65); }
[data-theme="dark"] .waker-toast-progress { background: rgba(255,255,255,0.05); }

[data-theme="dark"] .waker-toast.toast-success .waker-toast-icon        { color: #4B9CF5; }
[data-theme="dark"] .waker-toast.toast-success .waker-toast-progress-bar { background: #4B9CF5; }
[data-theme="dark"] .waker-toast.toast-warning .waker-toast-icon        { color: #E5A540; }
[data-theme="dark"] .waker-toast.toast-warning .waker-toast-progress-bar { background: #E5A540; }
[data-theme="dark"] .waker-toast.toast-danger .waker-toast-icon         { color: #F47067; }
[data-theme="dark"] .waker-toast.toast-danger .waker-toast-progress-bar  { background: #F47067; }
[data-theme="dark"] .waker-toast.toast-info .waker-toast-icon           { color: #4B9CF5; }
[data-theme="dark"] .waker-toast.toast-info .waker-toast-progress-bar    { background: #4B9CF5; }

/* ─── OSINT modal helpers ─── */
[data-theme="dark"] .osint-section-label   { color: rgba(226, 226, 226, 0.5); }
[data-theme="dark"] .osint-domain-tag      { color: rgba(226, 226, 226, 0.7); }

[data-theme="dark"] .threat-lvl {
    border-color: rgba(255, 255, 255, 0.08);
    background:   rgba(255, 255, 255, 0.03);
    color:        rgba(226, 226, 226, 0.55);
}
[data-theme="dark"] .threat-meter:not(.threat-meter--readonly) .threat-lvl:hover {
    background: rgba(255, 255, 255, 0.06);
    color:      #E2E2E2;
}
/* Dreigingsniveau per level: 5 paars, 4 rood, 3 oranje, 2 geel, 1 lichtblauw */
[data-theme="dark"] .threat-lvl[data-level="5"].is-active {
    background:   rgba(179, 136, 245, 0.14);
    border-color: rgba(179, 136, 245, 0.45);
    color:        #B388F5;
}
[data-theme="dark"] .threat-lvl[data-level="4"].is-active {
    background:   rgba(244, 112, 103, 0.14);
    border-color: rgba(244, 112, 103, 0.45);
    color:        #F47067;
}
[data-theme="dark"] .threat-lvl[data-level="3"].is-active {
    background:   rgba(229, 165, 64, 0.14);
    border-color: rgba(229, 165, 64, 0.45);
    color:        #E5A540;
}
[data-theme="dark"] .threat-lvl[data-level="2"].is-active {
    background:   rgba(230, 210, 74, 0.14);
    border-color: rgba(230, 210, 74, 0.45);
    color:        #E6D24A;
}
[data-theme="dark"] .threat-lvl[data-level="1"].is-active {
    background:   rgba(91, 192, 235, 0.14);
    border-color: rgba(91, 192, 235, 0.45);
    color:        #5BC0EB;
}

[data-theme="dark"] .osint-screenshot-frame {
    border-color: rgba(255, 255, 255, 0.12);
    background:   rgba(255, 255, 255, 0.02);
}
[data-theme="dark"] .osint-screenshot-ph { color: rgba(226, 226, 226, 0.32); }

[data-theme="dark"] .osint-textblock {
    background:   rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
    color:        #E2E2E2;
}
