:root {
    --ink: #10233f;
    --muted: #6d7b8f;
    --line: #dce5ef;
    --bg: #f7faff;
    --panel: #ffffff;

    --blue: #1463ff;
    --blue2: #0a4dd8;
    --blue-soft: #eaf3ff;

    --green: #0abf7a;

    --shadow: 0 12px 34px rgba(25, 50, 80, .09);

    --radius: 16px;

    --sidebar-width: 245px;
}


/* ================================================================
   GLOBAL
   ================================================================ */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;

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

    color: var(--ink);
    background: var(--bg);

    font-size: 14px;

    min-height: 100vh;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* ================================================================
   APPLICATION SHELL
   ================================================================ */

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


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

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);

    height: 100vh;

    background: #ffffff;

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

    position: fixed;
    inset: 0 auto 0 0;

    display: flex;
    flex-direction: column;

    z-index: 100;

    overflow: hidden;
}


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

.sidebar-brand {
    width: 100%;
    height: 92px;
    min-height: 92px;

    display: flex;
    align-items: center;

    padding: 0 12px;

    overflow: hidden;
}

.sidebar-brand-link {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;

    text-decoration: none;

    overflow: hidden;
}

.sidebar-logo {
    display: block;

    width: 220px;
    max-width: 100%;

    height: auto;
    max-height: 68px;

    object-fit: contain;
    object-position: left center;

    flex: 0 0 auto;
}


/* ================================================================
   CREATE NEW
   ================================================================ */

.sidebar-create {
    padding: 7px 14px 8px;
}

.create-btn {
    width: 100%;
    height: 42px;

    display: flex;
    align-items: center;

    gap: 9px;

    color: var(--blue);

    text-decoration: none;

    font-weight: 800;

    padding: 0 11px;

    margin: 0;

    border-radius: 10px;

    transition:
        background .15s ease,
        color .15s ease;
}

.create-btn:hover {
    background: #f2f7ff;
}

.create-btn span {
    font-size: 22px;
    line-height: 1;
}

.create-icon {
    width: 18px;
    min-width: 18px;

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


/* ================================================================
   NAVIGATION
   ================================================================ */

.nav {
    flex: 1 1 auto;

    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 2px 10px 14px;

    scrollbar-width: thin;
}

.nav::-webkit-scrollbar {
    width: 5px;
}

.nav::-webkit-scrollbar-track {
    background: transparent;
}

.nav::-webkit-scrollbar-thumb {
    background: #d8e2ed;
    border-radius: 99px;
}


/* ================================================================
   NAV LABEL
   ================================================================ */

.nav-label {
    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: .12em;

    color: #91a0b2;

    font-weight: 800;

    padding: 17px 11px 7px;
}


/* ================================================================
   NAV ITEM
   ================================================================ */

.nav-item {
    height: 39px;
    border-radius: 10px;

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 0 11px;

    color: #10233f;
    text-decoration: none;

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

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

    margin: 2px 0;
}

.nav-item span {
    width: 18px;
    min-width: 18px;

    text-align: center;

    color: #7b8da3;

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

.nav-item.active {
    background: #e4f2ff;
    color: #10233f;
}

.nav-item.active span {
    color: #1463ff;
}

.nav-item.disabled {
    opacity: 1;
    cursor: default;
}

.nav-item.disabled span {
    color: #7b8da3;
}

.nav-item em {
    margin-left: auto;

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

    font-style: normal;
    font-size: 9px;
    font-weight: 600;

    color: #9aa8b8;
}

/* ================================================================
   DISABLED / COMING NEXT
   ================================================================ */

.nav-item.disabled {
    opacity: .62;

    cursor: default;
}

.nav-item.disabled:hover {
    background: transparent;
    color: #15355f;
}

.nav-item em {
    margin-left: auto;

    font-style: normal;

    font-size: 9px;

    color: #9ba9ba;

    white-space: nowrap;
}


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

.sidebar-footer {
    margin-top: auto;

    min-height: 51px;

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

    padding: 15px 18px 10px;

    color: var(--muted);

    font-size: 11px;

    background: #ffffff;

    display: flex;
    align-items: center;
}

.status-dot {
    display: inline-block;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    margin-right: 7px;

    flex: 0 0 auto;
}


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

.main {
    margin-left: var(--sidebar-width);

    width: calc(100% - var(--sidebar-width));

    min-width: 0;

    min-height: 100vh;
}


/* ================================================================
   TOP BAR
   ================================================================ */

.topbar {
    height: 68px;

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

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

    display: flex;
    align-items: center;

    padding: 0 30px;

    gap: 10px;

    position: sticky;
    top: 0;

    z-index: 90;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.topbar-spacer {
    flex: 1;
}


/* ================================================================
   TOPBAR BUTTONS
   ================================================================ */

.icon-btn {
    width: 38px;
    height: 38px;

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

    background: #ffffff;

    border-radius: 10px;

    color: #25466f;

    position: relative;

    cursor: pointer;

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

.icon-btn:hover {
    background: #f7faff;
}

.notification-dot {
    position: absolute;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #ff5a5f;

    top: 7px;
    right: 8px;
}


/* ================================================================
   TOPBAR DIVIDER
   ================================================================ */

.topbar-divider {
    width: 1px;
    height: 30px;

    background: var(--line);

    margin: 0 2px 0 4px;
}


/* ================================================================
   USER MENU
   ================================================================ */

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

    gap: 9px;

    margin-left: 6px;

    padding-left: 12px;

    border-left: 1px solid var(--line);
}

.avatar {
    width: 34px;
    height: 34px;

    border-radius: 10px;

    background: var(--blue-soft);

    color: var(--blue);

    display: grid;
    place-items: center;

    font-weight: 850;
}

.user-menu strong {
    display: block;

    font-size: 12px;
}

.user-menu small {
    display: block;

    color: var(--muted);

    font-size: 10px;

    margin-top: 2px;
}

.user-details {
    min-width: 0;
}


/* ================================================================
   LOGOUT
   ================================================================ */

.logout {
    font-size: 12px;

    color: var(--muted);

    text-decoration: none;

    margin-left: 12px;
}

.logout:hover {
    color: var(--ink);
}


/* ================================================================
   MOBILE TOGGLE
   ================================================================ */

.mobile-toggle {
    display: none;

    border: 0;

    background: transparent;

    font-size: 20px;

    color: var(--ink);

    cursor: pointer;

    padding: 5px;
}


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

.content {
    max-width: 1450px;

    margin: 0 auto;

    padding: 38px 42px 60px;
}


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

.page-heading {
    display: flex;

    justify-content: space-between;

    align-items: end;

    margin-bottom: 25px;
}

.eyebrow {
    margin: 0 0 7px;

    color: #7590ad;

    font-weight: 850;

    font-size: 10px;

    letter-spacing: .13em;
}

.page-heading h1 {
    font-family: Georgia, serif;

    font-weight: 500;

    font-size: 44px;

    letter-spacing: -1.5px;

    margin: 0 0 6px;
}

.page-heading p:not(.eyebrow) {
    color: var(--muted);

    margin: 0;
}


/* ================================================================
   BUTTONS
   ================================================================ */

.outline-btn,
.primary-btn {
    border: 1px solid var(--blue);

    color: var(--blue);

    background: #ffffff;

    border-radius: 10px;

    padding: 10px 15px;

    font-weight: 800;

    cursor: pointer;

    text-decoration: none;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 10px;
}

.outline-btn:hover {
    background: var(--blue-soft);
}


/* ================================================================
   SETUP BANNER
   ================================================================ */

.setup-banner {
    background: #ffffff;

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

    border-radius: 15px;

    padding: 17px 21px;

    box-shadow: var(--shadow);

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 22px;
}

.setup-banner strong {
    display: block;

    font-size: 14px;
}

.setup-banner span {
    display: block;

    color: var(--muted);

    font-size: 12px;

    margin-top: 4px;
}


/* ================================================================
   PROGRESS
   ================================================================ */

.progress-wrap {
    width: 290px;
}

.progress {
    height: 6px;

    border-radius: 99px;

    background: #e8eef5;

    overflow: hidden;
}

.progress span {
    display: block;

    width: 16%;

    height: 100%;

    background: var(--green);

    border-radius: 99px;
}

.progress-wrap small {
    display: block;

    text-align: right;

    color: var(--muted);

    font-size: 10px;

    margin-top: 5px;
}


/* ================================================================
   QUICK ACTIONS
   ================================================================ */

.quick-actions {
    display: grid;

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

    gap: 12px;

    margin-bottom: 35px;
}

.quick-actions button {
    border: 1px solid transparent;

    border-radius: 12px;

    min-height: 60px;

    background: #eaf7ff;

    color: #17395f;

    display: grid;

    grid-template-columns: 28px 1fr;

    grid-template-rows: 1fr 1fr;

    text-align: left;

    padding: 11px 15px;

    cursor: pointer;
}

.quick-actions button:hover {
    border-color: #d5e7f8;
}

.quick-actions button:nth-child(2) {
    background: #ecfff7;
}

.quick-actions button:nth-child(3) {
    background: #f3edff;
}

.quick-actions button:nth-child(4) {
    background: #fff2e8;
}

.quick-actions span {
    grid-row: 1 / 3;

    align-self: center;

    font-size: 18px;
}

.quick-actions strong {
    font-size: 12px;

    align-self: end;
}

.quick-actions small {
    font-size: 10px;

    color: #7890a8;

    align-self: start;
}


/* ================================================================
   SECTION HEAD
   ================================================================ */

.section-head,
.panel-heading {
    display: flex;

    align-items: center;

    justify-content: space-between;
}

.section-head {
    margin-bottom: 13px;
}

.section-head h2,
.panel h2 {
    margin: 0;

    font-size: 20px;

    letter-spacing: -.4px;
}


/* ================================================================
   DATE / BADGES
   ================================================================ */

.date-pill,
.badge {
    padding: 7px 10px;

    border-radius: 99px;

    background: #ffffff;

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

    font-size: 11px;

    color: var(--muted);
}


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

.stat-grid {
    display: grid;

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

    gap: 14px;

    margin-bottom: 18px;
}

.stat-card {
    background: #ffffff;

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

    border-radius: 15px;

    padding: 19px 20px;

    box-shadow: 0 5px 20px rgba(25, 50, 80, .04);
}

.stat-card.accent {
    border-color: #bfe7ff;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f0f8ff
        );
}

.stat-label {
    font-size: 11px;

    color: var(--muted);

    font-weight: 750;

    display: block;
}

.stat-card strong {
    font-size: 26px;

    display: block;

    margin: 7px 0 4px;

    letter-spacing: -1px;
}

.stat-card small {
    color: #8a98a9;

    font-size: 10px;
}


/* ================================================================
   DASHBOARD GRID
   ================================================================ */

.dashboard-grid {
    display: grid;

    grid-template-columns: 1.45fr 1fr;

    gap: 18px;

    margin-bottom: 18px;
}


/* ================================================================
   PANELS
   ================================================================ */

.panel {
    background: #ffffff;

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

    border-radius: 15px;

    box-shadow: 0 5px 20px rgba(25, 50, 80, .04);

    min-width: 0;
}

.panel-heading {
    padding: 20px 20px 0;
}

.panel-heading select {
    border: 1px solid var(--line);

    border-radius: 9px;

    padding: 8px 10px;

    color: #52677e;

    background: #ffffff;
}


/* ================================================================
   EMPTY CHART
   ================================================================ */

.empty-chart {
    height: 285px;

    padding: 25px 22px;

    position: relative;
}

.chart-bars {
    height: 185px;

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

    display: flex;

    align-items: end;

    gap: 12px;

    padding: 0 8px;

    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 45px,
            #edf2f7 46px
        );
}

.chart-bars i {
    flex: 1;

    max-width: 32px;

    background: #dbe9f8;

    border-radius: 6px 6px 0 0;

    height: 8%;
}

.chart-bars i:nth-child(3),
.chart-bars i:nth-child(8) {
    height: 25%;
}

.chart-bars i:nth-child(5),
.chart-bars i:nth-child(10) {
    height: 38%;
}

.chart-axis {
    display: flex;

    justify-content: space-between;

    color: #94a2b2;

    font-size: 9px;

    padding: 8px;
}

.chart-message {
    position: absolute;

    left: 0;
    right: 0;

    top: 132px;

    text-align: center;

    color: #91a0af;

    font-size: 11px;
}


/* ================================================================
   EMPTY STATES
   ================================================================ */

.empty-state {
    padding: 48px 35px;

    text-align: center;

    color: var(--muted);

    min-height: 270px;

    display: flex;

    align-items: center;

    flex-direction: column;

    justify-content: center;
}

.empty-state strong {
    color: var(--ink);

    margin-top: 10px;
}

.empty-state p {
    max-width: 300px;

    line-height: 1.55;

    margin: 7px 0 14px;

    font-size: 12px;
}

.empty-icon {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    display: grid;

    place-items: center;

    background: #edf7f3;

    color: #09a96c;

    font-weight: 900;
}

.text-btn {
    border: 0;

    background: transparent;

    color: var(--blue);

    font-weight: 800;

    cursor: pointer;
}


/* ================================================================
   LOWER PANELS
   ================================================================ */

.lower .panel {
    min-height: 300px;
}

.empty-state.compact {
    min-height: 220px;
}


/* ================================================================
   SETUP LIST
   ================================================================ */

.setup-list {
    list-style: none;

    margin: 15px 20px;

    padding: 0;
}

.setup-list li {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 14px 0;

    border-top: 1px solid #edf1f5;
}

.setup-list li:first-child {
    border-top: 0;
}

.setup-list li > span {
    font-size: 10px;

    font-weight: 900;

    color: #8ca0b6;
}

.setup-list li div {
    flex: 1;
}

.setup-list strong,
.setup-list small {
    display: block;
}

.setup-list strong {
    font-size: 12px;
}

.setup-list small {
    color: var(--muted);

    font-size: 10px;

    margin-top: 3px;
}

.setup-list b {
    color: var(--blue);
}


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

.login-page {
    min-height: 100vh;

    display: grid;

    place-items: center;

    background: #f4f8fd;

    overflow: hidden;

    position: relative;
}

.login-orb {
    position: absolute;

    border-radius: 50%;

    filter: blur(3px);

    opacity: .55;
}

.orb-one {
    width: 520px;
    height: 520px;

    background: #dbeeff;

    top: -230px;
    right: -180px;
}

.orb-two {
    width: 420px;
    height: 420px;

    background: #e5ddff;

    bottom: -230px;
    left: -180px;
}


/* ================================================================
   LOGIN CARD
   ================================================================ */

.login-card {
    position: relative;

    width: min(430px, calc(100% - 32px));

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

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

    border-radius: 20px;

    padding: 34px;

    box-shadow:
        0 30px 80px rgba(30, 58, 95, .14);
}

.login-brand {
    display: flex;

    align-items: center;

    gap: 11px;

    margin-bottom: 42px;
}

.login-heading h1 {
    font-family: Georgia, serif;

    font-size: 38px;

    font-weight: 500;

    margin: 0 0 7px;

    letter-spacing: -1px;
}

.login-heading p:not(.eyebrow) {
    color: var(--muted);

    margin: 0 0 24px;
}

.login-card form {
    display: grid;

    gap: 16px;
}

.login-card label {
    font-size: 11px;

    font-weight: 800;

    color: #405872;
}

.login-card input {
    display: block;

    width: 100%;

    margin-top: 7px;

    border: 1px solid #d6e1ec;

    border-radius: 10px;

    padding: 12px 13px;

    outline: none;

    background: #fbfdff;
}

.login-card input:focus {
    border-color: #72aaff;

    box-shadow:
        0 0 0 3px #eaf2ff;
}


/* ================================================================
   PRIMARY BUTTON
   ================================================================ */

.primary-btn {
    background: var(--blue);

    color: #ffffff;

    border-color: var(--blue);

    padding: 12px 15px;
}

.primary-btn:hover {
    background: var(--blue2);
}

.full {
    width: 100%;
}


/* ================================================================
   LOGIN NOTE
   ================================================================ */

.login-note {
    text-align: center;

    color: #94a1b0;

    font-size: 10px;

    margin: 20px 0 0;
}


/* ================================================================
   ALERTS
   ================================================================ */

.alert {
    padding: 11px 12px;

    border-radius: 10px;

    font-size: 11px;

    margin-bottom: 15px;
}

.alert.error {
    background: #fff0f0;

    color: #a73535;

    border: 1px solid #ffd2d2;
}

.alert.success {
    background: #effbf5;

    color: #08764e;

    border: 1px solid #c7f0de;
}

.field-help {
    display: block;

    color: #8c9aaa;

    font-size: 10px;

    margin-top: 5px;
}


/* ================================================================
   SETUP
   ================================================================ */

.setup-card {
    width: min(470px, calc(100% - 32px));
}


/* ================================================================
   TABLET
   ================================================================ */

@media (max-width: 1050px) {

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

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .content {
        padding-left: 30px;
        padding-right: 30px;
    }

}


/* ================================================================
   MOBILE
   ================================================================ */

@media (max-width: 760px) {

    .sidebar {
        width: 260px;

        min-width: 260px;

        transform: translateX(-100%);

        transition:
            transform .2s ease;
    }

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

    .main {
        margin-left: 0;

        width: 100%;
    }

    .mobile-toggle {
        display: block;
    }

    .content {
        padding: 28px 18px;
    }

    .topbar {
        height: 62px;

        padding: 0 15px;
    }

    .logout {
        display: none;
    }

    .page-heading {
        align-items: flex-start;

        gap: 15px;
    }

    .page-heading h1 {
        font-size: 34px;
    }

    .setup-banner {
        display: block;
    }

    .progress-wrap {
        width: 100%;

        margin-top: 14px;
    }

    .quick-actions,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .user-menu {
        margin-left: 0;
    }

    .user-menu > div:last-child {
        display: none;
    }

    .topbar-divider {
        display: none;
    }

}


/* ================================================================
   SMALL MOBILE
   ================================================================ */

@media (max-width: 480px) {

    .content {
        padding: 22px 14px 40px;
    }

    .page-heading {
        flex-direction: column;
    }

    .page-heading h1 {
        font-size: 31px;
    }

    .setup-banner {
        padding: 15px;
    }

    .panel-heading {
        padding-left: 16px;
        padding-right: 16px;
    }

    .stat-card {
        padding: 17px;
    }

}