* {
    box-sizing: border-box
}

:root {
    --bg: #08110e;
    --panel: #101b17;
    --panel2: #15231e;
    --line: #25352f;
    --text: #edf4f0;
    --muted: #8da19a;
    --accent: #d8a63a;
    --green: #4fc48a;
    --red: #ef6d6d;
    --blue: #65a8d8;
    --shadow: 0 14px 40px rgba(0, 0, 0, .24)
}

body {
    margin: 0;
    background: #f3f6f4;
    color: #18231f;
    font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif
}

.app {
    min-height: 100vh;
    display: flex
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    background: var(--bg);
    color: var(--text);
    padding: 24px 14px;
    display: flex;
    flex-direction: column;
    z-index: 5
}

.brand {
    font-size: 22px;
    color: #fff;
    text-decoration: none;
    padding: 0 12px 26px;
    letter-spacing: .5px
}

.brand span {
    font-weight: 400;
    color: #9eb0a8
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.sidebar nav a {
    color: #9fb0aa;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 10px;
    display: flex;
    gap: 11px;
    align-items: center
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #17251f;
    color: #fff
}

.sidebar nav a.active {
    box-shadow: inset 3px 0 var(--accent)
}

.nav-label {
    font-size: 10px;
    color: #5e746b;
    letter-spacing: 1.5px;
    padding: 18px 12px 5px
}

.side-foot {
    margin-top: auto;
    color: #71847c;
    font-size: 11px;
    padding: 12px
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    margin-right: 7px
}

.main {
    margin-left: 240px;
    min-width: 0;
    flex: 1
}

.topbar {
    height: 90px;
    background: #fff;
    border-bottom: 1px solid #e2e9e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 32px;
    position: sticky;
    top: 0;
    z-index: 4
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #82918b
}

.topbar h1 {
    margin: 2px 0 0;
    font-size: 25px
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 14px
}

.quick,
.btn {
    border: 0;
    border-radius: 9px;
    padding: 10px 14px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 650;
    display: inline-block
}

.quick,
.btn.primary {
    background: #182d25;
    color: #fff
}

.btn.gold {
    background: var(--accent);
    color: #17150d
}

.btn.ghost {
    background: #eef3f0;
    color: #26352f
}

.btn.danger {
    background: #b63e3e;
    color: #fff
}

.user-chip {
    border-left: 1px solid #e3e8e5;
    padding-left: 14px;
    display: flex;
    flex-direction: column
}

.user-chip small {
    color: #899790;
    font-size: 9px;
    letter-spacing: 1px
}

.logout {
    color: #75827d;
    text-decoration: none
}

.content {
    padding: 28px 32px;
    max-width: 1600px;
    margin: auto
}

.footer {
    padding: 24px 32px;
    color: #8b9792;
    font-size: 11px
}

.grid {
    display: grid;
    gap: 16px
}

.kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr))
}

.two {
    grid-template-columns: repeat(2, minmax(0, 1fr))
}

.three {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.card {
    background: #fff;
    border: 1px solid #e1e9e5;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(20, 40, 30, .03)
}

.kpi .label {
    color: #718079;
    font-size: 12px
}

.kpi .value {
    font-size: 25px;
    font-weight: 750;
    margin: 6px 0
}

.kpi .hint {
    font-size: 11px;
    color: #8a9691
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 28px 0 12px
}

.section-head h2 {
    font-size: 16px;
    margin: 0
}

.muted {
    color: #7c8984
}

.small {
    font-size: 12px
}

.table-wrap {
    overflow: auto
}

.table {
    width: 100%;
    border-collapse: collapse
}

.table th,
.table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #edf1ef;
    white-space: nowrap
}

.table th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #85918d
}

.table td {
    font-size: 13px
}

.badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf2ef;
    color: #54635d;
    font-size: 10px;
    font-weight: 700
}

.badge.green {
    background: #e5f6ee;
    color: #23734f
}

.badge.red {
    background: #fde9e9;
    color: #a23838
}

.badge.gold {
    background: #fbf3dc;
    color: #86661d
}

.badge.blue {
    background: #e8f2fa;
    color: #3b6f93
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px
}

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.form-grid .full {
    grid-column: 1/-1
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #596761;
    font-size: 12px;
    font-weight: 650
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d9e2de;
    background: #fff;
    border-radius: 9px;
    padding: 10px 11px;
    font: inherit;
    color: #1c2823;
    outline: none
}

input:focus,
select:focus,
textarea:focus {
    border-color: #8aa99a;
    box-shadow: 0 0 0 3px #edf5f1
}

textarea {
    min-height: 90px;
    resize: vertical
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 16px
}

.alert {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 9px;
    background: #eef3f0;
    color: #42514b
}

.alert.success {
    background: #e4f6ec;
    color: #226c4b
}

.alert.danger {
    background: #fde7e7;
    color: #9d3636
}

.alert.warning {
    background: #fff4d9;
    color: #80631e
}

.search {
    max-width: 260px
}

.pill-row {
    display: flex;
    gap: 7px;
    flex-wrap: wrap
}

.statline {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid #edf1ef
}

.bar {
    height: 8px;
    background: #e8eeeb;
    border-radius: 99px;
    overflow: hidden
}

.bar i {
    display: block;
    height: 100%;
    background: var(--accent)
}

.login-bg,
.auth-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #07110e, #183129);
    display: grid;
    place-items: center
}

.auth-card {
    width: min(460px, calc(100% - 30px));
    background: #fff;
    border-radius: 18px;
    padding: 34px;
    box-shadow: var(--shadow)
}

.auth-card .brand {
    display: block;
    padding: 0;
    color: #182d25;
    margin-bottom: 20px
}

.auth-card .brand span {
    color: #7b8c85
}

.auth-card h1 {
    margin: 0 0 8px
}

.auth-card form {
    display: grid;
    gap: 15px;
    margin-top: 20px
}

.auth-card .btn {
    width: 100%
}

.login-note {
    font-size: 11px;
    color: #89948f;
    margin-top: 18px
}

.empty {
    text-align: center;
    padding: 35px;
    color: #87938e
}

.metric-up {
    color: #287a53
}

.metric-down {
    color: #b04747
}

.hero {
    background: linear-gradient(120deg, #102a20, #19382b);
    color: #fff;
    border: 0
}

.hero .muted {
    color: #a8beb4
}

.hero .value {
    font-size: 34px
}

.mini-chart {
    height: 130px;
    display: flex;
    align-items: end;
    gap: 5px
}

.mini-chart i {
    flex: 1;
    background: #d8a63a;
    opacity: .75;
    border-radius: 4px 4px 0 0;
    min-height: 4px
}

.print-only {
    display: none
}

@media(max-width:1000px) {
    .sidebar {
        width: 70px
    }

    .sidebar .brand span,
    .sidebar nav span,
    .nav-label,
    .side-foot {
        display: none
    }

    .main {
        margin-left: 70px
    }

    .kpis,
    .three {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(max-width:650px) {
    .topbar {
        padding: 15px;
        height: auto;
        gap: 10px
    }

    .topbar h1 {
        font-size: 20px
    }

    .top-actions .user-chip,
    .logout {
        display: none
    }

    .content {
        padding: 18px
    }

    .kpis,
    .two,
    .three,
    .form-grid,
    .form-grid.three {
        grid-template-columns: 1fr
    }

    .quick {
        padding: 8px
    }

    .table th,
    .table td {
        padding: 9px 7px
    }

    .sidebar {
        width: 58px
    }

    .main {
        margin-left: 58px
    }
}

@media print {

    .sidebar,
    .topbar,
    .footer,
    .actions,
    .no-print {
        display: none !important
    }

    .main {
        margin: 0
    }

    .content {
        padding: 0
    }

    .print-only {
        display: block
    }
}