@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary_color: #6366f1;
    --secondary_color: #1e293b;
    --bg_color: #0b0f19;
    --card_bg: #151d30;
    --text_color: #f8fafc;
    --text_muted: #94a3b8;
    --glass_bg: rgba(21, 29, 48, 0.75);
    --glass_border: rgba(99, 102, 241, 0.2);
    --accent_gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --success_gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger_gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --warning_gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --hover_glow: 0 0 25px rgba(99, 102, 241, 0.35);
}

/* Base Resets & Global Typography */
body {
    background-color: var(--bg_color) !important;
    color: var(--text_color) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .fw-bold, .dashboard-sidebar-link-title span {
    font-family: 'Outfit', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0b0f19;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

/* Glassmorphism Premium Cards */
.premium-card, .box {
    background: var(--glass_bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass_border) !important;
    border-radius: 20px !important;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text_color) !important;
}

.premium-card:hover, .box:hover {
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.15);
}

/* Buttons */
.btn-premium, .btn-primary {
    background: var(--accent_gradient) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-premium:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover_glow);
    color: #ffffff !important;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: var(--text_color) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}
.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

/* Modals & Popups Styling */
.modal-backdrop {
    background-color: rgba(3, 7, 18, 0.85) !important;
    backdrop-filter: blur(10px) !important;
}

.modal-content, .glass-modal {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.2) !important;
    color: var(--text_color) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
    transition: all 0.2s ease;
}

.btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Form Controls & Inputs */
.form-control, .form-select, .input-group-text {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.25s ease;
}

.form-control::placeholder {
    color: #64748b !important;
}

.form-control:focus, .form-select:focus {
    background-color: rgba(30, 41, 59, 0.95) !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25) !important;
    color: #ffffff !important;
}

.form-label {
    color: #cbd5e1 !important;
    font-weight: 500;
}

/* Select2 Custom Dark Styling */
.select2-container--default .select2-selection--single {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
    padding-left: 14px !important;
}

.select2-dropdown {
    background-color: #1e293b !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    border-radius: 14px !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
}

.select2-results__option {
    color: #cbd5e1 !important;
    padding: 10px 16px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--accent_gradient) !important;
    color: #ffffff !important;
}

.select2-search__field {
    background-color: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}

/* User Dashboard Layout Modernization */
.dashboard {
    background-color: #0b0f19 !important;
    min-height: 100vh;
}

.dashboard-sidebar,
.dashboard-sidebar .dashboard-sidebar-header,
.dashboard-sidebar .dashboard-sidebar-inner,
.dashboard-sidebar .dashboard-sidebar-content,
.dashboard-sidebar .dashboard-sidebar-body,
.dashboard-sidebar .dashboard-sidebar-footer {
    background: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.dashboard-sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(20px);
}

.dashboard-sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1.25rem 1.5rem !important;
}

.dashboard-sidebar-header img {
    max-height: 42px;
    filter: brightness(0) invert(1);
}

.dashboard-sidebar-links-title {
    color: #64748b !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-sidebar-link-title {
    color: #94a3b8 !important;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.25s ease;
    font-weight: 500;
}

.dashboard-sidebar-link-title i {
    font-size: 1.1rem;
    color: #64748b;
    transition: all 0.25s ease;
}

.dashboard-sidebar-link:hover .dashboard-sidebar-link-title {
    color: #ffffff !important;
    background: rgba(99, 102, 241, 0.15) !important;
}

.dashboard-sidebar-link:hover .dashboard-sidebar-link-title i {
    color: #818cf8;
}

.dashboard-sidebar-link.current .dashboard-sidebar-link-title {
    background: var(--accent_gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.dashboard-sidebar-link.current .dashboard-sidebar-link-title i {
    color: #ffffff !important;
}

/* Dashboard Nav Top Bar */
.dashboard-nav {
    background: #0f172a !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1rem 2rem !important;
}

.dashboard-welcome-message {
    color: #ffffff !important;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    background: var(--accent_gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-toggle-btn {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 12px;
}

/* User Dashboard Footer */
.dashboard-footer {
    background: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1.25rem 2rem !important;
    color: #94a3b8 !important;
}

.dashboard-footer p, .dashboard-footer a {
    color: #94a3b8 !important;
}

.dashboard-footer a:hover {
    color: #818cf8 !important;
}

.user-menu .drop-down-menu {
    background: #0f172a !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    backdrop-filter: blur(20px);
    border-radius: 16px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6) !important;
    padding: 1rem !important;
}

.user-title {
    color: #ffffff !important;
}

.drop-down-item {
    color: #cbd5e1 !important;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.drop-down-item:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #ffffff !important;
}

/* Counter Widgets */
.counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.counter-amount {
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin-bottom: 0.2rem !important;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.counter-title {
    color: var(--text_muted) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    margin-bottom: 0 !important;
}

.counter-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #6366f1;
}

/* Tables */
.table {
    color: var(--text_color) !important;
    --bs-table-bg: transparent !important;
    --bs-table-hover-bg: rgba(99, 102, 241, 0.08) !important;
}

.table thead th {
    background: rgba(30, 41, 59, 0.6) !important;
    color: #94a3b8 !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1rem !important;
}

.table tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 1rem !important;
    color: #e2e8f0 !important;
    vertical-align: middle;
}

/* Badges */
.badge {
    padding: 0.45em 0.8em;
    font-weight: 600;
    border-radius: 30px;
}
.bg-success-lt, .badge-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.bg-danger-lt, .badge-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.bg-warning-lt, .badge-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.bg-primary-lt, .badge-primary {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #818cf8 !important;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Navbar Scrolled */
.navbar {
    padding: 1.25rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.8rem 0;
}

/* Admin Panel Form Elements Override (Dark Mode Support) */
.form-group {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}
.form-group .form-control, 
.form-group .form-select,
.form-group .input-group,
.form-group .input-group-text,
.input-group .form-control,
.input-group .form-select {
    background-color: transparent !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: none !important;
}
.form-group .form-control:focus, 
.form-group .form-select:focus {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.form-group select option {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

/* Bootstrap Tagsinput and Select2 Multiple Dark Overrides */
.bootstrap-tagsinput {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 0.75rem 1rem !important;
    width: 100% !important;
    display: block !important;
}
.bootstrap-tagsinput input {
    color: #ffffff !important;
    background-color: transparent !important;
}
.bootstrap-tagsinput .tag {
    background: var(--accent_gradient) !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    border: none !important;
}
.select2-container--default .select2-selection--multiple {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    min-height: 48px !important;
    padding: 4px 8px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    padding: 0 !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--accent_gradient) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 3px 10px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #ffffff !important;
    border-right: none !important;
    margin-right: 6px !important;
    font-weight: bold !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #f87171 !important;
    background: transparent !important;
}
.select2-container--default .select2-selection--multiple .select2-search__field {
    background-color: transparent !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 4px !important;
    height: 32px !important;
}

