* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #172033;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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


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

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 255px;
    height: 100vh;

    background: #071a35;
    color: white;

    z-index: 1200;

    display: flex;
    flex-direction: column;
}

.sidebar-top {
    padding: 24px 22px;

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

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: #4da3ff;
}

.close-sidebar {
    display: none;

    background: none;
    border: none;
    color: white;

    font-size: 1.3rem;
}

.profile {
    margin: 5px 18px 25px;

    padding: 15px;

    background: rgba(255,255,255,0.07);

    border-radius: 10px;

    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar,
.small-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    background: #2f80ed;
    color: white;

    font-weight: 800;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.profile strong,
.profile span {
    display: block;
}

.profile strong {
    font-size: 0.82rem;
}

.profile span {
    color: #8ea6c0;
    font-size: 0.7rem;
    margin-top: 3px;
}

.sidebar-nav {
    padding: 0 14px;
    flex: 1;
}

.nav-label {
    color: #657d99;
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    font-weight: 800;

    padding: 0 10px 10px;
}

.second-label {
    margin-top: 25px;
}

.nav-link {
    color: #aebed0;

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

    padding: 12px 13px;

    border-radius: 8px;

    margin-bottom: 4px;

    font-size: 0.84rem;

    transition: 0.25s;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.nav-link b {
    margin-left: auto;

    background: #2f80ed;
    color: white;

    min-width: 21px;
    height: 21px;

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

    border-radius: 50%;

    font-size: 0.62rem;
}

.nav-link:hover,
.nav-link.active {
    background: #12335c;
    color: white;
}

.notification-number {
    background: #e55b72 !important;
}

.sidebar-bottom {
    padding: 15px 18px 20px;
}

.upgrade-box {
    background: linear-gradient(
        135deg,
        #123b69,
        #0c294a
    );

    border: 1px solid rgba(255,255,255,0.1);

    padding: 18px;

    border-radius: 12px;

    margin-bottom: 15px;
}

.upgrade-box i {
    color: #5baaff;
    margin-bottom: 10px;
}

.upgrade-box strong {
    display: block;
    font-size: 0.85rem;
}

.upgrade-box p {
    color: #91a7be;
    font-size: 0.7rem;
    margin: 5px 0 12px;
}

.upgrade-box button {
    border: none;
    background: #2f80ed;
    color: white;

    padding: 7px 12px;
    border-radius: 5px;

    font-size: 0.7rem;
}

.logout {
    display: flex;
    gap: 12px;
    align-items: center;

    color: #899db5;

    padding: 10px;
    font-size: 0.8rem;
}

.logout:hover {
    color: white;
}


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

.main {
    margin-left: 255px;
    min-height: 100vh;
}

.topbar {
    height: 78px;

    background: white;

    border-bottom: 1px solid #e7ebf2;

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

    padding: 0 30px;

    position: sticky;
    top: 0;

    z-index: 900;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
}

.topbar-left {
    gap: 15px;
}

.welcome-small {
    font-size: 0.7rem;
    color: #8491a5;
}

.topbar h1 {
    font-size: 1.35rem;
    color: #172033;
}

.menu-toggle {
    display: none;

    border: none;
    background: #f1f5f9;

    width: 40px;
    height: 40px;

    border-radius: 8px;
}

.topbar-right {
    gap: 18px;
}

.top-search {
    width: 220px;

    display: flex;
    align-items: center;

    background: #f5f7fb;

    border: 1px solid #e7ebf2;

    border-radius: 8px;

    padding: 9px 12px;

    color: #94a3b8;
}

.top-search input {
    border: none;
    outline: none;
    background: transparent;

    width: 100%;

    margin-left: 8px;

    font-size: 0.78rem;
}

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

    border: 1px solid #e5e9ef;

    background: white;

    border-radius: 8px;

    color: #64748b;

    position: relative;
}

.notification-dot {
    position: absolute;

    width: 7px;
    height: 7px;

    background: #ef536d;

    border-radius: 50%;

    right: 8px;
    top: 7px;
}

.top-profile {
    display: flex;
    align-items: center;
    gap: 9px;
}

.small-avatar {
    width: 35px;
    height: 35px;

    border-radius: 8px;

    font-size: 0.7rem;
}

.top-profile-text strong,
.top-profile-text span {
    display: block;
}

.top-profile-text strong {
    font-size: 0.75rem;
}

.top-profile-text span {
    color: #94a3b8;
    font-size: 0.65rem;
}

.top-profile > i {
    color: #94a3b8;
    font-size: 0.7rem;
}


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

.dashboard-content {
    padding: 30px;
    max-width: 1500px;
    margin: auto;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active-section {
    display: block;
}

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

    margin-bottom: 25px;
}

.page-heading > div > span,
.card-heading span {
    color: #2f80ed;

    font-size: 0.65rem;

    letter-spacing: 1.6px;

    font-weight: 800;
}

.page-heading h2 {
    font-size: 1.65rem;
    margin-top: 4px;
}

.date-button {
    border: 1px solid #e0e6ee;

    background: white;

    padding: 10px 14px;

    border-radius: 7px;

    color: #536174;

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

    font-size: 0.75rem;
}


/* =========================
   STATS
========================= */

.stats-grid {
    display: grid;

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

    gap: 18px;

    margin-bottom: 20px;
}

.stat-card {
    background: white;

    border: 1px solid #e7ebf2;

    border-radius: 11px;

    padding: 20px;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;
}

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

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

    border-radius: 9px;
}

.stat-icon.blue {
    background: #e7f1ff;
    color: #2f80ed;
}

.stat-icon.purple {
    background: #eeeaff;
    color: #7257e8;
}

.stat-icon.orange {
    background: #fff0df;
    color: #e99a3d;
}

.stat-icon.green {
    background: #e3f8ed;
    color: #25a967;
}

.positive {
    color: #1fa563;
    background: #e8f8ef;

    padding: 4px 7px;

    border-radius: 5px;

    font-size: 0.62rem;
    font-weight: bold;
}

.stat-card > p {
    color: #778497;
    font-size: 0.75rem;
}

.stat-card h3 {
    font-size: 1.55rem;
    margin: 4px 0;
}

.stat-card small {
    color: #9aa6b5;
    font-size: 0.65rem;
}


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

.dashboard-grid {
    display: grid;

    grid-template-columns: 1.55fr 0.75fr;

    gap: 20px;

    margin-bottom: 20px;
}

.dashboard-card {
    background: white;

    border: 1px solid #e7ebf2;

    border-radius: 11px;

    padding: 22px;

    margin-bottom: 20px;
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;

    margin-bottom: 25px;
}

.card-heading h3 {
    font-size: 1rem;
    margin-top: 4px;
}

.card-heading select {
    border: 1px solid #e1e6ed;

    padding: 7px 10px;

    border-radius: 6px;

    background: white;

    color: #637083;

    font-size: 0.7rem;
}


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

.chart {
    height: 280px;

    display: grid;

    grid-template-columns: 45px 1fr;

    grid-template-rows: 1fr 25px;
}

.chart-y {
    grid-row: 1;

    display: flex;
    flex-direction: column;

    justify-content: space-between;

    color: #a0aaba;

    font-size: 0.65rem;

    padding-bottom: 8px;
}

.chart-area {
    position: relative;

    height: 230px;
}

.chart-grid-line {
    position: absolute;

    left: 0;
    right: 0;

    border-top: 1px dashed #e7ebf2;
}

.line-1 {
    top: 0;
}

.line-2 {
    top: 33%;
}

.line-3 {
    top: 66%;
}

.line-4 {
    bottom: 0;
}

.chart-area svg {
    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 100%;
}

.chart-fill {
    fill: url(#chartGradient);
}

.chart-line {
    fill: none;

    stroke: #2f80ed;

    stroke-width: 4;

    vector-effect: non-scaling-stroke;
}

.chart-dots span {
    position: absolute;

    top: 50%;

    width: 8px;
    height: 8px;

    background: #2f80ed;

    border: 2px solid white;

    border-radius: 50%;

    transform: translate(-50%, -50%);
}

.chart-x {
    grid-column: 2;

    display: flex;
    justify-content: space-between;

    color: #9aa6b5;

    font-size: 0.65rem;

    padding-top: 7px;
}


/* =========================
   PERFORMANCE
========================= */

.performance-item {
    margin-bottom: 22px;
}

.performance-title {
    display: flex;
    justify-content: space-between;

    font-size: 0.75rem;

    margin-bottom: 8px;
}

.performance-title span {
    color: #5f6d80;
}

.progress {
    height: 7px;

    background: #edf1f6;

    border-radius: 20px;

    overflow: hidden;
}

.progress-bar {
    height: 100%;

    background: #2f80ed;

    border-radius: 20px;
}

.performance-total {
    margin-top: 30px;

    padding-top: 18px;

    border-top: 1px solid #e8edf3;

    display: flex;
    justify-content: space-between;

    color: #68768a;

    font-size: 0.78rem;
}

.performance-total strong {
    color: #172033;
}


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

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;

    min-width: 700px;
}

th {
    text-align: left;

    color: #8995a5;

    font-size: 0.65rem;

    text-transform: uppercase;

    letter-spacing: 0.8px;

    padding: 12px 10px;

    border-bottom: 1px solid #e7ebf2;
}

td {
    padding: 15px 10px;

    border-bottom: 1px solid #edf0f4;

    font-size: 0.74rem;

    color: #566477;
}

td:first-child {
    color: #172033;
    font-weight: bold;
}

.status {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 5px;

    font-size: 0.6rem;

    font-weight: bold;
}

.status.completed {
    color: #198a54;
    background: #e4f7ed;
}

.status.pending {
    color: #c47a18;
    background: #fff2dd;
}

.status.processing {
    color: #356bc2;
    background: #e8f0ff;
}

.view-all {
    border: none;
    background: none;

    color: #2f80ed;

    font-size: 0.72rem;

    display: flex;
    gap: 6px;
    align-items: center;
}


/* =========================
   ORDER TOOLBAR
========================= */

.table-toolbar {
    display: flex;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;
}

.table-toolbar input,
.table-toolbar select {
    border: 1px solid #dfe5ed;

    background: white;

    padding: 10px 12px;

    border-radius: 7px;

    outline: none;

    color: #4d5b6e;

    font-size: 0.75rem;
}

.table-toolbar input {
    flex: 1;
}

.table-toolbar input:focus {
    border-color: #2f80ed;
}

.primary-button {
    border: none;

    background: #071a35;

    color: white;

    padding: 10px 15px;

    border-radius: 7px;

    font-size: 0.75rem;

    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-button:hover {
    background: #2f80ed;
}


/* =========================
   CUSTOMERS
========================= */

.customer-grid {
    display: grid;

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

    gap: 18px;

    margin-bottom: 20px;
}

.customer-summary {
    background: white;

    border: 1px solid #e7ebf2;

    border-radius: 11px;

    padding: 25px;

    display: flex;
    flex-direction: column;

    gap: 7px;
}

.customer-summary i {
    color: #2f80ed;

    font-size: 1.5rem;
}

.customer-summary strong {
    font-size: 1.5rem;
}

.customer-summary span {
    color: #8491a3;

    font-size: 0.72rem;
}

.empty-section {
    padding: 70px 20px;

    text-align: center;

    color: #8b97a7;
}

.empty-section i {
    font-size: 2.5rem;

    color: #2f80ed;

    margin-bottom: 15px;
}

.empty-section h3 {
    color: #172033;

    margin-bottom: 5px;
}


/* =========================
   PRODUCTS
========================= */

.product-dashboard-grid {
    display: grid;

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

    gap: 18px;
}

.dashboard-product {
    background: white;

    border: 1px solid #e7ebf2;

    border-radius: 11px;

    padding: 20px;
}

.dashboard-product-icon {
    width: 60px;
    height: 60px;

    border-radius: 12px;

    background: #e8f2ff;

    color: #2f80ed;

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

    font-size: 1.6rem;

    margin-bottom: 18px;
}

.dashboard-product > span {
    color: #2f80ed;

    text-transform: uppercase;

    font-size: 0.6rem;

    font-weight: bold;
}

.dashboard-product h3 {
    font-size: 0.9rem;

    margin: 5px 0 12px;
}

.dashboard-product strong {
    display: block;

    font-size: 1rem;
}

.dashboard-product small {
    color: #8a96a5;

    font-size: 0.68rem;
}


/* =========================
   ANALYTICS
========================= */

.analytics-grid {
    display: grid;

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

    gap: 20px;
}

.analytics-card {
    background: white;

    border: 1px solid #e7ebf2;

    border-radius: 11px;

    padding: 30px;
}

.analytics-card i {
    color: #2f80ed;

    font-size: 1.5rem;

    margin-bottom: 18px;
}

.analytics-card strong,
.analytics-card span {
    display: block;
}

.analytics-card strong {
    font-size: 1.8rem;
}

.analytics-card span {
    color: #8491a3;

    font-size: 0.75rem;
}


/* =========================
   MESSAGES
========================= */

.message-item {
    display: flex;
    align-items: center;

    gap: 15px;

    padding: 18px 0;

    border-bottom: 1px solid #edf0f4;
}

.message-item:last-child {
    border-bottom: none;
}

.message-avatar {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: #e8f2ff;

    color: #2f80ed;

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

    font-size: 0.7rem;
    font-weight: bold;
}

.message-item div:nth-child(2) {
    flex: 1;
}

.message-item strong {
    font-size: 0.78rem;
}

.message-item p {
    color: #8a96a5;

    font-size: 0.7rem;

    margin-top: 3px;
}

.message-item > span {
    color: #a0aaba;

    font-size: 0.65rem;
}


/* =========================
   SETTINGS
========================= */

.setting-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 20px 0;

    border-bottom: 1px solid #edf0f4;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-row strong {
    display: block;

    font-size: 0.8rem;
}

.setting-row p {
    color: #8995a5;

    font-size: 0.68rem;

    margin-top: 4px;
}


/* SWITCH */

.switch {
    position: relative;

    width: 43px;
    height: 23px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch span {
    position: absolute;

    inset: 0;

    background: #d8dee7;

    border-radius: 30px;

    transition: 0.25s;
}

.switch span::before {
    content: "";

    position: absolute;

    width: 17px;
    height: 17px;

    left: 3px;
    top: 3px;

    background: white;

    border-radius: 50%;

    transition: 0.25s;
}

.switch input:checked + span {
    background: #2f80ed;
}

.switch input:checked + span::before {
    transform: translateX(20px);
}


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

.dashboard-footer {
    padding: 20px 30px;

    border-top: 1px solid #e7ebf2;

    display: flex;

    justify-content: space-between;

    color: #929dad;

    font-size: 0.68rem;
}


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

.sidebar-overlay {
    display: none;
}


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

@media (max-width: 1150px) {

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

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

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

}


@media (max-width: 900px) {

    .sidebar {
        transform: translateX(-100%);

        transition: 0.3s;
    }

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

    .close-sidebar {
        display: block;
    }

    .main {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;

        background: rgba(0,0,0,0.45);

        z-index: 1100;
    }

    .sidebar-overlay.show {
        display: block;
    }

}


@media (max-width: 700px) {

    .topbar {
        padding: 0 18px;
    }

    .top-search {
        display: none;
    }

    .top-profile-text,
    .top-profile > i {
        display: none;
    }

    .dashboard-content {
        padding: 20px 15px;
    }

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

    .customer-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .page-heading {
        align-items: start;
        flex-direction: column;
        gap: 15px;
    }

    .date-button {
        width: 100%;
        justify-content: center;
    }

    .dashboard-footer {
        padding: 20px 15px;

        flex-direction: column;

        gap: 5px;
    }

}


@media (max-width: 500px) {

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

    .table-toolbar {
        flex-direction: column;
    }

    .table-toolbar input,
    .table-toolbar select {
        width: 100%;
    }

    .dashboard-card {
        padding: 16px;
    }

}