* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #FAFAF8;
    color: #29252e;
    font-family: Tahoma, Arial, sans-serif
}

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

.dashboard-shell {
    min-height: 100vh
}

.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: #fff;
    border-left: 1px solid #ece9ef;
    padding: 24px 16px;
    z-index: 10
}

.logo {
    font-size: 22px;
    font-weight: 800;
    padding: 4px 8px 24px
}

.logo span {
    color: #8f7bcf
}

.sidebar nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    margin: 4px 0;
    color: #5d5862
}

.sidebar nav a.active,
.sidebar nav a:hover {
    background: #B8A9E8;
    color: #27212f
}

.logout {
    margin-top: 24px;
    width: 100%;
    padding: 11px;
    border: 1px solid #eee;
    border-radius: 999px;
    background: #fff
}

.dashboard-main {
    margin-right: 250px;
    padding: 30px
}

.dashboard-main header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px
}

.dashboard-main h1 {
    margin: 0
}

.dashboard-main header p {
    color: #777;
    margin: 7px 0
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 5px 10px;
    background: #8FD2B8;
    border: 1px solid #8FD2B8;
    opacity: 1;
}

.primary {
    background: #B8A9E8;
    border-color: #B8A9E8
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px
}

.stat,
.panel {
    background: #fff;
    border: 1px solid #ece9ef;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(30, 25, 40, .05)
}

.stat small {
    color: #777
}

.stat b {
    display: block;
    font-size: 22px;
    margin-top: 10px
}

.panel {
    margin-top: 18px
}

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

th,
td {
    text-align: right;
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    font-size: 13px
}

.customer {
    max-width: 1100px;
    margin: auto;
    padding: 24px 18px
}

.customer-head {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.categories {
    display: flex;
    gap: 8px;
    overflow: auto;
    margin: 20px 0
}

.categories a {
    background: #fff;
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 999px
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px
}

.product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 14px
}

.product-image {
    height: 150px;
    border-radius: 15px;
    background: #f2eff9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 45px
}

.product button {
    display: block;
    margin-top: 12px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 999px;
    background: #B8A9E8
}

.cart {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 300px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 15px 40px #0001
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center
}

.login-card {
    width: min(380px, 92vw);
    background: #fff;
    padding: 28px;
    border-radius: 22px;
    border: 1px solid #eee
}

.login-card input {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 12px
}

.login-card .btn {
    width: 100%;
    margin-top: 10px
}

@media(max-width:900px) {
    .sidebar {
        width: 78px;
        padding: 12px 8px
    }

    .sidebar .logo {
        font-size: 0
    }

    .sidebar .logo:first-letter {
        font-size: 22px
    }

    .sidebar nav a {
        font-size: 0;
        text-align: center
    }

    .sidebar nav a:first-letter {
        font-size: 20px
    }

    .dashboard-main {
        margin-right: 78px;
        padding: 18px
    }

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

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

@media(max-width:600px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr
    }

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

    .dashboard-main header {
        align-items: flex-start
    }

    .cart {
        left: 10px;
        right: 10px;
        width: auto
    }
}
/* =========================================================
   Customer Frontend — Correction 2
   ========================================================= */

html {
    scroll-behavior: smooth;
}

.customer {
    padding-bottom: 130px;
}

.categories {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 20px -18px;
    padding: 10px 18px;
    background: rgba(250,250,248,.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(236,233,239,.8);
    box-shadow: 0 6px 22px rgba(35,30,45,.06);
    transition: transform .22s ease, opacity .22s ease;
}

.categories.category-hidden {
    transform: translateY(calc(-100% - 2px));
    opacity: .98;
}

.categories a {
    flex: 0 0 auto;
    white-space: nowrap;
}

.menu-category {
    scroll-margin-top: 78px;
}

.cart {
    z-index: 50;
    width: min(430px, calc(100vw - 32px));
    max-height: min(42vh, 360px);
    overflow: auto;
    padding: 14px;
    background: rgba(255,255,255,.96);
    box-shadow:
        0 18px 50px rgba(35,30,45,.16),
        0 4px 14px rgba(35,30,45,.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: -14px;
    margin: -14px -14px 10px;
    padding: 14px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #eee;
    z-index: 2;
}

.cart-summary > div {
    min-width: 0;
}

.cart-summary b,
.cart-summary span {
    display: block;
}

.cart-summary span {
    color: #777;
    font-size: 12px;
    margin-top: 4px;
}

.cart-checkout-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.cart-items {
    display: grid;
    gap: 2px;
}

.cart-line,
.checkout-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cart-line:last-child,
.checkout-line:last-child {
    border-bottom: 0;
}

.cart-line strong,
.cart-line small,
.checkout-line-info strong,
.checkout-line-info span {
    display: block;
}

.cart-line small,
.checkout-line-info span {
    color: #777;
    font-size: 12px;
    margin-top: 3px;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.qty-control button {
    width: 34px;
    height: 34px;
    border: 1px solid #e5e1e8;
    border-radius: 50%;
    background: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.qty-control button:hover {
    background: #f3effb;
}

.empty-cart {
    color: #777;
    text-align: center;
    margin: 14px 0 4px;
}

body.modal-open {
    overflow: hidden;
}

.checkout-modal[hidden] {
    display: none;
}

.checkout-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 18px;
}

.checkout-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31,27,38,.38);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.checkout-dialog {
    position: relative;
    width: min(620px, 100%);
    max-height: min(90vh, 760px);
    overflow: auto;
    background: #fff;
    border: 1px solid #ece9ef;
    border-radius: 26px;
    padding: 22px;
    box-shadow: 0 28px 80px rgba(28,23,38,.22);
    direction: rtl;
}

.checkout-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.checkout-header h2 {
    margin: 4px 0 0;
}

.checkout-eyebrow {
    color: #8f7bcf;
    font-size: 12px;
    font-weight: 700;
}

.checkout-close {
    width: 38px;
    height: 38px;
    border: 1px solid #eee;
    border-radius: 50%;
    background: #fff;
    font-size: 24px;
    cursor: pointer;
}

.checkout-section {
    margin-top: 18px;
}

.checkout-section h3,
.checkout-section label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
}

.checkout-section label span {
    color: #999;
    font-weight: 400;
    font-size: 12px;
}

.checkout-section select,
.checkout-section textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd8e2;
    border-radius: 14px;
    background: #fff;
    font: inherit;
    outline: none;
}

.checkout-section select:focus,
.checkout-section textarea:focus {
    border-color: #B8A9E8;
    box-shadow: 0 0 0 3px rgba(184,169,232,.18);
}

.checkout-section small {
    display: block;
    margin-top: 6px;
    color: #888;
}

.checkout-items {
    border-top: 1px solid #eee;
}

.checkout-line-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.checkout-line-actions > strong {
    white-space: nowrap;
}

.checkout-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 16px;
    border-radius: 16px;
    background: #f8f6fc;
}

.checkout-total strong {
    font-size: 18px;
}

.checkout-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.checkout-submit:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.checkout-error {
    padding: 11px 13px;
    border-radius: 12px;
    background: #fff0f0;
    color: #9d3030;
    font-size: 13px;
}

.success-dialog {
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 5px auto 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #B8A9E8;
    font-size: 32px;
    font-weight: 800;
}

.success-dialog h2 {
    margin-bottom: 8px;
}

.success-dialog strong {
    display: inline-block;
    margin: 4px 0 14px;
    font-size: 20px;
    letter-spacing: .5px;
}

.success-note {
    color: #777;
    margin-bottom: 22px;
}

@media (max-width: 600px) {
    .customer {
        padding-bottom: 118px;
    }

    .cart {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-height: 32vh;
        border-radius: 18px;
    }

    .cart-items {
        max-height: 130px;
        overflow: auto;
    }

    .cart-summary {
        top: -14px;
    }

    .checkout-dialog {
        width: 100%;
        max-height: 94vh;
        padding: 18px;
        border-radius: 22px;
    }

    .checkout-actions {
        position: sticky;
        bottom: -18px;
        margin: 18px -18px -18px;
        padding: 14px 18px 18px;
        background: rgba(255,255,255,.97);
    }

    .checkout-line-actions {
        gap: 8px;
        flex-direction: column;
        align-items: flex-end;
    }
}
:root{--primary:#B8A9E8;--primary-dark:#8F7BCF;--primary-soft:#F1EDFC;--ink:#29252E;--muted:#77717D;--line:#ECE9EF;--surface:#fff;--canvas:#FAFAF8;--success:#4D9B72;--success-soft:#EAF7EF;--warning:#B8842D;--warning-soft:#FFF6E5;--danger:#B95C62;--danger-soft:#FCECEE;--shadow-sm:0 6px 20px rgba(35,30,45,.05);--shadow:0 14px 38px rgba(35,30,45,.08)}
body{font-family:"Vazirmatn",Tahoma,Arial,sans-serif;background:var(--canvas);color:var(--ink)}
.dashboard-sidebar {
    width: 278px;
    background: #fff;
    border-left: 1px solid var(--line);
    z-index: 1045
}

.sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 22px 16px
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 8px 25px;
    color: var(--ink)
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary);
    font-weight: 800;
    font-size: 20px;
    color: #292333;
    box-shadow: 0 8px 18px rgba(184, 169, 232, .3)
}

.brand-block strong,
.brand-block small {
    display: block
}

.brand-block strong {
    font-size: 16px
}

.brand-block small {
    color: var(--muted);
    font-size: 11px;
    margin-top: 3px
}

.sidebar-label {
    font-size: 11px;
    color: #A09AA4;
    font-weight: 700;
    padding: 0 10px 7px
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 3px
}

.dashboard-nav>a,
.nav-parent {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 0;
    background: transparent;
    padding: 11px 12px;
    border-radius: 13px;
    color: #625D67;
    font-size: 13px;
    text-align: right
}

.dashboard-nav>a i,
.nav-parent i {
    font-size: 17px;
    width: 20px;
    text-align: center
}

.dashboard-nav>a:hover,
.nav-parent:hover {
    background: #F7F5F9;
    color: var(--ink)
}

.dashboard-nav>a.active,
.nav-parent.active {
    background: var(--primary-soft);
    color: #4D4271;
    font-weight: 700
}

.nav-parent {
    justify-content: space-between;
    cursor: pointer
}

.nav-parent>span {
    display: flex;
    align-items: center;
    gap: 11px
}

.nav-chevron {
    font-size: 11px !important;
    width: auto !important;
    transition: .2s
}

.nav-parent[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg)
}

.submenu {
    padding: 2px 0 4px
}

.submenu a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 41px 8px 10px;
    color: #817A86;
    font-size: 12px;
    border-radius: 10px
}

.submenu a:hover {
    background: #FAF9FC;
    color: var(--ink)
}

.sidebar-divider {
    height: 1px;
    background: var(--line);
    margin: 18px 8px
}

.quick-order-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 14px;
    background: #2F2936;
    color: #fff
}

.quick-order-link:hover {
    color: #fff
}

.quick-order-link span {
    display: flex;
    flex-direction: column;
    flex: 1
}

.quick-order-link strong {
    font-size: 12px
}

.quick-order-link small {
    font-size: 10px;
    color: #C8C2CC
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 12px
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    background: transparent;
    border: 0;
    color: #77717D;
    font-size: 12px;
    border-radius: 10px;
    text-align: right
}

.sidebar-link:hover {
    background: #F7F5F9;
    color: var(--ink)
}

.dashboard-content {
    margin-right: 278px;
    min-height: 100vh
}

.dashboard-container {
    max-width: 1600px;
    padding: 34px 36px 70px
}

.dashboard-mobilebar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: 64px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    align-items: center;
    justify-content: space-between
}

.brand-mini {
    font-weight: 800;
    font-size: 17px
}

.brand-mini span {
    color: var(--primary-dark)
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px
}

.eyebrow {
    display: block;
    color: #8C8298;
    font-size: 10px;
    font-weight: 800;
    margin-bottom: 6px
}

.page-head h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0
}

.page-head p {
    color: var(--muted);
    font-size: 13px;
    margin: 7px 0 0
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px
}

.kpi-card,
.metric-card,
.surface-card,
.table-card {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm)
}

.kpi-card {
    border-radius: 20px;
    padding: 18px;
    transition: .2s
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow)
}

.kpi-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    margin-bottom: 15px
}

.kpi-icon.purple {
    background: var(--primary-soft);
    color: #7461B5
}

.kpi-icon.blue {
    background: #EEF3FF;
    color: #5671AD
}

.kpi-icon.green {
    background: var(--success-soft);
    color: #43825F
}

.kpi-icon.orange {
    background: var(--warning-soft);
    color: #A16E1F
}

.kpi-label {
    display: block;
    color: var(--muted);
    font-size: 15px
}

.kpi-card strong {
    display: block;
    font-size: 25px;
    margin: 4px 0 10px
}

.kpi-card small {
    color: #9A9A9A;
    font-size: 13px
}

.kpi-grid-secondary {
    margin-top: 14px
}

.metric-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 18px;
    padding: 16px 18px
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 15px;
}

.metric-card strong {
    display: block;
    font-size: 18px;
    margin-top: 6px
}

.metric-card>i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #F7F5F9;
    color: #817590
}

.content-grid {
    display: grid;
    gap: 16px;
    margin-top: 16px
}

.content-grid.two-one {
    grid-template-columns: 2fr 1fr
}

.surface-card {
    border-radius: 20px;
    padding: 20px
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px
}

.section-head h2 {
    font-size: 16px;
    margin: 0;
    font-weight: 800
}

.section-head p {
    font-size: 11px;
    color: var(--muted);
    margin: 5px 0 0
}

.text-link {
    font-size: 11px;
    color: #7461B5;
    font-weight: 700
}

.modern-table {
    --bs-table-bg: transparent;
    font-size: 12px
}

.modern-table th {
    font-size: 10px;
    color: #9A929F;
    font-weight: 700;
    padding: 11px 10px;
    white-space: nowrap
}

.modern-table td {
    padding: 13px 10px;
    border-bottom-color: #F0EDF2
}

.modern-table tbody tr:hover {
    background: #FCFBFD
}

.status-pill,
.channel-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap
}

.status-pill.success {
    background: var(--success-soft);
    color: #3E805A
}

.status-pill.warning {
    background: var(--warning-soft);
    color: #9A681E
}

.status-pill.pending {
    background: var(--primary-soft);
    color: #6B59A4
}

.status-pill.danger {
    background: var(--danger-soft);
    color: #A84E55
}

.status-pill.muted-pill {
    background: #F2F0F3;
    color: #7C7680
}

.channel-pill.admin {
    background: #F1EDFC;
    color: #6D59A7
}

.channel-pill.customer {
    background: #EEF5F1;
    color: #4D8164
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px
}

.quick-actions a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 11px;
    color: #615A67
}

.quick-actions i {
    font-size: 16px;
    color: var(--primary-dark)
}

.empty-state {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #958E99;
    text-align: center
}

.empty-state.compact {
    min-height: 100px
}

.empty-state i {
    font-size: 28px;
    color: #B6ADBE
}

.search-box {
    position: relative;
    min-width: 250px
}

.search-box i {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #A49DA7;
    z-index: 2
}

.search-box .form-control {
    padding-right: 38px
}

.toolbar,
.filter-strip {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px
}

.compact-select {
    width: 150px
}

.form-control,
.form-select {
    border-color: #E5E0E8;
    border-radius: 11px;
    font-size: 15px
}

.form-control:focus,
.form-select:focus {
    border-color: #B8A9E8;
    box-shadow: 0 0 0 .2rem rgba(184, 169, 232, .18)
}

.form-label {
    font-size: 15px;
    font-weight: 700;
    color: #5F5964
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 13px
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px
}

.modern-modal {
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(30, 25, 40, .18)
}

.modern-modal .modal-header,
.modern-modal .modal-footer {
    padding: 18px 22px;
    border-color: var(--line)
}

.modern-modal .modal-body {
    padding: 22px
}

.confirm-icon {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    background: var(--primary-soft);
    color: #6E5BA9;
    display: grid;
    place-items: center;
    font-size: 22px;
    margin: 0 auto 14px
}

.confirm-icon.danger {
    background: var(--danger-soft);
    color: var(--danger)
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.detail-grid>div {
    background: #FAF9FB;
    border-radius: 13px;
    padding: 12px
}

.detail-grid span {
    display: block;
    color: #9A929F;
    font-size: 10px
}

.detail-grid strong {
    display: block;
    font-size: 15px;
    margin-top: 4px
}

.order-detail-list {
    border-top: 1px solid var(--line)
}

.order-detail-list>div {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    font-size: 11px
}

.note-box {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #FFF9EC;
    border-radius: 12px;
    color: #856329;
    font-size: 11px
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    margin-top: 8px;
    font-size: 15px
}

.order-total-row strong {
    font-size: 18px
}

.table-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px
}

.table-card {
    border-radius: 20px;
    padding: 18px
}

.table-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.table-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    border-radius: 14px;
    color: #6E5BA9;
    font-size: 20px
}

.table-card h3 {
    font-size: 17px;
    margin: 18px 0 5px
}

.table-card p {
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 18px
}

.table-card-actions {
    display: flex;
    gap: 6px
}

.subnav-tabs {
    display: flex;
    gap: 5px;
    background: #F1EFF3;
    padding: 4px;
    border-radius: 13px;
    width: max-content;
    margin-bottom: 15px
}

.subnav-tabs a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 10px;
    color: #77717D;
    font-size: 11px
}

.subnav-tabs a.active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(30, 25, 40, .06)
}

.subnav-tabs span {
    background: #EEEAF2;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 9px
}

.category-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px
}

.category-admin-card {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid #F0EDF2;
    border-radius: 16px;
    padding: 11px
}

.category-admin-image {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: var(--primary-soft);
    display: grid;
    place-items: center;
    color: #7662B4;
    overflow: hidden
}

.category-admin-image img,
.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.category-admin-info h3 {
    font-size: 13px;
    margin: 0
}

.category-admin-info p {
    font-size: 10px;
    color: var(--muted);
    margin: 5px 0
}

.category-admin-info small {
    font-size: 13px;
    color: #9A929F
}

.category-admin-actions {
    display: flex;
    gap: 5px
}

.menu-group {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    margin-top: 18px
}

.menu-group:first-of-type {
    border-top: 0;
    padding-top: 0;
    margin-top: 0
}

.menu-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 9px
}

.menu-group-head h3 {
    font-size: 14px;
    margin: 0
}

.item-cell {
    display: flex;
    align-items: center;
    gap: 10px
}

.item-thumb {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    background: #F4F1F8;
    display: grid;
    place-items: center;
    color: #7A67B7;
    overflow: hidden
}

.item-cell strong,
.item-cell small {
    display: block
}

.item-cell small {
    color: #98909D;
    font-size: 9px;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.page-head-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: var(--warning-soft);
    padding: 10px 16px;
    border-radius: 14px;
    color: #94641D
}

.page-head-stat strong {
    font-size: 22px
}

.page-head-stat span {
    font-size: 10px
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #F1EEF2
}

.rank-row:last-child {
    border-bottom: 0
}

.rank {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: #F5F2F7;
    display: grid;
    place-items: center;
    font-size: 10px;
    color: #7E7585
}

.rank-name {
    flex: 1
}

.rank-name strong {
    font-size: 11px
}

.progress {
    height: 5px;
    background: #F1EEF3;
    margin-top: 7px
}

.progress-bar {
    background: var(--primary-dark);
    border-radius: 999px
}

.order-builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 16px
}

.summary-sticky {
    position: sticky;
    top: 20px
}

.order-summary-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: max-content
}

.summary-lines {
    min-height: 160px;
    max-height: 400px;
    overflow: auto
}

.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #F0EDF2
}

.summary-line strong {
    font-size: 11px
}

.summary-line small {
    display: block;
    color: #9A929F;
    font-size: 9px
}

.summary-total {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 10px
}

.summary-total strong {
    font-size: 19px
}

.table-select-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px
}

.table-select-card {
    cursor: pointer
}

.table-select-card input {
    position: absolute;
    opacity: 0
}

.table-select-card span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 7px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #6E6872
}

.table-select-card i {
    font-size: 18px;
    color: #9A90A4
}

.table-select-card strong {
    font-size: 13px
}

.table-select-card small {
    font-size: 12px;
    color: #A39BA7
}

.table-select-card input:checked+span {
    border-color: var(--primary-dark);
    background: var(--primary-soft);
    color: #4F426F
}

.order-category-tabs {
    display: flex;
    gap: 7px;
    overflow: auto;
    padding-bottom: 10px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2
}

.order-category-tabs a {
    white-space: nowrap;
    padding: 7px 12px;
    background: #F6F3F8;
    border-radius: 999px;
    font-size: 14px;
    color: #77717D
}

.order-category {
    scroll-margin-top: 80px;
    padding: 12px 0 20px;
    border-top: 1px solid #F0EDF2
}

.order-category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px
}

.order-category-title h3 {
    font-size: 16px;
    margin: 0;
    font-weight: 700;
}

.order-category-title span {
    font-size: 9px;
    color: #9A929F
}

.order-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px
}

.order-product {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 9px;
    background: #fff
}

.order-product-image {
    height: 90px;
    border-radius: 12px;
    background: #F4F1F8;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #7A67B7
}

.order-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.order-product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 8px 0
}

.order-product-info strong {
    font-size: 13px
}

.order-product-info span {
    font-size: 13px;
    color: #4C4C4C;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 7px
}

.qty-control button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 9px;
    font-size: 16px;
    display: grid;
    place-items: center
}

.admin-qty {
    justify-content: center
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 18px;
    background: radial-gradient(circle at 50% 0%, #F0EBFA 0, #FAFAF8 48%, #FAFAF8 100%)
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px
}

.auth-brand strong,
.auth-brand span {
    display: block
}

.auth-brand strong {
    font-size: 17px
}

.auth-brand span {
    font-size: 10px;
    color: var(--muted);
    margin-top: 3px
}

.auth-card {
    width: min(430px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(35, 30, 45, .08)
}

.auth-heading {
    margin-bottom: 22px
}

.auth-heading h1 {
    font-size: 24px;
    margin: 0
}

.auth-heading p {
    font-size: 11px;
    color: var(--muted);
    margin: 7px 0 0
}

.input-icon {
    position: relative
}

.input-icon i {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #A49CA8;
    z-index: 2
}

.input-icon .form-control {
    padding-right: 40px
}

.auth-footer {
    color: #AAA2AE;
    margin-top: 15px;
    font-size: 9px
}

@media(max-width:1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .table-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .customer-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}

@media(max-width:991.98px) {
    .dashboard-content {
        margin-right: 0
    }

    .dashboard-container {
        padding: 25px 18px 60px
    }

    .dashboard-sidebar {
        width: 285px
    }

    .content-grid.two-one,
    .order-builder-layout,
    .checkout-layout {
        grid-template-columns: 1fr
    }

    .order-summary-card {
        order: -1
    }

    .summary-sticky {
        position: static
    }

    .table-select-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }

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

@media(max-width:767px) {
    .page-head {
        align-items: flex-start;
        flex-direction: column
    }

    .page-head h1 {
        font-size: 24px
    }

    .toolbar,
    .filter-strip {
        align-items: stretch;
        flex-direction: column
    }

    .search-box {
        min-width: 0;
        width: 100%
    }

    .compact-select {
        width: 100%
    }

    .category-admin-grid,
    .customer-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

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

    .form-grid-2 {
        grid-template-columns: 1fr
    }

    .surface-card {
        padding: 15px
    }

    .checkout-footer {
        flex-direction: column-reverse
    }

    .checkout-footer .btn {
        width: 100%
    }
}

@media(max-width:520px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px
    }

    .table-overview-grid,
    .category-admin-grid {
        grid-template-columns: 1fr
    }

    .customer-product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px
    }

    .order-product-grid {
        grid-template-columns: 1fr 1fr
    }

    .table-select-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .dashboard-container {
        padding: 20px 12px 50px
    }
}

/* Dashboard desktop shell correction */
@media (min-width: 992px) {
    .dashboard-sidebar {
        position: fixed !important;
        top: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        overflow-y: auto;
        transform: none !important;
        visibility: visible !important;
    }

    .dashboard-content {
        margin-right: 278px;
        min-height: 100vh;
        width: auto;
    }
}

@media (max-width: 991.98px) {
    .dashboard-content {
        margin-right: 0;
        width: 100%;
    }
}


/* =========================================================
   Dashboard UI Step 1
   Scope: Dashboard only. Customer Frontend is intentionally untouched.
   ========================================================= */

.dashboard-ui-v2 {
    --dashboard-primary: #B6E8D6;
    --dashboard-primary-strong: #8FD2B8;
    --dashboard-primary-ink: #17372B;
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    font-feature-settings: "ss01" 1, "locl" 1;
}

.dashboard-ui-v2 .dashboard-sidebar,
.dashboard-ui-v2 .dashboard-content,
.dashboard-ui-v2 .dashboard-mobilebar {
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    font-feature-settings: "ss01" 1, "locl" 1;
}

.dashboard-ui-v2 p {
    font-size: 15px;
}

.dashboard-ui-v2 label,
.dashboard-ui-v2 .form-label {
    font-size: 16px;
}

.dashboard-ui-v2 .dashboard-nav a,
.dashboard-ui-v2 .nav-parent,
.dashboard-ui-v2 .submenu a,
.dashboard-ui-v2 .sidebar-link,
.dashboard-ui-v2 .quick-order-link,
.dashboard-ui-v2 .btn,
.dashboard-ui-v2 .form-control,
.dashboard-ui-v2 .form-select {
    font-size: 15px;
}

.dashboard-ui-v2 table th,
.dashboard-ui-v2 table td {
    font-size: 14px;
}

.dashboard-ui-v2 .page-head h1 {
    font-size: clamp(25px, 2vw, 32px);
}

.dashboard-ui-v2 .section-head h2 {
    font-size: 20px;
}

.dashboard-ui-v2 .dashboard-nav a.active,
.dashboard-ui-v2 .nav-parent.active,
.dashboard-ui-v2 .nav-parent:hover,
.dashboard-ui-v2 .dashboard-nav a:hover {
    background: var(--dashboard-primary);
    color: var(--dashboard-primary-ink);
}

.dashboard-ui-v2 .btn-primary,
.dashboard-ui-v2 .btn-primary:hover,
.dashboard-ui-v2 .btn-primary:focus {
    background-color: var(--dashboard-primary);
    border-color: var(--dashboard-primary);
    color: var(--dashboard-primary-ink);
}

.dashboard-ui-v2 .form-control:focus,
.dashboard-ui-v2 .form-select:focus {
    border-color: var(--dashboard-primary-strong);
    box-shadow: 0 0 0 .2rem rgba(182, 232, 214, .35);
}

.dashboard-ui-v2 .progress-bar {
    background-color: var(--dashboard-primary-strong);
}

.dashboard-ui-v2 .metric-card i,
.dashboard-ui-v2 .section-head i {
    color: var(--dashboard-primary-strong);
}


/* =========================================================
   Dashboard Step 1A — Persian numerals
   Presentation only. No JS/data/API conversion.
   ========================================================= */

.dashboard-ui-v2,
.dashboard-ui-v2 *,
.dashboard-ui-v2 input,
.dashboard-ui-v2 button,
.dashboard-ui-v2 select,
.dashboard-ui-v2 textarea {
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    font-feature-settings: "ss01" 1, "locl" 1 !important;
    font-variant-numeric: normal;
}

/* Keep Latin characters readable where they are intentionally used. */
.dashboard-ui-v2 code,
.dashboard-ui-v2 pre {
    font-feature-settings: normal !important;
}

.modal-header .btn-close {
position: absolute !important;
  left: 5% !important;
  top: 2% !important;
}