:root {
    --background: #f6f7f9;
    --surface: #ffffff;
    --surface-soft: #f9fafb;

    --sidebar: #111827;
    --sidebar-soft: #1f2937;

    --text: #101828;
    --muted: #667085;

    --border: #e4e7ec;

    --primary: #ef7d00;
    --primary-dark: #d96f00;
    --primary-soft: #fff4e8;

    --success: #12b76a;
    --success-soft: #ecfdf3;

    --shadow:
        0 1px 2px rgba(16, 24, 40, .03),
        0 4px 12px rgba(16, 24, 40, .04);

    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--background);
    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 15px;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   APP
========================================================= */

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


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    width: 250px;
    min-width: 250px;
    min-height: 100vh;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    display: flex;
    flex-direction: column;

    background: var(--sidebar);
    color: white;

    z-index: 50;
}

.sidebar-brand {
    height: 78px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 0 22px;

    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-mark {
    width: 39px;
    height: 39px;

    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary);

    font-size: 20px;
    font-weight: 800;
}

.sidebar-brand strong {
    display: block;
    font-size: 16px;
}

.sidebar-brand span {
    display: block;

    margin-top: 2px;

    color: #9ca3af;

    font-size: 12px;
}

.sidebar-nav {
    padding: 18px 12px;

    display: flex;
    flex-direction: column;

    gap: 4px;

    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;

    gap: 11px;

    min-height: 44px;

    padding: 0 13px;

    border-radius: 9px;

    color: #cbd5e1;

    font-size: 14px;
    font-weight: 500;

    transition: .15s ease;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,.06);
    color: white;
}

.sidebar-nav a.active {
    background: var(--primary);
    color: white;
}

.nav-icon {
    width: 21px;

    display: inline-flex;
    justify-content: center;

    font-size: 17px;
}

.nav-label {
    margin: 19px 13px 7px;

    color: #6b7280;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-bottom {
    padding: 15px;

    border-top: 1px solid rgba(255,255,255,.08);
}

.api-indicator {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 12px;

    background: rgba(255,255,255,.05);

    border-radius: 10px;
}

.api-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #22c55e;

    box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

.api-indicator small {
    display: block;

    color: #9ca3af;

    font-size: 11px;
}

.api-indicator strong {
    display: block;

    margin-top: 2px;

    font-size: 13px;
}


/* =========================================================
   MAIN
========================================================= */

.app-main {
    width: calc(100% - 250px);

    margin-left: 250px;

    min-height: 100vh;
}


/* =========================================================
   HEADER
========================================================= */

.top-header {
    height: 78px;

    position: sticky;
    top: 0;

    z-index: 40;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 30px;

    background: rgba(255,255,255,.96);

    border-bottom: 1px solid var(--border);
}

.top-header h3 {
    margin: 0 0 3px;

    font-size: 17px;
}

.header-subtitle {
    color: var(--muted);

    font-size: 12px;
}

.header-user {
    display: flex;
    align-items: center;

    gap: 12px;
}

.user-info {
    text-align: right;
}

.user-info strong {
    display: block;

    font-size: 13px;
}

.user-info span {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: 11px;
}

.user-avatar {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary-soft);
    color: var(--primary);

    font-weight: 800;
}

.logout-button {
    height: 36px;

    padding: 0 13px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: white;
    color: #344054;

    cursor: pointer;

    font: inherit;
    font-size: 12px;
    font-weight: 600;
}

.logout-button:hover {
    background: #f9fafb;
}


/* =========================================================
   PAGE
========================================================= */

.page-content {
    max-width: 1500px;

    margin: 0 auto;

    padding: 36px;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 8px;

    color: var(--primary);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: .1em;
}

.hero h1 {
    margin: 0;

    color: var(--text);

    font-size: 36px;
    line-height: 1.15;

    letter-spacing: -.025em;
}

.hero p:not(.eyebrow) {
    margin: 10px 0 0;

    color: var(--muted);

    font-size: 15px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 43px;

    padding: 0 17px;

    border-radius: 9px;

    background: var(--primary);
    color: white;

    font-size: 13px;
    font-weight: 700;

    white-space: nowrap;

    transition: .15s;
}

.button:hover {
    background: var(--primary-dark);
}


/* =========================================================
   CARDS
========================================================= */

.cards {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 30px;
}

.cards article {
    position: relative;

    min-height: 130px;

    padding: 20px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

.cards article::before {
    content: "";

    position: absolute;

    left: 0;
    top: 20px;

    width: 3px;
    height: 32px;

    border-radius: 0 4px 4px 0;

    background: var(--primary);
}

.cards span {
    display: block;

    color: var(--muted);

    font-size: 12px;
    font-weight: 600;
}

.cards strong {
    display: block;

    margin: 10px 0 5px;

    font-size: 25px;
    line-height: 1;
}

.cards small {
    color: #98a2b3;

    font-size: 11px;
}


/* =========================================================
   PANEL
========================================================= */

.panel {
    overflow: hidden;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 20px;

    border-bottom: 1px solid var(--border);
}

.panel-head h2 {
    margin: 0;

    font-size: 17px;
}

.panel-head input {
    width: 260px;
    height: 39px;

    padding: 0 12px;

    border: 1px solid #d0d5dd;
    border-radius: 8px;

    outline: none;

    font: inherit;
    font-size: 13px;
}

.panel-head input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(239,125,0,.10);
}


/* =========================================================
   TABLE
========================================================= */

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding: 15px 20px;

    border-bottom: 1px solid var(--border);

    text-align: left;
}

th {
    background: var(--surface-soft);

    color: #667085;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .03em;
    text-transform: uppercase;
}

td {
    color: #344054;

    font-size: 13px;
}

tbody tr:hover {
    background: #fcfcfd;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.status {
    display: inline-flex;

    padding: 5px 9px;

    border-radius: 999px;

    background: var(--success-soft);
    color: #027a48;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   FORMS
========================================================= */

input,
select,
textarea {
    font-family: inherit;
}

.notice {
    margin-bottom: 20px;

    padding: 13px 16px;

    border: 1px solid #abefc6;
    border-radius: 9px;

    background: #ecfdf3;
    color: #067647;

    font-size: 13px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1050px) {

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

}


@media (max-width: 800px) {

    .sidebar {
        width: 74px;
        min-width: 74px;
    }

    .sidebar-brand {
        justify-content: center;

        padding: 0;
    }

    .sidebar-brand > div:not(.brand-mark),
    .sidebar-nav a:not(.active) {
    }

    .sidebar-brand strong,
    .sidebar-brand span,
    .sidebar-nav a {
        font-size: 0;
    }

    .sidebar-nav a {
        justify-content: center;
    }

    .nav-icon {
        font-size: 18px;
    }

    .nav-label {
        display: none;
    }

    .sidebar-bottom {
        display: none;
    }

    .app-main {
        width: calc(100% - 74px);

        margin-left: 74px;
    }

    .page-content {
        padding: 24px;
    }

    .user-info {
        display: none;
    }

}


@media (max-width: 600px) {

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

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

    .hero h1 {
        font-size: 29px;
    }

    .panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .panel-head input {
        width: 100%;
    }

}
