/* ===========================================
   VIPDL Custom Theme - Indigo/Violet
   Bootstrap 5.3 CSS Variable Overrides
   =========================================== */

/* ── Light Mode ── */
:root {
    /* Primary: Indigo */
    --bs-primary: #6366f1;
    --bs-primary-rgb: 99, 102, 241;
    --bs-link-color: #6366f1;
    --bs-link-color-rgb: 99, 102, 241;
    --bs-link-hover-color: #4f46e5;
    --bs-link-hover-color-rgb: 79, 70, 229;

    /* Font */
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Background */
    --bs-body-bg: #f8fafc;
    --bs-body-bg-rgb: 248, 250, 252;

    /* Focus Ring */
    --bs-focus-ring-color: rgba(99, 102, 241, 0.25);
}

/* ── Dark Mode ── */
[data-bs-theme="dark"] {
    --bs-primary: #818cf8;
    --bs-primary-rgb: 129, 140, 248;
    --bs-link-color: #818cf8;
    --bs-link-color-rgb: 129, 140, 248;
    --bs-link-hover-color: #a5b4fc;
    --bs-link-hover-color-rgb: 165, 180, 252;
    --bs-body-bg: #0f172a;
    --bs-body-bg-rgb: 15, 23, 42;
    --bs-tertiary-bg: #1e293b;
    --bs-focus-ring-color: rgba(129, 140, 248, 0.25);
}

/* ── Buttons ── */
.btn-primary {
    --bs-btn-bg: #6366f1;
    --bs-btn-border-color: #6366f1;
    --bs-btn-hover-bg: #4f46e5;
    --bs-btn-hover-border-color: #4f46e5;
    --bs-btn-active-bg: #4338ca;
    --bs-btn-active-border-color: #4338ca;
    --bs-btn-disabled-bg: #6366f1;
    --bs-btn-disabled-border-color: #6366f1;
}

.btn-outline-primary {
    --bs-btn-color: #6366f1;
    --bs-btn-border-color: #6366f1;
    --bs-btn-hover-bg: #6366f1;
    --bs-btn-hover-border-color: #6366f1;
    --bs-btn-active-bg: #4f46e5;
    --bs-btn-active-border-color: #4f46e5;
}

[data-bs-theme="dark"] .btn-primary {
    --bs-btn-bg: #818cf8;
    --bs-btn-border-color: #818cf8;
    --bs-btn-color: #0f172a;
    --bs-btn-hover-bg: #a5b4fc;
    --bs-btn-hover-border-color: #a5b4fc;
    --bs-btn-hover-color: #0f172a;
    --bs-btn-active-bg: #c7d2fe;
    --bs-btn-active-border-color: #c7d2fe;
}

[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #818cf8;
    --bs-btn-border-color: #818cf8;
    --bs-btn-hover-bg: #818cf8;
    --bs-btn-hover-border-color: #818cf8;
    --bs-btn-hover-color: #0f172a;
}

/* ── Form Controls ── */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

.form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] .form-check-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 0.25rem rgba(129, 140, 248, 0.25);
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: #818cf8;
    border-color: #818cf8;
}

/* ── Navbar ── */
.navbar {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

[data-bs-theme="dark"] .navbar {
    background-color: rgba(15, 23, 42, 0.95) !important;
}

/* ── Cards ── */
.card {
    border-radius: 12px;
    transition: box-shadow 0.2s ease;
}

/* ── Alerts ── */
.alert {
    border-radius: 10px;
}

/* ── Badges ── */
.badge {
    font-weight: 500;
}

/* ── Text Utilities ── */
.text-primary {
    color: #6366f1 !important;
}

[data-bs-theme="dark"] .text-primary {
    color: #818cf8 !important;
}

/* ── Dropdown ── */
.dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .dropdown-menu {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.08);
}

.dropdown-item {
    border-radius: 6px;
    margin: 2px 6px;
    padding: 0.5rem 0.75rem;
}

/* ── Modal ── */
.modal-content {
    border-radius: 14px;
    border: none;
}

/* ── Pagination (if used) ── */
.page-link {
    color: #6366f1;
}

.page-item.active .page-link {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* ── Scrollbar (subtle) ── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.4);
}
