:root {
    --sidebar-width: 280px;
    --ink: #172033;
    --muted: #6b7280;
    --brand: #2454d6;
    --surface: #f5f7fb;
    --line: #e5e7eb;
}

body {
    background: var(--surface);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #eef4ff, #f8fafc);
}

.auth-card {
    width: min(440px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgb(15 23 42 / 10%);
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background: #111827;
    color: #d1d5db;
    min-height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar .brand {
    color: #fff;
    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1.2;
}

.sidebar .nav-link {
    color: #cbd5e1;
    border-radius: 8px;
    padding: .7rem .85rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgb(255 255 255 / 10%);
    color: #fff;
}

.main-panel {
    flex: 1;
    min-width: 0;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.metric-card,
.content-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metric-card .label {
    color: var(--muted);
    font-size: .85rem;
}

.metric-card .value {
    font-size: 1.8rem;
    font-weight: 800;
}

.table thead th {
    color: #475569;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.badge-soft {
    background: #eef4ff;
    color: var(--brand);
}

.rack-grid {
    display: grid;
    gap: .45rem;
}

.rack-slot {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: .75rem;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .65rem .75rem;
    background: #fff;
}

.rack-slot.occupied {
    border-color: #93c5fd;
    background: #eff6ff;
}

.rack-slot.free {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.u-label {
    font-weight: 800;
    color: #334155;
}

.form-label {
    font-weight: 600;
}

@media (max-width: 991px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        position: static;
    }

    .sidebar .nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .35rem;
    }
}
