/* =========================================================
   NEXA DASHBOARD
   App-01 — Main Stylesheet
   File: templates/apps/app-01/css/style.css
========================================================= */


/* =========================================================
   01. ROOT VARIABLES
========================================================= */

:root {

    --bg-main: #080d14;
    --bg-secondary: #0d131c;
    --bg-tertiary: #111923;

    --surface: #101821;
    --surface-hover: #151f2b;
    --surface-soft: #0c141d;

    --border: rgba(255, 255, 255, 0.075);
    --border-strong: rgba(255, 255, 255, 0.13);

    --text-primary: #f4f7fb;
    --text-secondary: #98a4b5;
    --text-muted: #657286;

    --accent: #4f8cff;
    --accent-dark: #3975e8;
    --accent-soft: rgba(79, 140, 255, 0.12);
    --accent-glow: rgba(79, 140, 255, 0.28);

    --green: #34d399;
    --green-soft: rgba(52, 211, 153, 0.12);

    --orange: #f59e0b;
    --orange-soft: rgba(245, 158, 11, 0.12);

    --red: #f87171;
    --red-soft: rgba(248, 113, 113, 0.12);

    --purple: #a78bfa;
    --purple-soft: rgba(167, 139, 250, 0.12);

    --sidebar-width: 260px;
    --topbar-height: 76px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    --shadow-sm:
        0 5px 20px rgba(0, 0, 0, 0.16);

    --shadow-md:
        0 12px 35px rgba(0, 0, 0, 0.22);

    --shadow-lg:
        0 25px 65px rgba(0, 0, 0, 0.32);

    --transition:
        180ms ease;

    --transition-slow:
        300ms ease;

    --font:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


/* =========================================================
   LIGHT THEME
========================================================= */

body.light-mode {

    --bg-main: #f4f7fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef2f7;

    --surface: #ffffff;
    --surface-hover: #f7f9fc;
    --surface-soft: #f4f7fb;

    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);

    --text-primary: #172033;
    --text-secondary: #647084;
    --text-muted: #8b96a7;

    --accent: #3977eb;
    --accent-dark: #2e63ca;
    --accent-soft: rgba(57, 119, 235, 0.10);
    --accent-glow: rgba(57, 119, 235, 0.18);

    --shadow-sm:
        0 5px 20px rgba(30, 41, 59, 0.07);

    --shadow-md:
        0 12px 35px rgba(30, 41, 59, 0.09);

    --shadow-lg:
        0 25px 65px rgba(30, 41, 59, 0.13);
}


/* =========================================================
   02. RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 85% 5%,
            rgba(79, 140, 255, 0.055),
            transparent 30%
        ),
        var(--bg-main);

    color: var(--text-primary);

    font-family: var(--font);

    font-size: 14px;

    line-height: 1.5;

    overflow-x: hidden;

    transition:
        background var(--transition-slow),
        color var(--transition-slow);
}

body.nav-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

svg {
    display: block;
    width: 1em;
    height: 1em;
}

img {
    max-width: 100%;
    display: block;
}


/* =========================================================
   03. APPLICATION SHELL
========================================================= */

.app-shell {
    min-height: 100vh;
    width: 100%;
}


/* =========================================================
   04. SIDEBAR
========================================================= */

.sidebar {

    position: fixed;

    inset:
        0 auto 0 0;

    z-index: 100;

    width: var(--sidebar-width);

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            rgba(16, 24, 33, 0.98),
            rgba(8, 13, 20, 0.99)
        );

    border-right:
        1px solid var(--border);

    box-shadow:
        12px 0 40px rgba(0, 0, 0, 0.08);

    transition:
        transform var(--transition-slow),
        background var(--transition-slow);
}

body.light-mode .sidebar {

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #f7f9fc
        );
}


/* =========================================================
   SIDEBAR BRAND
========================================================= */

.sidebar-brand {

    min-height: var(--topbar-height);

    padding:
        0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid var(--border);
}

.brand {

    display: inline-flex;
    align-items: center;

    gap: 11px;

    min-width: 0;
}

.brand-mark {

    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            #7b61ff
        );

    color: #ffffff;

    font-size: 17px;
    font-weight: 800;

    box-shadow:
        0 8px 25px var(--accent-glow);
}

.brand-content {

    min-width: 0;

    display: flex;
    flex-direction: column;
}

.brand-content strong {

    color: var(--text-primary);

    font-size: 16px;

    line-height: 1.1;

    letter-spacing: -0.02em;
}

.brand-content small {

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: 0.12em;
}

.sidebar-close {

    display: none;

    width: 34px;
    height: 34px;

    border-radius: 8px;

    background: transparent;

    color: var(--text-secondary);

    font-size: 22px;

    transition:
        background var(--transition),
        color var(--transition);
}

.sidebar-close:hover {

    background: var(--surface-hover);

    color: var(--text-primary);
}


/* =========================================================
   SIDEBAR NAVIGATION
========================================================= */

.sidebar-nav {

    flex: 1;

    padding:
        22px 13px;

    overflow-y: auto;

    scrollbar-width: thin;

    scrollbar-color:
        var(--border-strong)
        transparent;
}

.nav-group + .nav-group {
    margin-top: 27px;
}

.nav-label {

    padding:
        0 11px;

    margin-bottom: 8px;

    color: var(--text-muted);

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.13em;

    text-transform: uppercase;
}

.nav-link {

    min-height: 44px;

    padding:
        0 12px;

    display: flex;
    align-items: center;

    gap: 11px;

    position: relative;

    border-radius: 10px;

    color: var(--text-secondary);

    font-size: 13px;

    font-weight: 500;

    transition:
        background var(--transition),
        color var(--transition),
        transform var(--transition);
}

.nav-link + .nav-link {
    margin-top: 3px;
}

.nav-link:hover {

    background:
        var(--surface-hover);

    color:
        var(--text-primary);

    transform:
        translateX(2px);
}

.nav-link.active {

    background:
        var(--accent-soft);

    color:
        var(--accent);
}

.nav-link.active::before {

    content: "";

    position: absolute;

    left: -13px;

    top: 9px;
    bottom: 9px;

    width: 3px;

    border-radius:
        0 4px 4px 0;

    background:
        var(--accent);

    box-shadow:
        0 0 15px var(--accent-glow);
}

.nav-icon {

    width: 19px;
    height: 19px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;
}

.nav-icon svg {

    width: 18px;
    height: 18px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;

    stroke-linejoin: round;
}

.nav-badge {

    min-width: 21px;
    height: 21px;

    margin-left: auto;

    padding:
        0 6px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background:
        var(--surface-hover);

    color:
        var(--text-secondary);

    font-size: 10px;
    font-weight: 700;
}

.nav-badge.accent {

    background:
        var(--accent-soft);

    color:
        var(--accent);
}


/* =========================================================
   SIDEBAR BOTTOM
========================================================= */

.sidebar-bottom {
    padding: 13px;
}


/* Upgrade card */

.upgrade-card {

    padding: 15px;

    display: flex;

    gap: 11px;

    border:
        1px solid
        rgba(79, 140, 255, 0.16);

    border-radius:
        var(--radius-md);

    background:
        linear-gradient(
            135deg,
            rgba(79, 140, 255, 0.11),
            rgba(123, 97, 255, 0.06)
        );
}

.upgrade-icon {

    width: 31px;
    height: 31px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 9px;

    background:
        var(--accent-soft);

    color:
        var(--accent);

    font-size: 15px;
}

.upgrade-content {
    min-width: 0;
}

.upgrade-content strong {

    display: block;

    color:
        var(--text-primary);

    font-size: 12px;
}

.upgrade-content p {

    margin-top: 3px;

    color:
        var(--text-muted);

    font-size: 10px;

    line-height: 1.4;
}

.upgrade-content a {

    display: inline-block;

    margin-top: 7px;

    color:
        var(--accent);

    font-size: 10px;

    font-weight: 700;
}

.upgrade-content a:hover {
    text-decoration: underline;
}


/* Sidebar user */

.sidebar-user {

    margin-top: 12px;

    padding:
        12px 8px 3px;

    display: flex;
    align-items: center;

    gap: 9px;

    border-top:
        1px solid var(--border);
}

.user-avatar,
.profile-avatar {

    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #5d8fff,
            #8866ff
        );

    color:
        #ffffff;

    font-size: 10px;
    font-weight: 800;
}

.user-info {

    min-width: 0;

    display: flex;
    flex-direction: column;
}

.user-info strong {

    color:
        var(--text-primary);

    font-size: 11px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.user-info span {

    color:
        var(--text-muted);

    font-size: 9px;

    margin-top: 2px;
}

.user-menu {

    width: 30px;
    height: 30px;

    margin-left: auto;

    display: grid;
    place-content: center;

    gap: 3px;

    border-radius: 7px;

    background: transparent;
}

.user-menu span {

    width: 3px;
    height: 3px;

    border-radius: 50%;

    background:
        var(--text-muted);
}


/* =========================================================
   SIDEBAR OVERLAY
========================================================= */

.sidebar-overlay {

    position: fixed;

    inset: 0;

    z-index: 90;

    background:
        rgba(0, 0, 0, 0.58);

    opacity: 0;

    visibility: hidden;

    transition:
        opacity var(--transition-slow),
        visibility var(--transition-slow);
}

.sidebar-overlay.active {

    opacity: 1;

    visibility: visible;
}


/* =========================================================
   05. MAIN WRAPPER
========================================================= */

.main-wrapper {

    min-height: 100vh;

    margin-left:
        var(--sidebar-width);

    transition:
        margin-left var(--transition-slow);
}


/* =========================================================
   06. TOPBAR
========================================================= */

.topbar {

    position: sticky;

    top: 0;

    z-index: 70;

    height:
        var(--topbar-height);

    padding:
        0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background:
        color-mix(
            in srgb,
            var(--bg-main) 88%,
            transparent
        );

    border-bottom:
        1px solid var(--border);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);
}

.topbar-left {

    min-width: 0;

    display: flex;
    align-items: center;

    gap: 17px;
}

.menu-toggle {

    display: none;

    width: 38px;
    height: 38px;

    place-content: center;

    gap: 4px;

    border-radius: 9px;

    background:
        var(--surface);

    border:
        1px solid var(--border);

    color:
        var(--text-secondary);
}

.menu-toggle span {

    width: 16px;
    height: 2px;

    display: block;

    border-radius: 3px;

    background:
        currentColor;
}

.breadcrumb {

    display: flex;
    align-items: center;

    gap: 9px;

    color:
        var(--text-muted);

    font-size: 12px;
}

.breadcrumb strong {

    color:
        var(--text-primary);

    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--text-muted);
}


/* =========================================================
   TOPBAR ACTIONS
========================================================= */

.topbar-actions {

    display: flex;
    align-items: center;

    gap: 7px;
}

.topbar-button {

    width: 38px;
    height: 38px;

    position: relative;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: transparent;

    color:
        var(--text-secondary);

    transition:
        background var(--transition),
        color var(--transition),
        transform var(--transition);
}

.topbar-button:hover {

    background:
        var(--surface-hover);

    color:
        var(--text-primary);

    transform:
        translateY(-1px);
}

.topbar-button svg {

    width: 18px;
    height: 18px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;

    stroke-linejoin: round;
}

.notification-dot {

    position: absolute;

    top: 8px;
    right: 8px;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background:
        var(--accent);

    border:
        1px solid var(--bg-main);

    box-shadow:
        0 0 8px var(--accent-glow);
}


/* Theme */

.moon-icon {
    display: none;
}

body.light-mode .sun-icon {
    display: none;
}

body.light-mode .moon-icon {
    display: block;
}


/* Profile */

.topbar-profile {

    min-height: 42px;

    margin-left: 5px;

    padding:
        3px 5px 3px 3px;

    display: flex;
    align-items: center;

    gap: 8px;

    border-radius: 11px;

    background: transparent;

    color:
        var(--text-primary);

    transition:
        background var(--transition);
}

.topbar-profile:hover {
    background: var(--surface-hover);
}

.profile-avatar {
    width: 34px;
    height: 34px;
}

.profile-text {

    display: flex;
    flex-direction: column;

    align-items: flex-start;
}

.profile-text strong {

    font-size: 11px;

    line-height: 1.1;
}

.profile-text small {

    margin-top: 3px;

    color:
        var(--text-muted);

    font-size: 9px;
}

.topbar-profile > svg {

    width: 14px;
    height: 14px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.8;

    stroke-linecap: round;

    stroke-linejoin: round;

    color:
        var(--text-muted);
}


/* =========================================================
   07. DASHBOARD CONTENT
========================================================= */

.dashboard-content {

    width: 100%;

    max-width: 1800px;

    margin:
        0 auto;

    padding:
        31px 30px 28px;
}


/* =========================================================
   PAGE HEADING
========================================================= */

.page-heading {

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 25px;

    margin-bottom: 27px;
}

.eyebrow,
.panel-label {

    margin-bottom: 6px;

    color:
        var(--accent);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 0.14em;

    text-transform: uppercase;
}

.page-heading h1 {

    color:
        var(--text-primary);

    font-size:
        clamp(25px, 3vw, 34px);

    line-height: 1.1;

    letter-spacing:
        -0.04em;
}

.page-description {

    margin-top: 8px;

    color:
        var(--text-secondary);

    font-size: 12px;
}

.heading-actions {

    display: flex;
    align-items: center;

    gap: 9px;

    flex: 0 0 auto;
}


/* =========================================================
   BUTTONS
========================================================= */

.button {

    min-height: 39px;

    padding:
        0 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    border-radius: 9px;

    font-size: 11px;

    font-weight: 650;

    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.button svg {

    width: 15px;
    height: 15px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;

    stroke-linejoin: round;
}

.button:hover {
    transform: translateY(-1px);
}

.secondary-button {

    background:
        var(--surface);

    border:
        1px solid var(--border);

    color:
        var(--text-secondary);
}

.secondary-button:hover {

    border-color:
        var(--border-strong);

    color:
        var(--text-primary);
}

.primary-button {

    background:
        linear-gradient(
            135deg,
            var(--accent),
            #6a63ff
        );

    color:
        #ffffff;

    box-shadow:
        0 8px 22px
        rgba(79, 140, 255, 0.19);
}

.primary-button:hover {

    box-shadow:
        0 10px 28px
        rgba(79, 140, 255, 0.28);
}


/* =========================================================
   08. STATISTICS GRID
========================================================= */

.stats-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;

    margin-bottom: 16px;
}

.stat-card {

    position: relative;

    min-width: 0;

    padding:
        18px;

    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-lg);

    background:
        var(--surface);

    box-shadow:
        var(--shadow-sm);

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition);
}

.stat-card:hover {

    transform:
        translateY(-3px);

    border-color:
        var(--border-strong);

    background:
        var(--surface-hover);
}

.stat-top {

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {

    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    font-size: 13px;

    font-weight: 800;
}

.stat-icon.revenue {

    color:
        var(--green);

    background:
        var(--green-soft);
}

.stat-icon.orders {

    color:
        var(--accent);

    background:
        var(--accent-soft);
}

.stat-icon.customers {

    color:
        var(--purple);

    background:
        var(--purple-soft);
}

.stat-icon.conversion {

    color:
        var(--orange);

    background:
        var(--orange-soft);
}

.stat-trend {

    padding:
        4px 7px;

    border-radius:
        999px;

    font-size: 9px;

    font-weight: 700;
}

.stat-trend.positive {

    color:
        var(--green);

    background:
        var(--green-soft);
}

.stat-trend.negative {

    color:
        var(--red);

    background:
        var(--red-soft);
}

.stat-content {

    margin-top: 17px;

    display: flex;
    flex-direction: column;
}

.stat-label {

    color:
        var(--text-muted);

    font-size: 10px;
}

.stat-value {

    margin-top: 4px;

    color:
        var(--text-primary);

    font-size: 24px;

    line-height: 1.1;

    letter-spacing:
        -0.035em;
}

.mini-chart {

    height: 42px;

    margin-top: 18px;

    display: flex;
    align-items: flex-end;

    gap: 4px;
}

.mini-chart span {

    flex: 1;

    min-width: 2px;

    border-radius:
        3px 3px 1px 1px;

    background:
        var(--accent);

    opacity: 0.7;

    transition:
        opacity var(--transition),
        transform var(--transition);
}

.stat-card:hover .mini-chart span {
    opacity: 1;
}

.revenue-chart span {
    background: var(--green);
}

.orders-chart span {
    background: var(--accent);
}

.customers-chart span {
    background: var(--purple);
}

.conversion-chart span {
    background: var(--orange);
}

.stat-footer {

    margin-top: 12px;

    color:
        var(--text-muted);

    font-size: 9px;
}


/* =========================================================
   09. PANELS
========================================================= */

.panel {

    min-width: 0;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-lg);

    background:
        var(--surface);

    box-shadow:
        var(--shadow-sm);

    overflow: hidden;
}

.panel-header {

    min-height: 67px;

    padding:
        17px 19px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    border-bottom:
        1px solid var(--border);
}

.panel-header h2 {

    color:
        var(--text-primary);

    font-size: 14px;

    line-height: 1.2;

    letter-spacing:
        -0.015em;
}

.panel-menu {

    width: 30px;
    height: 30px;

    display: grid;
    place-content: center;

    gap: 3px;

    border-radius: 7px;

    background: transparent;

    color:
        var(--text-muted);

    transition:
        background var(--transition),
        color var(--transition);
}

.panel-menu:hover {

    background:
        var(--surface-hover);

    color:
        var(--text-primary);
}

.panel-menu span {

    width: 3px;
    height: 3px;

    border-radius: 50%;

    background:
        currentColor;
}


/* =========================================================
   10. DASHBOARD GRID
========================================================= */

.dashboard-grid {

    display: grid;

    grid-template-columns:
        minmax(0, 1.85fr)
        minmax(290px, 0.85fr);

    gap: 15px;

    margin-bottom: 15px;
}


/* =========================================================
   REVENUE PANEL
========================================================= */

.revenue-summary {

    padding:
        17px 19px 0;

    display: flex;
    align-items: baseline;

    gap: 9px;

    flex-wrap: wrap;
}

.revenue-summary strong {

    color:
        var(--text-primary);

    font-size: 22px;

    letter-spacing:
        -0.035em;
}

.summary-positive {

    color:
        var(--green);

    font-size: 10px;

    font-weight: 700;
}

.revenue-summary small {

    color:
        var(--text-muted);

    font-size: 9px;
}

.chart-area {

    height: 300px;

    padding:
        21px 18px 16px;

    display: flex;

    gap: 9px;
}

.chart-y-axis {

    width: 39px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding-bottom: 28px;

    color:
        var(--text-muted);

    font-size: 8px;

    text-align: right;
}

.chart-container {

    position: relative;

    flex: 1;

    min-width: 0;

    padding-bottom: 27px;
}

.chart-grid-lines {

    position: absolute;

    inset:
        0 0 27px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-grid-lines span {

    width: 100%;

    border-top:
        1px dashed var(--border);
}

.revenue-line-chart {

    position: absolute;

    inset:
        0 0 27px;

    width: 100%;
    height: calc(100% - 27px);

    overflow: visible;
}

.chart-area-fill {

    fill:
        url(#revenueGradient);

    opacity:
        0.7;
}

.chart-line {

    fill: none;

    stroke:
        var(--accent);

    stroke-width:
        3;

    stroke-linecap:
        round;

    stroke-linejoin:
        round;

    filter:
        drop-shadow(
            0 0 6px
            var(--accent-glow)
        );
}

.chart-x-axis {

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    justify-content: space-between;

    color:
        var(--text-muted);

    font-size: 8px;
}

.chart-tooltip {

    position: absolute;

    top: 22%;

    right: 12%;

    padding:
        8px 10px;

    display: flex;
    flex-direction: column;

    border:
        1px solid var(--border-strong);

    border-radius: 7px;

    background:
        var(--bg-secondary);

    box-shadow:
        var(--shadow-md);

    opacity: 0;

    pointer-events: none;

    transform:
        translateY(5px);

    transition:
        opacity var(--transition),
        transform var(--transition);
}

.revenue-panel:hover .chart-tooltip {

    opacity: 1;

    transform:
        translateY(0);
}

.chart-tooltip strong {

    color:
        var(--text-primary);

    font-size: 10px;
}

.chart-tooltip span {

    margin-top: 2px;

    color:
        var(--text-muted);

    font-size: 8px;
}


/* =========================================================
   TRAFFIC PANEL
========================================================= */

.traffic-panel {

    min-height: 100%;
}

.donut-wrapper {

    padding:
        21px 20px 10px;

    display: flex;
    justify-content: center;
}

.donut-chart {

    width: 145px;
    height: 145px;

    position: relative;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        conic-gradient(
            var(--accent) 0 68%,
            var(--purple) 68% 85%,
            var(--green) 85% 95%,
            var(--orange) 95% 100%
        );

    box-shadow:
        0 0 35px
        rgba(79, 140, 255, 0.08);
}

.donut-chart::after {

    content: "";

    position: absolute;

    inset: 18px;

    border-radius: 50%;

    background:
        var(--surface);
}

.donut-center {

    position: relative;

    z-index: 1;

    display: flex;
    flex-direction: column;

    align-items: center;
}

.donut-center strong {

    color:
        var(--text-primary);

    font-size: 23px;

    line-height: 1;

    letter-spacing:
        -0.04em;
}

.donut-center span {

    margin-top: 5px;

    color:
        var(--text-muted);

    font-size: 9px;
}

.traffic-list {

    padding:
        6px 20px 19px;
}

.traffic-item {

    min-height: 30px;

    display: flex;
    align-items: center;

    gap: 8px;

    color:
        var(--text-secondary);

    font-size: 10px;
}

.traffic-item + .traffic-item {
    margin-top: 3px;
}

.traffic-color {

    width: 7px;
    height: 7px;

    border-radius: 50%;

    flex: 0 0 auto;
}

.traffic-color.organic {
    background: var(--accent);
}

.traffic-color.direct {
    background: var(--purple);
}

.traffic-color.social {
    background: var(--green);
}

.traffic-color.referral {
    background: var(--orange);
}

.traffic-name {
    flex: 1;
}

.traffic-item strong {

    color:
        var(--text-primary);

    font-size: 10px;
}


/* =========================================================
   11. BOTTOM GRID
========================================================= */

.bottom-grid {

    display: grid;

    grid-template-columns:
        minmax(0, 1.65fr)
        minmax(280px, 0.8fr);

    gap: 15px;

    margin-bottom: 15px;
}


/* =========================================================
   TABLE
========================================================= */

.table-wrapper {

    width: 100%;

    overflow-x: auto;
}

table {

    width: 100%;

    border-collapse: collapse;

    min-width: 670px;
}

th,
td {

    padding:
        13px 19px;

    border-bottom:
        1px solid var(--border);

    text-align: left;

    white-space: nowrap;
}

th {

    color:
        var(--text-muted);

    font-size: 9px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing:
        0.07em;
}

td {

    color:
        var(--text-secondary);

    font-size: 10px;
}

tbody tr {

    transition:
        background var(--transition);
}

tbody tr:hover {

    background:
        var(--surface-hover);
}

tbody tr:last-child td {
    border-bottom: 0;
}

td strong {

    color:
        var(--text-primary);

    font-size: 10px;
}

.customer-cell {

    display: flex;
    align-items: center;

    gap: 8px;
}

.customer-avatar {

    width: 27px;
    height: 27px;

    display: grid;
    place-items: center;

    border-radius: 8px;

    background:
        var(--accent-soft);

    color:
        var(--accent);

    font-size: 8px;

    font-weight: 800;
}

.status {

    display: inline-flex;
    align-items: center;

    min-height: 21px;

    padding:
        0 7px;

    border-radius:
        999px;

    font-size: 8px;

    font-weight: 700;
}

.status.completed {

    color:
        var(--green);

    background:
        var(--green-soft);
}

.status.processing {

    color:
        var(--accent);

    background:
        var(--accent-soft);
}

.status.pending {

    color:
        var(--orange);

    background:
        var(--orange-soft);
}

.status.cancelled {

    color:
        var(--red);

    background:
        var(--red-soft);
}


/* =========================================================
   VIEW ALL
========================================================= */

.view-all {

    color:
        var(--accent);

    font-size: 9px;

    font-weight: 700;
}

.view-all:hover {
    text-decoration: underline;
}


/* =========================================================
   ACTIVITY
========================================================= */

.activity-list {

    padding:
        7px 19px 15px;
}

.activity-item {

    display: flex;

    gap: 10px;

    padding:
        11px 0;

    border-bottom:
        1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-icon {

    width: 28px;
    height: 28px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 8px;

    font-size: 10px;

    font-weight: 800;
}

.activity-icon.blue {

    color: var(--accent);
    background: var(--accent-soft);
}

.activity-icon.green {

    color: var(--green);
    background: var(--green-soft);
}

.activity-icon.purple {

    color: var(--purple);
    background: var(--purple-soft);
}

.activity-icon.orange {

    color: var(--orange);
    background: var(--orange-soft);
}

.activity-item div {
    min-width: 0;
}

.activity-item strong {

    display: block;

    color:
        var(--text-primary);

    font-size: 10px;
}

.activity-item p {

    margin-top: 2px;

    color:
        var(--text-muted);

    font-size: 9px;
}

.activity-item small {

    display: block;

    margin-top: 4px;

    color:
        var(--text-muted);

    font-size: 8px;
}


/* =========================================================
   12. EXTRA DASHBOARD
========================================================= */

.dashboard-extra {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 15px;

    margin-bottom: 25px;
}

.panel-period {

    color:
        var(--text-muted);

    font-size: 9px;

    font-weight: 700;
}

.growth-metrics {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    padding:
        20px;
}

.growth-metrics div {

    min-width: 0;

    padding:
        0 15px;

    border-right:
        1px solid var(--border);
}

.growth-metrics div:first-child {
    padding-left: 0;
}

.growth-metrics div:last-child {

    padding-right: 0;

    border-right: 0;
}

.growth-metrics span {

    display: block;

    color:
        var(--text-muted);

    font-size: 9px;
}

.growth-metrics strong {

    display: block;

    margin-top: 6px;

    color:
        var(--text-primary);

    font-size: 18px;

    letter-spacing:
        -0.03em;
}


/* Products */

.product-list {

    padding:
        7px 19px 12px;
}

.product-item {

    min-height: 53px;

    display: flex;
    align-items: center;

    gap: 10px;

    border-bottom:
        1px solid var(--border);
}

.product-item:last-child {
    border-bottom: 0;
}

.product-number {

    width: 25px;

    color:
        var(--text-muted);

    font-size: 9px;

    font-weight: 800;
}

.product-info {

    flex: 1;

    min-width: 0;

    display: flex;
    flex-direction: column;
}

.product-info strong {

    color:
        var(--text-primary);

    font-size: 10px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.product-info span {

    margin-top: 2px;

    color:
        var(--text-muted);

    font-size: 8px;
}

.product-revenue {

    color:
        var(--green);

    font-size: 10px;
}


/* =========================================================
   13. FOOTER
========================================================= */

.dashboard-footer {

    padding:
        3px 3px 5px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    color:
        var(--text-muted);

    font-size: 9px;
}

.footer-links {

    display: flex;
    align-items: center;

    gap: 15px;
}

.footer-links a:hover {
    color: var(--text-primary);
}


/* =========================================================
   14. SEARCH OVERLAY
========================================================= */

.search-overlay {

    position: fixed;

    inset: 0;

    z-index: 300;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    padding:
        12vh 20px;

    background:
        rgba(2, 6, 12, 0.72);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    opacity: 0;

    visibility: hidden;

    transition:
        opacity var(--transition-slow),
        visibility var(--transition-slow);
}

.search-overlay.active {

    opacity: 1;

    visibility: visible;
}

.search-dialog {

    width: min(
        620px,
        100%
    );

    border:
        1px solid var(--border-strong);

    border-radius:
        var(--radius-lg);

    background:
        var(--surface);

    box-shadow:
        var(--shadow-lg);

    overflow: hidden;

    transform:
        translateY(-15px);

    transition:
        transform var(--transition-slow);
}

.search-overlay.active .search-dialog {

    transform:
        translateY(0);
}

.search-header {

    min-height: 58px;

    padding:
        0 17px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid var(--border);
}

.search-header h2 {

    font-size: 13px;
}

.search-header button {

    width: 30px;
    height: 30px;

    border-radius: 7px;

    background: transparent;

    color:
        var(--text-muted);

    font-size: 20px;
}

.search-header button:hover {

    background:
        var(--surface-hover);

    color:
        var(--text-primary);
}

.search-input-wrapper {

    margin:
        15px;

    height: 44px;

    padding:
        0 12px;

    display: flex;
    align-items: center;

    gap: 9px;

    border:
        1px solid var(--border);

    border-radius: 9px;

    background:
        var(--bg-secondary);
}

.search-input-wrapper svg {

    width: 16px;
    height: 16px;

    flex: 0 0 auto;

    fill: none;

    stroke:
        var(--text-muted);

    stroke-width: 1.8;

    stroke-linecap: round;
}

.search-input-wrapper input {

    flex: 1;

    min-width: 0;

    height: 100%;

    border: 0;

    outline: 0;

    background: transparent;

    color:
        var(--text-primary);

    font-size: 11px;
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.search-input-wrapper kbd {

    padding:
        3px 6px;

    border:
        1px solid var(--border);

    border-radius: 5px;

    color:
        var(--text-muted);

    font-size: 8px;
}

.search-results {

    max-height: 300px;

    overflow-y: auto;

    padding:
        0 15px 15px;
}

.search-empty {

    padding:
        25px 10px;

    color:
        var(--text-muted);

    font-size: 10px;

    text-align: center;
}


/* =========================================================
   15. NOTIFICATION PANEL
========================================================= */

.notification-panel {

    position: fixed;

    top:
        calc(var(--topbar-height) - 5px);

    right: 25px;

    z-index: 200;

    width: min(
        340px,
        calc(100vw - 30px)
    );

    border:
        1px solid var(--border-strong);

    border-radius:
        var(--radius-lg);

    background:
        var(--surface);

    box-shadow:
        var(--shadow-lg);

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(-10px);

    transition:
        opacity var(--transition),
        visibility var(--transition),
        transform var(--transition);
}

.notification-panel.active {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}

.notification-header {

    min-height: 53px;

    padding:
        0 15px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid var(--border);
}

.notification-header h2 {
    font-size: 12px;
}

.notification-header button {

    width: 28px;
    height: 28px;

    background: transparent;

    color:
        var(--text-muted);

    font-size: 19px;
}

.notification-list {
    padding: 5px 15px 10px;
}

.notification-item {

    display: flex;

    gap: 9px;

    padding:
        12px 0;

    border-bottom:
        1px solid var(--border);
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-icon {

    width: 27px;
    height: 27px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 8px;

    font-size: 10px;

    font-weight: 800;
}

.notification-icon.blue {

    color: var(--accent);
    background: var(--accent-soft);
}

.notification-icon.green {

    color: var(--green);
    background: var(--green-soft);
}

.notification-icon.orange {

    color: var(--orange);
    background: var(--orange-soft);
}

.notification-item strong {

    display: block;

    color:
        var(--text-primary);

    font-size: 10px;
}

.notification-item p {

    margin-top: 2px;

    color:
        var(--text-muted);

    font-size: 9px;
}

.notification-item small {

    display: block;

    margin-top: 3px;

    color:
        var(--text-muted);

    font-size: 8px;
}


/* =========================================================
   16. PROFILE MENU
========================================================= */

.profile-menu {

    position: fixed;

    top:
        calc(var(--topbar-height) - 2px);

    right: 25px;

    z-index: 200;

    width: 225px;

    border:
        1px solid var(--border-strong);

    border-radius:
        var(--radius-lg);

    background:
        var(--surface);

    box-shadow:
        var(--shadow-lg);

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(-10px);

    transition:
        opacity var(--transition),
        visibility var(--transition),
        transform var(--transition);
}

.profile-menu.active {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}

.profile-menu-header {

    padding:
        15px;

    display: flex;
    align-items: center;

    gap: 9px;

    border-bottom:
        1px solid var(--border);
}

.profile-avatar.large {

    width: 37px;
    height: 37px;
}

.profile-menu-header div {

    min-width: 0;

    display: flex;
    flex-direction: column;
}

.profile-menu-header strong {

    color:
        var(--text-primary);

    font-size: 10px;
}

.profile-menu-header small {

    margin-top: 2px;

    color:
        var(--text-muted);

    font-size: 8px;
}

.profile-menu-links {
    padding: 7px;
}

.profile-menu-links a,
.profile-menu-links button {

    width: 100%;

    min-height: 35px;

    padding:
        0 10px;

    display: flex;
    align-items: center;

    border-radius: 7px;

    background: transparent;

    color:
        var(--text-secondary);

    font-size: 10px;

    text-align: left;

    transition:
        background var(--transition),
        color var(--transition);
}

.profile-menu-links a:hover,
.profile-menu-links button:hover {

    background:
        var(--surface-hover);

    color:
        var(--text-primary);
}

.profile-menu-links button {
    color: var(--red);
}


/* =========================================================
   17. DATE MENU
========================================================= */

.date-menu {

    position: fixed;

    top:
        calc(var(--topbar-height) + 8px);

    right: 145px;

    z-index: 190;

    min-width: 145px;

    padding: 6px;

    border:
        1px solid var(--border-strong);

    border-radius:
        10px;

    background:
        var(--surface);

    box-shadow:
        var(--shadow-md);

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(-7px);

    transition:
        opacity var(--transition),
        visibility var(--transition),
        transform var(--transition);
}

.date-menu.active {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}

.date-menu button {

    width: 100%;

    min-height: 34px;

    padding:
        0 10px;

    border-radius: 7px;

    background: transparent;

    color:
        var(--text-secondary);

    font-size: 10px;

    text-align: left;
}

.date-menu button:hover {

    background:
        var(--surface-hover);

    color:
        var(--text-primary);
}


/* =========================================================
   18. RESPONSIVE — LARGE TABLETS
========================================================= */

@media (max-width: 1250px) {

    :root {
        --sidebar-width: 235px;
    }

    .dashboard-content {
        padding-left: 22px;
        padding-right: 22px;
    }

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns:
            minmax(0, 1.55fr)
            minmax(250px, 0.8fr);
    }

    .bottom-grid {
        grid-template-columns:
            1fr;
    }

}


/* =========================================================
   19. RESPONSIVE — TABLET
========================================================= */

@media (max-width: 1000px) {

    :root {
        --sidebar-width: 0px;
    }

    .sidebar {

        width: 260px;

        transform:
            translateX(-100%);
    }

    .sidebar.open {

        transform:
            translateX(0);
    }

    .sidebar-close {
        display: grid;
        place-items: center;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .menu-toggle {
        display: grid;
    }

    .topbar {
        padding:
            0 20px;
    }

    .dashboard-content {
        padding:
            25px 20px;
    }

    .dashboard-grid {
        grid-template-columns:
            1fr;
    }

    .traffic-panel {
        min-height: auto;
    }

    .dashboard-extra {
        grid-template-columns:
            1fr;
    }

    .sidebar-overlay {
        display: block;
    }

}


/* =========================================================
   20. RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 700px) {

    :root {
        --topbar-height: 64px;
    }

    .topbar {
        padding:
            0 14px;
    }

    .breadcrumb {
        display: none;
    }

    .topbar-actions {
        gap: 2px;
    }

    .topbar-button {
        width: 34px;
        height: 34px;
    }

    .topbar-profile {
        margin-left: 2px;
    }

    .profile-text,
    .topbar-profile > svg {
        display: none;
    }

    .dashboard-content {
        padding:
            21px 14px;
    }

    .page-heading {

        align-items: flex-start;

        flex-direction: column;

        margin-bottom: 21px;
    }

    .page-heading h1 {
        font-size: 26px;
    }

    .heading-actions {

        width: 100%;

        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

    .button {
        width: 100%;
        padding: 0 9px;
    }

    .stats-grid {
        grid-template-columns:
            1fr 1fr;

        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-footer {
        font-size: 8px;
    }

    .chart-area {
        height: 255px;
        padding-left: 13px;
        padding-right: 13px;
    }

    .chart-y-axis {
        width: 31px;
    }

    .chart-x-axis {
        font-size: 7px;
    }

    .donut-chart {
        width: 125px;
        height: 125px;
    }

    .donut-chart::after {
        inset: 16px;
    }

    .dashboard-footer {

        flex-direction: column;

        align-items: flex-start;
    }

}


/* =========================================================
   21. RESPONSIVE — SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .sidebar {
        width: min(
            285px,
            88vw
        );
    }

    .stats-grid {
        grid-template-columns:
            1fr;
    }

    .heading-actions {
        grid-template-columns:
            1fr;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .page-description {
        font-size: 11px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 23px;
    }

    .growth-metrics {
        grid-template-columns:
            1fr;
        gap: 17px;
    }

    .growth-metrics div {

        padding:
            0 0 14px;

        border-right: 0;

        border-bottom:
            1px solid var(--border);
    }

    .growth-metrics div:last-child {

        padding-bottom: 0;

        border-bottom: 0;
    }

    .growth-metrics strong {
        font-size: 20px;
    }

    .notification-panel,
    .profile-menu {
        right: 14px;
    }

    .date-menu {
        right: 75px;
    }

}


/* =========================================================
   22. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   23. PRINT
========================================================= */

@media print {

    .sidebar,
    .topbar,
    .heading-actions,
    .search-overlay,
    .notification-panel,
    .profile-menu,
    .date-menu {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .dashboard-content {
        padding: 0;
    }

    .panel,
    .stat-card {
        box-shadow: none;
        break-inside: avoid;
    }

    body {
        background: #ffffff;
        color: #111111;
    }
}


/* =========================================================
   END OF APP-01 STYLESHEET
========================================================= */
