:root {
    --navy: #101f3d;
    --navy-light: #1b3156;
    --turquoise: #13b8a6;
    --turquoise-dark: #0e9f91;
    --background: #f4f7fb;
    --white: #ffffff;
    --text: #1d2939;
    --muted: #8491a5;
    --border: #e8edf3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "DM Sans", sans-serif;
    background: var(--background);
    color: var(--text);
    font-size: 15px;
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app {
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 265px;
    height: 100vh;
    background: var(--navy);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 30px 20px 20px;
    z-index: 100;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "Manrope", sans-serif;
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 42px;
    padding-left: 8px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--turquoise);
    border-radius: 11px;
    font-size: 22px;
    color: white;
}

.brand-dot {
    color: var(--turquoise);
}

.shop-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 12px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    margin-bottom: 35px;
}

.shop-avatar {
    width: 43px;
    height: 43px;
    border-radius: 10px;
    background: var(--turquoise);
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 800;
}

.shop-profile strong,
.shop-profile small {
    display: block;
}

.shop-profile strong {
    font-size: 14px;
}

.shop-profile small {
    color: #aab8cb;
    font-size: 12px;
    margin-top: 4px;
}

.nav-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #8190a8;
    padding: 0 12px;
    margin-bottom: 13px;
}

.second-title {
    margin-top: 35px;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nav-link {
    text-decoration: none;
    color: #b6c2d3;
    padding: 14px 12px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 14px;
    font-weight: 500;
    transition: .2s;
}

.nav-link:hover {
    background: rgba(255,255,255,.08);
    color: white;
}

.nav-link.active {
    background: var(--turquoise);
    color: white;
    font-weight: 700;
}

.nav-link i {
    width: 21px;
    font-size: 18px;
    text-align: center;
}

.count {
    margin-left: auto;
    background: #f59e0b;
    color: #392607;
    border-radius: 20px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 35px;
}

.overlay {
    display: none;
}

.logout {
    display: block;
    padding: 12px;
    color: #aab8cb;
    text-decoration: none;
    font-size: 14px;
}

.logout span {
    margin-right: 10px;
}

/* MAIN CONTENT */

.main-content {
    margin-left: 265px;
    min-height: 100vh;
}

.topbar {
    height: 78px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 38px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb strong {
    color: var(--navy);
}

.separator {
    color: #c3ccd7;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.notification {
    position: relative;
    border: 0;
    background: transparent;
    font-size: 23px;
    color: #617087;
}

.notification span {
    position: absolute;
    width: 7px;
    height: 7px;
    background: #ef5964;
    border: 2px solid white;
    border-radius: 50%;
    right: 0;
    top: 1px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-avatar {
    width: 39px;
    height: 39px;
    background: #d9f5f1;
    color: #078d80;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 12px;
}

.user-info strong,
.user-info small {
    display: block;
}

.user-info strong {
    font-size: 13px;
}

.user-info small {
    color: var(--muted);
    font-size: 11px;
    margin-top: 3px;
}

.arrow {
    color: var(--muted);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 23px;
    color: var(--navy);
}

/* PAGE */

.page-content {
    padding: 38px;
    max-width: 1700px;
    margin: auto;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.eyebrow {
    color: var(--turquoise-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.page-heading h1 {
    font-family: "Manrope", sans-serif;
    color: var(--navy);
    font-size: 30px;
    font-weight: 800;
    margin: 8px 0;
}

.page-heading p {
    color: var(--muted);
    font-size: 15px;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 13px 18px;
    color: var(--navy);
    font-weight: 700;
    font-size: 13px;
    transition: .2s;
}

.export-btn:hover {
    border-color: var(--turquoise);
    color: var(--turquoise-dark);
}

.export-btn span {
    font-size: 20px;
}

/* STATISTICS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    min-width: 0;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-label {
    color: #68778c;
    font-size: 13px;
    font-weight: 600;
}

.stat-icon {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 20px;
}

.stat-icon.blue {
    background: #e9f1ff;
    color: #3974d8;
}

.stat-icon.orange {
    background: #fff3e5;
    color: #e99432;
}

.stat-icon.purple {
    background: #f2edff;
    color: #8b67d9;
}

.stat-icon.green {
    background: #e5f8f1;
    color: #14a579;
}

.stat-card h2 {
    color: var(--navy);
    font-family: "Manrope", sans-serif;
    font-size: 29px;
    margin: 17px 0 7px;
}

.stat-description {
    font-size: 12px;
    color: var(--muted);
}

.positive {
    color: #13a579;
    font-weight: 800;
}

/* ORDERS */

.orders-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
    overflow: hidden;
}

.orders-heading {
    padding: 25px 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.orders-heading h2 {
    font-family: "Manrope", sans-serif;
    color: var(--navy);
    font-size: 19px;
    font-weight: 800;
}

.orders-heading p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}

.orders-heading .orders-status {
    font-size: 11px;
    line-height: 1.5;
}

.order-message {
    max-width: 260px;
    color: #53647a !important;
    font-size: 10px !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

.order-products {
    max-width: 260px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.detail-line strong {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-align: right;
}

.orders-total {
    background: #e8f8f5;
    color: #078d80;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 25px 22px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 230px;
    height: 43px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 13px;
}

.search-box span {
    font-size: 23px;
    color: #8290a4;
}

.search-box input {
    border: 0;
    outline: 0;
    width: 100%;
    color: var(--text);
    font-size: 13px;
    background: transparent;
}

.filter-bar select,
.filter-bar input[type="date"] {
    height: 43px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    color: #59677c;
    background: white;
    outline: none;
    font-size: 12px;
}

.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--turquoise);
}

.status-tabs {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 0 25px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab {
    border: 0;
    background: transparent;
    color: #77869a;
    font-size: 13px;
    font-weight: 600;
    padding: 15px 0;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.tab span {
    margin-left: 4px;
    color: #9ba7b7;
    font-size: 11px;
}

.tab.active {
    color: var(--turquoise-dark);
    border-bottom-color: var(--turquoise);
}

.tab.active span {
    color: var(--turquoise-dark);
}

/* TABLE */

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

thead {
    background: #f8fafc;
}

th {
    padding: 15px 13px;
    text-align: left;
    color: #8290a4;
    font-size: 10px;
    letter-spacing: .7px;
    font-weight: 800;
    white-space: nowrap;
}

td {
    padding: 16px 13px;
    border-bottom: 1px solid #edf0f5;
    font-size: 12px;
    color: #66758a;
    white-space: nowrap;
}

tbody tr:hover {
    background: #fbfdfd;
}

td input,
th input {
    width: 15px;
    height: 15px;
    accent-color: var(--turquoise);
    cursor: pointer;
}

.order-id {
    color: var(--navy);
    font-size: 12px;
    font-weight: 800;
}

.customer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-avatar {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}

.customer strong,
.customer small {
    display: block;
}

.customer strong {
    color: var(--navy);
    font-size: 12px;
}

.customer small {
    font-size: 10px;
    color: #98a3b2;
    margin-top: 4px;
}

.customer .order-address {
    max-width: 260px;
    color: #53647a;
    white-space: normal;
    overflow-wrap: anywhere;
}

.avatar-one {
    background: #e5efff;
    color: #4674bd;
}

.avatar-two {
    background: #fce9ef;
    color: #c05c80;
}

.avatar-three {
    background: #e8f5e9;
    color: #4d9560;
}

.avatar-four {
    background: #fff0df;
    color: #b87c32;
}

.avatar-five {
    background: #f0e9ff;
    color: #8061bd;
}

.avatar-six {
    background: #e0f4f5;
    color: #308d91;
}

.payment,
.status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}

.payment.paid {
    background: #e6f7ef;
    color: #149568;
}

.payment.pending {
    background: #fff3df;
    color: #c58a27;
}

.payment.refunded {
    background: #f1edff;
    color: #8166c2;
}

.status.new {
    background: #e9f1ff;
    color: #3974d8;
}

.status.preparing {
    background: #fff2df;
    color: #c98b2c;
}

.status.shipped {
    background: #e9f7f8;
    color: #258e97;
}

.status.delivered {
    background: #e5f7ee;
    color: #16966a;
}

.status.cancelled {
    background: #ffeded;
    color: #d35d5d;
}

.action-btn {
    border: 0;
    background: transparent;
    color: var(--turquoise-dark);
    font-size: 12px;
    font-weight: 800;
}

.action-btn:hover {
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state div {
    font-size: 35px;
    color: var(--turquoise);
}

.empty-state h3 {
    margin: 12px 0 7px;
    color: var(--navy);
}

.empty-state p {
    color: var(--muted);
    font-size: 13px;
}

.table-footer {
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--border);
}

.table-footer p {
    font-size: 12px;
    color: var(--muted);
}

.table-footer p strong {
    color: var(--navy);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination button {
    min-width: 31px;
    height: 31px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    color: #68778c;
    font-size: 11px;
}

.pagination button.current {
    background: var(--turquoise);
    color: white;
    border-color: var(--turquoise);
}

.pagination button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.pagination span {
    color: var(--muted);
    padding: 0 4px;
}

/* MODAL */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 48, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 300;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    display: flex;
    background: white;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: modalAppear .2s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 23px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-family: "Manrope", sans-serif;
    font-size: 20px;
    color: var(--navy);
    margin-top: 7px;
}

.close-modal {
    border: 0;
    background: transparent;
    color: #7d899a;
    font-size: 29px;
}

.modal-body {
    min-height: 0;
    padding: 23px 25px;
    overflow-y: auto;
}

.detail-block {
    margin-bottom: 22px;
}

.detail-block:last-child {
    margin-bottom: 0;
}

.detail-block h3 {
    color: var(--navy);
    font-size: 13px;
    margin-bottom: 10px;
}

.detail-block p {
    font-size: 14px;
    font-weight: 700;
}

.detail-block .delivery-address {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.detail-block small {
    display: block;
    color: var(--muted);
    margin-top: 5px;
}

.detail-line {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.detail-line span {
    color: var(--muted);
}

.detail-line strong {
    color: var(--navy);
}

.detail-block select {
    width: 100%;
    height: 45px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 25px;
    background: #f8fafc;
}

.cancel-btn,
.save-btn {
    border: 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.cancel-btn {
    background: #edf1f5;
    color: #58677c;
}

.save-btn {
    background: var(--turquoise);
    color: white;
}

.save-btn:hover {
    background: var(--turquoise-dark);
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-content {
        padding: 28px;
    }
}

@media (max-width: 900px) {
    .sidebar {
        z-index: 1000;
        top: 0;
        bottom: auto;
        left: -270px;
        transition: left .3s ease;
        width: 255px;
        min-width: 255px;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        max-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding: 27px 17px 20px;
    }

    .brand {
        padding: 0 10px;
        margin-bottom: 35px;
    }

    .shop-profile {
        padding: 13px 10px;
        margin-bottom: 31px;
    }

    .navigation {
        gap: 5px;
    }

    .navigation .nav-link {
        min-height: 44px;
        padding: 0 12px;
        gap: 12px;
        font-size: 12px;
    }

    .navigation .nav-link i {
        width: 18px;
        font-size: 14px;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-bottom {
        padding-top: 25px;
        border-top: 1px solid rgba(255,255,255,.1);
    }

    .sidebar-bottom .logout {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        color: #F3A1A1;
        font-size: 12px;
    }

    .overlay.visible {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 999;
        background: rgba(9, 25, 41, .5);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .topbar {
        padding: 0 22px;
        gap: 15px;
    }

    .breadcrumb {
        margin-right: auto;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    .topbar {
        height: 68px;
        padding: 0 15px;
    }

    .topbar-right {
        gap: 13px;
    }

    .user-info,
    .arrow {
        display: none;
    }

    .page-content {
        padding: 23px 15px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 23px;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .page-heading p {
        font-size: 13px;
        line-height: 1.6;
    }

    .export-btn {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 11px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-label {
        font-size: 11px;
        line-height: 1.5;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .stat-card h2 {
        font-size: 24px;
        margin-top: 13px;
    }

    .stat-description {
        font-size: 10px;
    }

    .orders-heading {
        padding: 20px 15px;
        align-items: flex-start;
        flex-direction: column;
    }

    .orders-heading h2 {
        font-size: 17px;
    }

    .filter-bar {
        padding: 0 15px 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
        min-width: 0;
    }

    .filter-bar select,
    .filter-bar input[type="date"] {
        width: 100%;
    }

    .status-tabs {
        padding: 0 15px;
        gap: 20px;
    }

    .tab {
        font-size: 12px;
    }

    .table-footer {
        padding: 15px;
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination {
        width: 100%;
        justify-content: center;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-overlay {
        padding: 12px;
    }

    .modal {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .modal-header,
    .modal-body {
        padding: 18px;
    }

    .detail-line {
        align-items: flex-start;
        gap: 12px;
    }

    .detail-line strong {
        max-width: 58%;
        font-size: 12px;
    }

    .cancel-btn,
    .save-btn {
        width: 100%;
        padding: 14px;
    }
}

@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}