:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --sidebar-width: 260px;
    --sidebar-bg: #fff;
    --sidebar-color: #333;
    --sidebar-active-bg: #e9ecef;
    --sidebar-active-color: #0d6efd;
    --topbar-height: 60px;
}

body {
    background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid #dee2e6;
    z-index: 1040;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-color);
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-color);
    border-right: 3px solid var(--primary-color);
}

.nav-link i {
    width: 24px;
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    z-index: 1030;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.25rem;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1035;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

/* Utilities */
.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Sticky Mobile Save Action */
.sticky-bottom-action {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    z-index: 1020;
    margin: 0 -1.5rem -1.5rem -1.5rem; /* Negate card padding */
}

/* Badge specific */
.badge-soft-success { background-color: #d1e7dd; color: #0f5132; }
.badge-soft-warning { background-color: #fff3cd; color: #664d03; }
.badge-soft-danger  { background-color: #f8d7da; color: #842029; }
.badge-soft-info    { background-color: #cff4fc; color: #055160; }
