:root {

    --violet-950: #2e1065;
    --violet-900: #4c1d95;
    --violet-800: #5b21b6;
    --violet-700: #6d28d9;
    --violet-600: #7c3aed;
    --violet-500: #8b5cf6;
    --violet-100: #ede9fe;
    --violet-50: #f7f3ff;

    --nav: #171124;
    --nav-soft: #21182f;
    --nav-hover: #2b203d;

    --bg: #f7f6fa;
    --card: #ffffff;

    --text: #1d1825;
    --muted: #746d7c;

    --border: #e8e3ed;

    --danger: #b42318;
    --success: #067647;

    --sidebar-width: 270px;

    --shadow:
        0 12px 36px
        rgba(45,27,70,.07);

}


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

html {
    overflow-x: hidden;
}

body {

    min-width: 320px;

    background:
        var(--bg);

    color:
        var(--text);

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

    -webkit-font-smoothing:
        antialiased;

}

body.menu-open {
    overflow: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}


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

.admin-layout {

    min-height: 100vh;

}


.main {

    min-height: 100vh;

    margin-left:
        var(--sidebar-width);

}


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

.sidebar {

    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width:
        var(--sidebar-width);

    display: flex;

    flex-direction: column;

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

    padding:
        16px 14px;

    background:
        linear-gradient(
            180deg,
            #171124,
            #120d1b
        );

    color: white;

    z-index: 1200;

    scrollbar-width: thin;

}


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

.sidebar-header {

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    min-height: 58px;

    padding:
        4px 8px
        14px;

}


.side-brand {

    display: inline-flex;

    align-items: center;

    gap: 10px;

}


.side-brand img {

    width: auto;

    height: 46px;

    max-width: 170px;

    object-fit: contain;

}


.side-brand .mark {

    width: 42px;

    height: 42px;

    display: grid;

    place-items: center;

    border-radius:
        13px;

    background:
        linear-gradient(
            135deg,
            var(--violet-700),
            var(--violet-500)
        );

    font-size: 20px;

    font-weight: 900;

}


.brand-name {

    font-size: 20px;

    font-weight: 900;

}


.sidebar-close {

    display: none;

    width: 38px;
    height: 38px;

    border: 0;

    border-radius:
        10px;

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

    color: white;

    cursor: pointer;

    font-size: 25px;

}


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

.sidebar-user {

    display: flex;

    align-items: center;

    gap: 11px;

    margin:
        2px 5px
        18px;

    padding:
        13px;

    border:
        1px solid
        rgba(255,255,255,.07);

    border-radius:
        15px;

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

}


.sidebar-avatar {

    width: 38px;

    height: 38px;

    flex: 0 0 auto;

    display: grid;

    place-items: center;

    border-radius:
        50%;

    background:
        linear-gradient(
            135deg,
            var(--violet-700),
            var(--violet-500)
        );

    font-size: 14px;

    font-weight: 900;

}


.sidebar-user-info {

    min-width: 0;

}


.sidebar-user-info strong {

    display: block;

    overflow: hidden;

    color: white;

    font-size: 12px;

    white-space: nowrap;

    text-overflow:
        ellipsis;

}


.sidebar-user-info span {

    display: block;

    margin-top: 2px;

    color:
        #9f95aa;

    font-size: 10px;

}


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

.sidebar-nav {

    flex: 1;

}


.nav-item,
.nav-group-toggle {

    width: 100%;

    display: flex;

    align-items: center;

    gap: 11px;

    min-height: 45px;

    padding:
        10px 12px;

    border: 0;

    border-radius:
        11px;

    background: transparent;

    color:
        #c9c0d2;

    cursor: pointer;

    font-size: 13px;

    font-weight: 600;

    text-align: left;

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

}


.nav-item:hover,
.nav-group-toggle:hover {

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

    color: white;

}


.nav-item.active {

    background:
        linear-gradient(
            135deg,
            rgba(109,40,217,.32),
            rgba(139,92,246,.18)
        );

    color: white;

    box-shadow:
        inset 3px 0 0
        var(--violet-500);

}


.nav-icon {

    width: 20px;

    height: 20px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 auto;

}


.nav-icon svg {

    width: 18px;

    height: 18px;

    stroke-width: 1.8;

}


.nav-label {

    min-width: 0;

}


/* =========================================================
   NAV GROUPS
========================================================= */

.nav-group {

    margin-top: 4px;

}


.nav-group-toggle {

    justify-content:
        space-between;

}


.nav-group-left {

    display: flex;

    align-items: center;

    gap: 11px;

}


.nav-chevron {

    color:
        #81758d;

    font-size: 20px;

    transform:
        rotate(0deg);

    transition:
        transform .22s ease;

}


.nav-group.open
.nav-chevron {

    transform:
        rotate(90deg);

}


.nav-submenu {

    max-height: 0;

    overflow: hidden;

    opacity: 0;

    margin-left: 30px;

    padding-left: 13px;

    border-left:
        1px solid
        rgba(255,255,255,.07);

    transition:
        max-height .3s ease,
        opacity .2s ease,
        margin .2s ease;

}


.nav-group.open
.nav-submenu {

    max-height: 450px;

    opacity: 1;

    margin-top: 3px;

    margin-bottom: 7px;

}


.nav-submenu a {

    display: block;

    padding:
        9px 10px;

    margin: 2px 0;

    border-radius:
        9px;

    color:
        #978da3;

    font-size: 12px;

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

}


.nav-submenu a:hover {

    color: white;

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

}


.nav-submenu a.active {

    color:
        #d8c9ff;

    background:
        rgba(109,40,217,.14);

    font-weight: 700;

}


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

.sidebar-footer {

    margin-top: 15px;

    padding-top: 14px;

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

}


.logout-button {

    display: flex;

    align-items: center;

    gap: 10px;

    padding:
        11px 12px;

    border-radius:
        11px;

    color:
        #f8b4b0;

    font-size: 12px;

    font-weight: 700;

    transition:
        .18s ease;

}


.logout-button:hover {

    background:
        rgba(180,35,24,.15);

    color: white;

}


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

.topbar {

    position: sticky;

    top: 0;

    z-index: 900;

    height: 74px;

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 20px;

    padding:
        0 28px;

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

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

    backdrop-filter:
        blur(15px);

    -webkit-backdrop-filter:
        blur(15px);

}


.topbar-left {

    display: flex;

    align-items: center;

    gap: 13px;

}


.topbar-title span {

    display: block;

    margin-bottom: 2px;

    color:
        var(--violet-700);

    font-size: 9px;

    font-weight: 900;

    text-transform:
        uppercase;

    letter-spacing:
        .10em;

}


.topbar-title strong {

    display: block;

    font-size: 17px;

}


.topbar-right {

    display: flex;

    align-items: center;

    gap: 10px;

}


.website-button {

    width: 40px;

    height: 40px;

    display: grid;

    place-items: center;

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

    border-radius:
        12px;

    background:
        white;

    color:
        var(--violet-700);

    transition:
        .18s ease;

}


.website-button:hover {

    background:
        var(--violet-50);

    border-color:
        #d7c8ef;

}


.website-button svg {

    width: 17px;

    height: 17px;

    stroke-width: 1.8;

}


.user-chip {

    display: flex;

    align-items: center;

    gap: 9px;

    padding:
        5px 8px
        5px 5px;

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

    border-radius:
        999px;

    background: white;

}


.avatar {

    width: 36px;

    height: 36px;

    display: grid;

    place-items: center;

    border-radius:
        50%;

    background:
        linear-gradient(
            135deg,
            var(--violet-700),
            var(--violet-500)
        );

    color: white;

    font-size: 12px;

    font-weight: 900;

}


.user-text {

    padding-right: 5px;

}


.user-text strong {

    display: block;

    max-width: 150px;

    overflow: hidden;

    text-overflow:
        ellipsis;

    white-space: nowrap;

    font-size: 11px;

}


.user-text small {

    display: block;

    margin-top: 1px;

    color:
        var(--muted);

    font-size: 9px;

}


/* =========================================================
   HAMBURGER
========================================================= */

.hamburger {

    display: none;

    width: 42px;

    height: 42px;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 5px;

    padding: 0;

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

    border-radius:
        11px;

    background: white;

    cursor: pointer;

}


.hamburger span {

    width: 19px;

    height: 2px;

    border-radius:
        999px;

    background:
        var(--violet-700);

}


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

.content {

    padding: 28px;

}


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

.page-head {

    display: flex;

    align-items:
        flex-end;

    justify-content:
        space-between;

    gap: 20px;

    margin-bottom: 24px;

}


.page-head h1 {

    margin: 0;

    font-size:
        clamp(
            25px,
            4vw,
            34px
        );

    letter-spacing:
        -.8px;

}


.page-head p {

    margin:
        6px 0 0;

    color:
        var(--muted);

}


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

.grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(190px,1fr)
        );

    gap: 15px;

}


.card,
.panel {

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

    border-radius:
        17px;

    background:
        var(--card);

    box-shadow:
        0 5px 20px
        rgba(45,27,70,.04);

}


.card {

    padding: 19px;

}


.panel {

    padding: 22px;

}


.metric {

    margin-top: 5px;

    font-size: 27px;

    font-weight: 900;

}


.muted {

    color:
        var(--muted);

}


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

.form-grid {

    display: grid;

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

    gap: 16px;

}


.field {

    margin-bottom: 16px;

}


.field label {

    display: block;

    margin-bottom: 7px;

    color:
        #3c3545;

    font-size: 12px;

    font-weight: 800;

}


.field input,
.field select,
.field textarea {

    width: 100%;

    min-height: 47px;

    padding:
        11px 13px;

    border:
        1px solid
        #d9d2e2;

    border-radius:
        11px;

    outline: none;

    background: white;

    color:
        var(--text);

    font-size: 14px;

    transition:
        .18s ease;

}


.field textarea {

    min-height: 110px;

    resize: vertical;

}


.field input:focus,
.field select:focus,
.field textarea:focus {

    border-color:
        var(--violet-600);

    box-shadow:
        0 0 0 4px
        rgba(109,40,217,.08);

}


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

.btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    min-height: 43px;

    padding:
        9px 14px;

    border: 0;

    border-radius:
        10px;

    background:
        linear-gradient(
            135deg,
            var(--violet-700),
            var(--violet-600)
        );

    color: white;

    cursor: pointer;

    font-size: 12px;

    font-weight: 800;

    transition:
        transform .18s ease,
        box-shadow .18s ease;

}


.btn:hover {

    transform:
        translateY(-1px);

    box-shadow:
        0 9px 22px
        rgba(109,40,217,.18);

}


.btn.secondary {

    border:
        1px solid
        #d7ccef;

    background: white;

    color:
        var(--violet-700);

}


.btn.danger {

    background:
        var(--danger);

}


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

.table-responsive {

    width: 100%;

    overflow-x: auto;

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

    border-radius:
        14px;

    -webkit-overflow-scrolling:
        touch;

}


table {

    width: 100%;

    min-width: 700px;

    border-collapse:
        collapse;

    background: white;

}


th,
td {

    padding:
        12px 14px;

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

    text-align: left;

    font-size: 12px;

}


th {

    background:
        #faf9fc;

    color:
        #6d6577;

    font-size: 10px;

    font-weight: 800;

    text-transform:
        uppercase;

    letter-spacing:
        .04em;

}


/* =========================================================
   NOTICE
========================================================= */

.notice {

    margin-bottom: 18px;

    padding:
        13px 15px;

    border-radius:
        11px;

    background:
        #f5f1ff;

    color:
        #513c72;

    font-size: 12px;

}


.notice.success {

    background:
        #ecfdf3;

    color:
        #067647;

}


.notice.error {

    background:
        #fff1f0;

    color:
        #b42318;

}


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

.sidebar-overlay {

    position: fixed;

    inset: 0;

    z-index: 1100;

    visibility: hidden;

    opacity: 0;

    background:
        rgba(18,13,27,.58);

    backdrop-filter:
        blur(2px);

    transition:
        opacity .22s ease,
        visibility .22s ease;

}


.sidebar-overlay.show {

    visibility: visible;

    opacity: 1;

}


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

@media
(max-width: 1000px) {

    .sidebar {

        width:
            min(
                84vw,
                290px
            );

        transform:
            translateX(-105%);

        transition:
            transform .25s ease;

        box-shadow:
            12px 0 30px
            rgba(0,0,0,.25);

    }


    .sidebar.open {

        transform:
            translateX(0);

    }


    .sidebar-close {

        display:
            inline-grid;

        place-items:
            center;

    }


    .main {

        margin-left: 0;

    }


    .hamburger {

        display: flex;

    }


    .content {

        padding: 22px;

    }

}


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

@media
(max-width: 620px) {

    .topbar {

        height: 66px;

        padding:
            0 14px;

    }


    .topbar-title span {

        display: none;

    }


    .topbar-title strong {

        max-width: 150px;

        overflow: hidden;

        white-space: nowrap;

        text-overflow:
            ellipsis;

        font-size: 14px;

    }


    .website-button {

        display: none;

    }


    .user-text {

        display: none;

    }


    .user-chip {

        padding: 3px;

        border: 0;

        background: transparent;

    }


    .content {

        padding:
            18px 14px;

    }


    .page-head {

        align-items:
            flex-start;

        flex-direction:
            column;

    }


    .page-head
    .btn {

        width: 100%;

    }


    .form-grid {

        grid-template-columns:
            1fr;

    }


    .panel {

        padding: 17px;

        border-radius:
            14px;

    }


    .grid {

        grid-template-columns:
            1fr;

    }

}