/* =========================================================
   AYSELL GALLERY
   ADMIN ORDERS CSS
   RTL / RESPONSIVE / DARK READY
   ========================================================= */

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

html {
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    font-family:
        Tahoma,
        Arial,
        sans-serif;

    background: #f7f4f7;
    color: #2d2730;

    min-height: 100vh;

    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

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


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

.admin-layout {
    min-height: 100vh;
    display: flex;
}


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

.sidebar {
    position: fixed;

    top: 0;
    right: 0;

    width: 270px;
    height: 100vh;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fff8fc 100%
        );

    border-left: 1px solid #eadfe7;

    z-index: 1000;

    display: flex;
    flex-direction: column;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


/* HEADER */

.sidebar-header {
    display: flex;

    align-items: center;

    gap: 13px;

    padding: 25px 20px;

    border-bottom: 1px solid #eee4eb;
}

.brand-icon {
    width: 48px;
    height: 48px;

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

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #f8b8d5,
            #e9a5ca
        );

    font-size: 24px;

    box-shadow:
        0 8px 20px rgba(
            214,
            105,
            157,
            0.18
        );
}

.brand-text h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.brand-text span {
    font-size: 12px;
    color: #8b7f88;
}


/* MENU */

.sidebar-menu {
    padding: 20px 14px;

    display: flex;
    flex-direction: column;

    gap: 7px;
}

.sidebar-menu a {
    min-height: 49px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 0 15px;

    border-radius: 13px;

    color: #665d66;

    font-size: 14px;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.sidebar-menu a:hover {
    background: #fff0f7;
    color: #c04d88;

    transform: translateX(-2px);
}

.sidebar-menu a.active {
    background:
        linear-gradient(
            135deg,
            #f9c2da,
            #efb0d1
        );

    color: #7f2855;

    font-weight: 700;

    box-shadow:
        0 8px 18px rgba(
            212,
            93,
            148,
            0.15
        );
}

.menu-icon {
    width: 27px;

    text-align: center;

    font-size: 19px;
}


/* FOOTER */

.sidebar-footer {
    margin-top: auto;

    padding: 20px;

    border-top: 1px solid #eee4eb;

    display: flex;
    flex-direction: column;

    gap: 5px;
}

.sidebar-footer strong {
    font-size: 12px;
    letter-spacing: 1px;
}

.sidebar-footer small {
    color: #9b9099;
    font-size: 11px;
}


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

.sidebar-overlay {
    position: fixed;

    inset: 0;

    background: rgba(
        20,
        15,
        20,
        0.48
    );

    z-index: 999;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}


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

.main-content {
    width: calc(100% - 270px);

    margin-right: 270px;

    min-height: 100vh;
}


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

.topbar {
    height: 82px;

    padding: 0 30px;

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

    border-bottom: 1px solid #e9e0e7;

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

    position: sticky;
    top: 0;

    z-index: 900;

    backdrop-filter: blur(15px);
}

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

    gap: 16px;
}

.page-heading h1 {
    font-size: 22px;
    margin-bottom: 5px;
}

.page-heading p {
    color: #8b8089;
    font-size: 12px;
}


/* MENU BUTTON */

.menu-toggle {
    width: 43px;
    height: 43px;

    display: none;

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

    border: 1px solid #eadde5;

    border-radius: 12px;

    background: #fff;

    font-size: 23px;

    color: #5f5260;
}

.menu-toggle:active {
    transform: scale(0.96);
}


/* TOP LEFT */

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

    gap: 10px;
}


/* REFRESH */

.refresh-btn,
.logout-btn {
    min-height: 42px;

    border-radius: 11px;

    padding: 0 15px;

    border: 1px solid #eadde5;

    background: #fff;

    color: #514751;

    display: inline-flex;

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

    gap: 7px;

    font-size: 13px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.refresh-btn:hover {
    background: #fff1f7;
    border-color: #edb3d0;
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.refresh-icon {
    font-size: 19px;
    line-height: 1;
}

.logout-btn:hover {
    background: #fff0f0;
    border-color: #e7bcbc;
    color: #a34242;
}


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

.page-content {
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}


/* ERROR */

.page-error {
    display: none;

    margin-bottom: 20px;

    padding: 14px 16px;

    border-radius: 13px;

    background: #fff0f0;

    border: 1px solid #edc1c1;

    color: #a23838;

    font-size: 13px;
}


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

.stats-grid {
    display: grid;

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

    gap: 17px;

    margin-bottom: 25px;
}

.stat-card {
    background: #fff;

    border: 1px solid #eee3ea;

    border-radius: 18px;

    padding: 20px;

    min-height: 115px;

    display: flex;
    align-items: center;

    gap: 15px;

    box-shadow:
        0 7px 25px rgba(
            70,
            45,
            65,
            0.045
        );
}

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

    flex: 0 0 51px;

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

    border-radius: 15px;

    background: #fff0f7;

    font-size: 23px;
}

.stat-content {
    display: flex;
    flex-direction: column;

    gap: 7px;

    min-width: 0;
}

.stat-content span {
    color: #8d828b;

    font-size: 12px;
}

.stat-content strong {
    font-size: 17px;

    color: #342d35;
}


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

.orders-toolbar {
    background: #fff;

    border: 1px solid #eee3ea;

    border-radius: 18px;

    padding: 17px;

    margin-bottom: 24px;

    display: flex;

    align-items: center;

    gap: 13px;

    box-shadow:
        0 7px 25px rgba(
            70,
            45,
            65,
            0.04
        );
}

.toolbar-search {
    flex: 1;

    min-width: 230px;

    height: 46px;

    position: relative;
}

.toolbar-search input {
    width: 100%;
    height: 100%;

    border: 1px solid #e7dce4;

    border-radius: 12px;

    background: #fff;

    outline: none;

    padding:
        0 45px 0 15px;

    font-size: 13px;

    color: #332c34;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.toolbar-search input:focus {
    border-color: #d88aae;

    box-shadow:
        0 0 0 4px rgba(
            216,
            138,
            174,
            0.10
        );
}

.search-icon {
    position: absolute;

    right: 15px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 17px;

    z-index: 2;
}

.toolbar-filters {
    display: flex;

    gap: 10px;
}

.filter-select {
    min-width: 175px;

    height: 46px;

    border-radius: 12px;

    border: 1px solid #e7dce4;

    background: #fff;

    color: #4b424b;

    outline: none;

    padding: 0 12px;

    font-size: 12px;

    cursor: pointer;
}

.filter-select:focus {
    border-color: #d88aae;
}


/* =========================================================
   LIST HEADER
   ========================================================= */

.orders-list-header {
    display: flex;

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

    margin-bottom: 13px;

    padding: 0 3px;
}

.orders-list-header h2 {
    font-size: 17px;
}

.orders-list-header span {
    color: #8d828b;
    font-size: 12px;
}


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

.table-wrapper {
    background: #fff;

    border: 1px solid #eee3ea;

    border-radius: 18px;

    overflow-x: auto;

    box-shadow:
        0 7px 25px rgba(
            70,
            45,
            65,
            0.04
        );
}

.orders-table {
    width: 100%;

    border-collapse: collapse;

    min-width: 950px;
}

.orders-table th {
    background: #fff8fc;

    color: #766b74;

    font-size: 12px;

    font-weight: 700;

    text-align: right;

    padding: 16px;

    white-space: nowrap;

    border-bottom: 1px solid #eee3ea;
}

.orders-table td {
    padding: 17px 16px;

    border-bottom: 1px solid #f1e9ef;

    font-size: 12px;

    vertical-align: middle;
}

.orders-table tbody tr {
    transition:
        background 0.2s ease;
}

.orders-table tbody tr:hover {
    background: #fffafd;
}

.orders-table tbody tr:last-child td {
    border-bottom: none;
}

.customer-name {
    font-weight: 700;
    margin-bottom: 5px;
}

.orders-table td small {
    color: #999099;
    font-size: 10px;
}


/* =========================================================
   STATUS
   ========================================================= */

.order-status,
.payment-status {
    display: inline-flex;

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

    min-width: 95px;

    min-height: 31px;

    padding: 5px 10px;

    border-radius: 999px;

    font-size: 11px;

    font-weight: 700;
}

.status-pending,
.payment-pending {
    background: #fff4df;
    color: #9b6a19;
}

.status-confirmed {
    background: #e9f7ed;
    color: #297341;
}

.status-processing {
    background: #edf3ff;
    color: #3e65a5;
}

.status-shipped {
    background: #eeeaff;
    color: #6550a4;
}

.status-delivered,
.status-completed,
.payment-paid {
    background: #e5f8ed;
    color: #287441;
}

.status-cancelled,
.payment-failed {
    background: #ffeded;
    color: #a23e3e;
}

.payment-refunded {
    background: #f0edf3;
    color: #6b6070;
}


/* =========================================================
   VIEW BUTTON
   ========================================================= */

.order-view-btn {
    min-height: 35px;

    padding: 0 13px;

    border-radius: 9px;

    border: 1px solid #edb5d1;

    background: #fff1f7;

    color: #a43b6d;

    font-size: 11px;

    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.order-view-btn:hover {
    background: #f9dbe9;

    transform: translateY(-1px);
}


/* =========================================================
   LOADING
   ========================================================= */

.loading-state {
    min-height: 260px;

    background: #fff;

    border: 1px solid #eee3ea;

    border-radius: 18px;

    display: flex;

    flex-direction: column;

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

    gap: 15px;

    color: #81757e;

    font-size: 13px;
}

.loading-spinner {
    width: 35px;
    height: 35px;

    border: 3px solid #f2dce7;

    border-top-color: #ce6c9d;

    border-radius: 50%;

    animation:
        spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   EMPTY
   ========================================================= */

.empty-state {
    min-height: 270px;

    background: #fff;

    border: 1px solid #eee3ea;

    border-radius: 18px;

    display: flex;

    flex-direction: column;

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

    text-align: center;

    padding: 30px;
}

.empty-icon {
    font-size: 42px;

    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 17px;

    margin-bottom: 8px;
}

.empty-state p {
    color: #90858e;

    font-size: 12px;
}


/* =========================================================
   MODAL
   ========================================================= */

.order-modal {
    position: fixed;

    inset: 0;

    z-index: 2000;

    background: rgba(
        30,
        23,
        30,
        0.56
    );

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

    padding: 20px;

    backdrop-filter: blur(5px);
}

.order-modal-content {
    width: min(
        100%,
        950px
    );

    max-height: calc(100vh - 40px);

    background: #fff;

    border-radius: 22px;

    overflow: hidden;

    display: flex;

    flex-direction: column;

    box-shadow:
        0 25px 80px rgba(
            20,
            10,
            20,
            0.22
        );
}

.modal-header {
    padding: 20px 23px;

    display: flex;

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

    border-bottom: 1px solid #eee4eb;

    background: #fffafd;
}

.modal-label {
    display: block;

    color: #988c95;

    font-size: 11px;

    margin-bottom: 5px;
}

.modal-header h2 {
    font-size: 19px;
}

.modal-close {
    width: 39px;
    height: 39px;

    border-radius: 11px;

    border: 1px solid #eadde5;

    background: #fff;

    font-size: 26px;

    color: #756a73;

    line-height: 1;
}

.modal-close:hover {
    background: #fff0f6;
    color: #a63c70;
}

.modal-body {
    overflow-y: auto;

    padding: 22px;
}

.modal-footer {
    padding: 15px 22px;

    border-top: 1px solid #eee4eb;

    display: flex;

    justify-content: flex-start;
}

.modal-footer-close {
    min-height: 40px;

    padding: 0 18px;

    border-radius: 10px;

    border: 1px solid #eadde5;

    background: #fff;

    font-size: 12px;
}


/* =========================================================
   ORDER DETAIL
   ========================================================= */

.order-detail-header {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    padding: 17px;

    background: #fff5fa;

    border: 1px solid #f0dce7;

    border-radius: 15px;

    margin-bottom: 18px;
}

.detail-label {
    display: block;

    color: #8d8089;

    font-size: 11px;

    margin-bottom: 6px;
}

.detail-order-number {
    font-size: 17px;
}

.detail-total {
    text-align: left;

    display: flex;
    flex-direction: column;

    gap: 5px;
}

.detail-total span {
    color: #8d8089;
    font-size: 11px;
}

.detail-total strong {
    color: #a13d6d;
    font-size: 16px;
}


/* SECTION */

.order-section {
    margin-bottom: 20px;
}

.order-section-title {
    display: flex;

    align-items: center;

    gap: 8px;

    font-weight: 700;

    font-size: 14px;

    margin-bottom: 12px;
}


/* INFO */

.order-info-grid {
    display: grid;

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

    gap: 10px;
}

.order-info-box {
    padding: 13px;

    border: 1px solid #eee3ea;

    border-radius: 12px;

    background: #fff;
}

.order-info-box span {
    display: block;

    color: #948991;

    font-size: 10px;

    margin-bottom: 6px;
}

.order-info-box strong {
    font-size: 12px;

    line-height: 1.8;
}

.order-info-full {
    grid-column: 1 / -1;
}


/* ITEMS */

.order-items {
    display: flex;

    flex-direction: column;

    gap: 8px;
}

.order-item {
    display: flex;

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

    gap: 15px;

    padding: 13px;

    border: 1px solid #eee3ea;

    border-radius: 12px;

    background: #fff;
}

.order-item-main {
    display: flex;

    flex-direction: column;

    gap: 6px;
}

.order-item-main strong {
    font-size: 12px;
}

.order-item-main span {
    color: #91858e;

    font-size: 10px;
}

.order-item-price {
    font-weight: 700;

    color: #9f3c6d;

    white-space: nowrap;
}

.order-no-items {
    padding: 15px;

    background: #faf7f9;

    border-radius: 12px;

    color: #8d828b;

    font-size: 12px;
}


/* =========================================================
   MANAGEMENT CONTROLS
   ========================================================= */

.order-controls {
    margin-top: 22px;
}

.order-controls-grid {
    display: grid;

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

    gap: 14px;
}

.order-control-box {
    background: #fff;

    border: 1px solid #eadfe7;

    border-radius: 15px;

    padding: 16px;

    box-shadow:
        0 5px 16px rgba(
            60,
            40,
            55,
            0.03
        );
}

.order-control-title {
    display: block;

    font-size: 12px;

    font-weight: 700;

    margin-bottom: 9px;

    color: #453b44;
}

.order-control-select,
.order-control-input,
.order-control-textarea {
    width: 100%;

    border: 1px solid #e4d9e1;

    background: #fff;

    color: #393139;

    border-radius: 10px;

    outline: none;

    font-size: 12px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.order-control-select,
.order-control-input {
    height: 43px;

    padding: 0 11px;
}

.order-control-textarea {
    padding: 11px;

    resize: vertical;

    min-height: 95px;

    line-height: 1.8;
}

.order-control-select:focus,
.order-control-input:focus,
.order-control-textarea:focus {
    border-color: #d88aae;

    box-shadow:
        0 0 0 4px rgba(
            216,
            138,
            174,
            0.10
        );
}

.order-control-hint {
    display: block;

    margin-top: 8px;

    opacity: 0.7;

    font-size: 10px;

    line-height: 1.7;
}

.order-control-save {
    width: 100%;

    min-height: 40px;

    margin-top: 12px;

    border: 0;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #d875a4,
            #c75e91
        );

    color: #fff;

    font-size: 11px;

    font-weight: 700;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.order-control-save:hover {
    transform: translateY(-1px);
}

.order-control-save:disabled {
    opacity: 0.55;

    cursor: wait;

    transform: none;
}


/* =========================================================
   MODAL LOADING / ERROR
   ========================================================= */

.order-loading {
    min-height: 180px;

    display: flex;

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

    color: #81757e;

    font-size: 13px;
}

.order-error {
    padding: 18px;

    border-radius: 12px;

    background: #fff0f0;

    color: #a23838;

    border: 1px solid #edc1c1;

    font-size: 12px;
}


/* =========================================================
   TOAST
   ========================================================= */

.toast-container {
    position: fixed;

    left: 22px;
    bottom: 22px;

    z-index: 5000;

    display: flex;

    flex-direction: column;

    gap: 9px;

    max-width: 360px;
}

.toast {
    padding: 13px 17px;

    border-radius: 12px;

    background: #302a31;

    color: #fff;

    font-size: 12px;

    box-shadow:
        0 10px 30px rgba(
            0,
            0,
            0,
            0.18
        );

    animation:
        toastIn 0.25s ease;
}

.toast-success {
    background: #267246;
}

.toast-error {
    background: #a43c3c;
}

.toast.hide {
    opacity: 0;

    transform: translateY(8px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


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

@media (max-width: 1000px) {

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

    .orders-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-filters {
        display: grid;

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

    .filter-select {
        width: 100%;
        min-width: 0;
    }
}


@media (max-width: 768px) {

    .sidebar {
        transform:
            translateX(100%);

        box-shadow: none;
    }

    /*
       مهم:
       JS کلاس open را اضافه می‌کند.
    */

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

        box-shadow:
            -15px 0 45px rgba(
                30,
                20,
                30,
                0.18
            );
    }

    .main-content {
        width: 100%;

        margin-right: 0;
    }

    .topbar {
        height: 72px;

        padding: 0 15px;
    }

    .menu-toggle {
        display: flex;
    }

    .page-heading h1 {
        font-size: 17px;
    }

    .page-heading p {
        display: none;
    }

    .topbar-left {
        gap: 6px;
    }

    .refresh-btn {
        width: 43px;

        padding: 0;

        font-size: 0;
    }

    .refresh-icon {
        font-size: 21px;
    }

    .logout-btn {
        width: 43px;

        padding: 0;

        font-size: 0;
    }

    .logout-btn::before {
        content: "↪";

        font-size: 20px;
    }

    .page-content {
        padding: 18px 13px 30px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        min-height: 100px;

        padding: 13px;

        border-radius: 14px;

        gap: 10px;
    }

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

        flex-basis: 42px;

        font-size: 19px;
    }

    .stat-content strong {
        font-size: 14px;
    }

    .stat-content span {
        font-size: 10px;
    }

    .toolbar-filters {
        grid-template-columns: 1fr;
    }

    .order-controls-grid {
        grid-template-columns: 1fr;
    }

    .order-info-grid {
        grid-template-columns: 1fr;
    }

    .order-info-full {
        grid-column: auto;
    }

    .order-detail-header {
        flex-direction: column;
    }

    .detail-total {
        text-align: right;
    }

    .order-modal {
        padding: 8px;
    }

    .order-modal-content {
        max-height: calc(100vh - 16px);

        border-radius: 17px;
    }

    .modal-body {
        padding: 14px;
    }

    .modal-header {
        padding: 15px;
    }

    .toast-container {
        left: 12px;
        right: 12px;

        bottom: 12px;

        max-width: none;
    }

    .toast {
        text-align: center;
    }
}


@media (max-width: 480px) {

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

    .orders-list-header h2 {
        font-size: 15px;
    }

    .toolbar-search {
        min-width: 0;
    }

    .order-item {
        align-items: flex-start;

        flex-direction: column;
    }

    .order-item-price {
        align-self: flex-start;
    }
}


/* =========================================================
   DARK MODE
   ========================================================= */

@media (prefers-color-scheme: dark) {

    body {
        background: #171318;
        color: #eee8ed;
    }

    .sidebar,
    .topbar,
    .stat-card,
    .orders-toolbar,
    .table-wrapper,
    .loading-state,
    .empty-state,
    .order-modal-content,
    .order-control-box,
    .order-info-box,
    .order-item {
        background: #211b21;
        border-color: #382f37;
    }

    .sidebar {
        background:
            linear-gradient(
                180deg,
                #211b21,
                #1b171b
            );
    }

    .sidebar-header,
    .sidebar-footer,
    .topbar,
    .orders-table th,
    .modal-header,
    .modal-footer {
        border-color: #382f37;
    }

    .sidebar-menu a {
        color: #c7bdc5;
    }

    .sidebar-menu a:hover {
        background: #30232c;
        color: #f0a9ca;
    }

    .sidebar-menu a.active {
        background: #432638;
        color: #f3afd0;
    }

    .brand-text h2,
    .page-heading h1,
    .stat-content strong,
    .orders-list-header h2,
    .order-control-title,
    .detail-order-number,
    .order-item-main strong,
    .modal-header h2 {
        color: #f1eaf0;
    }

    .page-heading p,
    .stat-content span,
    .orders-list-header span,
    .sidebar-footer small,
    .detail-label,
    .detail-total span,
    .order-item-main span,
    .order-no-items {
        color: #aaa0a9;
    }

    .refresh-btn,
    .logout-btn,
    .menu-toggle,
    .filter-select,
    .toolbar-search input,
    .order-control-select,
    .order-control-input,
    .order-control-textarea,
    .modal-close,
    .modal-footer-close {
        background: #292229;
        color: #eee8ed;
        border-color: #413640;
    }

    .toolbar-search input::placeholder,
    .order-control-input::placeholder,
    .order-control-textarea::placeholder {
        color: #827781;
    }

    .orders-table th {
        background: #2a2229;
        color: #bdb2bb;
    }

    .orders-table td {
        border-color: #342c33;
    }

    .orders-table tbody tr:hover {
        background: #282027;
    }

    .order-modal {
        background: rgba(
            0,
            0,
            0,
            0.7
        );
    }

    .order-detail-header {
        background: #30212a;
        border-color: #493441;
    }
}
/* =========================================================
   FIX — MOBILE MENU + REFRESH
========================================================= */

#menuToggle,
#refreshBtn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.sidebar.active,
.sidebar.open {
    transform: translateX(0) !important;
    visibility: visible !important;
}

.sidebar-overlay.active,
.sidebar-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

@media (max-width: 1000px) {

    .sidebar {
        transform: translateX(100%);
        z-index: 1100;
    }

    .sidebar.active,
    .sidebar.open {
        transform: translateX(0) !important;
    }

    .sidebar-overlay {
        z-index: 1099;
        pointer-events: none;
    }

    .sidebar-overlay.active,
    .sidebar-overlay.show {
        pointer-events: auto !important;
    }

    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 1101;
    }
}