/* ============================================================
   TEMPLATE — design tokens
   Only --color-primary is meant to be hand-picked (see
   js/config.js). The light "paper" background it sits on is
   calculated automatically from it with color-mix() — a faint
   tint of the primary color, the same relationship #F5FAF7 had
   to #0B3D2B in the original design — so you never have to pick
   a second color by hand. Every other shade (hover states,
   tints, gradients) is derived the same way, so the palette
   stays harmonious no matter what primary color you choose.
   main.js also writes --color-primary inline at runtime from
   SITE_CONFIG.colors, so config.js is the single source of truth.
   You can still override the auto-generated background by
   setting colors.secondary in config.js if you ever want to.
   ============================================================ */

:root {
  --color-primary: #0B3D2B;
  --auth-bg-image: none; /* set from JS (auth.js) once the store's hero/auth image loads */

  /* ---- derived shades (auto, do not edit here — edit config.js) ---- */
  --ink: var(--color-primary);
  --brand: color-mix(in srgb, var(--color-primary) 78%, white 22%);
  --brand-deep: color-mix(in srgb, var(--color-primary) 88%, black 12%);
  --brand-tint: color-mix(in srgb, var(--color-primary) 10%, white 90%);
  --paper: color-mix(in srgb, var(--color-primary) 4%, white 96%);
  --paper-raised: #FFFFFF;
  --line: color-mix(in srgb, var(--color-primary) 12%, white 88%);
  --text: color-mix(in srgb, var(--color-primary) 78%, black 22%);
  --text-muted: color-mix(in srgb, var(--color-primary) 34%, #5b6960 66%);
  --accent: var(--brand);
  --accent-deep: var(--brand-deep);
  --success: #1FAA59;
  --success-bg: #E7F7EE;
  --danger: #E5484D;
  --danger-bg: #FDEBEC;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow: 0 8px 30px color-mix(in srgb, var(--color-primary) 14%, transparent);
  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Poppins', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.4em 0;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em 0; color: var(--text-muted); max-width: 62ch; }
a { color: inherit; }
button, input, select { font-family: inherit; font-size: inherit; }
img, svg { display: block; max-width: 100%; }

.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 30%, transparent); }
.btn-accent { background: var(--brand); color: #fff; }
.btn-accent:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-app {
  background: var(--brand-tint); color: var(--ink); border: 1px solid var(--line);
}
.btn-app:hover { background: color-mix(in srgb, var(--brand) 16%, white 84%); }

/* ---- Forms ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--paper-raised); color: var(--text);
}
.field input:focus, .field select:focus { border-color: var(--brand); }
.field-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.field-row-between { display: flex; align-items: center; justify-content: space-between; margin: -10px 0 18px; }
.field-row-between a { font-size: 0.83rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.field-row-between a:hover { text-decoration: underline; }

/* ---- Cards ---- */
.card { background: var(--paper-raised); border-radius: var(--radius-md); border: 1px solid var(--line); padding: 24px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-pending { background: var(--brand-tint); color: var(--brand); }

.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 400;
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); max-width: 320px; font-size: 0.9rem;
  transform: translateY(20px); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

.icon-chip {
  display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm);
  background: var(--brand-tint); color: var(--brand); flex-shrink: 0;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  padding: 18px 0; border-bottom: 1px solid var(--line); background: var(--paper-raised);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.header-logo { height: 38px; width: auto; object-fit: contain; display: block; }

.nav-desktop { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 0.92rem; }
.nav-links a:hover { color: var(--ink); }
.nav-auth { display: flex; align-items: center; gap: 12px; }
.nav-app-btn { display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 12px; border-radius: 999px; font-size: 0.82rem; }
.nav-app-btn svg { width: 16px; height: 16px; }

.hamburger-btn {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--brand-tint); }

.user-menu { position: relative; }
.user-menu-trigger { display: flex; align-items: center; gap: 6px; background: var(--brand-tint); border: none; cursor: pointer; padding: 6px 10px 6px 6px; border-radius: 999px; }
.user-avatar-circle { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.user-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow); min-width: 180px; padding: 8px; display: none; z-index: 60;
}
.user-menu-dropdown.open { display: block; }
.user-menu-dropdown a, .user-menu-dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  background: none; border: none; text-align: left; cursor: pointer; font-size: 0.9rem; color: var(--text); text-decoration: none;
}
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover { background: var(--brand-tint); }

.mobile-menu-panel {
  display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper-raised);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px 24px 20px;
}
.mobile-menu-panel.open { display: block; }
.mobile-menu-panel a, .mobile-menu-panel button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 4px; border-bottom: 1px solid var(--line);
  background: none; border-left: none; border-right: none; border-top: none;
  text-align: left; font-size: 0.96rem; color: var(--text); text-decoration: none; cursor: pointer;
}
.mobile-menu-panel .mobile-menu-ctas { display: flex; gap: 10px; padding-top: 14px; }
.mobile-download-app {
  display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: var(--radius-md);
  background: var(--brand-tint); margin-bottom: 6px; border-bottom: none !important;
}
.mobile-download-app-icon { width: 26px; height: 26px; color: var(--brand); flex-shrink: 0; }
.mobile-download-app strong { display: block; font-size: 0.92rem; color: var(--ink); }
.mobile-download-app small { display: block; font-size: 0.76rem; color: var(--text-muted); }

@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .hamburger-btn { display: flex; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: 96px 0 88px; background: var(--paper); }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); max-width: 14ch; }
.hero .lede { font-size: 1.1rem; max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

.hero-visual { position: relative; max-width: 420px; margin: 0 auto; }
.hero-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--brand-tint); }
.hero-float-card {
  position: absolute; left: -18px; bottom: -22px; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow); padding: 14px 18px; display: flex; align-items: center;
  gap: 12px; max-width: 230px;
}
.hero-float-card .icon-chip { width: 42px; height: 42px; }
.hero-float-label { font-size: 0.72rem; color: var(--text-muted); }
.hero-float-amount { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.hero-badge-top {
  position: absolute; top: 18px; right: -14px; background: var(--ink); color: #fff; border-radius: 999px;
  padding: 8px 16px; font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow);
}

.trust-row { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }
.trust-item .check { width: 22px; height: 22px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trust-item .check .icon { width: 13px; height: 13px; stroke-width: 3; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 12px; }
}

/* ============================================================
   Section layout
   ============================================================ */
.section { padding: 88px 0; }
.section-tint { background: var(--brand-tint); }
.section-green { background: linear-gradient(135deg, var(--brand-deep), var(--brand)); color: rgba(255,255,255,0.92); }
.section-green h2, .section-green h3 { color: #fff; }
.section-green p { color: rgba(255,255,255,0.8); }
.section-green .eyebrow { color: #fff; opacity: 0.85; }
.section-green .step-num { color: #fff; background: rgba(255,255,255,0.15); width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.section-head { max-width: 640px; margin-bottom: 16px; }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 44px; }
.feature-card { padding: 26px 24px; }
.feature-card .icon-chip { width: 44px; height: 44px; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.02rem; }
.feature-card p { font-size: 0.88rem; margin-bottom: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 40px; }
.step-num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--brand); margin-bottom: 10px; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; margin-top: 44px; }
.service-card { display: flex; gap: 16px; align-items: flex-start; }
.service-card .icon-chip { width: 48px; height: 48px; border-radius: 12px; }
.service-card h3 { font-size: 1rem; margin-bottom: 5px; }
.service-card p { font-size: 0.86rem; margin-bottom: 0; }

.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-item summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--brand); transition: transform 0.15s; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 12px; font-size: 0.92rem; }

.testimonial-placeholder, .contact-card { border: 1.5px dashed var(--line); border-radius: var(--radius-md); padding: 44px 36px; text-align: center; color: var(--text-muted); background: var(--paper-raised); }
.testimonial-placeholder .icon-chip, .contact-card .icon-chip { margin: 0 auto 16px; width: 44px; height: 44px; }

.cta-band { background: linear-gradient(135deg, var(--brand-deep), var(--brand)); border-radius: var(--radius-lg); padding: 64px 40px; text-align: center; color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0 auto 26px; }
.cta-band .hero-ctas { justify-content: center; }
.cta-band .btn-accent { background: #fff; color: var(--ink); }

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 64px 0; }
  .hero { padding: 40px 0 56px; }
  .cta-band { padding: 48px 28px; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .container { padding: 0 20px; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer-big { background: var(--ink); color: rgba(255,255,255,0.75); padding: 72px 0 28px; }
.site-footer-big .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.site-footer-big .brand { color: #fff; margin-bottom: 12px; }
.site-footer-big p { color: rgba(255,255,255,0.6); font-size: 0.88rem; }
.site-footer-big h4 { color: #fff; font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; }
.site-footer-big ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer-big a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; }
.site-footer-big a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.footer-contact a { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.footer-contact .icon { width: 15px; height: 15px; }
.site-footer-big .footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; }

.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-links a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: #fff; transition: background 0.15s; }
.social-links a:hover { background: var(--brand); }
.social-links svg { width: 17px; height: 17px; }

@media (max-width: 900px) {
  .site-footer-big .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-footer-big .footer-grid { grid-template-columns: 1fr; }
  .site-footer-big .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ============================================================
   Floating WhatsApp / contact button
   ============================================================ */
.whatsapp-float-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 150; width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45); color: #fff; text-decoration: none; transition: transform 0.15s ease;
}
.whatsapp-float-btn:hover { transform: scale(1.08); }
.whatsapp-float-btn svg { width: 28px; height: 28px; }

@media (max-width: 640px) {
  .whatsapp-float-btn { bottom: 18px; right: 18px; width: 50px; height: 50px; }
  .whatsapp-float-btn svg { width: 24px; height: 24px; }
}

/* ============================================================
   Auth pages (login.html / register.html / forgot-password.html)
   ============================================================ */
.home-float-btn {
  position: fixed; top: 20px; right: 20px; z-index: 200; width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper-raised); border: 1px solid var(--line); display: flex; align-items: center;
  justify-content: center; color: var(--ink); box-shadow: var(--shadow); text-decoration: none;
}
.home-float-btn:hover { background: var(--brand-tint); border-color: var(--brand); }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-shell.auth-shell-narrow { grid-template-columns: 1fr; }
.auth-visual {
  position: relative;
  background-image: linear-gradient(160deg, color-mix(in srgb, var(--ink) 92%, black 8%) 0%, color-mix(in srgb, var(--brand) 88%, black 12%) 100%), var(--auth-bg-image);
  background-size: cover; background-position: center; background-blend-mode: multiply;
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-visual .quote { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; max-width: 22ch; }
.auth-visual .header-logo { background: #fff; padding: 8px 14px; border-radius: var(--radius-sm); height: 34px; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--paper-raised); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .switch-link { text-align: center; margin-top: 16px; font-size: 0.9rem; color: var(--text-muted); }
.switch-link a { color: var(--brand); font-weight: 600; text-decoration: none; }
.switch-link a:hover { text-decoration: underline; }
.auth-icon-badge {
  width: 52px; height: 52px; border-radius: 50%; background: var(--brand-tint); color: var(--brand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.form-success-note {
  background: var(--success-bg); color: color-mix(in srgb, var(--success) 70%, black 30%);
  border-radius: var(--radius-sm); padding: 14px 16px; font-size: 0.88rem; display: none;
}
.form-success-note.show { display: block; }

@media (max-width: 780px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-side { padding: 40px 24px; }
}

/* ============================================================
   Dashboard (dashboard.html)
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px; flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 120;
  overflow-y: auto; padding: 22px 16px; display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(180deg, var(--ink), var(--brand-deep)); color: rgba(255,255,255,0.85);
  transition: transform 0.25s ease;
}
.sidebar .brand { margin-bottom: 20px; }
.sidebar .header-logo { background: #fff; padding: 6px 10px; border-radius: var(--radius-sm); height: 30px; }
.sidebar-profile { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.08); border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 16px; }
.sidebar-profile .user-avatar-circle { background: rgba(255,255,255,0.18); color: #fff; }
.sidebar-profile-name { font-weight: 600; font-size: 0.9rem; color: #fff; }
.sidebar-profile-balance { font-size: 0.78rem; opacity: 0.75; }
.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.14); display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: none;
  color: rgba(255,255,255,0.78); padding: 11px 12px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; cursor: pointer; text-align: left; text-decoration: none;
}
.nav-item .icon { width: 18px; height: 18px; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.15); color: #fff; }

.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 110; }
.sidebar-backdrop.show { display: block; }

/* dashboard avatars reuse .user-avatar-circle (defined earlier, in the
   header dropdown styles) but are a bit larger */
.sidebar-profile .user-avatar-circle,
.topbar-profile .user-avatar-circle,
.mobile-profile-banner .user-avatar-circle { width: 40px; height: 40px; font-size: 1rem; }

.main-area { flex: 1; margin-left: 260px; display: flex; flex-direction: column; min-height: 100vh; }
.mobile-appbar { display: none; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--paper-raised); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 90; }
.mobile-appbar .header-logo { height: 30px; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; background: var(--paper-raised); border-bottom: 1px solid var(--line); }
.topbar-profile { display: flex; align-items: center; gap: 12px; }
.topbar-profile-text { text-align: right; }
.topbar-profile-name { font-weight: 600; font-size: 0.9rem; }
.topbar-profile-balance { font-size: 0.8rem; color: var(--text-muted); }

.view-body { padding: 28px 32px; max-width: 1100px; width: 100%; }
.view { display: none; }
.view.active { display: block; }
.view h2 { font-size: 1.15rem; margin: 28px 0 14px; }
.view h2:first-child { margin-top: 0; }

.mobile-profile-banner { display: none; }

.grid-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 16px 0 32px; }
.tile-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; cursor: pointer;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px;
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}
.tile-btn:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tile-icon { width: 38px; height: 38px; }
.tile-icon .icon { width: 20px; height: 20px; }
.tile-title { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.tile-sub { font-size: 0.76rem; color: var(--text-muted); }

.tx-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.tx-table th { text-align: left; padding: 14px 20px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); border-bottom: 1px solid var(--line); }
.tx-table td { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.tx-table tr:last-child td { border-bottom: none; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card { max-width: 520px; }

@media (max-width: 980px) {
  .grid-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .mobile-appbar { display: flex; }
  .topbar { display: none; }
  .view-body { padding: 20px; }
  .two-col { grid-template-columns: 1fr; }
  .mobile-profile-banner {
    display: block; background: linear-gradient(135deg, var(--brand-deep), var(--brand)); color: #fff;
    border-radius: var(--radius-md); padding: 20px; margin-bottom: 22px;
  }
  .mobile-profile-banner .user-avatar-circle { background: rgba(255,255,255,0.2); color: #fff; }
  .mobile-profile-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
  .mobile-profile-name { font-weight: 600; }
  .mobile-profile-sub { font-size: 0.8rem; opacity: 0.8; }
  .mobile-profile-balance-label { font-size: 0.78rem; opacity: 0.85; margin-top: 10px; }
  .mobile-profile-balance { font-size: 1.5rem; font-weight: 700; margin: 4px 0 12px; }
}
@media (max-width: 560px) {
  .grid-tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tile-btn { padding: 14px; }
}

/* ============================================================
   Global loading overlay
   ============================================================ */
.global-loader {
  position: fixed; inset: 0; z-index: 500; background: color-mix(in srgb, var(--paper) 65%, transparent);
  display: none; align-items: center; justify-content: center;
}
.global-loader.active { display: flex; }
.global-loader .spinner {
  width: 46px; height: 46px; border: 4px solid var(--brand-tint); border-top-color: var(--brand);
  border-radius: 50%; animation: template-spin 0.7s linear infinite;
}
@keyframes template-spin { to { transform: rotate(360deg); } }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============================================================
   STOREFRONT ADDITIONS — bundle shop, buy modal, payment-method
   choice, and a couple of small notices. Not part of the base
   template; added to sell data bundles specifically. Uses the
   same design tokens as everything above so it always matches
   whatever primary color the agent picks.
   ============================================================ */

.shop-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.net-tabs { display: flex; gap: 8px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.net-tab {
  border: none; background: none; padding: 9px 18px; border-radius: 999px; font-weight: 600;
  font-size: 0.86rem; color: var(--text-muted); cursor: pointer;
}
.net-tab.active { background: var(--ink); color: #fff; }

.bundle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.bundle-item {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 20px; text-align: center; display: flex; flex-direction: column; gap: 10px;
}
.bundle-item .size { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.bundle-item .validity { font-size: 0.78rem; color: var(--text-muted); }
.bundle-item .price { font-weight: 700; color: var(--brand); font-size: 1.05rem; }
@media (max-width: 900px) { .bundle-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .bundle-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }

/* ---- Buy modal (overlay + sheet) ---- */
.overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 300;
  align-items: flex-end; justify-content: center;
}
.overlay.open { display: flex; }
.sheet {
  background: var(--paper-raised); border-radius: var(--radius-lg) var(--radius-lg) 0 0; width: 100%;
  max-width: 440px; padding: 28px 24px 32px; position: relative; max-height: 90vh; overflow-y: auto;
}
@media (min-width: 640px) {
  .overlay { align-items: center; }
  .sheet { border-radius: var(--radius-lg); }
}
.sheet-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--brand-tint); color: var(--ink); font-size: 1.2rem; cursor: pointer; line-height: 1;
}
.sheet h3 { margin-bottom: 4px; }
.sheet .sub { font-size: 0.88rem; margin-bottom: 20px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.summary-row select { flex: 1; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--paper); }
.summary-row strong { color: var(--brand); font-size: 1.1rem; white-space: nowrap; }

.confirm-rows { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 16px; }
.confirm-rows .row { display: flex; justify-content: space-between; padding: 12px 16px; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.confirm-rows .row:last-child { border-bottom: none; }
.confirm-rows .row span:first-child { color: var(--text-muted); }
.total-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.warn { font-size: 0.78rem; color: var(--danger); background: var(--danger-bg); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 4px; }
.actions-row { display: flex; gap: 10px; margin-top: 18px; }

/* ---- Pay from Wallet / Pay by Card or Mobile Money toggle ---- */
.pay-method-group { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.pay-method-option {
  display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: var(--radius-md);
  padding: 13px 14px; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease;
}
.pay-method-option:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.pay-method-option input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.pay-method-option .pmo-text { flex: 1; }
.pay-method-option .pmo-title { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.pay-method-option .pmo-sub { font-size: 0.78rem; color: var(--text-muted); }
.pay-method-hint { font-size: 0.78rem; color: var(--text-muted); margin: -6px 0 12px; }

/* ---- Inline form message (used on auth pages alongside .toast) ---- */
.msg { display: none; font-size: 0.86rem; border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 16px; }
.msg.show { display: block; }
.msg.error { background: var(--danger-bg); color: color-mix(in srgb, var(--danger) 75%, black 25%); }
.msg.success { background: var(--success-bg); color: color-mix(in srgb, var(--success) 70%, black 30%); }

.loading-row { display: flex; align-items: center; gap: 10px; padding: 30px 10px; color: var(--text-muted); font-size: 0.9rem; grid-column: 1 / -1; justify-content: center; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--brand-tint); border-top-color: var(--brand); border-radius: 50%; animation: template-spin 0.7s linear infinite; flex-shrink: 0; }

.store-account { position: relative; }
