/* =====================================================================
   PTC Platform — Premium Glassmorphism design system
   Colors come from CSS variables injected by PHP (Admin > Settings).
   ===================================================================== */
:root {
  --primary: #f5b301; --primary-rgb: 245, 179, 1;
  --secondary: #d97706; --secondary-rgb: 217, 119, 6;
  --accent: #fde68a; --accent-rgb: 253, 230, 138;
  --bg: #0a0908;
  /* Per-theme values (overridden by the preset PHP injects) */
  --on-primary: #1c1404;
  --hl-a: #fff7d6; --hl-b: #fcd34d; --hl-c: #f59e0b;
  /* Everything below is derived from the four theme colours */
  --link: color-mix(in srgb, var(--primary) 60%, #fff);
  --text: color-mix(in srgb, var(--primary) 5%, #fafafa);
  --muted: color-mix(in srgb, var(--primary) 16%, #a3a3a3);
  --faint: color-mix(in srgb, var(--primary) 14%, #6b6b6b);
  --tint: color-mix(in srgb, var(--primary) 10%, #ececec);
  --tint-2: color-mix(in srgb, var(--primary) 12%, #d4d4d4);
  --mesh-glow: color-mix(in srgb, var(--primary) 40%, transparent);
  --mesh-1: color-mix(in srgb, var(--primary) 14%, var(--bg));
  --mesh-2: color-mix(in srgb, var(--primary) 7%, var(--bg));
  --mesh-4: color-mix(in srgb, #000 50%, var(--bg));
  --card-1: color-mix(in srgb, var(--primary) 32%, var(--bg));
  --card-2: color-mix(in srgb, var(--primary) 10%, var(--bg));
  --card-3: color-mix(in srgb, #000 55%, var(--bg));
  --bar-bg: color-mix(in srgb, var(--bg) 72%, transparent);
  --input-bg: color-mix(in srgb, var(--bg) 55%, transparent);
  --input-bg-focus: color-mix(in srgb, var(--bg) 78%, transparent);
  --option-bg: color-mix(in srgb, var(--primary) 8%, var(--bg));
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);
  --ok: #34d399; --ok-rgb: 52, 211, 153;
  --warn: #fbbf24; --warn-rgb: 251, 191, 36;
  --bad: #f87171; --bad-rgb: 248, 113, 113;
  --info: #60a5fa; --info-rgb: 96, 165, 250;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 44px -24px rgba(2, 6, 23, 0.8);
  --grad: linear-gradient(135deg, var(--primary), var(--secondary));
  --grad-soft: linear-gradient(135deg, rgba(var(--primary-rgb), .25), rgba(var(--secondary-rgb), .18));
  --ease: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 82px;
}

/* SolaimanLipi (Bangla web font), pinned to a fixed commit on jsDelivr */
@font-face {
  font-family: 'SolaimanLipi'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/maateen/bangla-web-fonts@8be99b866ae7057b366cff55874770d490794edb/fonts/solaiman-lipi/solaimanlipi-normal-v1.0.ttf') format('truetype');
}
@font-face {
  font-family: 'SolaimanLipi'; font-style: normal; font-weight: 600 900; font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/maateen/bangla-web-fonts@8be99b866ae7057b366cff55874770d490794edb/fonts/solaiman-lipi/solaimanlipi-bold-v1.0.ttf') format('truetype');
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'SolaimanLipi', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Background: theme-coloured gradient mesh (base) + slowly drifting glow blobs (top layer) */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(120vw 70vh at 50% -15%, var(--mesh-glow), transparent 70%),
    radial-gradient(80vw 60vh at -10% 40%, rgba(var(--secondary-rgb), .12), transparent 65%),
    radial-gradient(80vw 60vh at 110% 60%, rgba(var(--primary-rgb), .10), transparent 65%),
    linear-gradient(180deg, var(--mesh-1) 0%, var(--mesh-2) 40%, var(--bg) 70%, var(--mesh-4) 100%);
}
body::after {
  content: '';
  position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(28vmax 28vmax at 25% 30%, rgba(var(--primary-rgb), .16), transparent 70%),
    radial-gradient(24vmax 24vmax at 75% 25%, rgba(var(--secondary-rgb), .14), transparent 70%),
    radial-gradient(22vmax 22vmax at 70% 75%, rgba(var(--accent-rgb), .08), transparent 70%),
    radial-gradient(20vmax 20vmax at 92% 92%, rgba(var(--accent-rgb), .12), transparent 70%);
  opacity: var(--blob-op, 1);
  animation: meshDrift 28s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes meshDrift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(4%, -3%, 0) rotate(8deg) scale(1.06); }
  100% { transform: translate3d(-4%, 3%, 0) rotate(-6deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(var(--primary-rgb), .5); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 560px; }
.text-grad {
  background: linear-gradient(90deg, var(--hl-a), var(--hl-b) 40%, var(--hl-c) 75%, var(--hl-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .875rem; }
.center { text-align: center; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.hidden { display: none !important; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:40px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.flex{display:flex;gap:12px;align-items:center}.flex-between{display:flex;justify-content:space-between;align-items:center;gap:12px}
.wrap{flex-wrap:wrap}.grow{flex:1}

/* ---------------- Glass cards ---------------- */
.glass {
  position: relative;
  background: linear-gradient(155deg, rgba(255,255,255,.085), rgba(255,255,255,.028) 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.12);
}
.card { padding: 22px; }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }
.card-glow::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .45), transparent 42%, rgba(var(--secondary-rgb), .3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}

/* Icon tiles (gradient squircles) */
.tile {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border-radius: 16px; font-size: 1.45rem; color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 24px -8px rgba(var(--primary-rgb), .7), inset 0 1px 0 rgba(255,255,255,.35);
}
.tile-sm { width: 40px; height: 40px; border-radius: 12px; font-size: 1.1rem; }
.tile-lg { width: 64px; height: 64px; border-radius: 20px; font-size: 1.8rem; }
.g-violet { background: linear-gradient(145deg, #c4b5fd, #8b5cf6 60%, #7c3aed); box-shadow: 0 10px 24px -8px rgba(139,92,246,.75), inset 0 1px 0 rgba(255,255,255,.4); }
.g-green  { background: linear-gradient(145deg, #6ee7b7, #10b981 65%); box-shadow: 0 10px 24px -8px rgba(16,185,129,.7), inset 0 1px 0 rgba(255,255,255,.4); }
.g-orange { background: linear-gradient(145deg, #fdba74, #f97316 65%); box-shadow: 0 10px 24px -8px rgba(249,115,22,.7), inset 0 1px 0 rgba(255,255,255,.4); }
.g-cyan   { background: linear-gradient(145deg, #67e8f9, #0ea5e9 65%); box-shadow: 0 10px 24px -8px rgba(14,165,233,.7), inset 0 1px 0 rgba(255,255,255,.4); }
.g-pink   { background: linear-gradient(145deg, #f9a8d4, #ec4899 65%); box-shadow: 0 10px 24px -8px rgba(236,72,153,.7), inset 0 1px 0 rgba(255,255,255,.4); }
.g-purple { background: linear-gradient(145deg, #e9d5ff, #a855f7 65%); box-shadow: 0 10px 24px -8px rgba(168,85,247,.7), inset 0 1px 0 rgba(255,255,255,.4); }
.g-red    { background: linear-gradient(145deg, #fda4af, #f43f5e 65%); box-shadow: 0 10px 24px -8px rgba(244,63,94,.7), inset 0 1px 0 rgba(255,255,255,.4); }
.g-indigo { background: linear-gradient(145deg, #a5b4fc, #6366f1 65%); box-shadow: 0 10px 24px -8px rgba(99,102,241,.7), inset 0 1px 0 rgba(255,255,255,.4); }
.g-amber  { background: linear-gradient(145deg, #fde68a, #f59e0b 65%); box-shadow: 0 10px 24px -8px rgba(245,158,11,.7), inset 0 1px 0 rgba(255,255,255,.4); }

/* ---------------- Buttons ---------------- */
.btn {
  --b-bg: var(--glass-strong);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--b-bg); color: var(--text);
  font-weight: 700; font-size: 1rem; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s, background .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled, .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-primary {
  border-color: rgba(255,255,255,.25);
  background: linear-gradient(180deg, rgba(255,255,255,.2), transparent 55%), var(--grad);
  box-shadow: 0 14px 30px -12px rgba(var(--primary-rgb), .85), inset 0 1px 0 rgba(255,255,255,.35);
  color: var(--on-primary);
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ease);
}
.btn-primary:hover::after { left: 140%; }
.btn-primary:hover { box-shadow: 0 18px 40px -12px rgba(var(--primary-rgb), 1), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-rainbow { background: linear-gradient(100deg, var(--accent), var(--primary) 45%, var(--secondary)); color: var(--on-primary); border-color: rgba(255,255,255,.25); box-shadow: 0 14px 30px -12px rgba(var(--primary-rgb), .85); }
.btn-ghost { background: rgba(255,255,255,.03); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-ok { background: linear-gradient(135deg, #10b981, #059669); color: #fff; border-color: transparent; }
.btn-bad { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; border-color: transparent; }
.btn-warn { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border-color: transparent; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .9rem; gap: 6px; }
.btn-xs { min-height: 30px; padding: 0 10px; font-size: .82rem; gap: 4px; }
.btn-lg { min-height: 58px; font-size: 1.1rem; padding: 0 28px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; border-radius: 14px; }
.btn .spinner { width: 18px; height: 18px; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 18px; }
.label { display: block; font-weight: 700; margin-bottom: 8px; font-size: .97rem; }
.input-wrap { position: relative; }
.input-wrap > i:first-child { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; pointer-events: none; }
.input, .select, .textarea {
  width: 100%; min-height: 54px; padding: 12px 18px;
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: 16px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrap > i:first-child ~ .input { padding-left: 50px; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(var(--primary-rgb), .9);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .18);
  background: var(--input-bg-focus);
}
.textarea { min-height: 110px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.select option { background: var(--option-bg); }
.input-action { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); padding: 8px 10px; cursor: pointer; font-size: 1.2rem; }
.help { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.error-text { font-size: .85rem; color: var(--bad); margin-top: 6px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }
input[type=color].input { padding: 6px; height: 54px; cursor: pointer; }
input[type=file].input { padding: 13px 14px; }

/* ---------------- Alerts / badges ---------------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid; margin-bottom: 16px; font-size: .95rem; animation: slideDown .4s var(--ease); }
.alert i { font-size: 1.2rem; line-height: 1.4; }
.alert-success { background: rgba(var(--ok-rgb), .1); border-color: rgba(var(--ok-rgb), .35); color: #a7f3d0; }
.alert-error   { background: rgba(var(--bad-rgb), .1); border-color: rgba(var(--bad-rgb), .35); color: #fecaca; }
.alert-warning { background: rgba(var(--warn-rgb), .1); border-color: rgba(var(--warn-rgb), .35); color: #fde68a; }
.alert-info    { background: rgba(var(--info-rgb), .1); border-color: rgba(var(--info-rgb), .35); color: #bfdbfe; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid; white-space: nowrap; }
.badge-ok   { color: var(--ok);   background: rgba(var(--ok-rgb), .12);   border-color: rgba(var(--ok-rgb), .3); }
.badge-warn { color: var(--warn); background: rgba(var(--warn-rgb), .12); border-color: rgba(var(--warn-rgb), .3); }
.badge-bad  { color: var(--bad);  background: rgba(var(--bad-rgb), .12);  border-color: rgba(var(--bad-rgb), .3); }
.badge-info { color: var(--info); background: rgba(var(--info-rgb), .12); border-color: rgba(var(--info-rgb), .3); }
.badge-muted{ color: var(--muted);background: rgba(255,255,255,.05);       border-color: var(--border); }
.badge-hot  { position: absolute; top: -8px; right: -6px; background: linear-gradient(135deg,#fb7185,#f43f5e); color: #fff; border: 2px solid var(--bg); font-size: .7rem; padding: 1px 8px; z-index: 2; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 999px; background: rgba(var(--primary-rgb), .1); border: 1px solid rgba(var(--primary-rgb), .35); font-size: .95rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(var(--ok-rgb), .6); animation: pulse 2s infinite; flex: none; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; font-size: .85rem; white-space: nowrap; background: rgba(255,255,255,.02); }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(255,255,255,.03); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty i { font-size: 2.4rem; display: block; margin-bottom: 8px; opacity: .6; }

/* Pager */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--glass); padding: 0 10px; }
.pager .current { background: var(--grad); border-color: transparent; font-weight: 700; }
.pager a:hover { border-color: rgba(var(--primary-rgb), .6); }

/* ---------------- Modal ---------------- */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 3, 12, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-box { position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 26px; transform: translateY(24px) scale(.96); transition: transform .4s var(--ease); background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 16%, var(--bg)), color-mix(in srgb, var(--bg) 96%, #000)); }
.modal.open .modal-box { transform: none; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-strong); background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; z-index: 3; transition: transform .2s, background .2s; }
.modal-close:hover { transform: rotate(90deg); background: rgba(var(--bad-rgb), .4); }
.modal-promo .modal-box { padding: 0; max-width: 420px; overflow: hidden; }
.modal-promo img { width: 100%; height: auto; }
.modal-promo .promo-body { padding: 18px 22px 22px; }

/* Toast */
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; padding: 14px 18px; border-radius: 16px; display: flex; gap: 10px; align-items: center; background: rgba(20, 16, 40, .92); border: 1px solid var(--border-strong); box-shadow: var(--shadow); backdrop-filter: blur(14px); animation: toastIn .4s var(--ease); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast-success i { color: var(--ok); } .toast-error i { color: var(--bad); } .toast-info i { color: var(--info); } .toast-warning i { color: var(--warn); }

/* Loader */
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--primary); animation: spin .8s linear infinite; display: inline-block; }
.page-loader { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: var(--bg); transition: opacity .4s, visibility .4s; }
.page-loader.done { opacity: 0; visibility: hidden; }
.page-loader .logo-pulse { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; font-size: 2rem; color: #fff; background: var(--grad); animation: breathe 1.4s ease-in-out infinite; box-shadow: 0 0 60px rgba(var(--primary-rgb), .6); }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }

/* ---------------- Public header / landing ---------------- */
.topbar { position: sticky; top: 0; z-index: 50; padding: 14px 0; transition: background .3s, backdrop-filter .3s; }
.topbar.scrolled { background: var(--bar-bg); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); border-bottom: 1px solid var(--border); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.35rem; letter-spacing: .2px; }
.brand-logo { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 1.4rem; color: var(--on-primary); background: linear-gradient(145deg, #c4b5fd, var(--primary)); box-shadow: 0 10px 30px -8px rgba(var(--primary-rgb), .8), inset 0 1px 0 rgba(255,255,255,.4); overflow: hidden; flex: none; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--muted); transition: color .2s, background .2s; font-weight: 600; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.live-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(var(--primary-rgb), .4); background: rgba(var(--primary-rgb), .08); font-size: .9rem; white-space: nowrap; }
.live-chip b { color: var(--ok); letter-spacing: 1px; font-weight: 700; }
.menu-toggle { display: none; }

.hero { padding: 56px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 5rem); font-weight: 800; line-height: 1.15; margin: 26px 0 18px; letter-spacing: -.5px; }
.hero h1 .text-grad { filter: drop-shadow(0 6px 30px rgba(var(--secondary-rgb), .35)); }
.hero .sub { font-size: clamp(1.4rem, 4.5vw, 2rem); font-weight: 800; margin-bottom: 10px; }
.hero .lead { color: var(--tint); font-size: clamp(1.05rem, 3.2vw, 1.3rem); max-width: 640px; margin: 0 auto 30px; }
.hero-actions { display: grid; gap: 14px; max-width: 520px; margin: 0 auto; }
.section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.8rem, 5.5vw, 2.6rem); font-weight: 800; margin-top: 16px; }
.section-head p { color: var(--muted); max-width: 620px; margin: 0 auto; }

.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-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat-card { padding: 24px; overflow: hidden; }
.stat-card .value { font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 800; margin-top: 18px; line-height: 1.1; }
.stat-card .label-sm { color: var(--tint); font-size: 1.05rem; }
.stat-card .bar { height: 3px; border-radius: 3px; margin-top: 22px; background: linear-gradient(90deg, transparent, var(--c, var(--primary)), transparent); box-shadow: 0 0 18px var(--c, var(--primary)); }

.feature { display: flex; gap: 18px; align-items: center; padding: 22px; }
.feature h3 { font-size: 1.25rem; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); }

.step { display: flex; gap: 18px; padding: 22px; align-items: flex-start; }
.step .num { position: absolute; top: -8px; left: 50px; width: 26px; height: 26px; border-radius: 50%; background: #0b0a18; border: 1px solid var(--border-strong); font-size: .8rem; display: grid; place-items: center; font-weight: 700; }
.step .tile-wrap { position: relative; }
.step-tag { display: inline-block; padding: 1px 12px; border-radius: 999px; background: rgba(var(--primary-rgb), .15); border: 1px solid rgba(var(--primary-rgb), .35); font-size: .82rem; margin-right: 8px; }

.partner { padding: 18px; text-align: center; position: relative; }
.partner .logo-box { background: #fff; border-radius: 16px; height: 110px; display: grid; place-items: center; margin-bottom: 12px; overflow: hidden; padding: 10px; }
.partner .logo-box img { max-height: 90px; object-fit: contain; }
.partner .logo-box span { font-size: 1.8rem; font-weight: 800; }
.partner .online { position: absolute; top: 14px; right: 14px; }

.plan-card { padding: 24px; display: flex; flex-direction: column; transition: transform .35s var(--ease), border-color .35s; }
.plan-card:hover { transform: translateY(-6px); border-color: rgba(var(--primary-rgb), .5); }
.plan-card .price { font-size: 2rem; font-weight: 800; color: var(--accent); }
.plan-card ul { list-style: none; padding: 0; margin: 16px 0 22px; flex: 1; }
.plan-card li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.plan-card li i { color: var(--accent); font-size: 1.2rem; }
.plan-card .ribbon { position: absolute; top: 18px; right: 18px; }
.plan-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.plan-meta div { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--border); }
.plan-meta i { color: #c4b5fd; }
.plan-meta small { display: block; color: var(--muted); }
.plan-meta b { font-size: 1.05rem; }

.faq-item { margin-bottom: 12px; overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { transition: transform .3s; color: var(--muted); }
.faq-item[open] summary i { transform: rotate(45deg); color: var(--secondary); }
.faq-item .answer { padding: 0 22px 18px; color: var(--tint-2); }

.ticker { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-top: 30px; }
.ticker .t-body { flex: 1; min-width: 0; }
.ticker .t-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker .t-amt { font-weight: 800; color: var(--ok); font-size: 1.25rem; text-align: right; }
.ticker .fade { animation: fadeSwap .5s var(--ease); }

.footer { padding: 40px 0 120px; border-top: 1px solid var(--border); margin-top: 40px; color: var(--muted); }
.footer .social a { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--glass); border: 1px solid var(--border); margin-right: 6px; font-size: 1.1rem; transition: transform .2s, background .2s; }
.footer .social a:hover { transform: translateY(-3px); background: var(--grad); }

/* ---------------- Auth pages ---------------- */
.auth-page { min-height: 100vh; padding: 22px 0 40px; }
.auth-head { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 30px; min-height: 56px; }
.auth-head .back { position: absolute; left: 0; }
.auth-title { text-align: center; margin-bottom: 26px; }
.auth-title h1 { font-size: clamp(2.2rem, 8vw, 3rem); font-weight: 800; }
.auth-title p { color: var(--tint); font-size: 1.1rem; }
.auth-card { padding: 26px; }
.bonus-note { color: var(--accent); font-weight: 700; margin: 4px 0 18px; }

/* ---------------- App (logged-in) layout ---------------- */
.app-header { position: sticky; top: 0; z-index: 60; padding: 12px 0; background: rgba(7, 6, 15, .65); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.app-header .container { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-header .brand { font-size: 1.15rem; }
.app-header .brand-logo { width: 40px; height: 40px; border-radius: 13px; font-size: 1.2rem; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--border); font-size: 1.2rem; cursor: pointer; transition: background .2s, transform .2s; }
.icon-btn:hover { background: var(--glass-strong); transform: translateY(-2px); }
.icon-btn .count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #f43f5e; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.desk-nav { display: flex; gap: 4px; }
.desk-nav a { padding: 8px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; display: flex; gap: 8px; align-items: center; transition: background .2s, color .2s; }
.desk-nav a:hover, .desk-nav a.active { color: var(--text); background: rgba(var(--primary-rgb), .15); }
.app-main { padding: 20px 0 calc(var(--nav-h) + 40px); animation: pageIn .5s var(--ease); }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.page-head h1 { font-size: 1.6rem; margin: 0; font-weight: 800; }
.page-head p { margin: 0; color: var(--muted); }
.back-btn { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--border); font-size: 1.3rem; flex: none; transition: background .2s, transform .2s; }
.back-btn:hover { background: var(--glass-strong); transform: translateX(-3px); }

.balance-card { padding: 26px; overflow: hidden; background: linear-gradient(135deg, rgba(var(--primary-rgb), .45), rgba(49, 30, 110, .55) 50%, rgba(var(--secondary-rgb), .3)); border-color: rgba(var(--primary-rgb), .45); }
.balance-card::before { content: ''; position: absolute; width: 260px; height: 260px; right: -80px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--secondary-rgb), .45), transparent 70%); pointer-events: none; }
.balance-card .amount { font-size: clamp(2.4rem, 10vw, 3.4rem); font-weight: 800; line-height: 1.1; margin: 12px 0 6px; letter-spacing: -.5px; }
.balance-card .amount small { font-size: 1.3rem; color: var(--tint); font-weight: 700; }
.balance-card .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }

/* TAKAPAY wallet card: real bank-card ratio (85.6 × 54 mm), everything scales with card width (cqw) */
/* Flip wrapper holds the card shape; tap/click turns it to show the back side */
.wallet-flip { position: relative; width: 100%; max-width: 460px; margin-inline: auto; aspect-ratio: 85.6 / 54; perspective: 1200px; cursor: pointer; -webkit-tap-highlight-color: transparent; outline: none; border-radius: clamp(14px, 4.5vw, 22px); }
.wallet-flip:focus-visible { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .8); }
.wallet-flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.wallet-flip.is-flipped .wallet-flip-inner { transform: rotateY(180deg); }
.wallet-flip .wallet-card { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.wallet-flip .wc-back { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .wallet-flip-inner { transition: none; } }

.wallet-card { position: relative; isolation: isolate; overflow: hidden;
  container-type: inline-size; border-radius: clamp(14px, 4.5vw, 22px);
  padding: 5.5% 6%; display: flex; flex-direction: column; justify-content: space-between; color: #fff;
  background: linear-gradient(135deg, var(--card-1) 0%, var(--card-2) 48%, var(--card-3) 100%);
  border: 1px solid rgba(var(--primary-rgb), .35);
  box-shadow: 0 24px 46px -20px rgba(var(--primary-rgb), .9), inset 0 1px 0 rgba(255,255,255,.25); }
.wallet-card::before { content: ''; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; right: -22%; top: -45%; border-radius: 50%; background: radial-gradient(circle, rgba(var(--secondary-rgb), .5), transparent 70%); pointer-events: none; }
.wallet-card::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(55% 60% at 0% 100%, rgba(var(--accent-rgb), .28), transparent 70%),
              repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 14px); }
.wallet-card.is-locked { background: linear-gradient(135deg, var(--card-2) 0%, var(--card-3) 60%, #000 100%); }
.wc-top { display: flex; justify-content: space-between; align-items: center; gap: 3cqw; }
.wc-brand { display: inline-flex; align-items: center; gap: 2cqw; font-weight: 900; font-size: 6.4cqw; letter-spacing: .6cqw; font-style: italic; line-height: 1; font-family: system-ui, 'Segoe UI', Arial, sans-serif; white-space: nowrap; }
.wc-brand b { color: #fcd34d; font-weight: 900; }
.wc-logo { flex: none; width: 8.5cqw; height: 8.5cqw; border-radius: 2.2cqw; display: grid; place-items: center; overflow: hidden; font-style: normal; font-size: 5cqw; color: var(--on-primary); background: linear-gradient(145deg, #c4b5fd, var(--primary)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.wc-logo img { width: 100%; height: 100%; object-fit: cover; }
.wc-brand-sm { font-size: 4.6cqw; }
.wc-brand-sm .wc-logo { width: 6.5cqw; height: 6.5cqw; font-size: 3.8cqw; border-radius: 1.7cqw; }
.wc-today { flex: none; font-size: max(10px, 3.2cqw); font-weight: 700; padding: 1cqw 2.6cqw; border-radius: 999px; background: rgba(16,185,129,.22); border: 1px solid rgba(52,211,153,.5); color: #a7f3d0; white-space: nowrap; }
.wc-mid { display: flex; align-items: center; gap: 4cqw; }
.wc-chip { flex: none; width: 12cqw; aspect-ratio: 44 / 33; border-radius: 1.6cqw; background: linear-gradient(135deg, #fde68a, #d97706 55%, #fcd34d); position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.wc-chip::before, .wc-chip::after { content: ''; position: absolute; background: rgba(120,53,15,.45); }
.wc-chip::before { left: 0; right: 0; top: 50%; height: 1px; }
.wc-chip::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.wc-balance { flex: 1; min-width: 0; }
.wc-amount { font-size: 9.6cqw; font-weight: 800; line-height: 1.05; letter-spacing: -.2cqw; white-space: nowrap; }
.wc-amount small { font-size: 4cqw; color: var(--tint); font-weight: 700; }
.wc-nfc { flex: none; align-self: flex-start; font-size: 5.5cqw; opacity: .75; transform: rotate(90deg); }
.wc-number { font-family: ui-monospace, 'Consolas', 'Courier New', monospace; font-size: 5.6cqw; letter-spacing: .5cqw; word-spacing: 1.5cqw; white-space: nowrap; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.wc-locked { display: flex; align-items: center; gap: 1.8cqw; font-family: inherit; font-size: max(10px, 3.3cqw); letter-spacing: 0; word-spacing: 0; white-space: normal; line-height: 1.3; padding: 1.4cqw 2.6cqw; border-radius: 2cqw; background: rgba(0,0,0,.28); border: 1px dashed rgba(255,255,255,.3); color: #fef3c7; text-shadow: none; }
.wc-locked i { color: #fcd34d; }
.wc-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 4cqw; }
.wc-holder { min-width: 0; }
.wc-exp { flex: none; text-align: right; display: flex; gap: 3.5cqw; }
.wc-cap { font-size: max(9px, 2.6cqw); text-transform: uppercase; letter-spacing: .3cqw; color: color-mix(in srgb, var(--tint) 80%, transparent); line-height: 1.2; }
.wc-val { font-weight: 700; font-size: 4cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.wc-exp .wc-val { font-family: ui-monospace, 'Consolas', monospace; }
/* Back side */
.wc-back { padding-top: 0; padding-left: 0; padding-right: 0; justify-content: flex-start; background: linear-gradient(135deg, var(--card-3) 0%, var(--card-2) 55%, var(--card-1) 100%); }
.wc-stripe { flex: none; height: 13cqw; margin-top: 6cqw; background: linear-gradient(180deg, #0b0a12, #1f1d2b 50%, #0b0a12); }
.wc-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.6cqw 4cqw; padding: 4cqw 6% 0; }
.wc-info .wc-span { grid-column: 1 / -1; }
.wc-info .wc-val { font-size: 3.7cqw; }
.wc-warn { color: #fca5a5; }
.wc-noplan { padding: 4.5cqw 6% 0; font-size: max(11px, 3.6cqw); line-height: 1.4; color: var(--tint); display: grid; gap: 2.6cqw; justify-items: start; }
.wc-btn { display: inline-flex; align-items: center; gap: 1.6cqw; padding: 1.6cqw 3.6cqw; border-radius: 999px; background: #fcd34d; color: #1e1b4b; font-weight: 800; font-size: max(11px, 3.4cqw); }
.wc-back-foot { margin-top: auto; padding: 0 6%; display: flex; justify-content: space-between; align-items: center; gap: 3cqw; }
.wc-hint { font-size: max(9px, 2.8cqw); color: color-mix(in srgb, var(--tint) 80%, transparent); white-space: nowrap; }
.balance-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; margin-top: 12px; }

.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.mini-stat { padding: 16px; display: flex; gap: 12px; align-items: center; }
.mini-stat .v { font-weight: 800; font-size: 1.1rem; line-height: 1.2; }
.mini-stat .l { color: var(--muted); font-size: .85rem; }

.services { padding: 20px; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.service { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: rgba(255,255,255,.025); text-align: center; font-weight: 700; font-size: .98rem; line-height: 1.3; transition: transform .35s var(--ease), border-color .35s, background .35s; }
.service .tile { width: 62px; height: 62px; border-radius: 20px; font-size: 1.7rem; transition: transform .45s var(--ease); }
.service:hover { transform: translateY(-5px); border-color: rgba(var(--primary-rgb), .5); background: rgba(var(--primary-rgb), .08); }
.service:hover .tile { transform: scale(1.08) rotate(-6deg); }

.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { min-width: 0; }
.list-item .title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .meta { color: var(--muted); font-size: .85rem; }
.amount-credit { color: var(--ok); font-weight: 800; white-space: nowrap; }
.amount-debit { color: var(--bad); font-weight: 800; white-space: nowrap; }
.amount-none { color: var(--muted); font-weight: 800; white-space: nowrap; }

/* Banner slider */
.slider { position: relative; overflow: hidden; border-radius: var(--radius); }
.slides { display: flex; transition: transform .6s var(--ease); }
.slide { min-width: 100%; position: relative; }
.slide img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.slide .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 34px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.slide .cap b { font-size: 1.2rem; display: block; }
.slider-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.slider-dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; background: rgba(255,255,255,.45); padding: 0; cursor: pointer; transition: width .3s, background .3s; }
.slider-dots button.active { width: 26px; background: #fff; }

/* Method selector */
.method-option { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 20px; border: 1px solid var(--border); cursor: pointer; transition: border-color .25s, background .25s, transform .25s; overflow: hidden; margin-bottom: 12px; }
.method-option::before { content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--mc, var(--primary)) 35%, transparent), transparent 70%); opacity: .6; pointer-events: none; }
.method-option:hover { transform: translateY(-2px); }
.method-option input { position: absolute; opacity: 0; pointer-events: none; }
.method-option .m-logo { width: 96px; height: 60px; border-radius: 14px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; color: var(--mc, #333); font-weight: 800; font-size: 1.1rem; }
.method-option .m-logo img { max-width: 90%; max-height: 90%; object-fit: contain; }
.method-option .radio { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--faint); margin-left: auto; flex: none; transition: border-color .2s, box-shadow .2s; position: relative; }
.method-option input:checked ~ .radio { border-color: var(--mc, var(--primary)); box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 13px var(--mc, var(--primary)); }
.method-option:has(input:checked) { border-color: var(--mc, var(--primary)); background: rgba(255,255,255,.04); }

.copy-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid var(--border-strong); }
.copy-box .val { font-size: 1.3rem; font-weight: 800; letter-spacing: .5px; word-break: break-all; }

.steps-list { margin: 0; padding-left: 22px; color: var(--tint); }
.steps-list li { padding: 3px 0; }

/* Task cards */
.task-card { padding: 18px; display: flex; gap: 14px; align-items: flex-start; transition: transform .3s var(--ease), border-color .3s; }
.task-card:hover { transform: translateY(-3px); border-color: rgba(var(--primary-rgb), .45); }
.task-card .reward { font-weight: 800; color: var(--ok); font-size: 1.1rem; white-space: nowrap; }
.progress { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .5s var(--ease); }
.countdown { width: 150px; height: 150px; margin: 10px auto 18px; position: relative; display: grid; place-items: center; }
.countdown svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.countdown circle { fill: none; stroke-width: 10; }
.countdown .track { stroke: rgba(255,255,255,.08); }
.countdown .ring { stroke: url(#cdGrad); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.countdown .sec { font-size: 2.6rem; font-weight: 800; }

/* Tabs / filter chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--glass); white-space: nowrap; font-weight: 600; font-size: .92rem; transition: background .2s, border-color .2s; }
.chip.active, .chip:hover { background: rgba(var(--primary-rgb), .2); border-color: rgba(var(--primary-rgb), .55); }

/* Profile */
.avatar { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; color: #fff; background: var(--grad); box-shadow: 0 16px 40px -12px rgba(var(--primary-rgb), .9); flex: none; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { text-align: right; word-break: break-all; }

/* Notifications panel */
.notif-panel { position: fixed; top: 76px; right: 16px; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; z-index: 70; padding: 8px; display: none; background: linear-gradient(160deg, rgba(36, 28, 72, .97), rgba(14, 11, 30, .98)); }
.notif-panel.open { display: block; animation: slideDown .3s var(--ease); }
.notif-item { padding: 12px; border-radius: 14px; display: flex; gap: 12px; }
.notif-item:hover { background: rgba(255,255,255,.04); }
.notif-item.unread { background: rgba(var(--primary-rgb), .1); }
.notif-item .t { font-weight: 700; font-size: .95rem; }
.notif-item .m { font-size: .88rem; color: var(--tint-2); }
.notif-item .d { font-size: .78rem; color: var(--faint); }

/* Bottom navigation (mobile): floating liquid-glass capsule with a draggable glass lens.
   Drag the lens (or swipe the page sideways) to move between tabs. */
.bottom-nav { position: fixed; z-index: 80; left: 14px; right: 14px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 66px; padding: 6px;
  max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 34px; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.05)), color-mix(in srgb, var(--bg) 45%, transparent);
  backdrop-filter: blur(26px) saturate(200%) brightness(1.08); -webkit-backdrop-filter: blur(26px) saturate(200%) brightness(1.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), inset 0 -1px 0 rgba(255,255,255,.08), inset 0 0 0 1px rgba(255,255,255,.12), 0 20px 44px -14px rgba(0,0,0,.75), 0 2px 10px -4px rgba(0,0,0,.4); }
/* specular sheen across the top edge */
.bottom-nav::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 60% at 50% -20%, rgba(255,255,255,.22), transparent 60%); }
.nav-lens { position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 5); border-radius: 28px; pointer-events: none;
  transform: translateX(calc(var(--idx, 0) * 100%)); transition: transform .55s cubic-bezier(.3, 1.35, .5, 1), scale .3s var(--ease), background .3s;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.2), inset 0 -6px 12px -8px rgba(var(--primary-rgb), .6), 0 8px 18px -8px rgba(0,0,0,.6);
  backdrop-filter: blur(6px) saturate(180%); -webkit-backdrop-filter: blur(6px) saturate(180%); }
.nav-lens.none { opacity: 0; }
.bottom-nav.dragging .nav-lens { transition: scale .3s var(--ease), background .3s; scale: 1.1 1.14; background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.1)); }
.bottom-nav a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 28px;
  color: var(--muted); font-size: .74rem; font-weight: 700; -webkit-tap-highlight-color: transparent; -webkit-user-drag: none; transition: color .3s; }
.bottom-nav a i { font-size: 1.35rem; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.bottom-nav a.active, .bottom-nav a.hover { color: #fff; }
.bottom-nav a.active i { color: var(--link); transform: translateY(-1px) scale(1.08); filter: drop-shadow(0 2px 8px rgba(var(--primary-rgb), .7)); }
.bottom-nav.dragging a.active:not(.hover) i { transform: none; filter: none; color: inherit; }
.bottom-nav a.hover i { transform: scale(1.22); color: var(--link); }
.bottom-nav a:active i { transform: scale(.88); }

/* Page slide when switching tabs by swipe/drag */
.app-main.leave-l { animation: pgLeaveL .22s ease-in forwards; }
.app-main.leave-r { animation: pgLeaveR .22s ease-in forwards; }
.app-main.enter-l { animation: pgEnterL .42s var(--ease); }
.app-main.enter-r { animation: pgEnterR .42s var(--ease); }
@keyframes pgLeaveL { to { opacity: 0; transform: translateX(-40px); } }
@keyframes pgLeaveR { to { opacity: 0; transform: translateX(40px); } }
@keyframes pgEnterL { from { opacity: 0; transform: translateX(50px); } }
@keyframes pgEnterR { from { opacity: 0; transform: translateX(-50px); } }
.fab-support { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 75; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, #3b82f6, var(--primary)); box-shadow: 0 14px 30px -8px rgba(59,130,246,.8); transition: transform .3s var(--ease); }
.fab-support:hover { transform: scale(1.08) rotate(-8deg); }
.install-bar { position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + 16px); z-index: 85; padding: 14px 16px; display: none; align-items: center; gap: 12px; max-width: 520px; margin: 0 auto; }
.install-bar.show { display: flex; animation: slideUp .4s var(--ease); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Animations ---------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--ok-rgb), .6); } 70% { box-shadow: 0 0 0 10px rgba(var(--ok-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--ok-rgb), 0); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-16px) scale(.96); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------- Responsive ---------------- */
@media (min-width: 900px) {
  .bottom-nav { display: none; }
  .app-main { padding-bottom: 60px; }
  .fab-support { bottom: 24px; }
  .install-bar { bottom: 24px; }
  .dash-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
  .dash-grid > * + * { margin-top: 0 !important; }
}
@media (max-width: 899px) {
  .desk-nav { display: none; }
}
@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2.keep { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { gap: 8px; }
  .service { padding: 12px 2px; font-size: .88rem; border-radius: 16px; }
  .service .tile { width: 54px; height: 54px; border-radius: 17px; font-size: 1.45rem; }
  .live-chip .hide-xs { display: none; }
  .card { padding: 18px; }
  .brand { font-size: 1.15rem; }
  .brand-logo { width: 42px; height: 42px; }
  .table th, .table td { padding: 10px; }
  .method-option .m-logo { width: 76px; height: 50px; }
}

/* UddoktaPay automatic deposit card */
.gw-card { padding: 20px; margin-bottom: 8px; }
.gw-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.gw-title { font-size: 1.15rem; display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gw-row { display: grid; gap: 10px; margin-bottom: 14px; }
.gw-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.gw-quick .chip { cursor: pointer; }
