/* ===== Variables ===== */
:root {
    --sidebar-width: 240px;
    --navbar-height: 56px;
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --sp-primary: #0d6efd;
    --sp-dark: #1e2a3a;
    --sidebar-bg: #1e2a3a;
    --sidebar-text: #cdd6e0;
    --sidebar-active-bg: #0d6efd;
    --sidebar-hover-bg: #2c3e52;
    --body-bg: #f4f6f9;
    --card-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ===== Layout ===== */
body {
    background-color: var(--body-bg);
    padding-top: var(--navbar-height);
}

.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: var(--sidebar-bg);
    overflow-y: auto;
    z-index: 1000;
    padding: 1rem 0;
    transition: transform .3s ease;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--navbar-height));
    padding: 0;
}

/* ===== Sidebar Nav ===== */
.sidebar-nav {
    margin: 0;
    padding: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .9rem;
    transition: background .2s, color .2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: var(--sidebar-hover-bg);
    color: #fff;
}

.sidebar-link.active {
    background: var(--sidebar-active-bg);
    color: #fff;
    border-left-color: rgba(255,255,255,.5);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-divider {
    border-top: 1px solid rgba(255,255,255,.1);
    margin: .5rem 1rem;
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: .75rem;
    box-shadow: var(--card-shadow);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: .75rem .75rem 0 0 !important;
    font-weight: 600;
}

/* ===== Stat Cards ===== */
.stat-card {
    border-radius: .75rem;
    padding: 1.5rem;
    color: #fff;
    box-shadow: var(--card-shadow);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: .8;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: .85rem;
    opacity: .85;
}

/* ===== Progress ===== */
.progress {
    border-radius: 1rem;
    height: .6rem;
}

/* ===== Tables ===== */
.table th {
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6c757d;
}

/* ===== Badges ===== */
.badge-status {
    font-size: .78rem;
    padding: .35em .7em;
    border-radius: .4rem;
}

/* ===== Forms ===== */
.form-label {
    font-weight: 500;
    font-size: .9rem;
    color: #495057;
}

/* ===== Page Header ===== */
.page-header,
.sp-page-header {
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header .breadcrumb,
.sp-page-header .breadcrumb {
    font-size: .83rem;
    margin-bottom: .25rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}
