:root {
    --ink: #18212f;
    --muted: #687386;
    --line: #dbe2ea;
    --panel: #ffffff;
    --sidebar: #202936;
    --sidebar-soft: #2b3646;
    --accent: #0f766e;
    --accent-soft: #e7f5f3;
    --bg: #f4f7fb;
}

* {
    box-sizing: border-box;
}

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

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

.sidebar {
    background: var(--sidebar);
    color: #fff;
    padding: 18px 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 22px;
    font-size: 1.1rem;
    font-weight: 700;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--accent);
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cfd8e3;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 600;
}

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

.main {
    min-width: 0;
}

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

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

.content {
    padding: 24px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.stat {
    min-height: 118px;
}

.stat-label {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
    text-transform: uppercase;
}

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

.user-pill {
    color: var(--muted);
    font-weight: 650;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.badge-soft {
    background: var(--accent-soft);
    color: var(--accent);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f4f7fb 0%, #d9ece9 100%);
}

.login-box {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 26px;
    box-shadow: 0 20px 45px rgba(24, 33, 47, .12);
}

.bill-total {
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 8px;
    padding: 16px;
    text-align: right;
}

.customer-results {
    position: absolute;
    z-index: 20;
    left: 12px;
    right: 12px;
    top: 100%;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 16px 35px rgba(24, 33, 47, .16);
}

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

    .sidebar {
        position: static;
    }

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

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

@media print {
    .sidebar,
    .topbar,
    .no-print {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .content {
        padding: 0;
    }

    .panel {
        border: 0;
    }
}
