:root {
    --bg: #f5f7fb;
    --panel: rgba(255, 255, 255, 0.86);
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, #eef3f8 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

a {
    text-decoration: none;
}

.auth-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(440px, 100%);
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.auth-card h1 {
    margin-top: 18px;
    font-size: 2rem;
    font-weight: 750;
}

.brand-mark,
.brand-dot {
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: #111827;
}

.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-weight: 800;
}

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

.sidebar {
    position: sticky;
    top: 0;
    width: 280px;
    height: 100vh;
    padding: 24px;
    background: rgba(255, 255, 255, 0.72);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(22px);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0;
}

.brand-dot {
    width: 34px;
    height: 34px;
    border-radius: 12px;
}

.brand-dot::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7dd3fc;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
    margin-top: 34px;
}

.sidebar-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: #374151;
    font-weight: 650;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #111827;
    color: #fff;
}

.sidebar-footer {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--muted);
}

.sidebar-footer span {
    color: var(--text);
    font-weight: 700;
}

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

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 34px 8px;
}

.topbar h1 {
    margin: 0;
    font-size: clamp(1.8rem, 2vw, 2.7rem);
    font-weight: 780;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.user-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-weight: 650;
}

.content-shell {
    padding: 24px 34px 40px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 16px;
}

.kpi-card,
.panel {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.kpi-card {
    padding: 22px;
}

.kpi-card span,
.kpi-card small,
.panel-heading span,
.list-row small {
    color: var(--muted);
}

.kpi-card strong {
    display: block;
    margin: 8px 0 2px;
    font-size: 2.35rem;
    line-height: 1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 16px;
}

.panel {
    padding: 22px;
}

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

.panel-heading h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 780;
}

.list-stack {
    display: grid;
    gap: 10px;
}

.list-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.list-row:last-child {
    border-bottom: 0;
}

.status-pill {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eefdf5;
    color: #047857;
    font-size: 0.82rem;
    font-weight: 750;
}

.form-control,
.form-select,
.btn {
    border-radius: 13px;
}

.form-panel {
    max-width: 980px;
}

.qr-code {
    width: 220px;
    height: 220px;
    border-radius: 16px;
    border: 1px solid var(--line);
}

code {
    color: #334155;
}

@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

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

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

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

    .sidebar-footer {
        position: static;
        margin-top: 20px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px 20px 4px;
    }

    .content-shell {
        padding: 20px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
}
