/* =============================================================
   VERNA — Global Design System
   Color Palette: #DB1A1A (Red) · #FFF6F6 (Cream)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --red:           #DB1A1A;
  --red-dark:      #b01414;
  --red-deeper:    #8a0f0f;
  --red-light:     #e83535;
  --red-soft:      rgba(219,26,26,0.08);

  --green:         #16a34a;
  --green-dark:    #15803d;
  --green-light:   #22c55e;
  --green-soft:    rgba(22,163,74,0.10);
  --red-glow:      rgba(219,26,26,0.25);

  --cream:         #FFF6F6;
  --cream-dark:    #f7e8e8;
  --cream-deeper:  #f0d5d5;

  --primary:       #DB1A1A;
  --primary-dark:  #b01414;
  --primary-light: #e83535;

  --card-bg:       #ffffff;
  --card-bg2:      #FFF6F6;
  --text:          #2a0a0a;
  --text-mid:      #6b2020;
  --text-muted:    #a05050;
  --border:        #f0d5d5;
  --danger:        #DB1A1A;
  --warning:       #e8a730;
  --success:       #DB1A1A;
  --shadow:        0 4px 20px rgba(219,26,26,0.10);
  --shadow-lg:     0 8px 40px rgba(219,26,26,0.18);
  --radius:        16px;
  --radius-sm:     10px;
  --nav-h:         70px;
  --font:          'Inter', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 10px);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; outline: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); outline: none; }
img { max-width: 100%; display: block; }

/* ---- Page Container ---- */
.page { display: none; animation: fadeUp 0.3s ease; }
.page.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Header Bar ---- */
.app-header {
  background: linear-gradient(135deg, var(--red-deeper), var(--red-dark), var(--red));
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(219,26,26,0.4);
}
.app-header .logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--cream);
  text-shadow: 0 0 16px rgba(255,246,246,0.5);
}
.app-header .wallet-badge {
  background: rgba(255,246,246,0.15);
  border: 1px solid rgba(255,246,246,0.25);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-header .wallet-badge span { color: var(--cream); font-weight: 700; }

/* ---- Bottom Nav ---- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: linear-gradient(135deg, var(--red-deeper), var(--red-dark), var(--red));
  display: flex;
  align-items: stretch;
  z-index: 200;
  box-shadow: 0 -3px 24px rgba(219,26,26,0.35);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(255,246,246,0.45);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.nav-item svg { transition: transform 0.2s; }
.nav-item.active { color: #fff; }
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 3px;
  background: var(--cream);
  border-radius: 0 0 6px 6px;
}
.nav-item.active svg { transform: scale(1.15); }

/* ---- Cards ---- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.card-glass {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(219,26,26,0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  margin-bottom: 14px;
}

/* ---- Wallet Hero Card ---- */
.wallet-hero {
  background: linear-gradient(135deg, var(--red-deeper) 0%, var(--red-dark) 50%, var(--red) 100%);
  border-radius: var(--radius);
  padding: 24px 20px;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.wallet-hero::before {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,246,246,0.07);
  top: -70px; right: -70px;
}
.wallet-hero::after {
  content: '';
  position: absolute;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,246,246,0.05);
  bottom: -40px; left: -40px;
}
.wallet-hero .label { font-size: 0.8rem; opacity: 0.75; margin-bottom: 6px; }
.wallet-hero .amount { font-size: 2rem; font-weight: 800; color: #fff; }
.wallet-hero .amount small { font-size: 1rem; opacity: 0.8; }
.wallet-hero .sub-row { display: flex; gap: 18px; margin-top: 16px; }
.wallet-hero .sub-item { background: rgba(255,246,246,0.12); border-radius: 10px; padding: 10px 14px; flex: 1; }
.wallet-hero .sub-item .s-label { font-size: 0.7rem; opacity: 0.7; }
.wallet-hero .sub-item .s-val { font-size: 0.95rem; font-weight: 700; color: #fff; }

/* ---- Hero Action Buttons ---- */
.hero-actions { display: flex; gap: 12px; margin-top: 16px; }
.hero-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem; font-weight: 700;
  cursor: pointer; border: none;
  transition: all 0.2s;
  color: #fff;
}
.hero-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-btn.deposit {
  background: rgba(255,246,246,0.18);
  border: 1px solid rgba(255,246,246,0.3);
}
.hero-btn.deposit:hover { background: rgba(255,246,246,0.28); }
.hero-btn.withdraw {
  background: rgba(255,246,246,0.12);
  border: 1px solid rgba(255,246,246,0.2);
}
.hero-btn.withdraw:hover { background: rgba(255,246,246,0.22); }

/* ---- Quick Action Buttons ---- */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.qa-btn {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 14px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.qa-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.qa-btn .qa-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.qa-btn .qa-icon svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qa-btn .qa-label { font-size: 0.65rem; font-weight: 600; color: var(--text-muted); }
.qa-icon.primary  { background: rgba(219,26,26,0.08);  color: var(--red); }
.qa-icon.teal     { background: rgba(219,26,26,0.08);  color: var(--red); }
.qa-icon.cyan     { background: rgba(219,26,26,0.08);  color: var(--red); }
.qa-icon.cream    { background: var(--cream-dark);      color: var(--red); }

/* ---- Ticker ---- */
.ticker-wrap {
  background: linear-gradient(135deg, var(--red-deeper), var(--red));
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 12px;
  height: 36px;
}
.ticker-label {
  background: rgba(255,246,246,0.2);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  margin-right: 10px;
  flex-shrink: 0;
  border: 1px solid rgba(255,246,246,0.3);
}
.ticker-content { overflow: hidden; flex: 1; }
.ticker-text {
  color: rgba(255,246,246,0.9);
  font-size: 0.72rem;
  white-space: nowrap;
  animation: ticker 25s linear infinite;
  display: inline-block;
}
@keyframes ticker {
  0%   { transform: translateX(300px); }
  100% { transform: translateX(-100%); }
}

/* ---- Section Title ---- */
.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 16px;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  border-radius: 4px;
}

/* ---- Product / Plan Cards ---- */
.plans-grid { display: flex; flex-direction: column; gap: 16px; }

/* ---- New Product Card Styles ---- */
.product-card-new {
  background: #ffffff;
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 4px 24px rgba(219,26,26,0.08), 0 1px 6px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(219,26,26,0.06);
  cursor: pointer;
}

.product-card-new:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(219,26,26,0.16), 0 2px 10px rgba(0,0,0,0.06);
}

.product-card-new-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, var(--red-dark), var(--red), var(--red-light));
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(219,26,26,0.35);
  z-index: 2;
  letter-spacing: 0.3px;
}

.product-card-new-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 18px 14px;
}

.product-card-new-img {
  background: linear-gradient(135deg, var(--red-deeper), var(--red), var(--red-light));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  box-shadow: 0 6px 20px rgba(219,26,26,0.28);
}

.product-card-new-img svg {
  stroke: #fff;
  width: 2.6rem;
  height: 2.6rem;
}

.product-card-new-details {
  flex: 1;
  min-width: 0;
  padding-right: 44px;
}

.product-card-new-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.2;
}

.product-card-new-roi {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 14px;
  padding: 5px 12px;
  background: var(--green-soft);
  border-radius: 10px;
  display: inline-block;
}

.product-card-new-income-row {
  display: flex;
  gap: 10px;
}

.product-card-new-income-col {
  flex: 1;
  background: var(--cream);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.product-card-new-income-col:hover {
  box-shadow: 0 4px 12px rgba(219,26,26,0.1);
}

.product-card-new-income-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 3px;
}

.product-card-new-income-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.product-card-new-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.product-card-new-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--red);
}

.product-card-new-invest-btn {
  background: linear-gradient(135deg, var(--red-dark), var(--red), var(--red-light));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 11px 30px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(219,26,26,0.38);
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.product-card-new-invest-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(219,26,26,0.5);
}

.product-card-new-invest-btn:active {
  transform: translateY(0);
}

/* ---- Product Card Mobile Responsive ---- */
@media (max-width: 400px) {
  .product-card-new-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 14px 10px;
    gap: 15px;
  }
  .product-card-new-img {
    width: 100%;
    height: 120px;
    border-radius: 18px 18px 0 0;
  }
  .product-card-new-details {
    padding-right: 0;
    width: 100%;
  }
  .product-card-new-income-row {
    justify-content: center;
  }
  .product-card-new-badge {
    top: 10px;
    right: 10px;
  }
}

/* ---- Buy Button ---- */
.btn-buy {
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, var(--red-dark), var(--red-light));
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
  margin-top: 10px;
  box-shadow: 0 4px 14px rgba(219,26,26,0.35);
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(219,26,26,0.5); }
.btn-buy:active { transform: translateY(0); }

/* ---- Primary Button ---- */
.btn-primary {
  padding: 14px 24px;
  background: linear-gradient(90deg, var(--red-dark), var(--red-light));
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(219,26,26,0.35);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary.full { width: 100%; }

.btn-outline {
  padding: 12px 20px;
  background: transparent;
  border: 2px solid var(--red);
  color: var(--red);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.btn-outline:hover { background: var(--red); color: #fff; }

/* ---- Forms ---- */
.form-group { margin-bottom: 14px; }
.form-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; display: block; }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--cream);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(219,26,26,0.12); }
.form-control::placeholder { color: #c08888; }
.input-group { position: relative; }
.input-group .form-control { padding-right: 44px; }
.input-icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 1.1rem; color: var(--text-muted); cursor: pointer;
}

/* ---- Tabs ---- */
.tab-bar { display: flex; background: var(--cream-dark); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 16px; }
.tab-btn {
  flex: 1; padding: 9px; text-align: center;
  font-size: 0.78rem; font-weight: 600; border-radius: 8px; transition: all 0.2s;
  color: var(--text-muted); cursor: pointer; background: transparent;
}
.tab-btn.active {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 10px rgba(219,26,26,0.35);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeUp 0.25s ease; }

/* ---- Investment Progress ---- */
.invest-card { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; background: var(--card-bg); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.invest-icon { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--red-dark), var(--red-light)); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.invest-info { flex: 1; min-width: 0; }
.invest-name { font-size: 0.85rem; font-weight: 700; margin-bottom: 4px; }
.invest-meta { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 8px; }
.progress-bar { height: 6px; background: var(--cream-dark); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--red-dark), var(--red-light)); border-radius: 999px; transition: width 0.6s ease; }
.invest-right { text-align: right; flex-shrink: 0; }
.invest-right .earn { font-size: 0.85rem; font-weight: 700; color: var(--green); }
.invest-right .days { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }

/* ---- Badge / Status ---- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
.badge-success { background: rgba(22,163,74,0.10); color: var(--green); }
.badge-pending { background: rgba(232,167,48,0.12); color: var(--warning); }
.badge-danger  { background: rgba(219,26,26,0.12); color: var(--red); }

/* ---- Transaction List ---- */
.txn-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.txn-item:last-child { border-bottom: none; }
.txn-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.txn-icon.credit  { background: rgba(22,163,74,0.10);  color: var(--green); }
.txn-icon.debit   { background: rgba(219,26,26,0.12);   color: var(--red-dark); }
.txn-icon.pending { background: rgba(232,167,48,0.10);  color: var(--warning); }
.txn-info { flex: 1; min-width: 0; }
.txn-title { font-size: 0.82rem; font-weight: 600; }
.txn-date  { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.txn-amount { font-size: 0.9rem; font-weight: 700; flex-shrink: 0; }
.txn-amount.credit { color: var(--green); }
.txn-amount.debit  { color: var(--red); }
#buy-modal .txn-amount { color: var(--green); }

/* ---- Team Stats ---- */
.team-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-card { background: var(--card-bg); border-radius: var(--radius-sm); padding: 14px 10px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-card .s-num { font-size: 1.2rem; font-weight: 800; color: var(--red); }
.stat-card .s-label { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; margin-top: 4px; }
.stat-card .s-num.teal  { color: var(--red); }
.stat-card .s-num.green { color: var(--green); }
.stat-card .s-num.red   { color: var(--red); }

/* ---- Member Row ---- */
.member-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.member-row:last-child { border-bottom: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--red-light), var(--red-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.member-info { flex: 1; min-width: 0; }
.member-name { font-size: 0.82rem; font-weight: 600; }
.member-phone { font-size: 0.7rem; color: var(--text-muted); }
.member-earn { font-size: 0.82rem; font-weight: 700; color: var(--green); flex-shrink: 0; }

/* ---- Referral Link Box ---- */
.ref-box {
  background: linear-gradient(135deg, var(--red-deeper), var(--red-dark), var(--red));
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  color: #fff;
}
.ref-link-row { display: flex; gap: 8px; margin-top: 10px; }
.ref-link-input {
  flex: 1;
  background: rgba(255,246,246,0.12);
  border: 1px solid rgba(255,246,246,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.78rem;
  color: #fff;
  font-family: var(--font);
}
.btn-copy {
  background: rgba(255,246,246,0.2);
  border: 1px solid rgba(255,246,246,0.3);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.78rem;
  transition: background 0.2s;
}
.btn-copy:hover { background: rgba(255,246,246,0.3); }

/* ---- QR / UPI Box ---- */
.qr-box { text-align: center; padding: 20px; }
.qr-box img { width: 160px; height: 160px; border-radius: 12px; margin: 0 auto 12px; border: 3px solid var(--red); }
.upi-row { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 8px; }
.upi-text { font-size: 0.9rem; font-weight: 700; color: var(--red); }

/* ---- Toast Notification ---- */
#toast-container { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; width: 90%; max-width: 340px; }
.toast {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 20px rgba(219,26,26,0.3);
  animation: toastIn 0.3s ease;
  display: flex; align-items: center; gap: 10px;
}
.toast.success { background: linear-gradient(90deg, var(--red-deeper), var(--red)); }
.toast.error   { background: linear-gradient(90deg, var(--red-dark), var(--red-light)); }
.toast.info    { background: linear-gradient(90deg, var(--red-dark), var(--red)); }
@keyframes toastIn { from { opacity:0; transform: translateY(-10px); } to { opacity:1; transform: translateY(0); } }

/* ---- Popup / Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(138,15,15,0.45);
  z-index: 500; display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity:0; } to { opacity: 1; } }
.modal-box {
  background: var(--cream); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px;
  padding: 24px 20px;
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(40px); opacity:0; } to { transform: translateY(0); opacity:1; } }
.modal-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; color: var(--red); }
.modal-close { font-size: 1.3rem; cursor: pointer; color: var(--red); background: var(--cream-dark); border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; }

/* ---- Popup Notice ---- */
.popup-notice {
  position: fixed; inset: 0; background: rgba(138,15,15,0.5);
  z-index: 600; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.popup-notice.hidden { display: none; }
.popup-body {
  background: #fff;
  border-radius: 24px;
  padding: 30px 22px 20px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  position: relative;
}
.popup-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
  border: 3px solid var(--red-soft);
  box-shadow: 0 4px 16px rgba(219,26,26,0.2);
}
.popup-app-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.popup-points {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  text-align: left;
}
.popup-points li {
  font-size: 0.78rem;
  color: var(--text);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.popup-points li:last-child { border-bottom: none; }
.popup-points li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  min-width: 6px;
  border-radius: 50%;
  background: var(--red);
  margin-top: 6px;
}
.popup-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  cursor: pointer;
  color: var(--red);
  transition: all 0.2s;
}
.popup-close-btn:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* ---- Loading Spinner ---- */
.spinner-overlay { position: fixed; inset: 0; background: rgba(255,246,246,0.80); z-index: 800; display: flex; align-items: center; justify-content: center; }
.spinner-overlay.hidden { display: none; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--cream-deeper); border-top-color: var(--red); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Section Padding ---- */
.section { padding: 14px 16px; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cream-deeper); border-radius: 4px; }

/* ---- Utility ---- */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-14 { margin-bottom: 14px; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); font-size: 0.8rem; }
.text-teal   { color: var(--red); }
.text-green  { color: var(--red); }
.text-cream  { color: var(--red); }
.fw-700 { font-weight: 700; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.hidden { display: none !important; }
.full-w { width: 100%; }

/* ---- Responsive max-width ---- */
@media (min-width: 480px) {
  body { max-width: 480px; margin: 0 auto; }
  .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); }
}

/* ---- SVG Icons ---- */
.icon    { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-xl { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-2x { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Icon Circles ---- */
.icon-circle {
  width: 42px; height: 42px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(219,26,26,0.12);
  transition: box-shadow 0.2s, transform 0.2s;
}
.icon-circle:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(219,26,26,0.20); }
.icon-circle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-circle.sm { width: 34px; height: 34px; border-radius: 11px; }
.icon-circle.sm svg { width: 16px; height: 16px; }
.icon-circle.lg { width: 52px; height: 52px; border-radius: 16px; }
.icon-circle.lg svg { width: 26px; height: 26px; }

/* Icon circle color variants — all use red palette */
.icon-circle.teal    { background: rgba(219,26,26,0.08);  color: var(--red); }
.icon-circle.cyan    { background: rgba(219,26,26,0.08);  color: var(--red); }
.icon-circle.primary { background: rgba(219,26,26,0.10);  color: var(--red); }
.icon-circle.cream   { background: var(--cream-dark);      color: var(--red); }
.icon-circle.green   { background: rgba(219,26,26,0.08);  color: var(--red); }
.icon-circle.red     { background: rgba(219,26,26,0.10);  color: var(--red); }
.icon-circle.yellow  { background: rgba(232,167,48,0.10); color: var(--warning); }
.icon-circle.blue    { background: rgba(219,26,26,0.08);  color: var(--red); }
.icon-circle.white   { background: rgba(255,255,255,0.15); color: #fff; }
