/* =========================================================
   Aash Name — Design System
   Palette: premium light royal-blue + gold (exact brand palette — do not alter)
   Type: Outfit (display) + Inter (body/UI)
   ========================================================= */

@import url("fonts.css");

:root{
  /* -- brand palette (fixed) -- */
  --royal:          #4F46E5;
  --primary-blue:   #6366F1;
  --blue-accent:    #3B82F6;

  --bg:             #F7F8FC;
  --lavender:       #F0F0FF;
  --soft-blue:      #EEF4FF;
  --surface:        #FFFFFF;
  --surface-2:      #FAFAFE;

  --ink:            #171A2B;
  --ink-soft:       #4B556B;
  --muted:          #8B93A7;
  --disabled:       #B8BECC;

  --line:           #E4E7F0;
  --line-strong:    #D5DAE8;

  --success:        #10B981;
  --success-bg:     #ECFDF5;
  --warning:        #F59E0B;
  --warning-bg:     #FFF7E6;
  --error:          #EF4444;
  --error-bg:       #FEF2F2;
  --info:           #3B82F6;
  --info-bg:        #EFF6FF;

  --gold:           #D4A72C;
  --gold-soft:      #FFF8E5;

  /* mapped roles (kept for markup compatibility — every value still
     resolves to one of the colors above, nothing invented) */
  --bg-soft:        var(--lavender);
  --line-soft:      #EDEFF7;
  --primary:        var(--royal);
  --primary-dark:   var(--royal);
  --accent:         var(--blue-accent);
  --violet:         var(--primary-blue);
  --violet-deep:    var(--primary-blue);
  --violet-soft:    var(--soft-blue);
  --gold-deep:      var(--gold);
  --red:            var(--error);
  --red-soft:       var(--error-bg);
  --emerald:        var(--royal);
  --emerald-deep:   var(--royal);
  --emerald-soft:   var(--lavender);

  --radius-s:  10px;
  --radius-m:  14px;
  --radius-l:  20px;
  --radius-xl: 26px;

  --shadow-card: 0 1px 2px rgba(23,26,43,.04), 0 10px 26px -16px rgba(23,26,43,.14);
  --shadow-pop:  0 20px 50px -18px rgba(23,26,43,.26);

  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --header-h: 60px;
  --nav-h: 72px;
  --shell-w: 428px;
}

/* Aash Name ships a single premium light theme — deliberately no dark mode,
   so nothing here ever renders a black/navy surface. */

*,*::before,*::after{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4{ font-family: var(--font-display); margin:0; letter-spacing: -0.015em; }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
button{ font-family: inherit; cursor:pointer; }
input, select{ font-family: inherit; }
ul{ list-style:none; margin:0; padding:0; }
svg{ display:block; }
::selection{ background: var(--lavender); }

.icon{ width:20px; height:20px; stroke-width:2; flex-shrink:0; display:block; }

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

/* ---------- desktop stage ---------- */
.stage{
  min-height: 100vh;
  display:flex;
  justify-content:center;
  background:
    radial-gradient(900px 460px at 12% -8%, #F0F0FF 0%, transparent 55%),
    radial-gradient(700px 420px at 100% 4%, #EEF4FF 0%, transparent 52%),
    var(--bg);
}
.app{
  width:100%;
  max-width: var(--shell-w);
  min-height: 100vh;
  background: var(--bg);
  position:relative;
  display:flex;
  flex-direction:column;
  box-shadow: 0 0 0 1px var(--line);
}
@media (min-width: 560px){
  .stage{ padding: 30px 0; align-items:flex-start; }
  .app{ min-height: calc(100vh - 60px); border-radius: 28px; overflow:hidden; box-shadow: var(--shadow-pop); }
}

.screen{
  flex:1;
  padding: 14px 16px 28px;
}
.screen.no-nav{ padding-bottom: 28px; }

/* ---------- header ---------- */
.topbar{
  position: sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  height: var(--header-h);
  padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar.page-topbar{ justify-content:space-between; }
.page-topbar .brand-name{ font-size:16.5px; }

.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{
  width:34px; height:34px; border-radius:11px;
  background: linear-gradient(135deg, var(--royal) 0%, var(--blue-accent) 100%);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-family: var(--font-display); font-weight:800; font-size:15px;
  box-shadow: 0 6px 14px -5px rgba(79,70,229,.5);
}
.brand-mark-img{
  width:34px; height:34px; object-fit:contain; flex-shrink:0;
  border-radius:10px;
  filter: drop-shadow(0 4px 10px rgba(79,70,229,.25));
}
.brand-name{ font-family: var(--font-display); font-weight:800; font-size:17px; letter-spacing:-.02em; }

.topbar-right{ display:flex; align-items:center; gap:8px; }
.balance-pill{
  display:flex; align-items:center; gap:6px;
  background: var(--surface); border:1px solid var(--line);
  padding: 7px 12px 7px 10px; border-radius:999px;
  font-weight:700; font-size:12.5px;
}
.balance-pill .dot{ width:6px; height:6px; border-radius:50%; background: var(--royal); box-shadow: 0 0 0 3px var(--lavender); }
.icon-btn{
  width:38px; height:38px; border-radius:12px;
  border:1px solid var(--line); background: var(--surface);
  display:flex; align-items:center; justify-content:center;
  position:relative;
  color: var(--ink-soft);
  transition: transform .15s ease, background .15s ease;
}
.icon-btn:active{ transform: scale(.92); }
.icon-btn .ping{
  position:absolute; top:-3px; right:-3px; width:9px; height:9px;
  border-radius:50%; background: var(--gold); border:2px solid var(--bg);
}

/* ---------- bottom nav ---------- */
.bottomnav{
  position:fixed; bottom:0; left:50%; transform:translateX(-50%);
  width:100%; max-width: var(--shell-w);
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -14px 32px -26px rgba(23,26,43,.3);
  display:flex; align-items:center; justify-content:space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 30;
}
.navlink{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  color: var(--muted); font-size:10.5px; font-weight:700;
  padding:4px 10px; position:relative; width:60px;
}
.navlink .navcircle{
  width:34px; height:34px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.navlink .navcircle .icon{ transition: color .18s ease; }
.navlink.active{ color: var(--royal); }
.navlink.active .navcircle{ background: var(--lavender); color: var(--royal); }
.navlink.active .navcircle .icon{ color: var(--royal); }
.navlink.active::after{
  content:""; position:absolute; top:-1px; left:50%; transform:translateX(-50%);
  width:16px; height:3px; border-radius:999px; background: var(--gold);
}
.fab{
  position:fixed; left:50%; transform:translateX(calc(-50% + var(--shell-w)/2 - 60px));
  bottom: calc(var(--nav-h) + 14px);
  width:52px; height:52px; border-radius:16px; border:none;
  background: linear-gradient(135deg, var(--royal) 0%, var(--blue-accent) 100%);
  color:#fff; display:flex; align-items:center; justify-content:center;
  box-shadow: 0 12px 26px -10px rgba(79,70,229,.5);
  z-index: 25;
}
@media (max-width: 427px){
  .fab{ transform: translateX(calc(-50vw + 100% - 26px)); left: auto; right: 18px; }
}

/* ---------- cards ---------- */
.card{
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
}
.card-pad{ padding:16px; }
.section-title{ font-size:19px; font-weight:800; font-family: var(--font-display); letter-spacing:-.02em; }
.section-sub{ font-size:12px; color: var(--muted); margin-top:2px; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; margin: 22px 0 11px; }

.link-btn{
  font-size:12.5px; font-weight:700; color: var(--royal);
  display:flex; align-items:center; gap:4px;
}

/* buttons */
.btn{
  border:none; border-radius: var(--radius-m);
  font-weight:700; font-size:13.5px;
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  padding: 12px 16px;
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
}
.btn:active{ transform: scale(.97); }
.btn.block{ width:100%; }
.btn[hidden]{ display:none !important; }
.btn-primary{ background: linear-gradient(135deg, var(--royal) 0%, var(--blue-accent) 100%); color:#fff; box-shadow:0 12px 24px -12px rgba(79,70,229,.5); }
.btn-violet{ background: var(--ink); color:#fff; box-shadow:0 12px 24px -12px rgba(23,26,43,.35); }
.btn-gold{ background: var(--gold); color: var(--ink); }
.btn-outline{ background: var(--surface); border:1px solid var(--line-strong); color: var(--ink); }
.btn-ghost{ background: var(--surface-2); color: var(--ink); }
.btn-sm{ padding: 9px 14px; font-size:12.5px; border-radius: var(--radius-s); }
.btn[disabled]{ opacity:.5; pointer-events:none; }
.btn.loading{ pointer-events:none; }
.btn .spinner{ display:none; width:15px; height:15px; border-radius:50%; border:2px solid rgba(255,255,255,.4); border-top-color:#fff; animation: spin .7s linear infinite; }
.btn.loading .spinner{ display:inline-block; }
.btn.loading .btn-label{ opacity:.75; }
@keyframes spin{ to{ transform: rotate(360deg); } }

/* pills / badges */
.badge{ display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:999px; font-size:11px; font-weight:700; }
.badge-emerald{ background: var(--lavender); color: var(--royal); }
.badge-violet{ background: var(--soft-blue); color: var(--primary-blue); }
.badge-gold{ background: var(--gold-soft); color: var(--gold); }
.badge-muted{ background: var(--surface-2); color: var(--muted); }

.chip{
  padding:8px 14px; border-radius:999px; font-size:12.5px; font-weight:600;
  background: var(--surface); border:1px solid var(--line); color: var(--ink-soft);
  white-space:nowrap;
}
.chip.active{ background: var(--ink); color:#fff; border-color:var(--ink); }

/* forms */
.field{ margin-bottom:14px; }
.field label{ display:block; font-size:12.5px; font-weight:700; color: var(--ink-soft); margin-bottom:7px; }
.input-wrap{
  display:flex; align-items:center; gap:8px;
  background: var(--surface-2); border:1.5px solid var(--line);
  border-radius: var(--radius-m); padding: 0 12px; height:46px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input-wrap:focus-within{ border-color: var(--royal); background: var(--surface); box-shadow: 0 0 0 4px var(--lavender); }
.input-wrap input{ flex:1; border:none; outline:none; background:transparent; font-size:14.5px; color: var(--ink); min-width:0; }
.input-wrap .icon{ color: var(--muted); }
.field-hint{ font-size:11.5px; color: var(--muted); margin-top:6px; }
.field-error .input-wrap{ border-color: var(--error); }
.field-error .field-hint{ color: var(--error); }

.toggle{ position:relative; width:44px; height:26px; border-radius:999px; background: var(--line); flex-shrink:0; transition: background .2s ease; }
.toggle::after{ content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.2); transition: transform .2s ease; }
.toggle.on{ background: var(--royal); }
.toggle.on::after{ transform: translateX(18px); }

/* stats grid */
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.stat-card{
  padding:15px; border-radius: var(--radius-m); background: var(--surface);
  border:1px solid var(--line); box-shadow: var(--shadow-card);
  transition: transform .15s ease;
}
.stat-card:active{ transform: scale(.97); }
.stat-card .n{ font-family: var(--font-display); font-size:19px; font-weight:800; margin-top:9px; letter-spacing:-.01em; }
.stat-card .l{ font-size:11.5px; color: var(--muted); margin-top:3px; }
.stat-ic{ width:36px; height:36px; border-radius:11px; display:flex; align-items:center; justify-content:center; }
.stat-ic.badge-emerald{ background: var(--lavender); }
.stat-ic.badge-violet{ background: var(--soft-blue); }
.stat-ic.badge-gold{ background: var(--gold-soft); }

/* balance hero card */
.balance-hero{
  position:relative; overflow:hidden;
  background: linear-gradient(150deg, var(--royal) 0%, var(--blue-accent) 100%);
  border:none; color:#fff;
  box-shadow: 0 20px 36px -18px rgba(79,70,229,.45);
}
.balance-hero::before{
  content:""; position:absolute; top:-70px; right:-50px; width:200px; height:200px;
  border-radius:50%; background: radial-gradient(circle, rgba(255,255,255,.16) 0%, transparent 70%);
  pointer-events:none;
}
.balance-hero .bh-inner-tile{
  background: rgba(255,255,255,.16); border-radius:14px; padding:12px;
}
.balance-hero .bh-inner-tile .ic-wrap{
  width:24px; height:24px; border-radius:8px; background: rgba(255,255,255,.2);
  display:flex; align-items:center; justify-content:center;
}
.greeting-avatar{
  background: linear-gradient(135deg, var(--royal), var(--blue-accent));
  box-shadow: 0 10px 22px -10px rgba(79,70,229,.5), 0 0 0 3px var(--bg), 0 0 0 4.5px var(--line);
}

/* quick action tiles */
.qa-tile{
  display:flex; flex-direction:column; gap:10px;
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-m);
  padding:14px 12px; box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.qa-tile:active{ transform: scale(.96); box-shadow: none; }
.qa-tile .ic{
  width:42px; height:42px; border-radius:13px; display:flex; align-items:center; justify-content:center;
}
.qa-tile .ic.badge-emerald{ background: var(--lavender); }
.qa-tile .ic.badge-violet{ background: var(--soft-blue); }
.qa-tile .ic.badge-gold{ background: var(--gold-soft); }
.qa-tile .t{ font-size:12.8px; font-weight:700; letter-spacing:-.005em; }

/* glassmorphism popup — used for every success/error/info message */
.qm-popup-overlay{
  position:fixed; inset:0; z-index:400;
  display:flex; align-items:center; justify-content:center;
  background: rgba(23,26,43,.36);
  backdrop-filter: blur(4px);
  opacity:0; pointer-events:none; transition: opacity .22s ease;
  padding: 24px;
}
.qm-popup-overlay.show{ opacity:1; pointer-events:auto; }
.qm-popup{
  width:100%; max-width:292px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px;
  padding: 30px 24px 22px;
  text-align:center;
  box-shadow: 0 26px 64px -18px rgba(23,26,43,.28);
  transform: scale(.9) translateY(6px);
  transition: transform .25s cubic-bezier(.2,.9,.3,1.25);
}
.qm-popup-overlay.show .qm-popup{ transform: scale(1) translateY(0); }
.qm-popup-icon{
  position:relative; width:58px; height:58px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  margin: 0 auto 16px; color:#fff;
}
.qm-popup-icon::before{ content:""; position:absolute; inset:-8px; border-radius:50%; opacity:.32; z-index:-1; }
.qm-popup-icon.success{ background: var(--success); box-shadow:0 14px 28px -10px rgba(16,185,129,.45); }
.qm-popup-icon.success::before{ background: radial-gradient(circle, rgba(16,185,129,.3), transparent 72%); }
.qm-popup-icon.error{ background: var(--error); box-shadow:0 14px 28px -10px rgba(239,68,68,.4); }
.qm-popup-icon.error::before{ background: radial-gradient(circle, rgba(239,68,68,.28), transparent 72%); }
.qm-popup-icon.info{ background: var(--info); box-shadow:0 14px 28px -10px rgba(59,130,246,.4); }
.qm-popup-icon.info::before{ background: radial-gradient(circle, rgba(59,130,246,.28), transparent 72%); }
.qm-popup-icon svg{ width:27px; height:27px; }
.qm-popup-msg{ font-size:14px; font-weight:700; line-height:1.5; color: var(--ink); }

/* modal / sheet */
.overlay{
  position:fixed; inset:0; background: rgba(23,26,43,.46);
  display:flex; align-items:flex-end; justify-content:center;
  z-index:150; opacity:0; pointer-events:none; transition: opacity .2s ease;
}
.overlay.show{ opacity:1; pointer-events:auto; }
@media (min-width:560px){ .overlay{ align-items:center; } }
.sheet{
  width:100%; max-width: var(--shell-w);
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 10px 22px 26px;
  transform: translateY(24px);
  transition: transform .25s cubic-bezier(.2,.9,.3,1.2);
  max-height:88vh; overflow-y:auto;
}
.overlay.show .sheet{ transform: translateY(0); }
@media (min-width:560px){ .sheet{ border-radius: 24px; } }
.sheet-handle{ width:36px; height:4px; border-radius:999px; background: var(--line); margin: 8px auto 16px; }
.sheet-icon{ width:52px; height:52px; border-radius:16px; display:flex; align-items:center; justify-content:center; margin-bottom:14px; }
.sheet h3{ font-size:17px; margin-bottom:6px; }
.sheet p{ font-size:13.5px; color: var(--muted); line-height:1.55; }
.sheet-actions{ display:flex; gap:10px; margin-top:20px; }

/* dividers */
.divider{ display:flex; align-items:center; gap:12px; color: var(--muted); font-size:11.5px; font-weight:600; margin: 16px 0; }
.divider::before,.divider::after{ content:""; flex:1; height:1px; background: var(--line); }

/* loader */
.loader-screen{
  position:fixed; inset:0; z-index:500; background: var(--bg);
  display:flex; align-items:center; justify-content:center;
  transition: opacity .5s ease;
}
.loader-inner{ display:flex; flex-direction:column; align-items:center; gap:18px; }
.loader-ring{ position:relative; width:84px; height:84px; display:flex; align-items:center; justify-content:center; }
.loader-ring::before{
  content:""; position:absolute; inset:0; border-radius:50%;
  border:3px solid var(--line); border-top-color: var(--royal); border-right-color: var(--gold);
  animation: spin 1.1s linear infinite;
}
.loader-mark{
  width:56px; height:56px; border-radius:16px;
  background: linear-gradient(135deg, var(--royal) 0%, var(--blue-accent) 100%);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:800; font-size:24px;
  animation: pulseGlow 1.6s ease-in-out infinite;
  box-shadow: 0 10px 26px -10px rgba(79,70,229,.55);
}
.loader-mark-img{
  width:62px; height:62px; object-fit:contain; border-radius:16px;
  animation: pulseGlow 1.6s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(79,70,229,.35));
}
@keyframes pulseGlow{
  0%,100%{ box-shadow: 0 8px 24px -8px rgba(79,70,229,.5); transform: scale(1); }
  50%{ box-shadow: 0 8px 34px -6px rgba(79,70,229,.75); transform: scale(1.05); }
}
.loader-text{ text-align:center; }
.loader-text .lt-name{ font-family: var(--font-display); font-weight:800; font-size:16px; letter-spacing:.005em; }
.loader-text .lt-sub{ font-size:12px; color: var(--muted); margin-top:4px; }

/* auth pages — light premium hero (no dark panels) */
.auth-hero{
  background:
    radial-gradient(340px 200px at 12% 0%, rgba(212,167,44,.14), transparent 60%),
    radial-gradient(420px 260px at 100% 10%, rgba(79,70,229,.12), transparent 62%),
    var(--lavender);
  padding: 50px 26px 78px; color: var(--ink); text-align:center;
  border-radius: 0 0 34px 34px;
  border-bottom: 1px solid var(--line);
}
.auth-hero .brand-mark{ margin: 0 auto 18px; width:56px; height:56px; border-radius:18px; font-size:22px; background: var(--surface); box-shadow: var(--shadow-card); border:1px solid var(--line); color: var(--royal); }
.auth-hero .brand-mark-img{ margin: 0 auto 18px; width:72px; height:72px; border-radius:20px; filter: drop-shadow(0 10px 22px rgba(79,70,229,.28)); }
.auth-hero h1{ font-size:22px; color: var(--ink); }
.auth-hero p{ font-size:13px; color: var(--ink-soft); margin-top:6px; }
.auth-body{ padding: 22px 16px 34px; }
.auth-card{ background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-l); padding:20px; box-shadow: var(--shadow-pop); margin-top:-56px; position:relative; z-index:2; }
.auth-foot{ text-align:center; font-size:13px; color: var(--muted); margin-top:20px; }

/* empty state */
.empty-state{ display:flex; flex-direction:column; align-items:center; text-align:center; padding: 46px 20px; color: var(--muted); }
.empty-state .es-ic{ width:64px; height:64px; border-radius:20px; background: var(--surface-2); display:flex; align-items:center; justify-content:center; margin-bottom:16px; color: var(--muted); }
.empty-state h4{ font-size:14.5px; color: var(--ink); margin-bottom:4px; }
.empty-state p{ font-size:12.5px; max-width:230px; }

/* tabs */
.tabbar{ display:flex; gap:6px; background: var(--surface-2); padding:4px; border-radius: 16px; }
.tabbar button{ flex:1; border:none; background:transparent; padding:9px 6px; border-radius:12px; font-size:12.5px; font-weight:700; color: var(--muted); }
.tabbar button.active{ background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }

/* task/list rows */
.task-card{ padding:15px; border-radius: var(--radius-m); background: var(--surface); border:1px solid var(--line); margin-bottom:11px; }
.task-top{ display:flex; align-items:center; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.task-title{ font-size:14.5px; font-weight:700; margin: 4px 0 5px; }
.task-desc{ font-size:12.5px; color: var(--muted); line-height:1.5; }
.task-bottom{ display:flex; align-items:center; justify-content:space-between; margin-top:12px; }
.progress-bar{ height:5px; border-radius:999px; background: var(--surface-2); margin-top:12px; overflow:hidden; }
.progress-bar > span{ display:block; height:100%; background: linear-gradient(90deg, var(--royal), var(--blue-accent)); border-radius:999px; }

.list-row{ display:flex; align-items:center; gap:12px; padding:15px 0; border-bottom:1px solid var(--line); }
.list-row:last-child{ border-bottom:none; }
.list-ic{ width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.list-row .lr-title{ font-size:13.5px; font-weight:700; }
.list-row .lr-sub{ font-size:11.5px; color: var(--muted); margin-top:2px; }
.list-row .lr-right{ margin-left:auto; text-align:right; font-size:13px; font-weight:700; }

.scroller{ display:flex; gap:10px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.scroller::-webkit-scrollbar{ display:none; }

.skeleton{ background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius:8px; }
@keyframes shimmer{ 0%{ background-position:100% 0; } 100%{ background-position:0 0; } }

.copy-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; background: var(--surface-2); border:1px solid var(--line); border-radius: var(--radius-m); padding:13px 14px; }
.copy-row .val{ font-size:13px; font-weight:700; letter-spacing:.02em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.plan-card{ border-radius: var(--radius-l); padding:20px; position:relative; overflow:hidden; margin-bottom:14px; }
.plan-card .price{ font-family: var(--font-display); font-size:26px; font-weight:800; margin-top:10px; }
.plan-card .pnote{ font-size:11.5px; opacity:.85; margin-top:2px; }
.plan-benefits{ margin-top:14px; padding-top:14px; border-top:1px solid rgba(255,255,255,.22); display:flex; flex-direction:column; gap:8px; }
.plan-benefits .pb-row{ display:flex; align-items:center; gap:8px; font-size:12.5px; }

.avatar{ width:64px; height:64px; border-radius:20px; display:flex; align-items:center; justify-content:center; font-family: var(--font-display); font-weight:800; font-size:24px; color:#fff; background: linear-gradient(135deg, var(--royal), var(--blue-accent)); flex-shrink:0; overflow:hidden; }
.avatar img{ width:100%; height:100%; object-fit:cover; display:block; }

/* profile picture upload control */
.avatar-upload{ position:relative; display:inline-flex; }
.avatar-upload .avatar{ cursor:pointer; }
.avatar-upload .avatar-edit-badge{
  position:absolute; right:-4px; bottom:-4px; width:26px; height:26px; border-radius:50%;
  background: var(--royal); color:#fff; display:flex; align-items:center; justify-content:center;
  border:2.5px solid var(--surface); box-shadow: 0 4px 10px -3px rgba(79,70,229,.5); pointer-events:none;
}
.avatar-upload .avatar-edit-badge .icon{ width:12px; height:12px; }
.avatar-upload input[type="file"]{ display:none; }

/* =========================================================
   Dashboard
   ========================================================= */
.dashboard-screen{ padding-top:16px; padding-bottom: calc(var(--nav-h) + 26px); }
.welcome-card{ position:relative; overflow:hidden; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:19px 19px 18px; border-radius:24px; background: var(--surface); border:1px solid var(--line); box-shadow: var(--shadow-card); }
.welcome-card:after{ content:""; position:absolute; width:150px; height:150px; right:-60px; top:-70px; border-radius:50%; background: var(--lavender); }
.welcome-copy{ position:relative; z-index:1; }
.eyebrow{ display:flex; align-items:center; gap:6px; font-size:9px; font-weight:800; letter-spacing:.12em; color: var(--royal); }
.eyebrow span{ width:6px; height:6px; border-radius:50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.welcome-card h1{ font-size:24px; line-height:1.15; margin:9px 0 5px; letter-spacing:-.035em; }
.welcome-card p{ font-size:12.5px; color: var(--ink-soft); }
.greeting-avatar{ width:46px!important; height:46px!important; border-radius:16px!important; font-size:17px!important; position:relative; z-index:2; box-shadow:0 10px 20px -12px rgba(79,70,229,.55),0 0 0 3px #fff!important; }
.compact-history{ display:flex; align-items:center; justify-content:space-between; margin-top:12px; padding:9px 10px 9px 13px; border-radius:18px; }
.history-time{ display:flex; align-items:center; gap:9px; color: var(--ink-soft); font-size:12px; font-weight:700; }
.history-clock{ width:30px; height:30px; border-radius:10px; background: var(--surface-2); display:grid; place-items:center; color: var(--royal); }
.history-clock .icon{ width:16px; height:16px; }
.history-action{ border:none; background: var(--lavender); color: var(--royal); font:inherit; font-size:12px; font-weight:800; padding:8px 11px; border-radius:12px; display:flex; align-items:center; gap:5px; }
.history-action .icon{ width:15px; height:15px; }

.premium-balance{ margin-top:12px; padding:19px!important; border-radius:26px!important; }
.balance-hero:after{ content:""; position:absolute; width:320px; height:170px; bottom:-110px; right:-30px; border-radius:50%; background: radial-gradient(ellipse, rgba(212,167,44,.14), transparent 68%); pointer-events:none; }
.balance-topline{ position:relative; z-index:1; display:flex; justify-content:space-between; align-items:flex-start; }
.balance-label{ font-size:12px; opacity:.85; }
.balance-amount{ font-family: var(--font-display); font-size:36px; font-weight:800; line-height:1; margin-top:8px; letter-spacing:-.04em; }
.balance-eye{ width:42px; height:42px; border:1px solid rgba(255,255,255,.22); border-radius:15px; background: rgba(255,255,255,.15); color:#fff; display:grid; place-items:center; }
.balance-eye .icon{ width:20px; }
.wallet-split{ position:relative; z-index:1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:20px; }
.wallet-mini, .wallet-mini > div{ min-width:0; }
.wallet-mini > div{ overflow-wrap:anywhere; }
.balance-hero .bh-inner-tile.wallet-mini{ display:flex; align-items:center; gap:9px; padding:11px; border-radius:16px; background: rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.12); }
.wallet-mini-icon{ width:34px; height:34px; border-radius:12px; background: rgba(255,255,255,.18); display:grid; place-items:center; flex:none; }
.wallet-mini-icon .icon{ width:17px; height:17px; }
.wallet-mini small{ display:block; font-size:10.5px; opacity:.8; }
.wallet-mini strong{ display:block; margin-top:4px; font-size:14px; }
.mini-arrow{ margin-left:auto; width:14px; height:14px; opacity:.8; }

.quick-head{ margin-top:24px; }
.quick-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.quick-grid .qa-tile{ position:relative; gap:10px; min-height:124px; }
.quick-grid .qa-tile .t{ font-size:13.5px; }
.quick-grid .qa-tile small{ display:block; color: var(--muted); font-size:10.5px; margin-top:3px; }
.qa-arrow{ position:absolute; right:12px; bottom:14px; width:15px; height:15px; color: var(--royal); }
.quick-grid .qa-tile:nth-child(3) .qa-arrow{ color: var(--primary-blue); }
.quick-grid .qa-tile:nth-child(4) .qa-arrow{ color: var(--primary-blue); }
.quick-grid .qa-tile:nth-child(5) .qa-arrow{ color: var(--gold); }

.earn-banner{ position:relative; overflow:hidden; margin-top:18px; display:flex; align-items:flex-start; gap:11px; padding:17px; border-radius:22px; color:#fff; background: linear-gradient(135deg, var(--royal), var(--primary-blue)); box-shadow: 0 20px 34px -22px rgba(79,70,229,.55); }
.earn-banner:before{ content:""; position:absolute; width:180px; height:180px; border-radius:50%; right:-55px; bottom:-120px; background: rgba(212,167,44,.14); }
.earn-banner h3{ font-size:16px; }
.earn-banner p{ font-size:11px; opacity:.82; margin-top:4px; }
.earn-icon{ position:relative; z-index:1; width:36px; height:36px; border-radius:13px; background: rgba(255,255,255,.16); display:grid; place-items:center; color: var(--gold-soft); flex:none; }
.earn-icon .icon{ width:18px; }
.earn-btn{ display:inline-flex; align-items:center; gap:5px; margin-top:10px; padding:8px 12px; border-radius:11px; background:#fff; color: var(--royal); font-size:11px; font-weight:800; }
.earn-btn .icon{ width:13px; height:13px; }
.earn-art{ position:absolute; right:22px; bottom:18px; font-size:35px; color: var(--gold-soft); opacity:.9; }

.activity-head{ margin-top:22px; }
.activity-grid{ gap:10px; }
.activity-grid .stat-card{ padding:14px; border-radius:17px; }
.activity-grid .stat-ic{ width:36px; height:36px; border-radius:12px; }
.activity-grid .icon{ width:16px; height:16px; }
.activity-grid .n{ font-size:18px; margin-top:8px; }

@media(max-width:380px){
  .brand-name{ font-size:16px; } .balance-pill{ padding:6px 10px; } .topbar-right{ gap:5px; } .icon-btn{ width:35px; height:35px; }
  .welcome-card h1{ font-size:22px; } .balance-amount{ font-size:33px; } .wallet-mini strong{ font-size:12.5px; }
  .section-title{ font-size:17px; } .quick-grid .qa-tile{ min-height:114px; padding:12px; }
}

.task-meta-line{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; font-size:11.5px; color: var(--muted); }
.task-meta-line span{ display:inline-flex; align-items:center; gap:5px; }
.task-meta-line .icon{ width:13px; height:13px; }
.submission-card{ border-left:3px solid var(--gold); }

/* Ads reward */
.ads-app .topbar{ padding-bottom:12px; }
.ads-section-head{ margin-top:22px; display:flex; justify-content:space-between; align-items:flex-end; gap:12px; }
.ads-section-head .section-sub{ font-size:11px; color: var(--muted); margin-top:3px; }
.ads-live{ font-size:10px; font-weight:800; color: var(--royal); background: var(--lavender); border:1px solid var(--line); padding:6px 9px; border-radius:999px; white-space:nowrap; }
.ads-live i{ display:inline-block; width:6px; height:6px; border-radius:50%; background:currentColor; margin-right:4px; vertical-align:1px; }
.ads-app #adsList{ display:grid; gap:10px; }
.ads-app .ad-item,.ads-app .ad-card{ background: var(--surface); border:1px solid var(--line); border-radius:17px; box-shadow: var(--shadow-card); }
.ads-app .ads-bottomnav{ position:sticky; bottom:0; margin-top:18px; }

/* Bank picker */
.bank-picker{ width:100%; height:48px; border:1px solid var(--line); background: var(--surface-2); border-radius:15px; display:flex; align-items:center; gap:10px; padding:0 13px; color: var(--ink); font-weight:700; text-align:left; }
.bank-picker .icon:last-child{ margin-left:auto; color: var(--muted); width:17px; height:17px; }
.bank-search-area{ margin:-2px 0 14px; padding:10px; border:1px solid var(--line); border-radius:18px; background: var(--surface-2); }
.bank-list{ max-height:230px; overflow:auto; margin-top:9px; display:flex; flex-direction:column; gap:5px; }
.bank-option{ width:100%; border:0; background: var(--surface); border-radius:13px; display:flex; align-items:center; gap:10px; padding:9px; text-align:left; color: var(--ink); box-shadow:0 1px 2px rgba(23,26,43,.05); }
.bank-option:active{ transform: scale(.99); }
.bank-option-main{ min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
.bank-option-main b{ font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bank-option-main small{ font-size:10px; color: var(--muted); }
.bank-logo{ width:36px; height:36px; min-width:36px; border-radius:11px; background: var(--lavender); display:flex; align-items:center; justify-content:center; overflow:hidden; border:1px solid var(--line); }
.bank-logo.small{ width:30px; height:30px; min-width:30px; border-radius:9px; }
.bank-logo img{ width:24px; height:24px; object-fit:contain; }
.bank-logo span{ display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:800; color: var(--royal); }
.bank-empty{ padding:16px; text-align:center; color: var(--muted); font-size:12px; }
.bank-note{ display:flex; gap:8px; align-items:flex-start; padding:11px; border-radius:13px; background: var(--lavender); color: var(--royal); font-size:10.5px; line-height:1.45; margin-top:4px; }
.bank-note .icon{ width:15px; height:15px; margin-top:1px; }

/* Official channel popup */
.official-popup-copy{ font-size:12.5px!important; line-height:1.55; color: var(--muted)!important; }
.official-popup-buttons{ display:grid; gap:9px; margin-top:18px; }
.official-popup-btn{ display:flex; align-items:center; justify-content:center; gap:7px; padding:12px 14px; border-radius:14px; background: var(--royal); color:#fff; font-weight:800; font-size:13px; border:0; }
.official-popup-btn.alt{ background: var(--surface-2); color: var(--ink); border:1px solid var(--line); }

/* withdrawal receipt */
.receipt-page{ padding:4px 0 22px; }
.receipt-topbar .topbar-spacer{ width:40px; height:40px; }
.receipt-hero{ text-align:center; padding:18px 0 0; }
.receipt-success-art{ position:relative; width:260px; height:260px; margin:0 auto 10px; display:flex; align-items:center; justify-content:center; }
.receipt-ring{ position:absolute; border-radius:50%; border:18px solid rgba(79,70,229,.07); }
.receipt-ring-1{ width:246px; height:246px; }
.receipt-ring-2{ width:194px; height:194px; border-width:16px; border-color:rgba(79,70,229,.09); }
.receipt-ring-3{ width:140px; height:140px; border-width:14px; border-color:rgba(79,70,229,.12); }
.receipt-check{ position:relative; z-index:2; width:100px; height:100px; margin:0; border-radius:50%; display:flex; align-items:center; justify-content:center; background: linear-gradient(135deg,var(--royal) 0%,var(--blue-accent) 100%); box-shadow:0 16px 32px -12px rgba(79,70,229,.4); }
.receipt-check .icon{ width:54px; height:54px; color:#fff; stroke-width:2.8; }
.receipt-clock{ position:absolute; z-index:3; right:42px; bottom:42px; width:54px; height:54px; border-radius:50%; display:flex; align-items:center; justify-content:center; background: var(--gold-soft); border:5px solid #fff; box-shadow:0 6px 18px rgba(212,167,44,.18); color: var(--gold); }
.receipt-clock .icon{ width:30px; height:30px; stroke-width:2.2; }
.receipt-hero h2{ margin:0; font-size:27px; line-height:1.15; letter-spacing:-.6px; font-weight:850; color: var(--ink); }
.receipt-description{ max-width:620px; margin:12px auto 0; padding:0 18px; font-size:15px; line-height:1.55; color: var(--muted); }
.receipt-row{ position:relative; display:flex; align-items:center; margin:26px 0 0; padding:18px 10px; min-height:82px; border-radius:20px; background: var(--surface); border:1px solid var(--line); box-shadow:0 12px 30px -22px rgba(23,26,43,.25); }
.receipt-row > div{ flex:1; text-align:center; min-width:0; }
.receipt-row span{ display:block; font-size:12px; color: var(--muted); }
.receipt-row strong{ display:block; font-size:19px; line-height:1.25; margin-top:6px; font-weight:850; color: var(--ink); overflow-wrap:anywhere; }
.receipt-divider{ width:1px!important; height:48px; flex:0 0 1px!important; background: var(--line); }
.receipt-badge{ margin-top:18px; }
.receipt-badge .badge{ display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border-radius:999px; font-size:12px; font-weight:800; }
.receipt-note{ margin:12px 0 0; font-size:13px; color: var(--muted); }
.receipt-actions{ margin-top:28px; }
.receipt-actions .btn-primary{ min-height:56px; border-radius:17px; font-size:15px; font-weight:800; }
.receipt-bottom-nav{ position:fixed; z-index:30; left:50%; bottom:0; transform:translateX(-50%); width:min(100%,760px); display:flex; justify-content:space-around; padding:10px 8px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top:1px solid var(--line); backdrop-filter:blur(18px); }
.receipt-bottom-nav a{ position:relative; flex:1; display:flex; flex-direction:column; align-items:center; gap:5px; color: var(--muted); text-decoration:none; font-size:11px; font-weight:700; }
.receipt-bottom-nav a .icon{ width:24px; height:24px; stroke-width:2; }
.receipt-bottom-nav a.active{ color: var(--royal); }
.receipt-bottom-nav a i{ width:5px; height:5px; border-radius:50%; background:currentColor; display:block; }
@media (min-width:700px){ .receipt-page{ max-width:700px; margin:0 auto; } }
@media (max-width:430px){
  .receipt-success-art{ width:238px; height:238px; } .receipt-ring-1{ width:226px;height:226px; } .receipt-ring-2{ width:178px;height:178px; } .receipt-ring-3{ width:132px;height:132px; }
  .receipt-check{ width:88px;height:88px; } .receipt-check .icon{ width:48px;height:48px; } .receipt-clock{ right:37px; bottom:37px; width:50px;height:50px; }
  .receipt-hero h2{ font-size:25px; } .receipt-description{ font-size:14px; }
}

/* Mobile usability: keep the original shell while allowing compact content to fit. */
@media (max-width:559px){
  .btn, .chip, .history-action, .earn-btn, .bank-picker{ min-height:44px; }
  .icon-btn, .balance-eye{ min-width:44px; min-height:44px; }
  .input-wrap{ min-height:48px; height:auto; }
  .input-wrap input, .sheet input:not([type="file"]), .sheet textarea, .sheet select{ font-size:16px; }
  .input-wrap input{ min-height:44px; }
  .bottomnav{ height:calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .dashboard-screen{ padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 26px); }
  .sheet{ padding-bottom:calc(20px + env(safe-area-inset-bottom)); overscroll-behavior:contain; scroll-padding-block:16px 80px; }
  .sheet-actions{ position:sticky; bottom:calc(-20px - env(safe-area-inset-bottom)); background:var(--surface); padding:12px 0 calc(12px + env(safe-area-inset-bottom)); z-index:2; }
  .welcome-copy{ min-width:0; overflow-wrap:anywhere; }
}
@media (max-width:380px){
  .balance-hero .bh-inner-tile.wallet-mini{ gap:6px; padding:8px; }
  .wallet-mini-icon{ width:24px; height:24px; border-radius:8px; }
  .wallet-mini .mini-arrow{ display:none; }
}
/* Use the visible viewport for sheets when the on-screen keyboard opens. */
.overlay{
  top:var(--sheet-viewport-top,0px); bottom:auto;
  height:var(--sheet-viewport-height,100vh);
  height:var(--sheet-viewport-height,100dvh);
}
.sheet{ max-height:88vh; max-height:min(88dvh,calc(var(--sheet-viewport-height,100dvh) - 16px)); }
