:root {
    --sidebar-width: 240px;
    --navbar-height: 56px;
    --primary: #1a3a5c;
    --primary-light: #2563a8;
    --accent: #f59e0b;
    --sidebar-bg: #1a2942;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #2563a8;
}

body {
    background: #f1f5f9;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ── Navbar ── */
.spu-navbar {
    background: var(--primary);
    height: var(--navbar-height);
    z-index: 1050;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* ── Sidebar ── */
.spu-sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: var(--sidebar-bg);
    padding: 1rem 0;
    overflow-y: auto;
    transition: width .25s ease, transform .25s ease;
    z-index: 1040;
}

.spu-sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

.sidebar-header {
    color: var(--accent);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .25rem 1.25rem .75rem;
}

.spu-sidebar .nav-link {
    color: var(--sidebar-text);
    padding: .6rem 1.25rem;
    border-radius: 0;
    font-size: .875rem;
    transition: background .15s, color .15s, padding-left .15s;
}

.spu-sidebar .nav-link:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
    padding-left: 1.6rem;
}

.spu-sidebar .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    border-left: 3px solid var(--accent);
}

.nav-section-label {
    display: block;
    color: #64748b;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .25rem 1.25rem;
}

/* ── Main Wrapper ── */
.spu-main-wrapper {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
    transition: margin-left .25s ease;
}

.spu-main-wrapper.expanded {
    margin-left: 0;
}

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

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

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

/* ── Page Header ── */
.page-header {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h4 {
    margin: 0;
    color: var(--primary);
    font-weight: 700;
}

/* ── Table ── */
.spu-table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    overflow: hidden;
}

.spu-table-card .table {
    margin-bottom: 0;
}

.spu-table-card .table thead th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: none;
    padding: .85rem 1rem;
}

.spu-table-card .table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
}

.spu-table-card .table tbody tr:hover {
    background: #f8fafc;
}

.spu-table-card .table tbody td {
    padding: .75rem 1rem;
    vertical-align: middle;
    font-size: .875rem;
}

/* ── Form Card ── */
.form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    padding: 2rem;
}

.form-label {
    font-size: .8rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .3rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border-color: #d1d5db;
    font-size: .875rem;
    padding: .55rem .85rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37,99,168,.15);
}

/* ── Alerts ── */
.alert {
    border-radius: 10px;
    border: none;
}

/* ── Login Page ── */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a3a5c 0%, #2563a8 60%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    background: var(--primary);
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin: 0 auto 1.25rem;
}

/* ── Badges ── */
.badge-active   { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }

/* ── Pagination ── */
.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    border-color: #e2e8f0;
    color: var(--primary);
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ── Search Bar ── */
.search-bar {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .spu-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .spu-sidebar:not(.collapsed) {
        transform: translateX(0);
    }
    .spu-main-wrapper {
        margin-left: 0;
    }
}

