/* ============================================================
   Lumina — Global Styles (Pink & Purple Theme)
   Vibrant pink & purple gradient + warm white, Fraunces display + DM Sans body
   ============================================================ */

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

:root {
  --pink:       #EC4899;
  --pink-dark:  #BE185D;
  --pink-tint:  #FDF2F8;
  --purple:     #8B5CF6;
  --purple-dark:#6D28D9;
  --purple-tint:#F5F3FF;
  /* Compatibility aliases — references to --red or --blue map to pink/purple */
  --red:        var(--pink);
  --red-dark:   var(--pink-dark);
  --red-tint:   var(--pink-tint);
  --blue:       var(--purple);
  --blue-dark:  var(--purple-dark);
  --blue-tint:  var(--purple-tint);
  --ink:        #1E1B2E;
  --paper:      #FFFFFF;
  --bg:         #FAF8FC;
  --muted:      #7C758B;
  --border:     #E8E2EC;
  --success:    #059669;
  --success-bg: #ECFDF5;
  --warn:       #D97706;
  --warn-bg:    #FFFBEB;
  --danger:     #E11D48;
  --danger-bg:  #FFF1F2;
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 2px 14px rgba(139,92,246,.06);
  --shadow-md:  0 6px 28px rgba(236,72,153,.12);
  --display:    'Fraunces', serif;
  --body:       'DM Sans', sans-serif;
}

html, body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }

h1, h2, h3, .display { font-family: var(--display); }

/* ── Seal mark — the signature brand element ── */
.seal {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border: 2px solid #FCE7F3;
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  flex-shrink: 0;
}
.seal-sm { width: 30px; height: 30px; font-size: 13px; }
.seal-md { width: 40px; height: 40px; font-size: 16px; }
.seal-lg { width: 56px; height: 56px; font-size: 22px; }

/* ── Page wrapper ── */
.page-wrap {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 90px;
}

/* ── Top bar ── */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.back-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--purple-tint); border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--purple-dark); cursor: pointer;
  flex-shrink: 0; text-decoration: none;
  transition: background .15s;
}
.back-btn:hover { background: var(--border); }
.topbar-title { font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--ink); }
.topbar-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ── Balance / hero card ── */
.hero-card {
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
  border-radius: 22px; padding: 26px 22px 22px;
  color: #fff; margin: 16px; position: relative; overflow: hidden;
  box-shadow: 0 10px 30px rgba(236,72,153,.32);
}
.hero-card::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 180px; height: 180px; background: rgba(255,255,255,.12); border-radius: 50%;
}
.hero-label { font-size: 12px; opacity: .88; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; }
.hero-amount { font-family: var(--display); font-size: 38px; font-weight: 600; margin: 6px 0 4px; letter-spacing: -.5px; position: relative; z-index: 1; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.hero-btn {
  padding: 11px; border-radius: 12px; border: none; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: opacity .15s, transform .1s;
}
.hero-btn:active { transform: scale(.98); }
.hero-btn.fill  { background: rgba(255,255,255,.25); color: #fff; backdrop-filter: blur(4px); }
.hero-btn.ghost { background: rgba(255,255,255,.1); color: #fff; border: 1.5px solid rgba(255,255,255,.4); }

/* ── Stats ── */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-box { background: var(--paper); border-radius: var(--radius-sm); padding: 14px 10px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-val { font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--pink); line-height: 1; margin-bottom: 4px; }
.stat-lbl { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ── Cards ── */
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--border); }
.card-pad { padding: 16px; }
.section { margin: 16px; }
.section-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }

/* ── Menu group ── */
.menu-group { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s; -webkit-tap-highlight-color: transparent;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--purple-tint); }
.menu-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; background: var(--purple-tint); color: var(--purple); }
.menu-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
.menu-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.menu-arrow { color: var(--muted); font-size: 16px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 24px; border-radius: 50px; font-size: 15px; font-weight: 700;
  border: none; cursor: pointer; transition: opacity .15s, transform .12s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff; width: 100%; box-shadow: 0 4px 15px rgba(236,72,153,.3); }
.btn-outline { background: transparent; border: 2px solid var(--pink); color: var(--pink); }
.btn-ghost   { background: var(--purple-tint); color: var(--purple-dark); }
.btn-danger  { background: var(--danger-bg); color: var(--danger); }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ── Inputs ── */
.field { margin-bottom: 16px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; display: block; }
.field-input, .field-select {
  width: 100%; padding: 13px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; color: var(--ink); background: var(--paper); outline: none; transition: border-color .2s, box-shadow .2s;
}
.field-input:focus, .field-select:focus { border-color: var(--pink); box-shadow: 0 0 0 4px var(--pink-tint); }
.field-input::placeholder { color: #C4B5CD; }

/* ── Pills / badges ── */
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.pill-pink  { background: var(--pink-tint); color: var(--pink); }
.pill-purple{ background: var(--purple-tint); color: var(--purple); }
.pill-green { background: var(--success-bg); color: var(--success); }
.pill-warn  { background: var(--warn-bg); color: var(--warn); }
.pill-gray  { background: var(--border); color: var(--muted); }

/* ── List rows ── */
.list-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--paper); }
.list-item:last-child { border-bottom: none; }
.li-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.li-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.li-amount { font-family: var(--display); font-size: 15px; font-weight: 600; }
.li-amount.credit { color: var(--success); }
.li-amount.debit  { color: var(--danger); }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; display: none; margin-bottom: 14px; }
.alert.show { display: block; }
.alert-error   { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-info    { background: var(--purple-tint); color: var(--purple-dark); }
.alert-warn    { background: var(--warn-bg); color: var(--warn); }

/* ── Empty / loader ── */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon { font-size: 44px; margin-bottom: 12px; }
.loader-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; }
.loader { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--pink-tint); border-top-color: var(--pink); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: var(--paper);
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 9px 0 20px; z-index: 100; box-shadow: 0 -4px 20px rgba(139,92,246,.08);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; color: var(--muted);
  padding: 6px; cursor: pointer; border: none; background: none; -webkit-tap-highlight-color: transparent;
  transition: color .15s;
}
.nav-icon { font-size: 21px; line-height: 1; }
.nav-item.active { color: var(--pink); }

/* ── VIP badge ── */
.vip-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.vip-0 { background: var(--border); color: var(--muted); }
.vip-1 { background: linear-gradient(135deg,#7C3AED,#A78BFA); color:#fff; }
.vip-2 { background: linear-gradient(135deg,#DB2777,#F472B6); color:#fff; }
.vip-3 { background: linear-gradient(135deg,#6D28D9,#8B5CF6); color:#fff; }
.vip-4 { background: linear-gradient(135deg,#BE185D,#EC4899); color:#fff; }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 30px;
  font-size: 13px; font-weight: 600; z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .25s; white-space: nowrap; box-shadow: var(--shadow-md);
}
#toast.show { opacity: 1; }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.anim { animation: fadeUp .4s ease both; }
.anim-1 { animation-delay: .05s; } .anim-2 { animation-delay: .1s; }
.anim-3 { animation-delay: .15s; } .anim-4 { animation-delay: .2s; }

/* ── Utilities ── */
.flex { display: flex; } .flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .w-full { width: 100%; }
.text-center { text-align: center; } .text-muted { color: var(--muted); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
