:root {
    --sidebar: #172033;
    --sidebar-active: #2563eb;
    --body: #f4f6f9;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
}

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

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    background: var(--sidebar);
    color: #fff;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 32px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

.sidebar .nav-link {
    color: #cbd5e1;
    border-radius: 8px;
    padding: 11px 12px;
}

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

.main {
    min-width: 0;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.topbar h1 {
    font-size: 1.35rem;
    margin: 0;
    font-weight: 750;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.content {
    padding: 28px;
}

.metric,
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.metric {
    padding: 20px;
}

.metric span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-size: .9rem;
}

.metric strong {
    font-size: 1.45rem;
}

.metric.danger strong {
    color: #dc2626;
}

.panel {
    padding: 20px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-header h2 {
    font-size: 1rem;
    margin: 0;
    font-weight: 750;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc, #dbeafe);
}

.login-card {
    width: min(100%, 430px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 18px 60px rgba(15, 23, 42, .12);
}

@media (max-width: 991.98px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        z-index: 1030;
        inset: 0 auto 0 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .content {
        padding: 18px;
    }
}
