:root {
    --blue: #1769e0;
    --blue-soft: #eaf2ff;
    --dark: #111318;
    --sidebar: #12151b;
    --background: #f4f6f9;
    --surface: #ffffff;
    --text: #171a20;
    --soft: #697181;
    --muted: #9aa1ad;
    --line: #e2e6ec;
    --success: #19945b;
    --warning: #e59b18;
    --danger: #d84a4a;
    --font-body: "DM Sans", sans-serif;
    --font-heading: "Manrope", sans-serif;
}

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

body {
    background: var(--background);
    color: var(--text);
    font-family: var(--font-body);
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    width: 245px;
    padding: 24px 18px;
    background: var(--sidebar);
    color: white;
    display: flex;
    flex-direction: column;
}

.admin-logo {
    padding: 0 8px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 11px;
}

.admin-logo > span {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--blue);
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-weight: 800;
}

.admin-logo strong,
.admin-logo small {
    display: block;
}

.admin-logo strong {
    font-family: var(--font-heading);
    font-size: 15px;
}

.admin-logo small {
    color: rgba(255, 255, 255, 0.42);
    font-size: 7px;
    text-transform: uppercase;
}

.admin-navigation {
    margin-top: 25px;
    display: grid;
    gap: 4px;
}

.navigation-label {
    margin: 18px 11px 8px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 7px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.admin-navigation a {
    min-height: 43px;
    padding: 0 11px;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.55);
    display: grid;
    grid-template-columns: 25px 1fr auto;
    align-items: center;
    font-size: 9px;
    font-weight: 600;
}

.admin-navigation a.active,
.admin-navigation a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.admin-navigation a.active {
    background: var(--blue);
}

.admin-navigation a small {
    min-width: 21px;
    height: 21px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    font-size: 7px;
}

.sidebar-support {
    margin-top: auto;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.sidebar-support > span {
    color: #8db9ff;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-support p {
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 8px;
}

.sidebar-support a {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    color: #9dc3ff;
    font-size: 8px;
    font-weight: 700;
}

.admin-page {
    min-height: 100vh;
    margin-left: 245px;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 800;
    min-height: 74px;
    padding: 0 32px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-menu-button {
    display: none;
}

.admin-search {
    width: min(100%, 440px);
    height: 43px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--background);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-search span {
    color: var(--muted);
}

.admin-search input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 9px;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 17px;
}

.admin-header-actions > button {
    position: relative;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
}

.admin-header-actions > button span {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
}

.admin-profile {
    padding-left: 17px;
    border-left: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-profile > span {
    width: 39px;
    height: 39px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-size: 9px;
    font-weight: 800;
}

.admin-profile strong,
.admin-profile small {
    display: block;
}

.admin-profile strong {
    font-size: 9px;
}

.admin-profile small {
    color: var(--muted);
    font-size: 7px;
}

.admin-content {
    padding: 32px;
}

.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.dashboard-heading > div:first-child > span {
    color: var(--blue);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-heading h1 {
    margin-top: 5px;
    font-family: var(--font-heading);
    font-size: 32px;
}

.dashboard-heading p {
    margin-top: 5px;
    color: var(--soft);
    font-size: 9px;
}

.dashboard-heading-actions {
    display: flex;
    gap: 9px;
}

.dashboard-heading-actions a,
.dashboard-heading-actions button {
    min-height: 42px;
    padding: 0 15px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 8px;
    font-weight: 700;
}

.dashboard-heading-actions a {
    border: 1px solid var(--line);
    background: white;
}

.dashboard-heading-actions button {
    border: none;
    background: var(--blue);
    color: white;
}

.dashboard-stat-grid {
    margin-top: 27px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.dashboard-stat-grid > article,
.dashboard-card {
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
}

.dashboard-stat-grid > article {
    position: relative;
    min-height: 195px;
    padding: 20px;
    overflow: hidden;
}

.stat-heading {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.stat-heading > span {
    color: var(--soft);
    font-size: 8px;
    text-transform: uppercase;
}

.stat-heading small {
    color: var(--success);
    font-size: 8px;
}

.dashboard-stat-grid article > strong {
    display: block;
    margin-top: 18px;
    font-family: var(--font-heading);
    font-size: 25px;
}

.dashboard-stat-grid article > p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 8px;
}

.stat-chart {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    height: 53px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.stat-chart i {
    width: 100%;
    border-radius: 3px 3px 0 0;
    background: var(--blue);
    opacity: 0.7;
}

.stat-progress {
    position: absolute;
    right: 20px;
    bottom: 25px;
    left: 20px;
    height: 7px;
    border-radius: 20px;
    background: var(--blue-soft);
    overflow: hidden;
}

.stat-progress span {
    display: block;
    height: 100%;
    background: var(--blue);
}

.visitor-points {
    position: absolute;
    right: 20px;
    bottom: 24px;
    left: 20px;
    display: flex;
    gap: 8px;
}

.visitor-points span {
    height: 9px;
    flex: 1;
    border-radius: 10px;
    background: var(--blue-soft);
}

.visitor-points span:nth-child(2),
.visitor-points span:nth-child(4),
.visitor-points span:nth-child(5) {
    background: var(--blue);
}

.conversion-circle {
    position: absolute;
    right: 20px;
    bottom: 18px;
    width: 58px;
    height: 58px;
    border: 7px solid var(--blue-soft);
    border-top-color: var(--blue);
    border-right-color: var(--blue);
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.conversion-circle span {
    color: var(--blue);
    font-size: 8px;
    font-weight: 800;
}

.dashboard-main-grid {
    margin-top: 17px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 17px;
}

.dashboard-card {
    padding: 22px;
}

.dashboard-card-heading {
    padding-bottom: 17px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-card-heading span {
    color: var(--blue);
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-card-heading h2 {
    margin-top: 4px;
    font-family: var(--font-heading);
    font-size: 17px;
}

.dashboard-card-heading select {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font-size: 8px;
}

.dashboard-card-heading > button {
    border: none;
    background: transparent;
    color: var(--blue);
    display: flex;
    gap: 10px;
    font-size: 8px;
    font-weight: 700;
}

.sales-summary {
    padding: 20px 0;
    display: flex;
    gap: 45px;
}

.sales-summary span,
.sales-summary strong {
    display: block;
}

.sales-summary span {
    color: var(--muted);
    font-size: 7px;
    text-transform: uppercase;
}

.sales-summary strong {
    margin-top: 5px;
    font-size: 11px;
}

.sales-chart {
    height: 245px;
    display: grid;
    grid-template-columns: 45px 1fr;
    gap: 10px;
}

.chart-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--muted);
    font-size: 7px;
}

.chart-content {
    position: relative;
}

.chart-grid-lines {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-grid-lines span {
    width: 100%;
    border-top: 1px dashed var(--line);
}

.chart-bars {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.chart-bars > div {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.chart-bars i {
    width: 55%;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(
        to top,
        var(--blue),
        #72a6ef
    );
}

.chart-bars small {
    margin-top: 8px;
    color: var(--muted);
    font-size: 7px;
}

.status-donut {
    width: 160px;
    height: 160px;
    margin: 30px auto;
    border: 24px solid var(--blue-soft);
    border-top-color: var(--blue);
    border-right-color: var(--success);
    border-bottom-color: var(--warning);
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.status-donut > div {
    text-align: center;
}

.status-donut strong,
.status-donut span {
    display: block;
}

.status-donut strong {
    font-family: var(--font-heading);
    font-size: 28px;
}

.status-donut span {
    color: var(--muted);
    font-size: 7px;
}

.status-list {
    display: grid;
    gap: 11px;
}

.status-list article {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    gap: 9px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.processing {
    background: var(--blue);
}

.status-dot.shipped {
    background: #8059d9;
}

.status-dot.delivered {
    background: var(--success);
}

.status-dot.pending {
    background: var(--warning);
}

.status-list strong {
    font-size: 8px;
}

.status-list small {
    color: var(--muted);
    font-size: 7px;
}

.dashboard-bottom-grid {
    margin-top: 17px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 17px;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
    font-size: 8px;
}

.admin-table th {
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
}

.admin-table td {
    color: var(--soft);
}

.admin-table td strong {
    color: var(--text);
}

.admin-table td > button {
    border: none;
    background: transparent;
}

.table-status {
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 7px;
    font-weight: 700;
}

.table-status.processing,
.table-status.paid {
    background: var(--blue-soft);
    color: var(--blue);
}

.table-status.delivered {
    background: #e5f7ed;
    color: var(--success);
}

.table-status.pending {
    background: #fff2d9;
    color: var(--warning);
}

.low-stock-card > .dashboard-card-heading > strong {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #fae8e8;
    color: var(--danger);
    display: grid;
    place-items: center;
    font-size: 8px;
}

.low-stock-list article {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 10px;
}

.low-stock-list img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.low-stock-list strong,
.low-stock-list span {
    display: block;
}

.low-stock-list strong {
    font-size: 8px;
}

.low-stock-list span {
    margin-top: 3px;
    color: var(--danger);
    font-size: 7px;
}

.low-stock-list button {
    min-height: 32px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: white;
    color: var(--blue);
    font-size: 7px;
    font-weight: 700;
}

.top-products-card {
    margin-top: 17px;
}

.top-product-grid {
    display: grid;
}

.top-product-grid article {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 40px 60px 1fr 90px 135px;
    align-items: center;
    gap: 15px;
}

.product-rank {
    color: var(--muted);
    font-family: var(--font-heading);
    font-size: 14px;
}

.top-product-grid img {
    width: 60px;
    height: 60px;
    border-radius: 9px;
    object-fit: cover;
}

.top-product-grid strong,
.top-product-grid small {
    display: block;
}

.top-product-grid article > div > strong {
    font-size: 9px;
}

.top-product-grid article > div > small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 7px;
}

.product-sales,
.product-revenue {
    text-align: right;
}

@media (max-width: 1100px) {
    .dashboard-stat-grid {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 800px) {
    .admin-sidebar {
        transform: translateX(-105%);
        transition: transform 0.25s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 25px 0 60px rgba(0, 0, 0, 0.25);
    }

    .admin-page {
        margin-left: 0;
    }

    .admin-menu-button {
        width: 39px;
        height: 39px;
        border: 1px solid var(--line);
        border-radius: 9px;
        background: white;
        display: grid;
        place-items: center;
    }

    .admin-header {
        padding: 0 17px;
        gap: 12px;
    }

    .admin-search {
        flex: 1;
    }

    .admin-profile > div {
        display: none;
    }

    .admin-content {
        padding: 20px 14px;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-product-grid article {
        grid-template-columns: 35px 55px 1fr;
    }

    .product-sales,
    .product-revenue {
        grid-column: 3;
        text-align: left;
    }
}

@media (max-width: 550px) {
    .admin-header-actions > button {
        display: none;
    }

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

    .sales-summary {
        flex-direction: column;
        gap: 13px;
    }

    .chart-bars {
        gap: 6px;
    }

    .dashboard-heading-actions {
        width: 100%;
    }

    .dashboard-heading-actions a,
    .dashboard-heading-actions button {
        flex: 1;
        justify-content: center;
    }
}
