:root {
    /* Modern Palette */
    --primary-color: #2563eb; /* Blue 600 */
    --primary-hover: #1d4ed8; /* Blue 700 */
    --secondary-color: #475569; /* Slate 600 */
    --success-color: #10b981; /* Emerald 500 */
    --danger-color: #ef4444; /* Red 500 */
    --warning-color: #f59e0b; /* Amber 500 */
    --info-color: #3b82f6; /* Blue 500 */
    
    /* Backgrounds */
    --bg-body: #f8fafc; /* Slate 50 */
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b; /* Slate 800 */
    
    /* Text */
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --text-light: #f1f5f9; /* Slate 100 */
    
    /* Spacing & Borders */
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--bg-body);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    padding-top: 70px; /* Fix content behind fixed navbar */
}

/* Navbar Modernization */
.navbar {
    box-shadow: var(--box-shadow);
    background-color: var(--bg-sidebar) !important;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Sidebar Layout (if used) */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: var(--bg-sidebar);
    color: var(--text-light);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #cbd5e1; /* Slate 300 */
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin: 0.25rem 0.5rem;
    transition: var(--transition);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link .feather {
    margin-right: 4px;
    color: #94a3b8; /* Slate 400 */
}

.sidebar .nav-link.active .feather {
    color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background-color: var(--bg-card);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Tables */
.table {
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom-width: 1px;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 1px solid #cbd5e1;
    padding: 0.625rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Dashboard Stats Cards */
.stats-card .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Toast Notifications */
.toast {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: var(--transition);
}

.loader-overlay.show {
    visibility: visible;
    opacity: 1;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
        padding-top: 0;
    }
    
    .main-content {
        margin-left: 0 !important; 
    }
}