:root {
    --sidebar-width: 240px;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #3b82f6;
    --sidebar-text: #cbd5e1;
    --sidebar-text-active: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f1f5f9;
    min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.25rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand .icon { font-size: 1.4rem; }

.sidebar-nav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    flex: 1;
}

.sidebar-nav .nav-label {
    padding: 0.75rem 1rem 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 600;
}

.sidebar-nav .nav-item a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.sidebar-nav .nav-item a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-item a.active {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
    border-left-color: var(--sidebar-active);
    font-weight: 500;
}

.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #334155;
    font-size: 0.8rem;
}

.sidebar-footer a {
    color: #94a3b8;
    text-decoration: none;
}

.sidebar-footer a:hover { color: #fff; }

/* ── WLB Selector in sidebar ──────────────────────── */
.wlb-selector {
    padding: 0.5rem 1rem;
}

.wlb-selector select {
    width: 100%;
    background: #334155;
    color: #fff;
    border: 1px solid #475569;
    border-radius: 0.375rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

.wlb-selector select:focus {
    border-color: var(--sidebar-active);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
}

/* ── Main Content ─────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem 2rem;
    min-height: 100vh;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* ── Cards ────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* ── Tables ───────────────────────────────────────── */
.table-wrap {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.table-wrap .table {
    margin: 0;
}

.table-wrap .table th {
    background: #f8fafc;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
    font-weight: 600;
    white-space: nowrap;
}

.table-wrap .table td {
    font-size: 0.875rem;
    vertical-align: middle;
}

/* ── Login Page ───────────────────────────────────── */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.login-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
}

.login-card .subtitle {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* ── Misc ─────────────────────────────────────────── */
.text-nominal { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.badge { font-weight: 500; }

@media (max-width: 768px) {
    .sidebar { width: 100%; height: auto; position: relative; }
    .main-content { margin-left: 0; padding: 1rem; }
}
