* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--bg, #f4f7fb);
    color: #182230;
    font-size: 14px;
    line-height: 1.5;
}

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

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

button {
    cursor: pointer;
}

/* =====================================================
   APPLICATION LAYOUT
===================================================== */

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

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

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

    width: 250px;
    height: 100vh;

    background: #0f172a;
    color: #dbe5f2;

    padding: 22px 14px;

    display: flex;
    flex-direction: column;

    z-index: 1000;
    overflow: hidden;
}

/* BRAND */

.brand {
    display: flex;
    align-items: center;
    gap: 10px;

    color: #fff;

    margin: 5px 6px 25px;
    padding: 4px 6px 18px;

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

    font-weight: 900;
    letter-spacing: 1px;
}

.brand strong {
    display: block;
    color: #fff;
    font-size: 15px;
    line-height: 1.2;
}

.brand span {
    display: block;
    margin-top: 5px;

    color: #67a8ff;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.brand.dark {
    color: #10213c;
    text-align: center;
}

.brand.dark span {
    color: #1565c0;
}

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

aside nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

aside nav a,
.logout {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 38px;

    padding: 9px 12px;

    border-radius: 9px;

    color: #b9c6d9;

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

    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}

aside nav a:hover,
.logout:hover {
    background: #1b2940;
    color: #fff;
}

aside nav a.active,
aside nav a[aria-current="page"] {
    background: #1565c0;
    color: #fff;
    box-shadow: 0 5px 15px rgba(21,101,192,.25);
}

.logout {
    margin-top: auto;
    color: #fecaca;
}

.logout:hover {
    background: #3b1720;
    color: #fff;
}

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

/*
   IMPORTANT:
   Sidebar is fixed at 250px.
   Main must NOT have another 250px margin.
*/

.app main {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0;
    flex: 1;
    background: var(--bg, #f4f7fb);
}

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

.app main > header {
    width: 100%;
    height: 70px;

    background: #fff;

    border-bottom: 1px solid #e6ebf1;

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

    padding: 0 30px;

    position: sticky;
    top: 0;

    z-index: 100;
}

.app main > header b {
    display: block;

    color: #172033;

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

.app main > header small {
    display: block;

    color: #7a8798;

    margin-top: 3px;

    font-size: 12px;
}

.top {
    color: #637083;
    font-size: 13px;
    font-weight: 700;
}

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

.content {
    width: 100%;
    max-width: none;

    margin: 0;

    padding: 28px 30px 45px;
}

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

.pagehead {
    display: flex;

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

    gap: 20px;

    margin-bottom: 22px;
}

.pagehead h1 {
    margin: 0;

    font-size: 28px;
    line-height: 1.2;
}

.pagehead p {
    margin: 6px 0;

    color: #738096;
}

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

.btn {
    display: inline-flex;

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

    border: 0;

    background: var(--primary, #1565c0);
    color: #fff;

    padding: 11px 17px;

    border-radius: 9px;

    font-weight: 700;

    cursor: pointer;

    transition: .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(.94);
}

.btn.big {
    padding: 14px 22px;
}

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

.cards {
    display: grid;

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

    gap: 16px;

    margin-bottom: 18px;
}

.card,
.panel {
    background: #fff;

    border: 1px solid #e6ebf1;

    border-radius: 13px;

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

.card {
    padding: 20px;
}

.card small {
    display: block;

    color: #7b8798;

    font-weight: 800;

    font-size: 11px;

    text-transform: uppercase;
}

.card strong {
    display: block;

    font-size: 27px;

    margin: 9px 0;
}

.card span {
    font-size: 12px;

    color: #8490a0;
}

.up {
    color: #159447 !important;
}

/* =====================================================
   TWO COLUMN DASHBOARD
===================================================== */

.twocol {
    display: grid;

    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(300px, 1fr);

    gap: 18px;

    margin-bottom: 18px;
}

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

.panel {
    padding: 20px;

    margin-bottom: 18px;
}

.panelhead {
    display: flex;

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

    gap: 15px;

    margin-bottom: 18px;
}

.panel h2 {
    margin: 0;

    font-size: 17px;
}

.panelhead a {
    color: var(--primary, #1565c0);

    font-size: 13px;

    font-weight: 700;
}

/* =====================================================
   REVENUE CHART
===================================================== */

.bars {
    height: 190px;

    display: flex;

    align-items: flex-end;

    gap: 10px;

    border-bottom:
        1px solid #e8edf4;

    padding: 0 10px;
}

.bars i {
    display: block;

    flex: 1;

    background:
        linear-gradient(
            var(--primary, #1565c0),
            #83b8ff
        );

    border-radius:
        5px 5px 0 0;
}

.axis {
    font-size: 11px;

    color: #8792a2;

    padding-top: 10px;
}

/* =====================================================
   SUMMARY
===================================================== */

.summary {
    display: grid;

    gap: 15px;
}

.summary span {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    padding: 13px;

    background: #f7f9fc;

    border-radius: 9px;

    color: #647184;
}

.summary b {
    color: #1c2a3b;
}

/* =====================================================
   TABLES
===================================================== */

.table-wrap {
    width: 100%;

    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;

    font-size: 13px;
}

th,
td {
    text-align: left;

    padding: 14px 10px;

    border-bottom:
        1px solid #edf0f4;
}

th {
    color: #718096;

    font-size: 11px;

    text-transform: uppercase;

    font-weight: 800;
}

td {
    color: #3c4858;
}

.status {
    display: inline-block;

    background: #eaf8ef;

    color: #138744;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 11px;

    font-weight: 800;
}

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

.formpanel {
    padding: 16px;
}

.inlineform,
.formgrid {
    display: grid;

    gap: 10px;
}

.inlineform {
    grid-template-columns:
        1.5fr 1fr 1.5fr auto;
}

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

input,
select,
textarea {
    width: 100%;

    border:
        1px solid #dce3ec;

    border-radius: 8px;

    padding: 11px;

    background: #fff;

    outline: none;

    color: #182230;
}

textarea {
    min-height: 110px;

    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color:
        var(--primary,#1565c0);

    box-shadow:
        0 0 0 3px
        rgba(21,101,192,.08);
}

/* SETTINGS */

.settingsform {
    display: grid;

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

    gap: 18px;
}

.settingsform label {
    display: grid;

    gap: 7px;

    font-size: 12px;

    font-weight: 800;

    color: #59677a;
}

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

.alert {
    padding: 12px 15px;

    background: #fff7df;

    border:
        1px solid #f0df9a;

    border-radius: 9px;

    margin-bottom: 18px;

    color: #6b5a20;
}

.alert.ok {
    background: #eaf8ef;

    border-color: #bfe5ca;

    color: #146d36;
}

.alert.error {
    background: #fff0f0;

    border-color: #efc0c0;

    color: #a32d2d;
}

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

.landing {
    min-height: 100vh;

    background:
        linear-gradient(
            135deg,
            #f7fbff,
            #eef5ff
        );
}

.publicnav {
    height: 75px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    max-width: 1180px;

    margin: auto;

    padding: 0 22px;
}

.publicnav > b {
    font-size: 18px;

    color: #12315c;
}

.publicnav span {
    display: flex;

    align-items: center;

    gap: 18px;
}

.hero {
    max-width: 1180px;

    margin: 40px auto 90px;

    padding: 50px 22px;

    display: grid;

    grid-template-columns:
        minmax(0,1.1fr)
        minmax(340px,.9fr);

    gap: 70px;

    align-items: center;
}

.hero h1 {
    font-size: 58px;

    line-height: 1.02;

    margin: 15px 0;
}

.hero em {
    font-style: normal;

    color: #1565c0;
}

.hero p {
    font-size: 18px;

    line-height: 1.7;

    color: #66758b;

    max-width: 620px;
}

.pill {
    display: inline-block;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 1px;

    color: #1565c0;

    background: #e4f0ff;

    padding: 8px 11px;

    border-radius: 20px;
}

.hero-card {
    background: #fff;

    border:
        1px solid #e0e8f3;

    border-radius: 18px;

    padding: 25px;

    box-shadow:
        0 20px 60px
        rgba(35,83,140,.12);
}

.mini {
    font-size: 11px;

    font-weight: 900;

    color: #8a96a8;
}

.bigstat {
    font-size: 34px;

    font-weight: 900;

    margin: 10px 0 20px;
}

.chart {
    height: 160px;

    background:
        linear-gradient(
            180deg,
            rgba(21,101,192,.15),
            transparent
        );

    clip-path:
        polygon(
            0 70%,
            10% 60%,
            20% 75%,
            30% 40%,
            40% 55%,
            50% 30%,
            60% 45%,
            70% 18%,
            80% 35%,
            90% 10%,
            100% 25%,
            100% 100%,
            0 100%
        );
}

.minirow {
    display: flex;

    justify-content: space-between;

    color: #6d7a8d;

    font-size: 12px;

    margin-top: 15px;
}

.features {
    background: #fff;

    padding: 80px 22px;
}

.features h2 {
    text-align: center;

    font-size: 32px;
}

.grid {
    max-width: 1180px;

    margin: 35px auto;

    display: grid;

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

    gap: 18px;
}

.feature {
    border:
        1px solid #e8edf4;

    border-radius: 14px;

    padding: 22px;
}

.feature > b {
    font-size: 25px;
}

.feature h3 {
    margin: 12px 0 5px;
}

.feature p {
    color: #768398;

    line-height: 1.5;

    font-size: 13px;
}

footer {
    text-align: center;

    padding: 30px;

    color: #758196;

    font-size: 13px;
}

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

.loginpage {
    min-height: 100vh;

    display: grid;

    place-items: center;

    background:
        linear-gradient(
            135deg,
            #eaf3ff,
            #f8fbff
        );
}

.loginbox {
    width: min(420px,92vw);

    background: #fff;

    padding: 40px;

    border-radius: 18px;

    box-shadow:
        0 20px 60px
        rgba(25,60,100,.12);
}

.loginbox h2 {
    margin-bottom: 5px;
}

.loginbox p {
    color: #718096;
}

.loginbox form {
    display: grid;

    gap: 9px;

    margin: 25px 0;
}

.loginbox label {
    font-size: 12px;

    font-weight: 800;

    color: #536175;
}

.loginbox small {
    color: #7a8798;

    line-height: 1.5;
}

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

@media (max-width:1100px) {

    aside {
        width: 220px;
    }

    .app main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .cards {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }

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

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

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

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

    .hero {
        grid-template-columns: 1fr;

        gap: 35px;
    }

    .hero-card {
        max-width: 600px;

        width: 100%;

        margin: auto;
    }
}

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

@media (max-width:680px) {

    aside {
        position: relative;

        width: 100%;

        height: auto;

        min-height: auto;

        padding: 15px 12px;
    }

    .app {
        display: block;
    }

    .app main {
        margin-left: 0 !important;

        width: 100% !important;
    }

    aside nav {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

    .logout {
        margin-top: 10px;
    }

    .app main > header {
        height: 64px;

        padding: 0 15px;
    }

    .content {
        padding: 18px 15px 35px;
    }

    .pagehead {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }

    .pagehead h1 {
        font-size: 23px;
    }
    .grid,
    .formgrid,
    .inlineform,
    .settingsform {
        grid-template-columns: 1fr;
    }

    .hero {
        margin: 15px auto 50px;

        padding: 30px 18px;
    }

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

    .hero p {
        font-size: 16px;
    }

    .publicnav {
        padding: 0 15px;
    }

    .publicnav span {
        gap: 10px;
    }

    .loginbox {
        padding: 28px 22px;
    }
}