@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #f4f1e9;
  --bg-2: #ebe6da;
  --surface: #fffdf8;
  --surface-2: #f9f5ec;
  --ink: #14231f;
  --muted: #6d7b75;
  --line: #e6dfd1;
  --brand: #0d2f28;
  --brand-2: #16463c;
  --brand-3: #1f5a4d;
  --gold: #c8a24a;
  --gold-2: #e2c47c;
  --gold-soft: #f5ead1;
  --ok: #1f8a5b;
  --ok-soft: #e5f4ec;
  --warn: #b7791f;
  --warn-soft: #fdf3df;
  --danger: #b42318;
  --danger-soft: #fcebe9;
  --shadow: 0 12px 34px rgba(20, 35, 31, .08);
  --shadow-sm: 0 4px 14px rgba(20, 35, 31, .06);
  --r: 20px;
  --r-sm: 14px;
  --nav-h: 76px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(200, 162, 74, .12), transparent 60%),
    radial-gradient(900px 420px at -10% 10%, rgba(13, 47, 40, .08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
button { cursor: pointer; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.hidden { display: none !important; }

/* ---------------- Layout ---------------- */
.shell { max-width: 1180px; margin: 0 auto; padding: 18px 20px calc(var(--nav-h) + 34px); }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 241, 233, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 223, 209, .8);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(13, 47, 40, .25);
}
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -.2px; }
.brand-sub { font-size: 10px; color: var(--muted); letter-spacing: 2.4px; direction: ltr; }
.topbar-spacer { flex: 1; }

.price-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; box-shadow: var(--shadow-sm);
}
.price-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.price-pill strong { font-size: 14px; }
.price-pill .unit { font-size: 11px; color: var(--muted); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--ink);
  transition: .18s ease;
}
.icon-btn:hover { border-color: var(--gold); color: var(--brand-2); transform: translateY(-1px); }

/* ---------------- Cards ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.card-head .muted { font-size: 12px; }
.spacer { flex: 1; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: 1.5fr 1fr; align-items: start; }

.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { font-size: 17px; margin: 0; font-weight: 750; }
.section-title .line { flex: 1; height: 1px; background: var(--line); }

/* ---------------- Hero / Balance ---------------- */
.hello { margin: 6px 0 18px; }
.hello h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.4px; }
.hello p { margin: 0; color: var(--muted); font-size: 13.5px; }

.balance-card {
  position: relative; overflow: hidden;
  border-radius: 26px; padding: 26px;
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(226, 196, 124, .28), transparent 60%),
    radial-gradient(420px 260px at 0% 100%, rgba(31, 90, 77, .55), transparent 65%),
    linear-gradient(150deg, #0b241f 0%, #0d2f28 55%, #123b32 100%);
  color: #f6f1e7;
  box-shadow: 0 24px 50px rgba(13, 47, 40, .28);
  border: 1px solid rgba(226, 196, 124, .18);
}
.balance-card::after {
  content: ""; position: absolute; inset: -40% -20% auto auto;
  width: 340px; height: 340px; border-radius: 50%;
  border: 1px solid rgba(226, 196, 124, .16);
}
.balance-top { display: flex; align-items: flex-start; gap: 12px; }
.balance-label { font-size: 12.5px; color: rgba(246, 241, 231, .62); }
.balance-value { font-size: 34px; font-weight: 800; letter-spacing: -.8px; margin: 2px 0 2px; }
.balance-unit { font-size: 13px; color: rgba(246, 241, 231, .65); }
.balance-meta { display: flex; gap: 24px; margin-top: 22px; flex-wrap: wrap; }
.meta-item .k { font-size: 11.5px; color: rgba(246, 241, 231, .55); }
.meta-item .v { font-size: 16px; font-weight: 700; }
.balance-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.balance-actions .btn { flex: 1; min-width: 104px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 13px; border: 1px solid transparent;
  padding: 12px 18px; font-size: 14px; font-weight: 650;
  background: var(--surface); color: var(--ink);
  transition: .18s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #241a06; box-shadow: 0 10px 22px rgba(200, 162, 74, .28);
}
.btn-brand { background: var(--brand); color: #f6f1e7; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-soft { background: var(--gold-soft); color: #6b4f14; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-sm { padding: 8px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------------- Price strip ---------------- */
.price-card { display: flex; align-items: center; gap: 14px; }
.price-card .big { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.trend.up { color: var(--ok); background: var(--ok-soft); }
.trend.down { color: var(--danger); background: var(--danger-soft); }

/* ---------------- Chart ---------------- */
.chart-wrap { position: relative; }
.chart-wrap canvas { width: 100%; height: 190px; display: block; }
.chart-legend { display: flex; gap: 18px; margin-top: 10px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-inline-end: 6px; }

/* ---------------- Segmented / chips ---------------- */
.seg {
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--bg-2); border-radius: 13px; border: 1px solid var(--line);
}
.seg button {
  border: 0; background: transparent; color: var(--muted);
  padding: 8px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 650;
}
.seg button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 7px 13px; font-size: 12px; color: var(--muted);
}
.chip:hover { border-color: var(--gold); color: var(--brand); }
.chip.active { background: var(--gold-soft); color: #6b4f14; border-color: transparent; font-weight: 650; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.input-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 13px; padding: 0 14px; transition: .18s ease;
}
.input-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(200, 162, 74, .12); background: var(--surface); }
.input-wrap.error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(180, 35, 24, .08); }
.input-wrap input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 14px 0; font-size: 16px; font-weight: 650; color: var(--ink);
  min-width: 0;
}
.input-wrap input::placeholder { color: #a9b2ad; font-weight: 400; font-size: 13px; }
.input-unit { font-size: 12px; color: var(--muted); white-space: nowrap; }
.help { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.help.error { color: var(--danger); }

.select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 13px; padding: 13px 14px; font-size: 13.5px; color: var(--ink);
  outline: none; appearance: none;
}
.select:focus { border-color: var(--gold); }

.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: #d9d2c3;
  transition: .2s; cursor: pointer;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.15); transition: .2s;
}
.switch input:checked + span { background: var(--brand-2); }
.switch input:checked + span::after { transform: translateX(-20px); }

/* ---------------- Summary ---------------- */
.summary { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 16px; padding: 16px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; }
.summary-row .k { color: var(--muted); }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 15px; font-weight: 750; }

/* ---------------- Lists / transactions ---------------- */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row-icon {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--surface-2); color: var(--brand-2);
}
.row-icon.gold { background: var(--gold-soft); color: #7a5a15; }
.row-icon.ok { background: var(--ok-soft); color: var(--ok); }
.row-icon.warn { background: var(--warn-soft); color: var(--warn); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13.5px; font-weight: 650; }
.row-sub { font-size: 11.5px; color: var(--muted); }
.row-amount { font-size: 13.5px; font-weight: 750; white-space: nowrap; }
.row-amount.pos { color: var(--ok); }
.row-amount.neg { color: var(--danger); }

/* ---------------- Quick actions ---------------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick a {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 8px; text-align: center; font-size: 12.5px; font-weight: 650;
  box-shadow: var(--shadow-sm); transition: .18s ease;
}
.quick a:hover { border-color: var(--gold); transform: translateY(-2px); }
.quick .q-icon {
  width: 40px; height: 40px; border-radius: 13px; margin: 0 auto 8px;
  display: grid; place-items: center; background: var(--gold-soft); color: #7a5a15;
}

/* ---------------- Badges ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; border-radius: 999px; padding: 4px 9px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: #e8f0fb; color: #255db3; }
.badge.muted { background: var(--bg-2); color: var(--muted); }

/* ---------------- Bottom nav ---------------- */
.bottom-nav {
  position: fixed; z-index: 45; bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255, 253, 248, .94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.bottom-nav-inner { width: 100%; max-width: 620px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 8px; }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 10.5px; padding: 8px 0; border-radius: 12px;
}
.nav-item.active { color: var(--brand); }
.nav-item.active .nav-icon { background: var(--gold-soft); color: #7a5a15; }
.nav-icon { width: 34px; height: 30px; border-radius: 10px; display: grid; place-items: center; }

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(13, 24, 20, .55);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%; max-width: 440px; background: var(--surface);
  border-radius: 22px; padding: 22px; box-shadow: 0 30px 70px rgba(0,0,0,.28);
  animation: pop .22s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close { margin-inline-start: auto; border: 0; background: var(--bg-2); width: 32px; height: 32px; border-radius: 10px; font-size: 16px; color: var(--muted); }
.receipt-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line); }
.receipt-line:last-child { border-bottom: 0; }
.receipt-line .k { color: var(--muted); }
.success-ic { width: 62px; height: 62px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 4px auto 12px; }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; z-index: 120; bottom: 96px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--brand); color: #f6f1e7; border-radius: 12px;
  padding: 11px 18px; font-size: 12.5px; box-shadow: 0 14px 30px rgba(13,47,40,.3);
  animation: toastIn .22s ease;
}
.toast.error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- Profile ---------------- */
.profile-head {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(150deg, #0b241f, #123b32);
  color: #f6f1e7; border-radius: 22px; padding: 20px;
}
.avatar {
  width: 58px; height: 58px; border-radius: 18px; flex: none;
  background: linear-gradient(145deg, var(--gold-2), var(--gold));
  display: grid; place-items: center; color: #2a1e06; font-weight: 800; font-size: 20px;
}
.menu { display: flex; flex-direction: column; }
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 2px;
  border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item .chev { margin-inline-start: auto; color: #b5beb9; }
.menu-icon { width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; color: var(--brand-2); }

/* ---------------- Delivery steps ---------------- */
.steps { display: flex; gap: 8px; margin: 4px 0 18px; }
.step { flex: 1; height: 4px; border-radius: 999px; background: var(--bg-2); }
.step.done { background: var(--gold); }

/* ---------------- Admin ---------------- */
.admin-body { background: #eef1ee; }
.admin-layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-side {
  background: linear-gradient(180deg, #0b241f, #0d2f28 60%, #102f29);
  color: #e9e4d8; padding: 20px 16px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.admin-brand .brand-logo { width: 38px; height: 38px; border-radius: 12px; }
.admin-brand .n { font-size: 14px; font-weight: 750; }
.admin-brand .s { font-size: 9.5px; opacity: .55; letter-spacing: 1.6px; direction: ltr; }
.admin-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-radius: 11px; font-size: 12.5px; color: rgba(233, 228, 216, .72);
}
.admin-nav a.active { background: rgba(226, 196, 124, .14); color: #f3dfae; font-weight: 650; }
.admin-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.admin-foot { margin-top: auto; font-size: 10.5px; color: rgba(233,228,216,.45); padding: 12px; }
.admin-main { padding: 22px 26px 50px; min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.admin-top h1 { font-size: 20px; margin: 0; }
.admin-top .muted { font-size: 12px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.kpi-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: #fff; border: 1px solid #e1e6e1; border-radius: 16px; padding: 16px; box-shadow: 0 4px 14px rgba(20,35,31,.04); }
.kpi .k { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 22px; font-weight: 800; margin-top: 6px; letter-spacing: -.4px; }
.kpi .d { font-size: 10.5px; color: var(--ok); margin-top: 2px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: right; color: var(--muted); font-weight: 600; font-size: 11px; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.table-actions { display: flex; gap: 6px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-inline-end: 5px; }
.status-dot.ok { background: var(--ok); }
.status-dot.warn { background: var(--warn); }
.status-dot.danger { background: var(--danger); }
.admin-panel { background: #fff; border: 1px solid #e1e6e1; border-radius: 16px; padding: 18px; margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.form-grid .field { margin: 0; }
.admin-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.admin-tab { border: 0; background: transparent; padding: 8px 12px; border-radius: 9px; font-size: 12px; color: var(--muted); }
.admin-tab.active { background: var(--gold-soft); color: #6b4f14; font-weight: 650; }
.note-box { background: var(--warn-soft); border: 1px solid #f0dfb8; color: #7a5a15; border-radius: 12px; padding: 10px 14px; font-size: 12px; }
.ok-box { background: var(--ok-soft); border: 1px solid #c8e6d7; color: #196b47; border-radius: 12px; padding: 10px 14px; font-size: 12px; }
.danger-box { background: var(--danger-soft); border: 1px solid #f3c9c5; color: var(--danger); border-radius: 12px; padding: 10px 14px; font-size: 12px; }
.admin-panel h3 { font-size: 14px; margin: 0; }
.admin-panel .card-head { margin-bottom: 12px; }
.modal-lg { max-width: 560px; }
.warn-text { color: var(--warn); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; direction: ltr; }
.admin-view .summary { background: #fbfaf5; }
.admin-view table .badge { white-space: nowrap; }
.admin-top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.admin-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kpi-link { display: block; transition: .18s ease; color: inherit; }
.kpi-link:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,35,31,.09); }
.kpi .v.ok { color: var(--ok); }
.kpi .v.warn { color: var(--warn); }
.kpi .v.danger { color: var(--danger); }
.filter-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.filter-item { display: flex; flex-direction: column; gap: 5px; }
.filter-item label { font-size: 11px; color: var(--muted); }
.filter-bar .btn { padding: 10px 14px; }
.admin-input {
  width: 100%; background: #fbfaf5; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; font-size: 12.5px; font-family: inherit;
  color: var(--ink); outline: none; min-width: 0;
}
.admin-input:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(200,162,74,.12); }
.admin-input:disabled { opacity: .6; }
select.admin-input { appearance: none; }
.source-card { background: #fbfaf5; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.source-card b { font-size: 12.5px; }
.source-card.active { border-color: var(--gold); background: var(--gold-soft); }
.admin-panel h3 { display: flex; align-items: center; gap: 8px; }
.admin-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------------- Demo notice ---------------- */
.demo-bar {
  max-width: 1180px; margin: 10px auto 0; padding: 8px 16px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--warn-soft); border: 1px solid #f0dfb8; color: #7a5a15;
  border-radius: 12px; font-size: 11.5px; line-height: 1.8;
}
.demo-bar b { font-weight: 750; }
.demo-bar span { opacity: .9; }

/* ---------------- Delivery store ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 10px; }
.product-card {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 15px; padding: 11px;
  background: var(--surface); transition: .16s ease;
}
.product-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.product-avatar {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  background: linear-gradient(145deg, var(--gold-soft), #efdfbd);
  display: grid; place-items: center; font-size: 22px;
}
.product-avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.product-info { flex: 1; min-width: 0; }
.product-name { font-size: 13px; font-weight: 700; }
.product-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.product-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.product-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.product-side .strong { font-size: 12.5px; font-weight: 750; }
.product-side .tiny { font-size: 10px; }
.product-side .btn { margin-top: 2px; }
.mini {
  display: inline-block; background: var(--bg-2); border-radius: 999px;
  padding: 2px 7px; font-size: 10px; color: var(--muted);
}

.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-2); border-radius: 10px; padding: 2px; flex: none; }
.qty button {
  width: 26px; height: 26px; border: 0; border-radius: 8px;
  background: var(--surface); color: var(--brand); font-size: 15px; line-height: 1;
}
.qty span { min-width: 20px; text-align: center; font-size: 12.5px; font-weight: 700; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }

.pay-options { display: grid; gap: 8px; margin-top: 12px; }
.pay-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2);
  padding: 12px; text-align: right; font-family: inherit; color: var(--ink);
  transition: .16s ease;
}
.pay-opt:hover:not(:disabled) { border-color: var(--gold); background: var(--surface); }
.pay-opt:disabled { opacity: .48; cursor: not-allowed; }
.pay-opt > span { display: flex; flex-direction: column; gap: 2px; }

.order-steps { display: flex; gap: 5px; margin: 2px 0 10px; }
.order-step { flex: 1; height: 4px; border-radius: 999px; background: var(--bg-2); }
.order-step.done { background: var(--gold); }

/* ---------------- Bank cards ---------------- */
.bank-logo {
  border-radius: 12px; display: inline-grid; place-items: center;
  color: #fff; font-size: 7.5px; font-weight: 700; flex: none;
  letter-spacing: -.2px; padding: 2px; text-align: center; line-height: 1.15;
  box-shadow: inset 0 -10px 18px rgba(0,0,0,.12);
}
.bank-logo span { display: block; }
.card-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.card-item:last-child { border-bottom: 0; }
.card-item .inline-actions { display: flex; align-items: center; gap: 5px; flex: none; }
.bank-preview { display: flex; align-items: center; gap: 8px; margin-top: 8px; min-height: 30px; }
.bank-preview .small { display: flex; flex-direction: column; line-height: 1.5; }

/* ---------------- FAQ ---------------- */
.faq {
  border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2);
  padding: 10px 14px; margin-bottom: 8px;
}
.faq:last-child { margin-bottom: 0; }
.faq summary { cursor: pointer; font-size: 13px; font-weight: 650; list-style: none; display: flex; align-items: center; gap: 8px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--gold); font-weight: 800; font-size: 15px; }
.faq[open] summary::before { content: "−"; }
.faq p { margin: 8px 0 2px; font-size: 12.5px; color: var(--muted); line-height: 2; }

/* ---------------- Ticket thread ---------------- */
.ticket-thread { display: flex; flex-direction: column; gap: 10px; padding: 4px; max-height: 430px; overflow: auto; }
.bubble {
  max-width: 82%; padding: 10px 13px; border-radius: 15px;
  font-size: 12.5px; line-height: 1.9; white-space: pre-wrap;
}
.bubble.user { align-self: flex-start; background: var(--gold-soft); color: #4a3610; border-top-right-radius: 4px; }
.bubble.admin { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--line); border-top-left-radius: 4px; }
.bubble .meta { font-size: 10px; color: var(--muted); margin-top: 5px; }

/* ---------------- KYC ---------------- */
.kyc-id-card {
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(226, 196, 124, .25), transparent 60%),
    linear-gradient(150deg, #0b241f, #123b32);
  color: #f6f1e7; border: 1px solid rgba(226, 196, 124, .18);
}
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kv .k { font-size: 10.5px; color: rgba(246, 241, 231, .55); }
.kv .v { font-size: 13.5px; font-weight: 700; }

.empty { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 0; }

/* ---------------- Auth (OTP demo) ---------------- */
body.auth-locked .topbar, body.auth-locked .bottom-nav, body.auth-locked .demo-bar { display: none; }
body.auth-locked .shell { padding-top: 28px; padding-bottom: 28px; }
.auth-wrap { max-width: 460px; margin: 0 auto; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0 22px; }
.auth-brand .brand-name { display: block; }
.auth-brand .brand-sub { display: block; }
.auth-logo { width: 46px; height: 46px; border-radius: 14px; }
.auth-card { padding: 22px; border-radius: 22px; }
.auth-head h1 { margin: 0 0 6px; font-size: 21px; }
.auth-head p { margin: 0 0 18px; font-size: 12.5px; line-height: 1.9; color: var(--muted); }
.auth-card .field { margin-bottom: 12px; }
.auth-card .btn-block { margin-top: 6px; }
.auth-demo-code {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--gold-soft); color: #4a3610; border: 1px dashed rgba(122, 90, 21, .3);
  border-radius: 14px; padding: 11px 14px; font-size: 12.5px; margin-bottom: 14px;
}
.auth-demo-code b { font-size: 20px; letter-spacing: 4px; direction: ltr; }
.auth-error {
  background: var(--danger-soft); color: var(--danger); border-radius: 12px;
  padding: 9px 12px; font-size: 12px; line-height: 1.8; margin-bottom: 10px;
}
.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.auth-foot { text-align: center; font-size: 11px; color: var(--muted); line-height: 1.9; margin-top: 16px; }
.auth-foot a { color: var(--brand); }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .grid-main, .grid-3 { grid-template-columns: 1fr; }
  .kpi-grid, .kpi-grid.cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .admin-grid-2, .admin-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-foot { display: none; }
}
@media (max-width: 640px) {
  .shell { padding: 14px 14px calc(var(--nav-h) + 26px); }
  .topbar-inner { padding: 10px 14px; gap: 10px; }
  .price-pill { display: none; }
  .hello h1 { font-size: 20px; }
  .balance-card { padding: 20px; border-radius: 22px; }
  .balance-value { font-size: 28px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: 17px; }
  .admin-main { padding: 16px 14px 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .btn { padding: 11px 14px; }
  .kv-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   v5 — public landing, live market, unified trade, filters,
   wallet charge, profile/KYC, licenses, responsive admin
   ============================================================ */

.mobile-only { display: none !important; }
body.public-view .topbar,
body.public-view .bottom-nav { display: none; }
body.public-view .shell { max-width: 1240px; padding-bottom: 40px; }

/* ---------------- Landing ---------------- */
body.view-landing,
body.view-landing .shell {
  background: transparent;
}
body.view-landing {
  overflow-x: clip;
  background:
    radial-gradient(1100px 620px at 85% -10%, rgba(200, 162, 74, .22), transparent 62%),
    radial-gradient(900px 520px at 5% 12%, rgba(31, 90, 77, .5), transparent 60%),
    linear-gradient(160deg, #061a16, #0a2721 48%, #08201b);
  color: #f6f1e7;
}
body.view-landing .shell { padding-top: 18px; }
.landing-nav {
  display: flex; align-items: center; gap: 18px;
  padding: 8px 4px 20px;
}
.landing-nav .brand-name { color: #f6f1e7; }
.landing-nav .brand-sub { color: rgba(246, 241, 231, .5); }
.landing-links { display: flex; gap: 16px; margin-inline-start: auto; font-size: 13px; }
.landing-links a { color: rgba(246, 241, 231, .7); }
.landing-links a:hover { color: var(--gold-2); }

.hero3d {
  display: grid; grid-template-columns: 1.06fr .94fr; gap: 26px;
  align-items: center;
  padding: 22px 0 10px;
}
.hero-copy h1 {
  margin: 14px 0 12px; font-size: clamp(34px, 5vw, 58px);
  line-height: 1.22; letter-spacing: -1.2px; font-weight: 800;
}
.gold-text {
  background: linear-gradient(100deg, #f7e6b6, #e2c47c 40%, #b98d2b 70%, #f5e3b0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 22px rgba(200, 162, 74, .22));
}
.hero-copy p { color: rgba(246, 241, 231, .62); font-size: 15px; line-height: 2; max-width: 470px; margin: 0 0 18px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(226, 196, 124, .28); background: rgba(226, 196, 124, .08);
  color: #f3dfae; border-radius: 999px; padding: 6px 13px; font-size: 12px;
}
.land-price-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; border-radius: 18px;
  background: linear-gradient(150deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border: 1px solid rgba(226, 196, 124, .2);
  backdrop-filter: blur(10px);
  max-width: 480px;
}
.land-price-card .k { font-size: 11.5px; color: rgba(246, 241, 231, .55); }
.land-price-card .v { font-size: 27px; font-weight: 800; letter-spacing: -.5px; margin: 2px 0; }
.land-price-card .v small { font-size: 12px; font-weight: 500; opacity: .6; }
.land-price-card .k2 { font-size: 11.5px; color: rgba(246, 241, 231, .55); }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero-actions .btn-ghost { border-color: rgba(255,255,255,.18); color: #f6f1e7; background: rgba(255,255,255,.04); }
.hero-trust { display: flex; gap: 24px; margin-top: 24px; flex-wrap: wrap; }
.hero-trust div { display: flex; flex-direction: column; }
.hero-trust b { font-size: 20px; color: var(--gold-2); }
.hero-trust span { font-size: 11px; color: rgba(246, 241, 231, .5); }

.scene {
  position: relative; height: 470px; perspective: 1100px;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease;
  overflow: clip;
}
.scene-glow {
  position: absolute; inset: 8% 4%; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(226, 196, 124, .28), transparent 62%);
  filter: blur(8px);
}
.scene-ring {
  position: absolute; left: 50%; top: 48%; border-radius: 50%;
  border: 1px solid rgba(226, 196, 124, .18);
  transform: translate(-50%, -50%) rotateX(72deg);
}
.scene-ring.r1 { width: 360px; height: 360px; }
.scene-ring.r2 { width: 470px; height: 470px; opacity: .55; }
.cuboid {
  position: absolute; left: 50%; top: 50%;
  width: 176px; height: 64px; margin-left: -88px; margin-top: -32px;
  transform-style: preserve-3d;
  animation: barFloat 7s ease-in-out infinite;
}
.cuboid .f { position: absolute; border: 1px solid rgba(122, 90, 21, .28); border-radius: 2px; }
.cuboid .f-front, .cuboid .f-back { width: 176px; height: 64px; background: linear-gradient(150deg, #f5dd9e, #d3a748 48%, #b98d2b); }
.cuboid .f-front { transform: translateZ(45px); }
.cuboid .f-back { transform: rotateY(180deg) translateZ(45px); background: #b98d2b; }
.cuboid .f-right, .cuboid .f-left { width: 90px; height: 64px; background: #a97d24; }
.cuboid .f-right { left: 43px; transform: rotateY(90deg) translateZ(88px); }
.cuboid .f-left { left: 43px; transform: rotateY(-90deg) translateZ(88px); }
.cuboid .f-top, .cuboid .f-bottom { width: 176px; height: 90px; background: linear-gradient(140deg, #fbeec6, #e2c47c); }
.cuboid .f-top { top: 0; transform: rotateX(90deg) translateZ(44px); }
.cuboid .f-bottom { top: 0; transform: rotateX(-90deg) translateZ(20px); background: #8f6819; }
.cuboid.bar-a { transform: translate3d(-30px, 40px, 30px) rotateX(-22deg) rotateY(-34deg) rotateZ(-4deg); animation-delay: -.4s; }
.cuboid.bar-b { transform: translate3d(46px, 104px, -30px) rotateX(-18deg) rotateY(-38deg) rotateZ(3deg) scale(.86); animation-delay: -2.6s; }
.cuboid.bar-c { transform: translate3d(-4px, 162px, 52px) rotateX(-30deg) rotateY(-28deg) rotateZ(6deg) scale(1.08); animation-delay: -4.8s; }
@keyframes barFloat {
  0%, 100% { margin-top: -32px; }
  50% { margin-top: -44px; }
}
.coin3d {
  position: absolute; left: 52%; top: 12%; width: 118px; height: 118px;
  margin-left: -59px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff4cd, #e2c47c 42%, #b18322 78%, #8a621b);
  box-shadow: 0 0 0 8px #a97d24, 0 0 0 10px #d3a748, 0 26px 50px rgba(0,0,0,.35);
  display: grid; place-items: center; color: #4a3310; font-weight: 800;
  animation: coinSpin 9s linear infinite;
  transform-style: preserve-3d;
}
.coin3d span { font-size: 34px; letter-spacing: -1px; }
.coin3d i { position: absolute; bottom: 20px; font-size: 10px; font-style: normal; letter-spacing: 2px; opacity: .7; }
@keyframes coinSpin {
  0% { transform: rotateY(0deg) translateY(0); }
  50% { transform: rotateY(180deg) translateY(-12px); }
  100% { transform: rotateY(360deg) translateY(0); }
}
.spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #f7e6b6; box-shadow: 0 0 18px 6px rgba(247, 230, 182, .5); animation: sparkPulse 3.2s ease-in-out infinite; }
.spark.s1 { left: 16%; top: 20%; }
.spark.s2 { right: 14%; top: 38%; animation-delay: -1s; }
.spark.s3 { left: 24%; bottom: 18%; animation-delay: -2s; }
.spark.s4 { right: 26%; bottom: 12%; animation-delay: -1.6s; }
@keyframes sparkPulse { 0%,100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.25); } }
.scene-label {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: rgba(246, 241, 231, .6);
  background: rgba(6, 26, 22, .55); border: 1px solid rgba(226, 196, 124, .18);
  padding: 6px 14px; border-radius: 999px; backdrop-filter: blur(8px); white-space: nowrap;
}
.landing-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.feature-card {
  border: 1px solid rgba(226, 196, 124, .14);
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border-radius: 20px; padding: 18px;
}
.feature-card .f-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(226, 196, 124, .13); color: var(--gold-2); margin-bottom: 10px;
}
.feature-card h3 { margin: 0 0 6px; font-size: 14px; }
.feature-card p { margin: 0; font-size: 11.5px; line-height: 2; color: rgba(246, 241, 231, .52); }
.landing-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 30px; padding: 16px 4px; color: rgba(246, 241, 231, .4); font-size: 11.5px; border-top: 1px solid rgba(255,255,255,.08); }
.landing-foot a { color: var(--gold-2); }

/* ---------------- Auth ---------------- */
.auth-back { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.auth-demo-code.hidden { display: none; }
body:not(.authed) .auth-foot a { color: var(--brand-2); }

/* ---------------- Topbar extras ---------------- */
.bell-btn { position: relative; }
.bell-count {
  position: absolute; top: -5px; left: -5px; min-width: 18px; height: 18px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; display: grid; place-items: center; padding: 0 4px;
  border: 2px solid var(--bg);
}
.avatar-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0;
  background: linear-gradient(145deg, var(--gold-2), var(--gold));
  color: #2a1e06; font-weight: 800; font-size: 15px;
}

/* ---------------- Mobile live ticker ---------------- */
.live-ticker {
  display: none; align-items: center; gap: 10px;
  background: linear-gradient(150deg, #0b241f, #123b32);
  color: #f6f1e7; border: 1px solid rgba(226, 196, 124, .22);
  border-radius: 16px; padding: 10px 13px; margin-bottom: 14px;
  box-shadow: 0 12px 26px rgba(13, 47, 40, .22);
}
.live-ticker .lt-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; color: #cdeee0; background: rgba(31, 138, 91, .2);
  border-radius: 999px; padding: 3px 8px; flex: none;
}
.live-ticker .lt-live i { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .18); }
.live-ticker .lt-main { display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.live-ticker .lt-main b { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.live-ticker .lt-main span { font-size: 9.5px; color: rgba(246, 241, 231, .55); }
.live-ticker .lt-sub { font-size: 10px; color: rgba(246, 241, 231, .62); border-inline-start: 1px solid rgba(255,255,255,.12); padding-inline-start: 10px; flex: none; }
.live-ticker .lt-change { margin-inline-start: auto; font-size: 11px; font-weight: 700; flex: none; }
.live-ticker .lt-change.up { color: #6ee7a8; }
.live-ticker .lt-change.down { color: #fca5a5; }

/* ---------------- Home ---------------- */
.home-hello { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.home-hello > div { flex: 1; min-width: 220px; }
.home-hello .badge { margin-top: 6px; }
.balance-eye { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #f6f1e7; }
.btn-on-dark {
  background: rgba(255,255,255,.1); color: #f6f1e7; border-color: rgba(255,255,255,.14);
}
.balance-card .balance-value .unit-t { font-size: 15px; font-weight: 500; opacity: .7; }
.support-cta { background: linear-gradient(150deg, #fffaf0, #f9f1dc); border-color: #eee0bd; }
.support-hours { background: var(--warn-soft); border-color: #f0dfb8; }
.support-hours p { color: #7a5a15; }

/* ---------------- Chart tooltip ---------------- */
.chart-wrap { position: relative; }
.chart-tip {
  position: absolute; z-index: 3; min-width: 132px;
  background: rgba(13, 47, 40, .94); color: #f6f1e7;
  border: 1px solid rgba(226, 196, 124, .26);
  border-radius: 12px; padding: 8px 11px; pointer-events: none;
  box-shadow: 0 14px 30px rgba(13,47,40,.28);
  transform: translate(-50%, -120%);
}
.chart-tip .tip-price { font-size: 14px; font-weight: 800; }
.chart-tip .tip-date { font-size: 10px; color: rgba(246, 241, 231, .65); white-space: nowrap; }

/* ---------------- Trade ---------------- */
.seg-block { display: flex; width: 100%; }
.seg-block button { flex: 1; padding: 10px 8px; }
.price-strip {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 16px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(150deg, var(--gold-soft), #fbf6e9);
  border: 1px solid #eee0bd;
}
.price-strip .k { font-size: 11px; color: #7a5a15; }
.price-strip .v { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.price-strip .v small { font-size: 11px; font-weight: 500; color: #7a5a15; }
.price-strip .k2 { font-size: 11.5px; color: #7a5a15; }
.price-strip .badge { margin-inline-start: auto; }
.balance-mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.balance-mini .k { display: block; font-size: 10.5px; color: var(--muted); }
.balance-mini b { font-size: 16px; font-weight: 800; }
.balance-mini .unit { font-size: 10px; color: var(--muted); }
.live-card { background: linear-gradient(150deg, #0b241f, #123b32); color: #f6f1e7; border-color: rgba(226, 196, 124, .2); }
.live-card .card-head h3 { color: #f6f1e7; }
.live-card .summary { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.live-card .summary .k { color: rgba(246, 241, 231, .58); }
.live-card .summary-row { color: #f6f1e7; }
.live-big { font-size: 27px; font-weight: 800; letter-spacing: -.5px; }
.live-big small { font-size: 11px; font-weight: 500; opacity: .6; }
.live-mg { font-size: 12px; color: var(--gold-2); }
.inline-alert {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--warn-soft); border: 1px solid #f0dfb8; color: #7a5a15;
  border-radius: 14px; padding: 12px 14px; margin-top: 14px; font-size: 12px;
}
.inline-alert > div { flex: 1; display: flex; flex-direction: column; }
.inline-alert b { font-size: 12.5px; }

/* ---------------- History filters ---------------- */
.history-hello { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.history-hello > div { flex: 1; min-width: 220px; }
.filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.date-range { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; margin-top: 12px; }
.date-range-title { font-size: 11.5px; color: var(--muted); }
.date-selects { display: grid; grid-template-columns: .8fr 1.2fr 1fr; gap: 6px; }
.date-selects .select { padding: 10px 8px; font-size: 12px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.birth-selects { grid-template-columns: 1fr 1.4fr 1fr; }
.tx-row-main { display: flex; flex-direction: column; min-width: 0; }
.tx-ref { font-size: 10px; color: var(--muted); direction: ltr; text-align: right; }

/* ---------------- Wallet ---------------- */
.wallet-card .wallet-big { font-size: 30px; font-weight: 800; letter-spacing: -.6px; }
.wallet-card .wallet-big small { font-size: 12px; color: var(--muted); font-weight: 500; }
.gold-wallet { background: linear-gradient(150deg, #fffaf0, #f7edd3); border-color: #eee0bd; }
.wallet-value { font-size: 11.5px; color: #7a5a15; margin-top: 2px; }
.wallet-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.wallet-actions .btn { flex: 1; min-width: 120px; }
.gold-badge { background: var(--gold-soft); color: #7a5a15; }
.quick-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick-link {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 14px; padding: 11px; text-align: right; color: var(--ink);
  font-family: inherit;
}
.quick-link span { width: 32px; height: 32px; border-radius: 10px; background: var(--gold-soft); color: #7a5a15; display: grid; place-items: center; margin-bottom: 4px; }
.quick-link b { font-size: 12.5px; }
.quick-link small { font-size: 10px; color: var(--muted); }
.quick-link:hover { border-color: var(--gold); }

/* ---------------- Charge ---------------- */
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-bottom: 6px; background: none; border: 0; font-family: inherit; cursor: pointer; }
.charge-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; font-size: 11.5px; color: var(--muted); }
.charge-steps span.active { color: #6b4f14; background: var(--gold-soft); border-radius: 999px; padding: 4px 10px; font-weight: 650; }
.charge-steps i { width: 22px; height: 1px; background: var(--line); }
.amount-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amount-preset {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px;
  padding: 13px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: inherit; color: var(--ink); transition: .16s ease;
}
.amount-preset b { font-size: 14px; }
.amount-preset span { font-size: 10px; color: var(--muted); }
.amount-preset:hover { border-color: var(--gold); }
.amount-preset.active { background: var(--gold-soft); border-color: var(--gold); }
.pay-opt .pay-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--gold-soft); color: #7a5a15; display: grid; place-items: center; flex: none; }
.pay-opt .pay-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pay-opt .pay-main b { font-size: 13px; }
.pay-opt .pay-main span { font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.pay-opt .pay-lock { font-size: 10px; color: var(--muted); }
.paya-guide { display: flex; flex-direction: column; gap: 10px; }
.guide-step { display: flex; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; }
.guide-step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #f6f1e7; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.guide-step b { display: block; font-size: 12.5px; }
.guide-step p { margin: 2px 0 0; font-size: 11px; color: var(--muted); line-height: 1.9; }
.dest-box { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 12px; }
.dest-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 12px; border-bottom: 1px dashed var(--line); }
.dest-row:last-child { border-bottom: 0; }
.dest-row .k { color: var(--muted); flex: none; }
.dest-row .v { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 650; }
.dest-row .v .num { direction: ltr; overflow-wrap: anywhere; }
.copy-btn { border: 0; background: var(--surface); color: var(--brand-2); border-radius: 8px; padding: 3px 6px; font-size: 10px; flex: none; }
.cycle-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-top: 10px; }
.cycle-table th, .cycle-table td { text-align: center; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.cycle-table th { color: var(--muted); font-weight: 600; font-size: 10.5px; }
.cycle-note { font-size: 10.5px; color: var(--muted); margin-top: 6px; line-height: 1.9; }
.charge-ref { margin-top: 12px; }

/* ---------------- Profile / KYC ---------------- */
.profile-hello { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.profile-hello > div { flex: 1; min-width: 220px; }
.profile-hello .badge { margin-top: 6px; }
.profile-intro { display: flex; align-items: center; gap: 12px; padding: 4px 0 16px; }
.profile-intro .avatar { width: 52px; height: 52px; border-radius: 16px; font-size: 18px; }
.profile-name { font-size: 16px; font-weight: 750; }
.profile-phone { font-size: 11.5px; color: var(--muted); }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid-2 .field { margin-bottom: 10px; }
.profile-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.lock-note {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--ok-soft); border: 1px solid #c8e6d7; color: #196b47;
  border-radius: 12px; padding: 10px 12px; font-size: 11.5px; line-height: 1.9;
  margin-top: 4px;
}
.lock-note .ic { margin-top: 2px; flex: none; }
.kyc-green {
  position: relative; overflow: hidden;
  border-radius: 24px; padding: 20px;
  background:
    radial-gradient(400px 220px at 100% 0%, rgba(226, 196, 124, .24), transparent 60%),
    linear-gradient(150deg, #0b241f, #123b32);
  color: #f6f1e7; border: 1px solid rgba(226, 196, 124, .18);
  box-shadow: 0 18px 40px rgba(13, 47, 40, .22);
}
.kyc-green::after {
  content: ""; position: absolute; left: -60px; bottom: -80px; width: 240px; height: 240px;
  border-radius: 50%; border: 1px solid rgba(226, 196, 124, .14);
}
.kyc-green-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.kyc-green-head .k { font-size: 10.5px; color: rgba(246, 241, 231, .55); }
.kyc-green-head h3 { margin: 2px 0 0; font-size: 18px; }
.kyc-seal {
  margin-inline-start: auto; width: 46px; height: 46px; border-radius: 14px;
  background: rgba(226, 196, 124, .16); color: var(--gold-2);
  display: grid; place-items: center; border: 1px solid rgba(226, 196, 124, .24);
}
.kyc-green .kv-grid { position: relative; z-index: 1; }
.kyc-green .kv .k { font-size: 10.5px; color: rgba(246, 241, 231, .55); }
.kyc-green .kv .v { font-size: 13px; font-weight: 700; word-break: break-word; }
.green-foot { position: relative; z-index: 1; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); font-size: 10.5px; color: rgba(246, 241, 231, .55); line-height: 1.9; }
.kyc-green.rejected { background: linear-gradient(150deg, #3b1210, #5a1a16); border-color: rgba(255, 180, 170, .2); }
.kyc-green.pending { background: linear-gradient(150deg, #2c2410, #3d3216); }

/* ---------------- Cards ---------------- */
.card-item-main { flex: 1; min-width: 0; }
.card-number { font-size: 13px; font-weight: 700; letter-spacing: .6px; }
.card-bank { font-size: 11px; color: var(--muted); }
.card-tag { font-size: 9.5px; color: #7a5a15; background: var(--gold-soft); border-radius: 999px; padding: 2px 7px; margin-inline-start: 5px; }
.bank-preview { display: flex; align-items: center; gap: 8px; margin-top: 8px; min-height: 30px; font-size: 11.5px; }
.card-form-note { background: var(--warn-soft); border: 1px solid #f0dfb8; color: #7a5a15; border-radius: 12px; padding: 9px 12px; font-size: 11px; line-height: 1.9; margin-top: 8px; }

/* ---------------- Licenses ---------------- */
.license-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.license-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
  text-align: right; font-family: inherit; color: var(--ink); cursor: pointer; transition: .18s ease;
}
.license-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }
.license-thumb {
  height: 128px; border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(226, 196, 124, .35), transparent 60%),
    linear-gradient(150deg, #0b241f, #123b32);
  display: grid; place-items: center; color: var(--gold-2);
}
.license-thumb img { width: 100%; height: 100%; object-fit: cover; }
.license-thumb svg { width: 44px; height: 44px; }
.license-card h3 { margin: 0; font-size: 14px; }
.license-card .license-meta { font-size: 10.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.license-empty { color: var(--muted); font-size: 11px; }
.license-view img { width: 100%; border-radius: 14px; display: block; }
.license-view iframe { width: 100%; height: 60vh; border: 0; border-radius: 14px; background: #fff; }

/* ---------------- Notifications ---------------- */
.notif-row .row-icon { background: var(--gold-soft); color: #7a5a15; }
.notif-body { font-size: 12px; color: var(--muted); line-height: 1.9; margin-top: 2px; }
.notif-row.unseen { background: linear-gradient(90deg, rgba(200,162,74,.08), transparent); }

/* ---------------- Landing / public responsive ---------------- */
@media (max-width: 980px) {
  .hero3d { grid-template-columns: 1fr; }
  .scene { height: 390px; }
  .landing-features { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mobile-only { display: flex !important; }
  body.view-landing .shell { padding: 12px 14px 30px; }
  .landing-nav { flex-wrap: wrap; gap: 10px; }
  .landing-links { display: none; }
  .landing-nav > .btn { margin-inline-start: auto; }
  .hero-copy h1 { font-size: 31px; letter-spacing: -.8px; }
  .hero-copy p { font-size: 13px; }
  .land-price-card { flex-direction: column; align-items: flex-start; }
  .land-price-card .badge { align-self: flex-start; }
  .scene { height: 330px; transform: scale(.9); transform-origin: top center; }
  .coin3d { width: 88px; height: 88px; margin-left: -44px; }
  .coin3d span { font-size: 26px; }
  .hero-trust { gap: 16px; }
  .landing-foot { flex-direction: column; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .date-range { grid-template-columns: 1fr; }
  .date-range-title { margin-top: 4px; }
  .amount-presets { grid-template-columns: 1fr; }
  .amount-preset { flex-direction: row; justify-content: space-between; padding: 12px 14px; }
  .license-grid { grid-template-columns: 1fr; }
  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .live-ticker { flex-wrap: wrap; }
  .live-ticker .lt-sub { border-inline-start: 0; padding-inline-start: 0; width: 100%; }
  .live-ticker .lt-change { margin-inline-start: 0; }
  .wallet-card .wallet-big { font-size: 25px; }
  .price-strip .v { font-size: 19px; }
  .history-hello .btn { width: 100%; }
  .charge-steps { font-size: 10.5px; }
}

/* ---------------- Admin v5 ---------------- */
body.admin-body { background: #eef1ee; font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif; }
body.admin-body table th,
body.admin-body table td { text-align: center; vertical-align: middle; }
body.admin-body table td .table-actions { justify-content: center; }
body.admin-body .table-wrap { border-radius: 12px; }
body.admin-body table { min-width: 760px; }
body.admin-body .admin-main { max-width: 100%; }
body.admin-body .admin-panel { margin-bottom: 16px; }
body.admin-body .admin-top { flex-wrap: wrap; }
body.admin-body .admin-top-actions { margin-inline-start: auto; }
body.admin-body .admin-side { overflow-y: auto; }
body.admin-body .form-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
body.admin-body .admin-nav a { white-space: nowrap; }
body.admin-body .admin-input,
body.admin-body .select { font-family: inherit; }
body.admin-body .license-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
body.admin-body .license-admin {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fbfaf5;
}
body.admin-body .license-admin .thumb { height: 90px; border-radius: 10px; overflow: hidden; background: #0d2f28; display: grid; place-items: center; color: var(--gold-2); margin-bottom: 8px; }
body.admin-body .license-admin .thumb img { width: 100%; height: 100%; object-fit: cover; }
body.admin-body .license-admin .thumb pdf { font-size: 11px; }
body.admin-body .kyc-review-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fbfaf5; margin-bottom: 10px; }
body.admin-body .kyc-review-card h4 { margin: 0 0 4px; font-size: 13px; }
body.admin-body .review-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; font-size: 11.5px; margin: 8px 0; }
body.admin-body .review-grid .k { color: var(--muted); font-size: 10px; }
body.admin-body .source-order { display: flex; flex-direction: column; gap: 8px; }
body.admin-body .source-row { display: flex; align-items: center; gap: 8px; background: #fbfaf5; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; flex-wrap: wrap; }
body.admin-body .source-row .grow { flex: 1; min-width: 160px; }
body.admin-body .source-row b { font-size: 12.5px; }
body.admin-body .source-row small { display: block; color: var(--muted); font-size: 10.5px; }
body.admin-body .source-row .order { width: 26px; height: 26px; border-radius: 8px; background: var(--gold-soft); color: #6b4f14; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
body.admin-body .login-gate { max-width: 380px; margin: 12vh auto; background: #fff; border: 1px solid #e1e6e1; border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
body.admin-body .login-gate h1 { font-size: 20px; margin: 0 0 6px; }
body.admin-body .login-gate p { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
@media (max-width: 900px) {
  body.admin-body table { min-width: 680px; }
  body.admin-body .review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.admin-body .license-admin-grid { grid-template-columns: 1fr; }
  body.admin-body .admin-side { padding: 12px; }
  body.admin-body .admin-nav { gap: 4px; }
  body.admin-body .admin-nav a { padding: 8px 10px; font-size: 11.5px; }
}
@media (max-width: 640px) {
  body.admin-body .kpi-grid { grid-template-columns: 1fr; }
  body.admin-body .admin-main { padding: 14px 10px 40px; }
  body.admin-body .table-wrap { margin-inline: -6px; }
}
