:root {
    --sidebar-w: 240px;
    --sidebar-bg: #0f1f3d;
    --sidebar-text: #a8b5cc;
    --accent: #e63946;
    --primary: #1a3a5c;
}

/* ── Reset ── */
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f0f2f5; }

/* ── Sidebar ── */
.sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-w); height: 100vh;
    background: var(--sidebar-bg);
    overflow-y: auto; z-index: 200;
    display: flex; flex-direction: column;
}
.sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; gap:.6rem;
}
.sidebar-brand img { max-height: 36px;}
.sidebar-brand span { color: #fff; font-size: 1rem; font-weight: 700; }

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

.nav-section {
    font-size: .65rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: rgba(168,181,204,.4);
    padding: 1rem 1.2rem .3rem;
}
.sidebar .nav-link {
    color: var(--sidebar-text); padding: .55rem 1.2rem;
    font-size: .875rem; display: flex; align-items: center; gap: .7rem;
    border-left: 3px solid transparent; border-radius: 0;
    transition: all .15s;
}
.sidebar .nav-link i { font-size: .95rem; width: 18px; text-align: center; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-link.active { background: rgba(255,255,255,.1); color: #fff; border-left-color: var(--accent); }

.sidebar-footer {
    padding: .875rem 1.2rem;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: .8rem; color: var(--sidebar-text);
}
.sidebar-footer a { color: var(--sidebar-text); text-decoration: none; }
.sidebar-footer a:hover { color: #fff; }

/* ── Main layout ── */
.main-content { margin-left: var(--sidebar-w); min-height: 100vh; }

.topbar {
    background: #fff; padding: .75rem 1.5rem;
    border-bottom: 1px solid #e2e6ea;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}
.topbar .page-title { font-size: 1rem; font-weight: 700; color: var(--primary); margin: 0; }

.content-area { padding: 1.5rem; }

/* ── Stat cards ── */
.stat-card {
    background: #fff; border-radius: 12px; padding: 1.25rem;
    border: 1px solid #e8ecf0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.stat-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; margin: .4rem 0 .2rem; }
.stat-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #888; }

/* ── Table card ── */
.table-card {
    background: #fff; border-radius: 12px; border: 1px solid #e8ecf0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06); overflow: hidden;
}
.table-card-header {
    padding: .875rem 1.25rem; border-bottom: 1px solid #f0f2f5;
    display: flex; align-items: center; justify-content: space-between;
}
.table-card-header h6 { margin: 0; font-size: .9rem; font-weight: 700; }

.table thead th {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: #777;
    background: #fafbfc; border-bottom: 2px solid #f0f2f5;
    padding: .625rem 1rem;
}
.table td { padding: .625rem 1rem; vertical-align: middle; font-size: .875rem; }
.table-hover tbody tr:hover { background: #f7f9ff; }

/* ── Badges ── */
.badge { font-size: .7rem; font-weight: 600; padding: .3em .65em; }

/* ── Status dot ── */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: .35rem; }
.dot-green { background: #28a745; }
.dot-red   { background: #dc3545; }
.dot-yellow{ background: #ffc107; }

/* ── Login ── */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #1a3a5c 100%);
    display: flex; align-items: center; justify-content: center;
}
.login-card {
    background: #fff; border-radius: 16px; padding: 2.5rem;
    width: 100%; max-width: 400px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo img { max-height: 52px; }

/* ── Form card ── */
.form-card {
    background: #fff; border-radius: 12px; padding: 1.5rem;
    border: 1px solid #e8ecf0; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.form-label { font-size: .83rem; font-weight: 600; color: #444; }

/* ── Misc ── */
.btn-sm { font-size: .78rem; }
.text-clp { color: #155724; font-weight: 600; }

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