/* ============================================================
   Bhorawat Jewellers — user app theme (mobile-first, professional)
   Warm ivory surfaces · gold accent · bottom nav · Nunito
   NOTE: admin panel uses assets/css/admin.css (frozen copy) — do not
   restyle admin from this file. Class names must stay stable (PHP
   markup references them directly).
   ============================================================ */

:root {
  --slate-900: #2c1a12;
  --slate-800: #4a2b17;
  --slate-700: #62462f;
  --slate-500: #806d5b;
  --slate-400: #a89079;
  --slate-300: #d7c6ab;
  --slate-200: #e9dcc7;
  --slate-100: #f5eddf;
  --slate-50: #fbf7ef;

  --gold: #d18b0a;
  --gold-dark: #8b5c0a;
  --gold-tint: #fff1c9;
  --gold-line: #eec86d;

  --bg: #fbf6ec;
  --card: #fffcf6;
  --ink: #281a12;
  --muted: #75624e;
  --line: #eedfc9;
  --green: #15803d;
  --green-bg: #ecfdf3;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --blue: #1d4ed8;

  --primary: #b87300;

  --radius: 12px;
  --shadow: 0 2px 6px rgba(100, 61, 19, 0.08);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family:
    "Nunito",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #f2eadf;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

/* ---------- app frame ---------- */
.app {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(100, 61, 19, 0.1);
}

.screen {
  padding: 16px 16px 96px;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 252, 245, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.brand-logo img {
  width: 35px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gold);
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #fff;
}
.brand-mark svg {
  width: 18px;
  height: 18px;
}
.brand-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--slate-900);
  letter-spacing: 0.2px;
}
.wallet-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--slate-100);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}
.wallet-chip .ic-sm,
.wallet-chip svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}
.wallet-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- topbar right cluster ---------- */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--slate-100);
  border: 1px solid var(--line);
  color: var(--slate-700);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.dot-alert {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ---------- hero portfolio card ---------- */
.hero {
  background: linear-gradient(120deg, #f0c052 0%, #d99212 48%, #b87506 100%);
  border-radius: 16px;
  padding: 20px 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(120, 67, 8, 0.22);
  margin-bottom: 14px;
}
.hero-label {
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
}
.hero-sub {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-sub .up {
  color: #a7f3d0;
  background: rgba(21, 128, 61, 0.35);
  border-radius: 6px;
  padding: 1px 7px;
}
.hero-sub .down {
  color: #fecaca;
  background: rgba(153, 27, 27, 0.35);
  border-radius: 6px;
  padding: 1px 7px;
}

/* ---------- metal holding cards ---------- */
.metal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.metal-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.metal-card .coin {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}
.metal-card h3 {
  font-size: 14px;
  font-weight: 700;
}
.metal-card .g {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}
.metal-card .v {
  font-size: 15px;
  font-weight: 700;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.metal-card .pl {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 2px;
}
.metal-card .pl.up {
  color: var(--green);
}
.metal-card .pl.down {
  color: var(--red);
}
.metal-card.gold::before,
.metal-card.silver::before {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 100%;
  height: 58%;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 100% 100%;
}
.metal-card.gold::before,
.rate-box.gold::before {
  background-image: url("../img/gold-wave.svg");
}
.metal-card.silver::before,
.rate-box.silver::before {
  background-image: url("../img/silver-wave.svg");
}
.metal-card > *,
.rate-box > * {
  position: relative;
  z-index: 1;
}
.coin-gold {
  border-radius: 50%;
  background: var(--gold-tint);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--gold-dark);
  font-size: 15px;
}
.coin-silver {
  border-radius: 50%;
  background: var(--slate-100);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #475569;
  font-size: 15px;
}
.coin {
  width: 40px;
  height: 40px;
}

/* ---------- coin shop ---------- */
.shop-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.coin-shop-medal {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  line-height: 1.05;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.65),
    var(--shadow);
}
.coin-shop-medal span {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.75;
}
.coin-shop-medal.gold {
  background: var(--gold-tint);
  color: var(--gold-dark);
  border: 2px solid var(--gold);
}
.coin-shop-medal.silver {
  background: var(--slate-100);
  color: #475569;
  border: 2px solid #94a3b8;
}
.shop-desc {
  margin: 8px 0 0;
}
.shop-flow {
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.shop-step-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ---------- quick actions ---------- */
.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.qa {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.qa svg {
  width: 22px;
  height: 22px;
}
.qa.qa-buy-gold svg {
  color: var(--gold);
}
.qa.qa-buy-silver svg {
  color: #64748b;
}
.qa.qa-add svg {
  color: var(--green);
}
.qa.qa-out svg {
  color: var(--red);
}

/* ---------- rates strip ---------- */
.rate-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.rate-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.rate-box.gold::before,
.rate-box.silver::before {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 100%;
  height: 62%;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 100% 100%;
}
.rate-box .m {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
}
.rate-box .r {
  font-size: 17px;
  font-weight: 700;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.rate-box .s {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.dot.gold {
  background: #d97706;
}
.dot.silver {
  background: #cbd5e1;
  border: 1px solid #cbd5e1;
}

/* ---------- lists / transactions ---------- */
.list {
  display: flex;
  flex-direction: column;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child {
  border-bottom: 0;
}
.li-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
}
.li-icon svg {
  width: 17px;
  height: 17px;
}
.li-icon.gold {
  background: var(--gold-tint);
  color: var(--gold-dark);
}
.li-icon.silver {
  background: var(--slate-100);
  color: #64748b;
}
.li-icon.money-in {
  background: var(--green-bg);
  color: var(--green);
}
.li-icon.money-out {
  background: var(--red-bg);
  color: var(--red);
}
.li-body {
  flex: 1;
  min-width: 0;
}
.li-title {
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.li-sub {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}
.li-right {
  text-align: right;
}
.li-amt {
  font-weight: 700;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.li-amt.in {
  color: var(--green);
}
.li-amt.out {
  color: var(--red);
}
.li-amt.flat {
  color: var(--ink);
}

/* ---------- headings / sections ---------- */
.page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 6px 0 2px;
}
.page-sub {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 14px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 8px;
}
.section-head h2 {
  font-size: 14.5px;
  font-weight: 700;
}
.section-head a {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

/* ---------- forms ---------- */
.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--slate-700);
  margin: 12px 0 5px;
}
.field,
select.field,
textarea.field {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--slate-300);
  background: var(--card);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  transition:
    border 0.15s,
    box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
select.field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field:focus {
  border-color: var(--slate-500);
  box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}
.field::placeholder {
  color: #a9b4c4;
  font-weight: 400;
}
.input-wrap {
  position: relative;
}
.input-wrap .prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--slate-700);
}
.input-wrap .prefix + .field {
  padding-left: 34px;
}
.field-hint {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(
    110deg,
    #8c641c,
    #d4af37,
    #fff4c4,
    #c99a27,
    #8c641c
  );
  background-size: 250% auto;
  color: #382609;
  border: 1px solid #e9ce79;
  animation: goldShine 4s linear infinite;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(120, 67, 8, 0.2);
  transition:
    transform 0.08s,
    filter 0.15s;
}
.gold-btn {
  background: linear-gradient(
    110deg,
    #8c641c,
    #d4af37,
    #fff4c4,
    #c99a27,
    #8c641c
  );
  background-size: 250% auto;
  color: #382609;
  border: 1px solid #e9ce79;
  animation: goldShine 4s linear infinite;
}
/* @keyframes goldShine {
  to { background-position: 250% center; }
} */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .gold-btn,
  .swal-mg-confirm {
    animation: none;
  }
}
.btn:active {
  transform: scale(0.98);
}
.btn:hover {
  filter: brightness(1.12);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-ghost {
  background: var(--card);
  color: var(--primary);
  border: 1px solid var(--slate-300);
  box-shadow: none;
}
.btn-danger {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
  animation: none;
}
.btn-green {
  background: #059669;
  color: #fff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  animation: none;
}
.btn-ghost,
.btn-danger-ghost {
  animation: none;
}
.btn-sm {
  width: auto;
  padding: 8px 14px;
  font-size: 12.5px;
  border-radius: 8px;
  box-shadow: none;
}
.btn-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 10px;
}

/* ---------- metal switch pills ---------- */
.metal-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.metal-pill {
  padding: 12px 10px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--slate-300);
  background: var(--card);
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: block;
}
.metal-pill .sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 1px;
}
.metal-pill.active-gold {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}
.metal-pill.active-gold .sub {
  color: #fbfcfd;
}
.metal-pill.active-silver {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}
.metal-pill.active-silver .sub {
  color: #fbfcfd;
}
/* radio-pill variant used on the SIP form (label wraps a hidden radio) */
.metal-pill:has(input[type="radio"]:checked) {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}
.metal-pill:has(input[type="radio"]:checked) .sub {
  color: #cbd5e1;
}

.metal-pill svg {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  margin-right: 2px;
}

/* ---------- toggle chips (₹ / grams) ---------- */
.chip-row {
  display: flex;
  gap: 8px;
  margin: 10px 0 4px;
  flex-wrap: wrap;
}
.chip {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--slate-300);
  background: #fff;
  color: var(--slate-700);
  cursor: pointer;
}
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- summary / stat rows ---------- */
.summary {
  background: var(--slate-50);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  padding: 3px 0;
  color: var(--slate-700);
}
.summary-row.big {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-900);
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.kv:last-child {
  border-bottom: 0;
}
.kv .k {
  color: var(--muted);
  font-weight: 500;
}
.kv .v {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ---------- badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-success {
  background: var(--green-bg);
  color: var(--green);
}
.badge-warning {
  background: var(--gold-tint);
  color: var(--gold-dark);
}
.badge-danger {
  background: var(--red-bg);
  color: var(--red);
}
.badge-muted {
  background: var(--slate-100);
  color: var(--slate-500);
}
.badge-info {
  background: #eff6ff;
  color: var(--blue);
}
.badge-gold {
  background: var(--gold-tint);
  color: var(--gold-dark);
}
.badge-silver {
  background: var(--slate-100);
  color: #475569;
}

/* ---------- flash ---------- */
.flash {
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 12px;
  border: 1px solid;
}
.flash-success {
  background: var(--green-bg);
  color: #166534;
  border-color: #bbf7d0;
}
.flash-error {
  background: var(--red-bg);
  color: #991b1b;
  border-color: #fecaca;
}

/* ---------- auth screens ---------- */
.auth {
  padding: 48px 22px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.auth-logo .lg {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: var(--gold);
  display: grid;
  place-items: center;
  font-size: 36px;
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.3);
  color: #fff;
}
.auth-logo .lg svg {
  width: 36px;
  height: 36px;
}
.auth-logo h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--slate-900);
}
.auth-logo p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin-top: -6px;
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.auth-foot a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- tab bar (Material-style bottom nav) ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  z-index: 50;
  width: min(430px, 100%);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 252, 245, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--slate-400);
  font-size: 10px;
  font-weight: 700;
  padding-top: 8px;
}
.tab svg {
  width: 22px;
  height: 22px;
}
.tab.active {
  color: var(--primary);
}
.tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--gold);
}

/* ---------- empty states ---------- */
.empty {
  text-align: center;
  padding: 34px 16px;
  color: var(--muted);
}
.empty .ico {
  font-size: 42px;
  margin-bottom: 8px;
}
.empty .ico svg {
  width: 42px;
  height: 42px;
  color: var(--slate-300);
}
.empty h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 4px;
}
.empty p {
  font-size: 12.5px;
  font-weight: 400;
  max-width: 260px;
  margin: 0 auto 14px;
}

/* ---------- pagination ---------- */
.pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
  font-weight: 700;
  font-size: 13px;
}
.pager a,
.pager span {
  padding: 7px 13px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}
.pager .cur {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

/* ---------- history filter tabs ---------- */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.filter-tabs a {
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--slate-300);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}
.filter-tabs a.active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

/* ============================================================
   v2 — richer user app components
   ============================================================ */

/* ---------- generic inline icon sizing ---------- */
.ic-14 svg,
svg.ic-14 {
  width: 14px;
  height: 14px;
}
.ic-16 svg,
svg.ic-16 {
  width: 16px;
  height: 16px;
}
.ic-18 svg,
svg.ic-18 {
  width: 18px;
  height: 18px;
}
.ic-20 svg,
svg.ic-20 {
  width: 20px;
  height: 20px;
}
.ic-24 svg,
svg.ic-24 {
  width: 24px;
  height: 24px;
}
.ic-28 svg,
svg.ic-28 {
  width: 28px;
  height: 28px;
}
[class*="ic-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- privacy: hide balances ---------- */
.hide-balances .maskable {
  filter: blur(7px);
  user-select: none;
}
.maskable {
  transition: filter 0.15s;
}

/* ---------- section header with icon ---------- */
.sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 2px 10px;
}
.sec-head svg {
  width: 17px;
  height: 17px;
  color: var(--slate-500);
}
.sec-head h2 {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.sec-head .spacer {
  flex: 1;
}
.sec-head a {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

/* ---------- mini stat cards (SIP overview, wallet in/out) ---------- */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.mini-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
}
.mini {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px 10px;
  box-shadow: var(--shadow);
}
.mini .mk {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.mini .mk svg {
  width: 12px;
  height: 12px;
}
.mini .mv {
  font-size: 15.5px;
  font-weight: 700;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini .ms {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1px;
}

/* ---------- profile / settings menu list ---------- */
.menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: none;
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}
.menu-item:last-child {
  border-bottom: 0;
}
.menu-item:active {
  background: var(--slate-50);
}
.menu-item .mi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  background: var(--slate-100);
  color: var(--slate-700);
}
.menu-item .mi-icon svg {
  width: 18px;
  height: 18px;
}
.menu-item .mi-icon.tone-green {
  background: var(--green-bg);
  color: var(--green);
}
.menu-item .mi-icon.tone-red {
  background: var(--red-bg);
  color: var(--red);
}
.menu-item .mi-icon.tone-blue {
  background: #eff6ff;
  color: var(--blue);
}
.menu-item .mi-icon.tone-slate {
  background: var(--slate-100);
  color: #475569;
}
.menu-item .mi-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.menu-item .mi-title {
  font-weight: 700;
  font-size: 13.5px;
}
.menu-item .mi-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 1px;
}
.menu-item .mi-end {
  color: var(--slate-300);
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-item .mi-end svg {
  width: 16px;
  height: 16px;
}

/* ---------- profile header ---------- */
.profile-head {
  background: linear-gradient(120deg, #f0c052 0%, #d99212 48%, #b87506 100%);
  border-radius: 16px;
  color: #fff;
  padding: 22px 18px 18px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(120, 67, 8, 0.22);
}
.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.profile-head .p-name {
  font-size: 19px;
  font-weight: 700;
  margin-top: 9px;
}
.profile-head .p-sub {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 2px;
}
.profile-head .p-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 700;
}
.profile-head .p-badge svg {
  width: 12px;
  height: 12px;
}

/* ---------- segmented control (frequency picker, filter pills) ---------- */
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  background: #b87300;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
}
.seg label {
  position: relative;
}
.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.seg .seg-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px 7px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fffaf4;
  cursor: pointer;
  transition: all 0.15s;
}
.seg .seg-btn svg {
  width: 16px;
  height: 16px;
}
.seg input:checked + .seg-btn {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}
.seg .seg-btn small {
  font-size: 9.5px;
  font-weight: 500;
  color: #fffaf4;
}
.seg input:checked + .seg-btn small {
  color: #b87300;
}
/* ---------- amount slider ---------- */
input[type="range"].slider {
  width: 100%;
  margin: 12px 0 2px;
  height: 26px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type="range"].slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--slate-200);
}
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--gold);
  margin-top: -8px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}
input[type="range"].slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--slate-200);
}
input[type="range"].slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--gold);
}

/* ---------- SIP plan cards ---------- */
.plan {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 15px;
  margin-bottom: 12px;
}
.plan-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.plan-top .li-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 10px;
}
.plan-top .li-icon svg {
  width: 19px;
  height: 19px;
}
.plan-amount {
  font-size: 16px;
  font-weight: 700;
}
.plan-meta {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1px;
}
.plan-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 0 10px;
  background: var(--slate-50);
  border-radius: 10px;
  padding: 9px 10px;
}
.plan-stats div {
  text-align: center;
}
.plan-stats .ps-k {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  font-weight: 700;
}
.plan-stats .ps-v {
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

/* ---------- projection (SIP calculator) ---------- */
.projection {
  background: var(--slate-50);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
}
.projection .proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.projection .proj-cell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.projection .pk {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.projection .pv {
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.projection .pv.grow {
  color: var(--green);
}

/* ---------- FAQ accordion ---------- */
.faq {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:last-child {
  border-bottom: 0;
}
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary svg {
  width: 16px;
  height: 16px;
  color: var(--slate-500);
  flex: 0 0 16px;
}
.faq summary .chev {
  margin-left: auto;
  color: var(--slate-300);
  transition: transform 0.2s;
}
.faq details[open] summary .chev {
  transform: rotate(90deg);
}
.faq .faq-body {
  padding: 0 15px 14px 41px;
  font-size: 13px;
  color: var(--slate-700);
  font-weight: 400;
  line-height: 1.55;
}

/* ---------- notifications ---------- */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.notif-item:last-child {
  border-bottom: 0;
}
.notif-item .n-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  background: var(--slate-100);
  color: var(--slate-700);
}
.notif-item .n-icon svg {
  width: 18px;
  height: 18px;
}
.notif-item .n-icon.tone-green {
  background: var(--green-bg);
  color: var(--green);
}
.notif-item .n-icon.tone-red {
  background: var(--red-bg);
  color: var(--red);
}
.notif-item .n-icon.tone-blue {
  background: #eff6ff;
  color: var(--blue);
}
.notif-item .n-title {
  font-weight: 700;
  font-size: 13.5px;
}
.notif-item .n-sub {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 1px;
}
.notif-item .n-when {
  font-size: 10.5px;
  color: var(--slate-400);
  font-weight: 500;
  margin-top: 2px;
}
.alert-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fffbeb;
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 10px;
}
.alert-card svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex: 0 0 18px;
  margin-top: 2px;
}

/* ---------- history date groups + search ---------- */
.date-group {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--slate-500);
  margin: 16px 2px 6px;
}
.date-group:first-child {
  margin-top: 4px;
}
.search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.search-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.search-wrap input {
  padding-left: 38px;
}

/* ---------- bank rows ---------- */
.bank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.bank-row:last-child {
  border-bottom: 0;
}
.bank-row .b-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: 0 0 38px;
  background: var(--slate-100);
  color: var(--slate-700);
  display: grid;
  place-items: center;
}
.bank-row .b-icon svg {
  width: 18px;
  height: 18px;
}

/* ---------- settings toggle switch ---------- */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex: 0 0 46px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--slate-300);
  cursor: pointer;
  transition: background 0.18s;
}
.switch .track::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s;
}
.switch input:checked + .track {
  background: var(--primary);
}
.switch input:checked + .track::before {
  transform: translateX(20px);
}

/* ---------- password field with eye toggle ---------- */
.pw-wrap {
  position: relative;
}
.pw-wrap .pw-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted);
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.pw-wrap .pw-eye svg {
  width: 17px;
  height: 17px;
}
.pw-wrap .field {
  padding-right: 42px;
}

/* ---------- danger zone ---------- */
.danger-zone {
  border: 1px solid #fecaca;
  background: #fff8f8;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.danger-zone .dz-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--red);
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 6px;
}
.danger-zone .dz-title svg {
  width: 16px;
  height: 16px;
}
.danger-zone p {
  font-size: 12px;
  color: #7f1d1d;
  font-weight: 500;
  margin-bottom: 10px;
}

/* ---------- buttons with icons ---------- */
.btn svg {
  width: 18px;
  height: 18px;
}
.btn-sm svg {
  width: 14px;
  height: 14px;
}
.btn-danger-ghost {
  background: #fff;
  color: var(--red);
  border: 1px solid #fecaca;
  box-shadow: none;
}

/* ---------- SIP banner on dashboard ---------- */
.sip-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.sip-banner .sb-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: 0 0 40px;
  background: var(--gold-tint);
  color: var(--gold-dark);
  display: grid;
  place-items: center;
}
.sip-banner .sb-icon svg {
  width: 19px;
  height: 19px;
}
.sip-banner .sb-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sip-banner .sb-title {
  font-size: 13px;
  font-weight: 700;
}
.sip-banner .sb-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.sip-banner .mi-end {
  color: var(--slate-300);
}

/* ---------- portfolio ---------- */
.alloc-box {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
}
.alloc-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alloc-legend .al-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}
.alloc-legend .al-swatch {
  width: 11px;
  height: 11px;
  border-radius: 4px;
}
.alloc-legend .al-val {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.metal-detail {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.metal-detail .md-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.metal-detail .md-head h3 {
  font-size: 14.5px;
  font-weight: 700;
}

/* ---------- withdraw timeline ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 6px;
}
.timeline .tl-step {
  display: flex;
  gap: 10px;
}
.timeline .tl-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timeline .tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--slate-200);
  margin-top: 3px;
}
.timeline .tl-dot.done {
  background: var(--green);
}
.timeline .tl-line {
  width: 2px;
  flex: 1;
  background: var(--slate-200);
  min-height: 18px;
}
.timeline .tl-body {
  padding-bottom: 12px;
}
.timeline .tl-title {
  font-size: 12.5px;
  font-weight: 700;
}
.timeline .tl-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

/* ---------- auth extras ---------- */
.auth-benefits {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 16px;
}
.auth-benefits .ab {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--slate-700);
}
.auth-benefits .ab svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex: 0 0 16px;
}
.pw-meter {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.pw-meter span {
  height: 4px;
  flex: 1;
  border-radius: 99px;
  background: var(--slate-200);
}
.pw-meter.s1 span:nth-child(1) {
  background: var(--red);
}
.pw-meter.s2 span:nth-child(-n + 2) {
  background: #d97706;
}
.pw-meter.s3 span {
  background: var(--green);
}

/* ---------- misc new ---------- */
.hero .eye-btn {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  z-index: 2;
}
.hero .eye-btn svg {
  width: 17px;
  height: 17px;
}
.quick .qa svg {
  width: 22px;
  height: 22px;
}
.rate-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 7px;
  padding: 2px 7px;
}
.rate-change svg {
  width: 12px;
  height: 12px;
}
.rate-change.up {
  background: var(--green-bg);
  color: var(--green);
}
.rate-change.down {
  background: var(--red-bg);
  color: var(--red);
}
.copy-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================================================
   ADMIN PANEL (kept identical to frozen admin.css — admin does
   not use this file; left here so shared markup never breaks
   if this stylesheet is ever loaded in an admin context)
   ============================================================ */
.admin-body {
  background: #fbf7ef;
}
.admin-wrap {
  max-width: 1020px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.admin-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 10px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.admin-nav .brand-name {
  font-size: 15px;
}
.admin-nav .navlink svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 5px;
}
.admin-nav .brand-mark svg {
  width: 19px;
  height: 19px;
}
.stat .v svg {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}
.admin-nav a.navlink {
  padding: 8px 14px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 800;
  color: #7a6f60;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.admin-nav a.navlink:hover {
  background: #f8fafc;
  color: var(--primary);
}
.admin-nav a.navlink.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}
.admin-nav .spacer {
  flex: 1;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.stat .k {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.stat .v {
  font-size: 22px;
  font-weight: 900;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat .s {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 700;
  margin-top: 2px;
}

.admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}
.admin-card h2 {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 12px;
}
.admin-card h3 {
  font-size: 13.5px;
  font-weight: 900;
  margin: 14px 0 8px;
  color: #57534e;
}

.table-wrap {
  overflow-x: auto;
}
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  vertical-align: middle;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.tbl .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tbl a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}
.tbl form {
  display: inline;
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.admin-form .full {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .admin-form {
    grid-template-columns: 1fr;
  }
}

.inline-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-form input.field {
  width: 130px;
  padding: 8px 10px;
  font-size: 13px;
}

/* ---------- misc ---------- */
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.mt8 {
  margin-top: 8px;
}
.mt14 {
  margin-top: 14px;
}
.mt20 {
  margin-top: 20px;
}
.center {
  text-align: center;
}
.chart-box {
  position: relative;
  height: 190px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.notice {
  background: #fffbeb;
  border: 1px solid var(--gold-line);
  color: var(--gold-dark);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 14px;
}
.mono {
  font-family:
    "Sarasa Mono SC", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 6px;
}

/* ============================================================
   SweetAlert2 — Bhorawat Jewellers professional theme
   (applied via customClass + buttonsStyling:false)
   Falls back gracefully: without the CDN, native confirm + .flash divs remain.
   ============================================================ */
.swal-mg-popup {
  font-family:
    "Nunito",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  padding: 22px 20px;
  color: var(--ink);
}
.swal-mg-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--slate-900);
  padding: 0;
}
.swal-mg-text {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--slate-700);
}
.swal-mg-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border: 1px solid #e9ce79;
  border-radius: 10px;
  background: linear-gradient(
    110deg,
    #8c641c,
    #d4af37,
    #fff4c4,
    #c99a27,
    #8c641c
  );
  background-size: 250% auto;
  color: #382609;
  animation: goldShine 4s linear infinite;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(120, 67, 8, 0.2);
}
.swal-mg-confirm:hover {
  filter: brightness(1.15);
}
.swal-mg-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--slate-300);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.swal-mg-actions {
  gap: 10px;
  margin-top: 18px;
}
.swal-mg-toast {
  font-family: "Nunito", system-ui, sans-serif;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
  padding: 12px 16px;
  color: var(--ink);
  background: #fff;
}
.swal-mg-toast .swal2-title {
  font-size: 13.5px;
  font-weight: 700;
}
/* hide upgraded inline flashes only when Swal actually rendered them */
body.mg-swal-flash .flash {
  display: none;
}

/* ============================================================
   ADMIN APP (mobile-first, same neutral theme as the user app)
   Dark topbar distinguishes the control room. Additive only —
   no user-app rules above are modified by this section.
   ============================================================ */
.topbar-admin {
  background: #0f172a;
  border-bottom-color: #0f172a;
}
.topbar-admin .brand-name {
  color: #fff;
}
.topbar-admin .brand-mark {
  background: var(--gold);
}
.topbar-admin .icon-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
  color: #fff;
}
.topbar-admin .icon-btn .dot-alert {
  border-color: #0f172a;
}
.tabbar-admin {
  grid-template-columns: repeat(6, 1fr);
}
.tabbar-admin .tab {
  font-size: 10px;
}
.tabbar-admin .tab.active::before {
  background: var(--gold);
}
/* Cards/Table segmented toggle */
.view-toggle {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  background: #e8ecf2;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 12px;
}
.view-toggle a {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.view-toggle a.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}
/* admin stat minis: 2 columns on phones */
@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat {
    padding: 12px;
  }
  .stat .v {
    font-size: 18px;
  }
}
/* admin action forms stack cleanly inside cards */
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stack-form .field {
  width: 100%;
}

/* ---------- stepped quantity input (coin buy form) ---------- */
.qty-stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  align-items: stretch;
}
.qty-stepper .qbtn {
  border: 1px solid var(--slate-300);
  background: #fff;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: grid;
  place-items: center;
  min-height: 46px;
}
.qty-stepper .qbtn:active {
  background: var(--slate-100);
}
.qty-stepper .field {
  text-align: center;
}

/* ---------- admin menu drawer ---------- */
body.drawer-lock {
  overflow: hidden;
}
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.2s;
}
.drawer-scrim.open {
  opacity: 1;
}
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 91;
  width: min(300px, 84vw);
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 30px rgba(15, 23, 42, 0.18);
  transform: translateX(-102%);
  transition: transform 0.2s ease-out;
  display: flex;
  flex-direction: column;
}
.drawer.open {
  transform: translateX(0);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #0f172a;
}
.drawer-head .brand-name {
  color: #fff;
}
.drawer-head .icon-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
  color: #fff;
  width: 34px;
  height: 34px;
}
.drawer-nav {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.drawer-item svg {
  width: 18px;
  height: 18px;
  color: var(--slate-500);
  flex: 0 0 18px;
}
.drawer-item:active {
  background: var(--slate-100);
}
.drawer-item.active {
  background: var(--slate-100);
  color: var(--primary);
}
.drawer-item.active svg {
  color: var(--gold);
}
.drawer-item.drawer-danger {
  color: var(--red);
  margin-top: 6px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding-top: 16px;
}
.drawer-item.drawer-danger svg {
  color: var(--red);
}
