/* ─── Custom Properties ─────────────────────────────────────────── */
:root {
    --accent: #6c5ce7;
    --accent-rgb: 108, 92, 231;
    --accent-hover: #5a4bd1;
    --accent-glow: rgba(108, 92, 231, 0.35);
    --gradient-blue: linear-gradient(135deg, #0984e3 0%, #6c5ce7 100%);
    --gradient-green: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    --gradient-purple: linear-gradient(135deg, #6c5ce7 0%, #e17055 100%);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* ─── Base ──────────────────────────────────────────────────────── */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    background: #0f0f1a;
    color: #e2e2e2;
    transition: background 0.5s ease, color 0.4s ease;
}

/* ─── Theme: Gradient ───────────────────────────────────────────── */
body.theme-gradient {
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #0f0c29);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ─── Theme: Light ──────────────────────────────────────────────── */
body.theme-light {
    background: #fbf8f3; /* Warm tinted cream background */
    color: #433939;      /* Warm dark chocolate text */
}

body.theme-light .glass-nav {
    background: rgba(251, 248, 243, 0.9);
    border-bottom-color: rgba(67, 57, 57, 0.1);
}

body.theme-light .glass-nav .nav-link {
    color: rgba(67, 57, 57, 0.65);
}

body.theme-light .glass-nav .nav-link:hover {
    color: #000;
    background: rgba(108, 92, 231, 0.1);
}

body.theme-light .glass-card {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(67, 57, 57, 0.1);
    box-shadow: 0 4px 20px rgba(67, 57, 57, 0.08);
}

body.theme-light .custom-table thead th {
    background: rgba(108, 92, 231, 0.08);
    color: rgba(67, 57, 57, 0.55);
}

body.theme-light .custom-table tbody td {
    border-bottom-color: rgba(67, 57, 57, 0.06);
    color: #433939; /* Fix: explicitly set for readability */
}

body.theme-light .table-row-hover:hover {
    background: rgba(108, 92, 231, 0.04) !important;
}

body.theme-light .text-body-secondary {
    color: rgba(67, 57, 57, 0.55) !important;
}

body.theme-light .form-control {
    background: #fff !important;
    border-color: #e2ddd5 !important;
    color: #433939 !important;
}

body.theme-light .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(67, 57, 57, 0.3);
}

body.theme-light footer {
    border-top-color: rgba(67, 57, 57, 0.1) !important;
}

body.theme-light .alert {
    color: #433939;
}

/* ─── Theme Switcher ────────────────────────────────────────────── */
.theme-switcher {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-light .theme-switcher {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    padding: 0;
}

.theme-btn:hover {
    transform: scale(1.15);
}

.theme-btn.active {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.theme-btn-dark {
    background: #0f0f1a;
}

.theme-btn-gradient {
    background: linear-gradient(135deg, #302b63, #24243e);
}

.theme-btn-light {
    background: #f0f2f5;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #0f0f1a;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

.text-accent {
    color: var(--accent) !important;
}

.link-accent {
    color: var(--accent) !important;
    transition: color 0.2s;
}

.link-accent:hover {
    color: var(--accent-hover) !important;
}

.bg-accent {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--accent-rgb), var(--bs-bg-opacity)) !important;
}

/* ─── Glass Nav ─────────────────────────────────────────────────── */
.glass-nav {
    background: rgba(15, 15, 26, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.glass-nav .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    transition: all 0.25s ease;
    font-weight: 500;
}

.glass-nav .nav-link:hover {
    color: #fff;
    background: rgba(108, 92, 231, 0.15);
}

.brand-text {
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

/* ─── Stat Cards ────────────────────────────────────────────────── */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.stat-card-link {
    cursor: pointer;
}

.card-gradient-blue {
    background: var(--gradient-blue);
}

.card-gradient-green {
    background: var(--gradient-green);
}

.card-gradient-purple {
    background: var(--gradient-purple);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.85;
    line-height: 1;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Glass Card ────────────────────────────────────────────────── */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

/* ─── Tables ────────────────────────────────────────────────────── */
.custom-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.custom-table-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.custom-table thead th {
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    padding: 1rem 1.25rem;
}

.custom-table tbody td {
    padding: 0.75rem 1.25rem; /* Slightly more compact for better density */
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
    color: rgba(255, 255, 255, 0.85);
}

.table-row-hover {
    transition: all 0.2s ease;
}

.table-row-hover:hover {
    background: rgba(108, 92, 231, 0.04) !important;
}

/* ─── Scrollable Table Wrapper ──────────────────────────────────── */
.scrollable-table {
    max-height: 280px;
    overflow-y: auto;
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
    border-radius: var(--radius-sm) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    transition: all 0.25s ease;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent; /* Prevents layout shift on hover */
}

.btn-sm {
    border-radius: 8px !important;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    gap: 0.35rem;
}

.btn-lg {
    border-radius: 12px !important;
    padding: 0.75rem 1.75rem;
}

/* Ensure button groups follow consistency */
.btn-group > .btn {
    border-radius: 0 !important;
}

.btn-group > .btn:first-child,
.btn-group > .delete-form:first-child .btn {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}

.btn-group > .btn:last-child,
.btn-group > .delete-form:last-child .btn {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.btn-group-lg > .btn:first-child { border-radius: 12px 0 0 12px !important; }
.btn-group-lg > .btn:last-child { border-radius: 0 12px 12px 0 !important; }

.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-accent:active {
    transform: translateY(0);
}

.btn-outline-accent {
    color: var(--accent);
    border-color: rgba(108, 92, 231, 0.4);
    background: rgba(108, 92, 231, 0.08);
    font-weight: 600;
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* ─── Soft Alt Backgrounds for Outline Buttons ─────────── */
.btn-outline-info { background: rgba(13, 202, 240, 0.08); border-color: rgba(13, 202, 240, 0.2); }
.btn-outline-warning { background: rgba(255, 193, 7, 0.08); border-color: rgba(255, 193, 7, 0.2); }
.btn-outline-danger { background: rgba(220, 53, 69, 0.08); border-color: rgba(220, 53, 69, 0.2); }
.btn-outline-success { background: rgba(25, 135, 84, 0.08); border-color: rgba(25, 135, 84, 0.2); }
.btn-outline-light { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); }

/* Standard transitions on click/hover for these */
.btn-outline-info:hover { background: #0dcaf0; color: #000; }
.btn-outline-warning:hover { background: #ffc107; color: #000; }
.btn-outline-danger:hover { background: #dc3545; color: #fff; }
.btn-outline-success:hover { background: #198754; color: #fff; }

/* ─── Form Controls ─────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem var(--accent-glow);
}

/* ─── Alerts ────────────────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* ─── Breadcrumbs ───────────────────────────────────────────────── */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.3);
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .stat-card {
        padding: 1.15rem;
        gap: 1rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .custom-table thead th {
        font-size: 0.7rem;
        padding: 0.65rem 0.5rem;
    }

    .custom-table tbody td {
        padding: 0.65rem 0.5rem;
        font-size: 0.85rem;
    }

    .btn-group-sm>.btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.78rem;
    }

    h2,
    h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 575.98px) {
    .table-responsive {
        font-size: 0.82rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem;
    }
}

/* ─── Animations ────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.stat-card {
    animation: fadeInUp 0.5s ease forwards;
}

.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.2s;
}

.card,
.glass-card {
    animation: fadeInUp 0.4s ease forwards;
}

/* ─── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 92, 231, 0.5);
}

/* ─── Delete form inline ────────────────────────────────────────── */
.delete-form {
    display: inline-flex;
}

.delete-form .btn {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: inherit !important;
    border-bottom-right-radius: inherit !important;
}

/* ─── Login Page ────────────────────────────────────────────────── */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.login-card {
    border-radius: var(--radius);
    animation: fadeInUp 0.6s ease forwards;
}

.login-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4); }
    50% { box-shadow: 0 8px 35px rgba(108, 92, 231, 0.65); }
}

.login-card .input-group-text {
    border-color: var(--glass-border);
}

body.theme-light .login-card .input-group-text {
    border-color: #e2ddd5;
    background: #fff;
}

.login-card .form-control::placeholder {
    font-size: 0.95rem;
    opacity: 0.6;
}

.login-card .form-control {
    font-size: 1.1rem;
}

/* ─── Dropdown no caret ─────────────────────────────────────────── */
.no-caret::after {
    display: none !important;
}

/* ─── Glass Modal ───────────────────────────────────────────────── */
.glass-modal {
    background: rgba(20, 20, 35, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius) !important;
}

body.theme-light .glass-modal {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(67, 57, 57, 0.1) !important;
}

/* ─── Cameras Grid Layout ───────────────────────────────────────── */
.camera-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .camera-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .camera-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.camera-tile {
    position: relative;
    padding: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.camera-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--glass-border);
}

.cam-live-badge {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cam-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background-color: #ff4757;
    border-radius: 50%;
    box-shadow: 0 0 8px #ff4757;
    animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.3; }
    100% { transform: scale(1); opacity: 1; }
}

.camera-feed {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cam-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cam-offline {
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.cam-fullscreen-btn {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 5;
}

.camera-tile:hover .cam-fullscreen-btn {
    opacity: 1;
}

.cam-fullscreen-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
    border-color: transparent;
}

/* ─── Dashboard: Orange Gradient ────────────────────────────────── */
.card-gradient-orange {
    background: linear-gradient(135deg, #e17055 0%, #fdcb6e 100%);
}

/* ─── Dashboard: Mini Stat Cards ────────────────────────────────── */
.dash-mini-card {
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.dash-mini-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    pointer-events: none;
}

.dash-mini-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.dash-mini-icon {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    opacity: 0.85;
}

.dash-mini-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.dash-mini-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.75;
    font-weight: 600;
    margin-top: 0.25rem;
}

.dash-mini-blue {
    background: linear-gradient(135deg, rgba(9,132,227,0.15), rgba(108,92,231,0.15));
    border: 1px solid rgba(9,132,227,0.2);
    color: #74b9ff;
}

.dash-mini-teal {
    background: linear-gradient(135deg, rgba(0,184,148,0.15), rgba(0,206,201,0.15));
    border: 1px solid rgba(0,184,148,0.2);
    color: #55efc4;
}

.dash-mini-purple {
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(162,155,254,0.15));
    border: 1px solid rgba(108,92,231,0.2);
    color: #a29bfe;
}

.dash-mini-amber {
    background: linear-gradient(135deg, rgba(253,203,110,0.15), rgba(225,112,85,0.15));
    border: 1px solid rgba(253,203,110,0.2);
    color: #ffeaa7;
}

.dash-mini-green {
    background: linear-gradient(135deg, rgba(0,184,148,0.15), rgba(85,239,196,0.15));
    border: 1px solid rgba(0,184,148,0.2);
    color: #55efc4;
}

.dash-mini-cyan {
    background: linear-gradient(135deg, rgba(0,206,201,0.15), rgba(129,236,236,0.15));
    border: 1px solid rgba(0,206,201,0.2);
    color: #81ecec;
}

.dash-mini-rose {
    background: linear-gradient(135deg, rgba(232,67,147,0.15), rgba(253,121,168,0.15));
    border: 1px solid rgba(232,67,147,0.2);
    color: #fd79a8;
}

.dash-mini-indigo {
    background: linear-gradient(135deg, rgba(99,110,250,0.15), rgba(108,92,231,0.15));
    border: 1px solid rgba(99,110,250,0.2);
    color: #a29bfe;
}

/* ─── Dashboard: Notifications ──────────────────────────────────── */
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

.notification-item.swiping {
    transition: none !important;
}

.notification-item.swiped-out {
    transform: translateX(120%) !important;
    opacity: 0 !important;
    margin-bottom: -50px; /* Collapse space */
    pointer-events: none;
}

.notification-item:hover {
    transform: translateX(4px);
}

.notif-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.notif-warning {
    background: rgba(255,193,7,0.06);
    border: 1px solid rgba(255,193,7,0.15);
}

.notif-warning .notif-icon-wrap {
    background: rgba(255,193,7,0.15);
    color: #ffc107;
}

.notif-info {
    background: rgba(13,202,240,0.06);
    border: 1px solid rgba(13,202,240,0.15);
}

.notif-info .notif-icon-wrap {
    background: rgba(13,202,240,0.15);
    color: #0dcaf0;
}

.notif-success {
    background: rgba(25,135,84,0.06);
    border: 1px solid rgba(25,135,84,0.15);
}

.notif-success .notif-icon-wrap {
    background: rgba(25,135,84,0.15);
    color: #198754;
}

/* ─── Dashboard: DB Info Card ───────────────────────────────────── */
.db-info-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.db-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #0984e3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.db-stat {
    padding: 0.5rem;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* ─── Dashboard: Quick Actions ──────────────────────────────────── */
.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-action-card:hover {
    transform: translateY(-4px);
    background: rgba(108,92,231,0.08);
    border-color: rgba(108,92,231,0.25);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    color: inherit;
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.quick-action-card:hover .quick-action-icon {
    transform: scale(1.1);
}

/* ─── Light theme overrides for dashboard ───────────────────────── */
body.theme-light .dash-mini-card {
    background: rgba(67, 57, 57, 0.03);
}

body.theme-light .notification-item {
    background: rgba(67, 57, 57, 0.02);
}

body.theme-light .db-info-card {
    background: rgba(67, 57, 57, 0.03);
    border-color: rgba(67, 57, 57, 0.1);
}

body.theme-light .quick-action-card {
    background: rgba(67, 57, 57, 0.02);
    border-color: rgba(67, 57, 57, 0.1);
}

body.theme-light .quick-action-card:hover {
    background: rgba(108, 92, 231, 0.06);
    border-color: rgba(108, 92, 231, 0.25);
}

body.theme-light .db-stat {
    background: rgba(67, 57, 57, 0.02);
    border-color: rgba(67, 57, 57, 0.08);
}
/* ─── Custom Search Bar ─────────────────────────────────────────── */
.custom-search-wrapper {
    position: relative;
    max-width: 400px;
}

.custom-search-input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.8rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--bs-body-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.custom-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.custom-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 0 0 4px var(--accent-glow);
}

.custom-search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.custom-search-input:focus + .custom-search-icon {
    color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

/* Light Theme overrides */
body.theme-light .custom-search-input {
    background: #fff;
    border-color: #d0d0d0;
    color: #1a1a2e;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

body.theme-light .custom-search-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

body.theme-light .custom-search-input:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05), 0 0 0 4px rgba(108, 92, 231, 0.15);
}

body.theme-light .custom-search-icon {
    color: rgba(0, 0, 0, 0.4);
}
