/* =====================================================
   CLUB BANK — Design System
   Theme: Dark Navy + Premium Gold Gradient
   ===================================================== */

:root {
  --bg:          #171925;
  --surface:     #202431;
  --surface-2:   #252a3a;
  --surface-3:   #2c3148;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.12);

  --text:        #f4f6fb;
  --text-2:      #a8b2c8;
  --text-3:      #6b7899;

  /* Gold gradient — three-stop premium */
  --gold-a: #f8e39a;
  --gold-b: #d4a93a;
  --gold-c: #8f6a16;
  --gold-grad: linear-gradient(135deg, var(--gold-a) 0%, var(--gold-b) 52%, var(--gold-c) 100%);
  --gold-grad-h: linear-gradient(135deg, #fdedb0 0%, #e0b84a 52%, #a07820 100%);

  /* Status */
  --green: #86efac;
  --green-bg: rgba(134,239,172,0.10);
  --red: #fca5a5;
  --red-bg: rgba(252,165,165,0.10);
  --blue: #93c5fd;

  /* Hero gradient for top panel */
  --hero-grad: linear-gradient(180deg, #1c2238 0%, var(--bg) 100%);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font: 'Vazirmatn', 'Inter', sans-serif;
  --font-mono: 'Inter', monospace;

  --nav-h: 70px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; scroll-behavior: smooth; }
/* ── Hide scrollbars globally ── */
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
input, textarea { user-select: text !important; -webkit-user-select: text !important; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ── App shell ── */
.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
}

/* ── Page content ── */
.page-body {
  flex: 1;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
  overflow-x: hidden;
}

/* ── Hero panel ── */
.hero {
  background: var(--hero-grad);
  padding: 56px 22px 32px;
  position: relative;
}
.hero-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}
.hero-icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--text-2);
  font-size: 17px;
}
.hero-icon-btn:hover { background: rgba(255,255,255,0.10); }

/* Balance section */
.hero-balance {
  text-align: center;
  margin-top: 8px;
}
.hero-balance-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  margin-bottom: 6px;
}
.hero-balance-label i { font-size: 14px; }
.hero-balance-amount {
  font-size: 38px;
  font-weight: 900;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-balance-unit {
  font-size: 14px;
  color: var(--gold-b);
  margin-top: 4px;
  font-weight: 600;
}

/* Quick actions row */
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}
.hero-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.hero-action-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-2);
  border-radius: 50%;
  font-size: 20px;
  color: var(--gold-a);
  transition: background 0.2s;
}
.hero-action-icon.gold {
  background: var(--gold-grad);
  border: none;
  color: #171717;
}
.hero-action:hover .hero-action-icon { background: rgba(255,255,255,0.13); }
.hero-action:hover .hero-action-icon.gold { filter: brightness(1.08); }

/* ── Sheet panel (bottom drawer style) ── */
.sheet {
  background: var(--bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: -20px;
  padding: 12px 0 0;
  flex: 1;
}
.sheet-handle {
  width: 36px; height: 4px;
  background: var(--surface-3);
  border-radius: 99px;
  margin: 0 auto 20px;
}
.sheet-inner { padding: 0 20px; }

/* ── Section headers ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.section-sub {
  font-size: 12px;
  color: var(--text-3);
}
.section-link {
  font-size: 12px;
  color: var(--gold-b);
  font-weight: 600;
}

/* ── Transaction list ── */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tx-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}
.tx-row:last-child { border-bottom: none; }
.tx-row:active { opacity: 0.7; }

.tx-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 16px;
  color: var(--text-2);
}
.tx-icon.in  { background: var(--green-bg); color: var(--green); border-color: rgba(134,239,172,0.15); }
.tx-icon.out { background: var(--red-bg);   color: var(--red);   border-color: rgba(252,165,165,0.15); }
.tx-icon.dep { background: rgba(147,197,253,0.10); color: var(--blue); border-color: rgba(147,197,253,0.15); }

.tx-body {
  flex: 1;
  min-width: 0;
}
.tx-body strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-body span {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.tx-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  text-align: left;
}
.tx-amount.plus { color: var(--green); }
.tx-amount.minus { color: var(--red); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 2;
}

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-item i { font-size: 20px; transition: transform 0.2s; }
.nav-item.active { color: var(--gold-b); }
.nav-item.active i { transform: scale(1.1); }
.nav-item:active i { transform: scale(0.92); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  transition: filter 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }

.btn-gold {
  background: var(--gold-grad);
  color: #171717;
}
.btn-gold:hover { filter: brightness(1.06); }

.btn-surface {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-surface:hover { background: var(--surface-3); }

.btn-ghost {
  background: transparent;
  color: var(--gold-a);
  border: 1px solid rgba(212,169,58,0.3);
}
.btn-ghost:hover { background: rgba(212,169,58,0.07); }

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(252,165,165,0.2);
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.btn-row .btn { flex: 1; }

.btn-sm {
  padding: 10px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* ── Form fields ── */
.field-group {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.field {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.field:last-child { border-bottom: none; }
.field-icon { color: var(--gold-a); width: 18px; text-align: center; font-size: 16px; flex-shrink: 0; }
.field-body { flex: 1; }
.field-label {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font);
  direction: ltr;
  text-align: right;
}
.field-input::placeholder { color: var(--text-3); }
.field-input::-webkit-outer-spin-button,
.field-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field-toggle {
  background: none;
  border: 0;
  color: var(--text-3);
  font-size: 16px;
  padding: 4px;
  cursor: pointer;
}

/* Standalone input */
.input-wrap {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.input-wrap:focus-within { border-color: var(--gold-b); }
.input-wrap label { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.input-wrap input {
  flex: 1;
  border: 0; outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font);
  text-align: left;
  direction: ltr;
}
.input-wrap input::placeholder { color: var(--text-3); }

/* ── Card component ── */
.card-wrap {
  padding: 20px 20px 0;
  perspective: 1200px;
}
.card-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4,0,0.2,1);
  border-radius: var(--radius-lg);
}
.card-scene.flipped { transform: rotateY(180deg); }

.card-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.card-front {
  background: linear-gradient(135deg, #1e2336 0%, #2c3350 50%, #1a2040 100%);
  border: 1px solid rgba(212,169,58,0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px;
}
.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #c8952a 0%, #e8b84b 40%, #f5d278 70%, #c8952a 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px;
}

.card-front-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.card-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-logo img {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
}
.card-logo-text {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 900;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.card-chip {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card-number-masked {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.85);
  text-align: center;
  margin-top: 18px;
}
.card-front-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.card-holder-name {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.05em;
}
.card-type-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-a);
  background: rgba(212,169,58,0.12);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(212,169,58,0.25);
}

/* Back of card */
.card-back-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-back-logo {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 900;
  color: rgba(0,0,0,0.7);
}
.card-back-number-label {
  font-size: 10px;
  color: rgba(0,0,0,0.55);
  margin-bottom: 4px;
}
.card-back-number {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: #1a1400;
  letter-spacing: 0.12em;
  direction: ltr;
}
.card-back-row {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}
.card-back-field label { font-size: 10px; color: rgba(0,0,0,0.55); display: block; margin-bottom: 2px; }
.card-back-field strong { font-family: var(--font-mono); font-size: 13px; font-weight: 800; color: #1a1400; }
.card-back-holder { font-size: 13px; color: rgba(0,0,0,0.7); font-weight: 700; }

/* ── Card action buttons ── */
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 20px;
}
.card-action-btn {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.card-action-btn i { color: var(--gold-a); font-size: 18px; }
.card-action-btn:hover { background: var(--surface-2); }

/* ── Settings list ── */
.settings-list { display: flex; flex-direction: column; }
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:active { opacity: 0.7; }

/* Inside info-card: add horizontal padding to match card inset */
.info-card .settings-item {
  padding: 15px 18px;
}

.settings-item-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  font-size: 18px;
  flex-shrink: 0;
}
.settings-item-icon.gold { background: rgba(212,169,58,0.12); color: var(--gold-a); }
.settings-item-icon.green { background: var(--green-bg); color: var(--green); }
.settings-item-icon.red { background: var(--red-bg); color: var(--red); }
.settings-item-icon.blue { background: rgba(147,197,253,0.10); color: var(--blue); }
.settings-item-icon.muted { background: var(--surface-2); color: var(--text-3); }

.settings-item-body { flex: 1; }
.settings-item-body strong { display: block; font-size: 14px; font-weight: 700; }
.settings-item-body span { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.settings-item-arrow { color: var(--text-3); font-size: 12px; }

/* Toggle switch */
.toggle {
  width: 46px; height: 26px;
  background: var(--surface-3);
  border-radius: 99px;
  border: 1px solid var(--border-2);
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  background: var(--text-2);
  border-radius: 50%;
  top: 2px; left: 2px;
  transition: transform 0.2s, background 0.2s;
}
.toggle.on { background: rgba(212,169,58,0.2); border-color: var(--gold-b); }
.toggle.on::after { transform: translateX(20px); background: var(--gold-b); }

/* ── Services grid ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.service-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  text-align: center;
  position: relative;
}
.service-tile:active { transform: scale(0.96); }
.service-tile:hover { background: var(--surface-2); }

.service-tile-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.service-tile .badge-new {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--gold-grad);
  color: #171717;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 99px;
}

/* Service icon colors */
.si-deposit  { background: rgba(134,239,172,0.12); color: #86efac; }
.si-transfer { background: rgba(147,197,253,0.12); color: #93c5fd; }
.si-withdraw { background: rgba(252,165,165,0.12); color: #fca5a5; }
.si-card     { background: rgba(212,169,58,0.12);  color: var(--gold-a); }
.si-account  { background: rgba(196,181,253,0.12); color: #c4b5fd; }
.si-history  { background: rgba(251,191,36,0.12);  color: #fbbf24; }

/* ── Info card ── */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.info-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-card-title i { color: var(--gold-a); }

/* ── Transfer hero ── */
.transfer-hero {
  background: var(--hero-grad);
  padding: 72px 22px 36px;
  text-align: center;
}
.transfer-hero h1 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 6px;
}
.transfer-hero p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
}
.from-card-mini {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: right;
}
.from-card-mini span { font-size: 12px; color: var(--text-3); }
.from-card-mini strong { font-size: 13px; color: var(--text); display: block; margin-top: 2px; direction: ltr; font-family: var(--font-mono); }

/* ── Response messages ── */
.msg {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.8;
  display: none;
  margin-top: 12px;
}
.msg.show { display: block; }
.msg.error { background: var(--red-bg); color: var(--red); border: 1px solid rgba(252,165,165,0.2); }
.msg.success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(134,239,172,0.2); }

/* ── Transaction detail ── */
.tx-detail-amount {
  text-align: center;
  padding: 32px 20px 20px;
}
.tx-detail-amount .big {
  font-size: 48px;
  font-weight: 900;
  font-family: var(--font-mono);
  line-height: 1;
  letter-spacing: -0.02em;
}
.tx-detail-amount .big.plus { color: var(--green); }
.tx-detail-amount .big.minus { color: var(--red); }
.tx-detail-amount .unit { font-size: 16px; color: var(--text-3); margin-top: 4px; }

.tx-detail-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  margin-top: 12px;
}
.tx-detail-status.ok { background: var(--green-bg); color: var(--green); border: 1px solid rgba(134,239,172,0.2); }

.tx-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  font-size: 14px;
}
.tx-detail-row:last-child { border-bottom: none; }
.tx-detail-row .label { color: var(--text-3); }
.tx-detail-row .val { font-weight: 700; text-align: left; direction: ltr; font-family: var(--font-mono); word-break: break-all; }
.tx-detail-row .val.hash { font-size: 11px; color: var(--text-2); }

/* ── Topbar (inner pages) ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-back {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.topbar-title {
  font-size: 16px;
  font-weight: 800;
}
.topbar-right { width: 38px; }

/* ── Notification pill ── */
.notif-dot {
  width: 8px; height: 8px;
  background: var(--gold-b);
  border-radius: 50%;
  position: absolute;
  top: 2px; right: 2px;
}

/* ── Badge / chip ── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
}
.chip-gold { background: rgba(212,169,58,0.12); color: var(--gold-a); border: 1px solid rgba(212,169,58,0.2); }
.chip-green { background: var(--green-bg); color: var(--green); }

/* ── Shimmer loading ── */
@keyframes shimmer {
  0% { background-position: -300px 0; }
  100% { background-position: 300px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 8px;
}

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(23,23,23,0.2); border-top-color: #171717; border-radius: 50%; animation: spin 0.7s linear infinite; }

/* ── Login page ── */
.login-screen {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.login-brand {
  padding-top: 80px;
  text-align: center;
}
.login-brand img {
  width: 80px; height: 80px;
  border-radius: 22px;
  object-fit: cover;
  margin: 0 auto 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-brand-word {
  font-family: var(--font-mono);
  font-size: 54px;
  font-weight: 900;
  letter-spacing: -0.05em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.login-brand-sub {
  margin-top: 10px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.8;
}
.login-form {
  margin-top: 52px;
  flex: 1;
}
.login-footer {
  padding: 24px 0;
  text-align: center;
}
.login-footer a { color: var(--gold-a); font-size: 13px; font-weight: 600; }
.login-version {
  text-align: center;
  padding-top: 16px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* OTP input */
.otp-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-3);
}
.otp-meta strong { color: var(--text); font-family: var(--font-mono); }
#timer-display { color: var(--gold-a); font-weight: 800; }
#resend-btn {
  display: none;
  background: none;
  border: 0;
  color: var(--gold-a);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  font-weight: 700;
}
.otp-input {
  text-align: center !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  letter-spacing: 0.4em !important;
  font-family: var(--font-mono) !important;
}

/* Step visibility */
.step { display: none; }
.step.active { display: block; }

/* ── Banner ── */
.banner {
  background: linear-gradient(135deg, #2a1f4e, #3d2b8e);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border: 1px solid rgba(139,92,246,0.3);
}
.banner-text h3 { font-size: 15px; font-weight: 800; color: #e9d5ff; }
.banner-text p { font-size: 12px; color: #a78bfa; margin-top: 3px; }
.banner-icon { font-size: 36px; }

/* ── Misc utilities ── */
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.px-20 { padding-left: 20px; padding-right: 20px; }
.pt-16 { padding-top: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-3); }
.text-gold { color: var(--gold-a); }
.font-mono { font-family: var(--font-mono); }
.divider { height: 1px; background: var(--border); margin: 8px 0; }
.spacer { height: 20px; }

/* ── Responsive ── */
@media (max-width: 380px) {
  .hero-balance-amount { font-size: 30px; }
  .hero-actions { gap: 10px; }
  .hero-action-icon { width: 48px; height: 48px; font-size: 18px; }
  .services-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .service-tile { padding: 10px 4px; font-size: 11px; }
  .service-tile-icon { width: 42px; height: 42px; font-size: 18px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .card-scene { transition: none; }
  * { animation-duration: 0.01ms !important; }
}
/* ── Hide browser spinner on number inputs ── */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* ── Formatted amount input (text-based) ── */
input.amount-input { direction: ltr; text-align: right; letter-spacing: 0.02em; }
input.card-input   { direction: ltr; text-align: left;  letter-spacing: 0.12em; font-family: var(--font-mono); }

/* =====================================================
   Bottom Sheet Modal (scroll-trap transaction history)
   ===================================================== */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(10,11,18,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease;
  z-index: 200;
}
.scrim.show { opacity: 1; visibility: visible; }

.sheet-modal {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  max-height: 78vh;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  border-top: 1px solid var(--border-2);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.35);
  transform: translate(-50%, 100%);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 201;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet-modal.open { transform: translate(-50%, 0); }

.sheet-modal-handle {
  width: 40px; height: 4px;
  background: var(--surface-3);
  border-radius: 99px;
  margin: 12px auto 4px;
  flex-shrink: 0;
}
.sheet-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.sheet-modal-head h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.sheet-modal-head span {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}
.sheet-modal-close {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--text-2);
  font-size: 13px;
  flex-shrink: 0;
}
.sheet-modal-close:active { background: rgba(255,255,255,0.12); }

.sheet-modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 20px 28px;
}
.sheet-modal-body .tx-row { padding: 12px 0; }

/* ── Skeleton Loader Components ── */
.skeleton-avatar {
  width: 76px; height: 76px; border-radius: 50%;
}
.skeleton-line-lg {
  height: 20px; border-radius: 6px; margin: 0 auto 8px;
}
.skeleton-line-sm {
  height: 13px; border-radius: 5px; margin: 0 auto;
}
.skeleton-card-full {
  height: 52px; border-radius: 14px; margin-bottom: 10px;
}
.skeleton-hero-balance {
  height: 44px; width: 180px; border-radius: 10px; margin: 0 auto 8px;
}
.skeleton-chip {
  height: 26px; width: 100px; border-radius: 99px; margin: 0 auto;
}
.skeleton-service-tile {
  height: 96px; border-radius: 18px;
}
.skeleton-settings-item {
  height: 64px; border-radius: 14px; margin-bottom: 8px;
}

/* Page fade-in on load */
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-body {
  animation: page-fade-in 0.28s ease both;
}

/* Skeleton content swap */
.skel-group { display: block; }
.skel-real  { display: none; }
.skel-loaded .skel-group { display: none; }
.skel-loaded .skel-real  { display: block; }

/* Nav transition flash */
.nav-transitioning { pointer-events: none; opacity: 0.7; transition: opacity 0.15s; }

/* Admin sidebar nav badge */
.nav-badge {
  font-size: 8px;
  font-weight: 800;
  color: #d4a93a;
  background: rgba(212,169,58,0.15);
  padding: 1px 4px;
  border-radius: 4px;
  margin-right: auto;
  line-height: 1;
}
