/* ===========================================================================
   CyberSee — Base / Global Styles
   Shared across ALL layouts (auth, dashboard, blank)
   Extracted from admin.css
   =========================================================================== */

/* --- Resets --- */
*, body {
    margin: 0
}

* {
    padding: 0;
    box-sizing: border-box
}

body, html {
    height: 100%;
    margin: 0
}

body {
    background-color: #0e1016;
    color: #fff;
    overflow-x: hidden
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    border-radius: 20px
}

html[data-bs-theme=dark] ::-webkit-scrollbar-track {
    background: #141923;
    border-radius: 8px
}

html[data-bs-theme=light] ::-webkit-scrollbar-track {
    border-radius: 8px
}

html[data-bs-theme=dark] ::-webkit-scrollbar-thumb {
    background: rgba(21, 19, 33, .83);
    border-radius: 8px
}

html[data-bs-theme=light] ::-webkit-scrollbar-thumb {
    border-radius: 8px
}

html[data-bs-theme=dark] ::-webkit-scrollbar-thumb:hover {
    background: rgba(21, 19, 33, .83)
}

/* --- Links & Cursors --- */
a, .edit-link {
    text-decoration: none
}

.card-cahrt .header-card .icon, .chart .header-card .icon,
.introjs-skipbutton, .sortable, .tab, a {
    cursor: pointer
}

.edit-link {
    color: #4a61e0;
    font-size: 14px
}

.edit-link:hover, .faq-chat u {
    text-decoration: underline
}

.faq-chat br {
    line-height: 1.25rem
}

.faq-chat strong {
    font-weight: 600
}

/* --- Form Controls --- */
.form-control {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    border-radius: .5rem;
    padding: .75rem 1rem
}

.form-control::placeholder {
    color: rgba(255, 255, 255, .7)
}

::placeholder {
    color: #8e8e8e !important
}

.form-label {
    color: #e5e7eb;
    font-weight: 500;
    margin-bottom: .5rem
}

.is-invalid {
    border-color: #f87171 !important;
    background: rgba(239, 68, 68, .1)
}

option {
    background-color: var(--dark-surface-2);
    color: #fff
}

/* --- Form Check Variants --- */
.form-check-success .form-check-input {
    background-color: #56b22c;
    border: none
}

.form-check-warning .form-check-input {
    background-color: #f0ad4e;
    border: none
}

.form-check-secondary .form-check-input {
    background-color: #6c757d;
    border: none
}

.form-check-danger .form-check-input {
    background-color: #dc3545;
    border: none
}

/* --- Buttons --- */
.btn-outline-light, .btn-primary {
    padding: .75rem 1.5rem;
    transition: .3s
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: .5rem;
    font-weight: 600
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3730a3, #6d28d9);
    box-shadow: 0 4px 8px rgba(79, 70, 229, .3);
    transform: translateY(-1px)
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, .3);
    color: #e5e7eb;
    border-radius: .5rem;
    font-weight: 500
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .5);
    color: #fff
}

.btn-outline-secondary, .text-secondary {
    color: #6c757d !important
}

.btn-secondary {
    background-color: #6c757d !important
}

.btn-outline-secondary {
    border: 1px solid #6c757d !important
}

html[data-bs-theme=light] .btn-dark {
    background: #343a40
}

html[data-bs-theme=light] .btn-dark:hover {
    background: #23272b
}

/* --- Text Utilities --- */
.text-primary {
    color: #60a5fa !important
}

.text-success {
    color: #34d399 !important
}

.text-light {
    color: #d1d5db !important
}

.dark-swal-title, .text-white {
    color: #fff !important
}

/* --- Alert --- */
.alert-success {
    background: rgba(34, 197, 94, .1);
    border: 1px solid rgba(34, 197, 94, .3);
    color: #86efac;
    border-radius: .5rem
}

html[data-bs-theme=light] .alert-card {
    border: 1px solid #e4e7eb
}

/* --- Badge Base --- */
.badge {
    display: flex;
    align-items: center;
    font-size: 12px;
    padding: 2px 10px;
    height: 20px;
    border-radius: 10px;
    width: max-content
}

.badge.low {
    background-color: #fde82b
}

.badge.info, .severity.info {
    background-color: #8596ea
}

.badge.yellow, .severity.medium {
    background-color: #ffae00
}

.badge.red, .severity.critical {
    background-color: #ff0040
}

/* --- Severity --- */
.severity {
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 12px;
    color: #fff
}

.severity.low {
    background-color: #fde82b;
    color: #333
}

.severity.high {
    background-color: #ff8629
}

/* --- Status Dots --- */
.status {
    display: flex;
    align-items: center;
    grid-gap: 5px
}

.status .cricle-ac {
    background-color: #fff;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: block
}

.status .cricle-ac.green {
    background-color: #4edfa8
}

.status .cricle-ac.yellow {
    background-color: #ffba00
}

.status .cricle-ac.purple {
    background-color: #6f00ff
}

.status .cricle-ac.blue {
    background-color: #3ba0ff
}

/* --- Modal --- */
.modal {
    background-color: rgba(0, 0, 0, .4)
}

/* --- SweetAlert Dark Theme --- */
.dark-swal-popup {
    background-color: var(--dark-surface-2) !important;
    color: #fff !important
}

.dark-swal-content {
    color: #ccc !important
}

.dark-swal-button {
    background-color: #37751c !important;
    color: #fff !important;
    border: none !important
}

/* --- Theme Variables --- */
:root {
    --primary: #4f46e5;
    --glass-bg-dark: rgba(18, 18, 18, .65);
    --glass-bg-light: rgba(255, 255, 255, .65)
}

html[data-bs-theme=light] {
    --bs-body-bg: #f8fafc;
    --bs-body-color: #1e293b;
    --bs-border-color: #e4e7eb;
    --bs-primary: #4f46e5;
    --light-bg: #f8fafc;
    --light-surface-1: #ffffff;
    --light-surface-2: #f1f5f9;
    --light-surface-3: #e9eef5;
    --light-border: #e4e7eb;
    --light-text: #0f172a;
    --light-text-muted: #475569;
    --light-muted: #f8fafc;
    --glass-bg: var(--glass-bg-light);
    --text-color: #1e293b
}

html[data-bs-theme=dark] {
    --dark-bg: #121721 !important;
    --dark-surface-1: #121721;
    --dark-surface-2: #1B1F2A;
    --dark-surface-3: #1F232E;
    --phishing-surface: #121212;
    --phishing-surface-alt: #181818;
    --dark-border: #1F232E;
    --dark-border-soft: #1F232E;
    --dark-shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .35);
    --dark-shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --dark-shadow-inset: inset 0 0 0 1px rgba(255, 255, 255, .03);
    --dark-hover: #1B1F2A;
    --dark-active: #1F232E;
    --glass-bg: var(--glass-bg-dark);
    --text-color: #f1f5f9
}

html[data-bs-theme=light] .input-group .input-group-text {
    background: var(--light-surface-2) !important;
    border: 1px solid var(--light-border) !important;
    color: var(--light-text-muted) !important
}

html[data-bs-theme=light] .sort-icon {
    color: var(--light-text-muted) !important;
    font-size: .95rem !important
}

html[data-bs-theme=light] .dashboard-header button[aria-label="Toggle Theme"]:focus-visible {
    outline: #93c5fd solid 2px;
    outline-offset: 2px;
    border-radius: 6px
}

html[data-bs-theme=light] .btn-outline-light {
    color: #334155 !important;
    border-color: #cbd5e1 !important
}

html[data-bs-theme=light] .btn-outline-light:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important
}

html[data-bs-theme=light] .statistics-row {
    background: var(--light-surface-1) !important;
    border-color: var(--light-border) !important
}

html[data-bs-theme=dark] .card.elevated,
html[data-bs-theme=dark] .dropdown-menu,
html[data-bs-theme=dark] .modal-content,
html[data-bs-theme=dark] .offcanvas {
    box-shadow: var(--dark-shadow)
}

html[data-bs-theme=dark] .input-group-dark .form-control,
html[data-bs-theme=dark] .input-group-dark .input-group-text {
    background: var(--dark-surface-2) !important;
    border: 1px solid var(--dark-border) !important;
    color: #eee !important
}

html[data-bs-theme=dark] .phishing-scope .cards-header,
html[data-bs-theme=dark] .phishing-scope .statistics-row,
html[data-bs-theme=dark] .phishing-scope .threat-card {
    background: var(--phishing-surface-alt) !important
}

html[data-bs-theme=dark] .phishing-scope .threat-card {
    border-color: rgba(255, 255, 255, .07) !important
}

html[data-bs-theme=dark] .phishing-scope .cards-header,
html[data-bs-theme=dark] .phishing-scope .statistics-row {
    border-color: rgba(255, 255, 255, .08) !important
}

html[data-bs-theme=dark] .phishing-scope .threat-card:hover {
    background: #1f1f1f !important
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1050;
    background: var(--glass-bg);
    backdrop-filter: blur(10px)
}

/* --- Theme Transition --- */
body.theme-transition {
    transition: background-color .3s, color .3s
}
