@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #fafbfc;
    --border: #e6e8ec;
    --text: #1b1f27;
    --text-dim: #6b7280;
    --text-faint: #9aa1ac;

    --navy: #10162b;
    --navy-2: #171f3d;
    --navy-line: #232c4d;

    --accent: #0ea5a0;
    --accent-dark: #0b8681;
    --accent-soft: #e3f6f5;

    --warn: #f5a623;
    --warn-soft: #fef3e0;
    --danger: #e0555f;
    --danger-soft: #fbe8e9;
    --success: #22a06b;
    --success-soft: #e5f6ee;
    --blue: #3b6fd6;
    --blue-soft: #e8eefb;
    --purple: #7c5cd6;
    --purple-soft: #efe9fb;

    --brand-pink: #ef4a6d;
    --brand-purple: #7c3aed;
    --brand-gradient: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
    --brand-soft: #f6eefd;

    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 22, 43, .04), 0 4px 14px rgba(16, 22, 43, .04);
}

[data-theme="dark"] {
    --bg: #0f1320;
    --surface: #171c2c;
    --surface-2: #1e2436;
    --border: #2a3146;
    --text: #e7e9ef;
    --text-dim: #a4abbd;
    --text-faint: #767e93;

    --navy: #0a0e1a;
    --navy-2: #131a2c;
    --navy-line: #232c4d;

    --accent-soft: #163533;
    --warn-soft: #3a2c10;
    --danger-soft: #3a1c1f;
    --success-soft: #123024;
    --blue-soft: #182640;
    --purple-soft: #241e3a;
    --brand-soft: #241e3a;

    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
}

[data-theme="dark"] .customer-body { background: #0f1320; }
[data-theme="dark"] .customer-sidebar,
[data-theme="dark"] .auth-form-side,
[data-theme="dark"] .file-drop { background: var(--surface); }
[data-theme="dark"] .product-card,
[data-theme="dark"] .config-link-box,
[data-theme="dark"] .auth-form-card { background: var(--surface-2); }
[data-theme="dark"] .receipt-thumb { filter: brightness(.9); }

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14.5px;
}

body { direction: rtl; }

.mono { font-variant-numeric: tabular-nums; }

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

/* ---------- Layout ---------- */
.app {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--navy);
    color: #cdd3e6;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 40;
}

.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0; background: rgba(16,22,43,.45);
    z-index: 39;
}

.mobile-menu-btn {
    display: none;
    align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface);
    font-size: 18px; cursor: pointer; color: var(--text);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 22px;
    border-bottom: 1px solid var(--navy-line);
    margin-bottom: 18px;
}

.brand-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(14,165,160,.18);
}

.brand-name { font-weight: 700; font-size: 16px; color: #fff; }
.brand-sub { font-size: 11px; color: #7c85a3; margin-top: 1px; }

.nav-group-title {
    font-size: 11px;
    color: #5c6485;
    margin: 18px 10px 8px;
    letter-spacing: .3px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    color: #b7bdd6;
    margin-bottom: 2px;
    position: relative;
    transition: background .15s, color .15s;
}

.nav-link:hover { background: var(--navy-2); color: #fff; }

.nav-link.active {
    background: var(--navy-2);
    color: #fff;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    right: -16px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--accent), #17d8d1);
}

.nav-icon { width: 18px; text-align: center; opacity: .9; }
.nav-badge-soon {
    margin-right: auto;
    font-size: 10px;
    color: #7c85a3;
    background: var(--navy-2);
    border: 1px solid var(--navy-line);
    padding: 1px 6px;
    border-radius: 20px;
}

/* ---------- Main ---------- */
.main { min-width: 0; }

.topbar {
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar-title { font-weight: 700; font-size: 16px; }
.topbar-title .dim { color: var(--text-faint); font-weight: 400; font-size: 12.5px; margin-right: 8px; }

.topbar-user { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent-dark);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}

.btn-logout {
    font-size: 12.5px; color: var(--text-dim);
    border: 1px solid var(--border); padding: 7px 12px; border-radius: 8px;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }

.content { padding: 24px 26px 60px; }

/* ---------- Cards / Stats ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card { padding: 18px 18px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stat-label { color: var(--text-dim); font-size: 12.5px; }
.stat-icon {
    width: 34px; height: 34px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.stat-value { font-size: 22px; font-weight: 700; }
.stat-delta { font-size: 11.5px; margin-top: 6px; }
.stat-delta.up { color: var(--success); }
.stat-delta.down { color: var(--danger); }

.icon-teal   { background: var(--accent-soft); color: var(--accent-dark); }
.icon-blue   { background: var(--blue-soft);   color: var(--blue); }
.icon-purple { background: var(--purple-soft); color: var(--purple); }
.icon-warn   { background: var(--warn-soft);   color: #b9790f; }

.grid-2 {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-card { padding: 20px; }
.panel-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.panel-card-title { font-weight: 700; font-size: 14.5px; }
.panel-card-sub { color: var(--text-faint); font-size: 12px; margin-top: 2px; }

.tag-select { display: flex; gap: 6px; }
.tag-select span {
    font-size: 11.5px; padding: 5px 10px; border-radius: 20px;
    border: 1px solid var(--border); color: var(--text-dim);
}
.tag-select span.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* top buyers list */
.buyer-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--surface-2);
}
.buyer-row:last-child { border-bottom: none; }
.buyer-rank {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--surface-2); color: var(--text-dim);
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.buyer-rank.gold   { background: #fdf0d0; color: #a5730b; }
.buyer-rank.silver { background: #eef0f4; color: #6b7280; }
.buyer-rank.bronze { background: #f7e3d3; color: #a15a26; }

.buyer-name { font-size: 13px; font-weight: 600; }
.buyer-meta { font-size: 11px; color: var(--text-faint); }
.buyer-amount { margin-right: auto; font-size: 13px; font-weight: 700; color: var(--accent-dark); }

.badge {
    display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 600;
}
.badge-gray   { background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border); }
.badge-blue   { background: var(--blue-soft); color: var(--blue); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-warn   { background: var(--warn-soft); color: #b9790f; }
.badge-success{ background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- Empty state ---------- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-faint);
    font-size: 13px;
}

/* ---------- Login page ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--navy);
    background-image: radial-gradient(circle at 20% 20%, rgba(14,165,160,.18), transparent 40%),
                       radial-gradient(circle at 80% 80%, rgba(124,92,214,.15), transparent 40%);
}
.login-box {
    width: 100%; max-width: 380px;
    background: var(--surface);
    border-radius: 14px;
    padding: 34px 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand .brand-dot { display: inline-block; margin-left: 6px; }
.login-brand h1 { font-size: 17px; margin: 10px 0 2px; }
.login-brand p { font-size: 12px; color: var(--text-faint); margin: 0; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; margin-bottom: 6px; color: var(--text-dim); }
.field input {
    width: 100%; padding: 11px 12px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface-2);
    font-family: inherit; font-size: 13.5px;
}
.field input:focus { outline: none; border-color: var(--accent); background: #fff; }

.btn-primary {
    width: 100%; padding: 11px; border-radius: 8px; border: none;
    background: var(--accent); color: #fff; font-family: inherit;
    font-size: 13.5px; font-weight: 700; cursor: pointer;
    transition: background .15s;
}
.btn-primary:hover { background: var(--accent-dark); }

.alert {
    padding: 10px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 14px;
}
.alert-danger  { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-warn    { background: var(--warn-soft); color: #a5730b; }

/* ---------- Toolbar / Filters ---------- */
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tabs a {
    font-size: 12.5px; padding: 7px 14px; border-radius: 20px;
    border: 1px solid var(--border); color: var(--text-dim); background: var(--surface);
}
.filter-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.search-box {
    display: flex; gap: 8px;
}
.search-box input {
    padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border);
    font-family: inherit; font-size: 13px; min-width: 220px; background: var(--surface);
}

.btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 9px 16px;
    border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-family: inherit; font-weight: 600; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
    text-align: right; color: var(--text-faint); font-weight: 600; font-size: 11.5px;
    padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data-table td {
    padding: 12px; border-bottom: 1px solid var(--surface-2); vertical-align: middle;
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--surface-2); }

.cell-name { font-weight: 700; }
.cell-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.balance-pos { color: var(--success); font-weight: 700; }
.balance-neg { color: var(--danger); font-weight: 700; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 7px; font-size: 12.5px;
    border: 1px solid var(--border); color: var(--text-dim);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent-dark); }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section-title {
    font-size: 12.5px; font-weight: 700; color: var(--text-dim);
    margin: 22px 0 12px; padding-top: 14px; border-top: 1px solid var(--surface-2);
}
.form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.help-text { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; }
.check-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.check-row input { width: 16px; height: 16px; }

.type-pill-select { display: flex; gap: 8px; flex-wrap: wrap; }
.type-pill-select label {
    border: 1px solid var(--border); border-radius: 9px; padding: 10px 14px;
    font-size: 12.5px; cursor: pointer; display: flex; align-items: center; gap: 7px;
}
.type-pill-select input { display: none; }
.type-pill-select label:has(input:checked) {
    border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 700;
}

.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.kv-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--surface-2); font-size: 13px; }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--text-faint); }
.kv-row .v { font-weight: 600; }

.balance-hero {
    text-align: center; padding: 22px 10px;
}
.balance-hero .amount { font-size: 26px; font-weight: 700; }
.balance-hero .label { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

/* ================== Customer Portal (sidebar layout) ================== */
.customer-body { background: #f5f3fa; }

.customer-app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

.customer-sidebar {
    background: #fff;
    border-left: 1px solid var(--border);
    padding: 20px 14px;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}

.cs-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 20px; }
.cs-brand-icon {
    width: 38px; height: 38px; border-radius: 11px;
    background: var(--brand-gradient); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
}
.cs-brand-name { font-weight: 700; font-size: 14.5px; }
.cs-brand-sub { font-size: 10.5px; color: var(--text-faint); margin-top: 1px; }

.cs-nav { display: flex; flex-direction: column; gap: 3px; }
.cs-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 13px; border-radius: 10px;
    font-size: 13px; font-weight: 600; color: var(--text-dim);
    border-right: 3px solid transparent;
}
.cs-nav-link:hover { background: var(--surface-2); }
.cs-nav-link.active {
    background: var(--brand-soft); color: var(--brand-purple);
    border-right: 3px solid var(--brand-purple);
}
.cs-nav-icon { width: 18px; text-align: center; }

.cs-wallet-card {
    margin-top: auto;
    background: var(--brand-gradient);
    border-radius: 14px; padding: 16px; color: #fff;
    box-shadow: 0 8px 20px rgba(124,58,237,.25);
}
.cs-wallet-label { font-size: 11px; opacity: .85; }
.cs-wallet-amount { font-size: 18px; font-weight: 700; margin: 6px 0 12px; }
.cs-wallet-btn {
    display: block; text-align: center;
    background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
    border-radius: 9px; padding: 9px; font-size: 12px; font-weight: 700; color: #fff;
}
.cs-wallet-btn:hover { background: rgba(255,255,255,.28); }

.cs-user-footer {
    display: flex; align-items: center; gap: 9px;
    margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.cs-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand-purple);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.cs-user-name { font-size: 12.5px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-logout { color: var(--text-faint); font-size: 16px; padding: 4px; }
.cs-logout:hover { color: var(--danger); }

.customer-main { min-width: 0; }
.customer-wrap { max-width: 920px; margin: 0 auto; padding: 26px 24px 60px; }

/* ---- Quick link cards ---- */
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.quick-link-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    padding: 20px 16px; text-align: center; font-size: 12.5px; font-weight: 600;
    box-shadow: 0 1px 3px rgba(16,22,43,.05);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.quick-link-card:hover {
    transform: translateY(-3px); border-color: var(--brand-purple);
    box-shadow: 0 10px 24px rgba(124,58,237,.14); color: var(--brand-purple);
}
.quick-link-card .qi {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px; font-size: 20px;
    background: var(--brand-soft); color: var(--brand-purple);
}

/* ---- Config / order status card (dashboard) ---- */
.config-card {
    border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: #fff;
    display: flex; align-items: center; gap: 16px; margin-bottom: 12px;
}
.config-ring {
    width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: conic-gradient(var(--brand-purple) calc(var(--pct, 50) * 1%), var(--surface-2) 0);
}
.config-ring-inner {
    width: 44px; height: 44px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: var(--text-dim); text-align: center; line-height: 1.2;
}
.config-info { flex: 1; min-width: 0; }
.config-name { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.config-meta { font-size: 11.5px; color: var(--text-faint); }
.config-link-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
    padding: 8px 12px; font-size: 11px; margin-top: 8px; word-break: break-all;
}

.file-drop {
    border: 1.5px dashed var(--border); border-radius: 10px; padding: 20px; text-align: center;
    font-size: 12.5px; color: var(--text-dim); background: var(--surface-2);
}
.file-drop input { margin-top: 10px; }
.receipt-thumb { max-width: 90px; max-height: 90px; border-radius: 6px; border: 1px solid var(--border); }

.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- Cards in customer area feel slightly softer/rounder ---- */
.customer-body .card { border-radius: 14px; }
.customer-body .btn, .customer-body .btn-primary { border-radius: 10px; }
.customer-body .btn-accent { background: var(--brand-gradient); border: none; }
.customer-body .btn-accent:hover { filter: brightness(.94); }
.customer-body a { color: inherit; }
.customer-body .badge-purple { background: var(--brand-soft); color: var(--brand-purple); }

/* ---- Product cards in shop ---- */
.product-card {
    border-radius: 14px; padding: 18px 16px; text-align: right;
    border: 1px solid var(--border); background: #fff;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(124,58,237,.14); border-color: var(--brand-purple); }
.product-card .p-name { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.product-card .p-meta { font-size: 11.5px; color: var(--text-faint); margin-bottom: 12px; }
.product-card .p-price { font-size: 17px; font-weight: 700; color: var(--brand-purple); margin-bottom: 14px; }
.server-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--blue-soft); color: var(--blue);
    font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 20px;
}

/* ---- Split-screen auth layout ---- */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-visual {
    background: radial-gradient(circle at 20% 20%, rgba(239,74,109,.30), transparent 45%),
                radial-gradient(circle at 80% 75%, rgba(124,58,237,.30), transparent 45%),
                linear-gradient(160deg, var(--navy), #131a33);
    color: #fff; display: flex; flex-direction: column; justify-content: center;
    padding: 60px; position: relative; overflow: hidden;
}
.auth-visual h2 { font-size: 24px; margin: 18px 0 10px; }
.auth-visual p { color: #9aa3c7; font-size: 13.5px; line-height: 2; max-width: 380px; }
.auth-feature-list { margin-top: 30px; display: flex; flex-direction: column; gap: 16px; }
.auth-feature-list .af { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #d3d7ea; }
.auth-feature-list .af-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #f5f3fa; }
.auth-form-card {
    width: 100%; max-width: 380px; background: #fff; border-radius: 16px;
    padding: 34px 30px; box-shadow: 0 4px 24px rgba(16,22,43,.06);
}
.auth-form-card .btn-primary { background: var(--brand-gradient); }
.auth-form-card .brand-dot { background: var(--brand-purple); box-shadow: 0 0 0 4px rgba(124,58,237,.18); }

@media (max-width: 860px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
}

.order-actions-menu summary::-webkit-details-marker { display: none; }
.order-actions-menu summary { list-style: none; }
.order-actions-list {
    display: flex; flex-direction: column; gap: 6px;
    margin-top: 8px; padding: 10px; border-radius: 10px;
    background: var(--surface-2); border: 1px solid var(--border);
}
.order-actions-list form { margin: 0; }
.order-actions-list button {
    width: 100%; text-align: right; padding: 9px 12px; border-radius: 8px;
    border: 1px solid var(--border); background: #fff; font-family: inherit;
    font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer;
}
.order-actions-list button:hover { border-color: var(--brand-purple); color: var(--brand-purple); }
.order-actions-list button.danger { color: var(--danger); }
.order-actions-list button.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.order-actions-note { font-size: 11.5px; color: var(--warn); background: var(--warn-soft); padding: 8px 10px; border-radius: 8px; text-align: center; }

/* ---- Mobile top bar (hidden on desktop) ---- */
.cs-mobile-topbar {
    display: none;
    align-items: center; justify-content: space-between;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 12px 14px; position: sticky; top: 0; z-index: 30;
}
.cs-mobile-brand { display: flex; align-items: center; gap: 8px; }
.cs-mobile-actions { display: flex; align-items: center; gap: 6px; }
.cs-mobile-wallet-chip {
    background: var(--brand-gradient); color: #fff; font-size: 11.5px; font-weight: 700;
    padding: 7px 12px; border-radius: 20px;
}
.cs-mobile-icon-btn {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; font-size: 15px;
    background: var(--surface-2); color: var(--text-dim);
}

/* ---- Fixed bottom nav bar (hidden on desktop) ---- */
.cs-bottom-nav {
    display: none;
    position: fixed; bottom: 0; right: 0; left: 0; z-index: 30;
    background: #fff; border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(16,22,43,.06);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    align-items: stretch; justify-content: space-around;
}
.cs-bottom-link {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 4px; border-radius: 10px; flex: 1;
    color: var(--text-faint); font-size: 10px; font-weight: 600;
}
.cs-bottom-icon { font-size: 19px; }
.cs-bottom-link.active { color: var(--brand-purple); }
.cs-bottom-link.active .cs-bottom-icon {
    background: var(--brand-soft); border-radius: 10px; width: 34px; height: 26px;
    display: flex; align-items: center; justify-content: center; margin: 0 auto;
}

@media (max-width: 900px) {
    .customer-app { grid-template-columns: 1fr; }
    .customer-sidebar { display: none; }
    .cs-mobile-topbar { display: flex; }
    .cs-bottom-nav { display: flex; }
    .customer-wrap { padding-bottom: 90px; }
    .pay-options, .quick-links { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .form-grid, .detail-grid { grid-template-columns: 1fr; }
    .app { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }

    .mobile-menu-btn { display: flex; }
    .sidebar {
        position: fixed; top: 0; right: -280px; bottom: 0;
        width: 260px; height: 100vh; transition: right .22s ease;
        box-shadow: -8px 0 24px rgba(0,0,0,.25);
    }
    .sidebar.open { right: 0; }
    .sidebar-backdrop.open { display: block; }
    .content { padding: 18px 14px 50px; }
    .topbar { padding: 0 14px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    table.data-table { font-size: 12px; }
}

@media (max-width: 560px) {
    .stat-grid { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .filter-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
}
