:root {
    --bg-main: #f3f4f6;
    --bg-card: #ffffff;
    --primary: #2563eb;
    --primary-light: rgba(37, 99, 235, 0.1);
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --text-title: #0f172a;
    --text-body: #475569;
    --border: #e2e8f0;
    --sidebar-bg: #ffffff;
}

body.light-style {
    background-color: var(--bg-main) !important;
    color: var(--text-body);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ==============================
   SIDEBAR: COMPACT DENSITY
============================== */
.menu-vertical .menu-inner {
    padding: 0.25rem 0 !important;
}

.menu-vertical .menu-inner > .menu-item {
    margin: 0 !important;
}

/* Section header — tight spacing */
.menu-vertical .menu-header {
    padding: 0 !important;
    margin: 0.5rem 1rem 0.15rem !important;
    min-height: unset !important;
    line-height: 1.2 !important;
}

/* Menu link — compact height */
.menu-vertical .menu-link {
    min-height: unset !important;
    line-height: 1.4 !important;
}

/* ACTIVE MENU — must be clearly visible */
.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}
.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) .menu-icon,
.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) i {
    color: #fff !important;
    opacity: 1 !important;
}

/* Layout Container — match navbar-detached horizontal indent */
.content-wrapper {
    padding: 0 1.5rem 1.5rem !important;
    background: transparent;
}

/* Remove extra padding added by container-p-y / container-fluid */
.content-wrapper > .container-fluid,
.content-wrapper > .container-p-y,
.content-wrapper > .container-p-y.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Glassmorphism Navbar */
.layout-navbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: none !important;
    margin-bottom: 1rem;
}

/* Modern Sidebar Styling */
.layout-menu {
    background: var(--sidebar-bg) !important;
    border-right: 1px solid var(--border);
    box-shadow: 10px 0 30px rgba(0,0,0,0.02) !important;
}

.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    border-radius: 10px;
}

.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) i {
    color: #ffffff !important;
}

.menu-item .menu-link {
    border-radius: 10px;
    margin: 0.2rem 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item .menu-link:hover {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
}

/* High-End Card Design */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
}

.card-title {
    color: var(--text-title);
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* Dashboard Banner Enhancement */
.dashboard-welcome-banner {
    background: var(--primary-gradient) !important;
    border-radius: 20px !important;
    padding: 2.5rem !important;
    position: relative;
    overflow: hidden;
    color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3) !important;
}

.dashboard-welcome-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* Refined Table Styling */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: -8px;
}

.table tr {
    transition: all 0.2s;
}

.table td, .table th {
    border: none !important;
    padding: 1rem 1.5rem !important;
}

.table thead th {
    background: #f8fafc !important;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1rem;
    border-radius: 0;
}

.table tbody tr {
    background: #fff;
    border-radius: 12px;
}

.table tbody tr:hover {
    background: #f1f5f9 !important;
}

/* Premium Buttons */
.btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Input Fields */
.form-control {
    border-radius: 10px;
    border: 1.5px solid var(--border);
    padding: 0.65rem 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Auth Specific Refinement */
.auth-illustration {
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.1));
}

.auth-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-input-group .form-control {
    padding-left: 3.25rem !important;
    height: 50px;
    border-radius: 12px !important;
    border: 1.5px solid #f1f5f9 !important;
    background: #f8fafc !important;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
}

.auth-input-group .form-control:focus {
    background: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important;
}

.auth-input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 10;
    font-size: 1.15rem;
}

.btn-google {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    height: 50px;
    color: #475569 !important;
    font-weight: 600 !important;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider-text {
    padding: 0 1rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

#login-container {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Premium Global Touches --- */

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dashboard Breadcrumb Card Refinement */
.breadcrumb-item a {
    color: var(--primary);
    font-weight: 600;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #1d4ed8;
}

.breadcrumb-item.active {
    color: #94a3b8;
    font-weight: 500;
}

/* Content Container Refinement */
.container-p-y {
    padding-top: 1.5rem !important;
    padding-bottom: 2rem !important;
}

/* Table Hover Row Animation */
.table tbody tr {
    transition: all 0.2s ease-in-out;
}

.table tbody tr:hover {
    transform: scale(1.005);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}