/* ═══════════════════════════════════════════════════════════
   EDC APP — Reusable UI Components
   ═══════════════════════════════════════════════════════════ */

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition), background var(--transition), transform 0.1s;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-full { width: 100%; }

.btn-primary {
  background: var(--c-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--c-primary-dk); }

.btn-secondary {
  background: var(--c-primary-lt);
  color: var(--c-primary);
}

.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
}

.btn-ghost {
  background: var(--c-surface-2);
  color: var(--c-text);
}
.btn-ghost:hover { background: var(--c-surface-3); }

.btn-danger {
  background: var(--c-error-lt);
  color: var(--c-error);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--r-sm);
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  border-radius: var(--r-lg);
}

.btn-icon {
  padding: 10px;
  border-radius: var(--r-full);
  background: var(--c-surface-2);
  color: var(--c-text);
  width: 44px;
  height: 44px;
}

.btn-icon svg { flex-shrink: 0; }

/* ── Form Fields ─────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
}

.field-required::after {
  content: ' *';
  color: var(--c-error);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-wrap:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), 0.12);
}

.input-wrap.error {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.input-wrap__icon {
  padding-left: 14px;
  color: var(--c-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.input-wrap__suffix {
  padding-right: 14px;
  color: var(--c-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.input {
  flex: 1;
  padding: 13px 14px;
  font-size: 15px;
  background: transparent;
  color: var(--c-text);
  width: 100%;
}

.input-wrap__icon + .input { padding-left: 8px; }
.input::placeholder { color: var(--c-muted-2); }

.field-hint {
  font-size: 12px;
  color: var(--c-muted);
}

.field-error {
  font-size: 12px;
  color: var(--c-error);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── OTP Screen ──────────────────────────────────────────── */
.otp-screen {
  align-items: center;
  text-align: center;
}

.otp-screen .auth-header {
  width: 100%;
  text-align: left;
  margin-bottom: var(--space-lg);
}

.otp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 36px;
  gap: 6px;
}

.otp-hero__icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--c-primary-lt);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 8px 28px rgba(var(--c-primary-rgb), 0.18);
}

.otp-hero__title {
  font-size: 26px;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.5px;
}

.otp-hero__sub {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.5;
  max-width: 260px;
}

.otp-hero__phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-primary);
  background: var(--c-primary-lt);
  padding: 6px 16px;
  border-radius: var(--r-full);
  margin-top: 6px;
}

.otp-hero__change {
  font-size: 13px;
  color: var(--c-muted);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 4px;
}

/* ── OTP Input ───────────────────────────────────────────── */
.otp-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.otp-cell {
  width: 52px;
  height: 62px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  color: var(--c-text);
  caret-color: transparent;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s, background 0.18s;
}

.otp-cell:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(var(--c-primary-rgb), 0.15);
  transform: scale(1.06);
  outline: none;
}

.otp-cell.filled {
  border-color: var(--c-primary);
  background: var(--c-primary-lt);
}

.otp-cell.error {
  border-color: var(--c-error) !important;
  background: var(--c-error-lt) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
  transform: none !important;
}

/* ── OTP Resend ──────────────────────────────────────────── */
.otp-resend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
}

.otp-resend__hint {
  font-size: 13px;
  color: var(--c-muted);
}

.otp-resend__btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-primary);
  padding: 5px 14px;
  border-radius: var(--r-full);
  transition: background 0.18s, opacity 0.18s;
}

.otp-resend__btn:disabled {
  color: var(--c-muted-2);
}

.otp-resend__btn:not(:disabled):hover {
  background: var(--c-primary-lt);
}

/* ── OTP Verify button ───────────────────────────────────── */
.otp-verify-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ── OTP Demo badge ──────────────────────────────────────── */
.otp-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-muted-2);
  background: var(--c-surface-2);
  border-radius: var(--r-full);
  padding: 5px 14px;
  margin-top: 16px;
  border: 1px solid var(--c-border);
}

.otp-demo-badge strong {
  color: var(--c-text-2);
  font-weight: 700;
  letter-spacing: 2px;
}

/* ── Register Screen ─────────────────────────────────────── */
.reg-screen {
  align-items: center;
  text-align: center;
}

.reg-screen .auth-header {
  width: 100%;
  text-align: left;
  margin-bottom: var(--space-lg);
}

/* Hero */
.reg-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
  gap: 6px;
}

.reg-hero__icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--c-primary-lt);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 8px 28px rgba(var(--c-primary-rgb), 0.18);
}

.reg-hero__title {
  font-size: 26px;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.5px;
}

.reg-hero__sub {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.5;
  max-width: 270px;
}

/* Fields */
.reg-field {
  width: 100%;
  text-align: left;
  margin-bottom: 16px;
}

.reg-optional {
  font-size: 11px;
  font-weight: 400;
  color: var(--c-muted-2);
  margin-left: 4px;
}

.reg-required {
  color: var(--c-error);
  margin-left: 2px;
}

.reg-input__icon {
  padding-left: 14px;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.reg-input__text {
  letter-spacing: 0;
}

/* Terms */
.reg-terms {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 24px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.reg-terms:has(#terms-cb:checked) {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), 0.10);
}

.reg-terms__check {
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
}

.reg-terms__cb {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.reg-terms__box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--c-border-2);
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface-2);
  color: transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.reg-terms__cb:checked + .reg-terms__box {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.reg-terms__label {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.55;
  cursor: pointer;
}

.reg-terms__link {
  color: var(--c-primary);
  font-weight: 600;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Submit */
.reg-submit {
  width: 100%;
  margin-bottom: 0;
}

/* Login link */
.reg-login-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
}

.reg-login-link span {
  color: var(--c-muted);
}

.reg-login-link button {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-primary);
}

/* ── PIN Input ───────────────────────────────────────────── */
.pin-dots {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: var(--space-lg) 0;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--c-border);
  background: transparent;
  transition: all 0.2s;
}

.pin-dot.filled {
  background: var(--c-primary);
  border-color: var(--c-primary);
}

.pin-dot.error {
  background: var(--c-error);
  border-color: var(--c-error);
}

/* PIN Numpad */
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 var(--space-lg);
}

.pin-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 70px;
  border-radius: var(--r-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  font-size: 22px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
  box-shadow: var(--shadow-xs);
}

.pin-key:active { background: var(--c-surface-2); transform: scale(0.95); }
.pin-key__sub   { font-size: 9px; font-weight: 400; letter-spacing: 1px; color: var(--c-muted); margin-top: 2px; }
.pin-key.empty  { background: transparent; border: none; box-shadow: none; }
.pin-key.del    { background: transparent; border: none; box-shadow: none; color: var(--c-muted); }

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  overflow: hidden;
}

.card-body {
  padding: var(--space-md);
}

.card-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
}

.card-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--c-border);
}

/* ── Consumer Card ───────────────────────────────────────── */
.consumer-card {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dk) 100%);
  border-radius: var(--r-xl);
  padding: var(--space-lg);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.consumer-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.consumer-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -20px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.consumer-card__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.consumer-card__id {
  font-size: 13px;
  opacity: 0.75;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 0.5px;
}

.consumer-card__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--r-full);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 12px;
}

.consumer-card__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
}

.consumer-card__meta {
  margin-top: var(--space-md);
  display: flex;
  justify-content: space-between;
}

.consumer-card__meta-item {}

.consumer-card__meta-label {
  font-size: 11px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.consumer-card__meta-value {
  font-size: 16px;
  font-weight: 700;
}

.consumer-card__divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: var(--space-md) 0;
}

/* ── Badge / Chip ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
}

.badge-success  { background: var(--c-paid-bg);         color: var(--c-paid); }
.badge-error    { background: var(--c-unpaid-bg);        color: var(--c-unpaid); }
.badge-warning  { background: var(--c-pending-bg);       color: var(--c-pending); }
.badge-muted    { background: var(--c-disconnected-bg);  color: var(--c-disconnected); }
.badge-primary  { background: var(--c-primary-lt);       color: var(--c-primary); }

/* ── List Item ───────────────────────────────────────────── */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 14px var(--space-md);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: background var(--transition);
}

.list-item:last-child { border-bottom: none; }
.list-item:active { background: var(--c-surface-2); }

.list-item__icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--c-primary-lt);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-item__body { flex: 1; min-width: 0; }

.list-item__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item__sub {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item__right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--c-muted);
}

.list-chevron {
  color: var(--c-muted-2);
}

/* ── Quick Action Button ─────────────────────────────────── */
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}

.quick-action__icon {
  width: 52px; height: 52px;
  border-radius: var(--r-lg);
  background: var(--c-primary-lt);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background var(--transition);
}

.quick-action:active .quick-action__icon { transform: scale(0.92); }

.quick-action__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-2);
  text-align: center;
  line-height: 1.3;
}

/* ── Tab Bar ─────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-bar__item {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition);
  white-space: nowrap;
}

.tab-bar__item.active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
  font-weight: 600;
}

/* ── Bottom Navigation — Floating Pill ───────────────────── */
#bottom-nav {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 398px;
  height: var(--nav-h);
  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  display: flex;
  align-items: center;
  z-index: 200;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.10),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

[data-theme="dark"] #bottom-nav {
  background: rgba(22, 26, 35, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  color: var(--c-muted);
  cursor: pointer;
  transition: color var(--transition);
  position: relative;
}

.nav-item.active { color: var(--c-primary); }

.nav-item__icon {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item__label {
  font-size: 10px;
  font-weight: 500;
}

.nav-item__badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--c-error);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: var(--r-full);
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--c-nav-bg);
}

/* ── Modal / Sheet ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--c-overlay);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-sheet {
  background: var(--c-surface);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  width: 100%;
  max-width: 430px;
  max-height: 92dvh;
  max-height: 92vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 20px);
}

.modal-sheet__handle {
  width: 36px;
  height: 4px;
  background: var(--c-border-2);
  border-radius: var(--r-full);
  margin: 12px auto 8px;
}

.modal-sheet__header {
  padding: 8px var(--space-md) var(--space-md);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-sheet__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
}

.modal-sheet__body {
  padding: var(--space-md);
}

.modal-center {
  background: var(--c-surface);
  border-radius: var(--r-2xl);
  width: calc(100% - 48px);
  max-width: 360px;
  padding: var(--space-lg);
  animation: fadeIn 0.2s ease;
  margin: auto;
}

/* Dialog overlay for centered modal */
.modal-overlay.center {
  align-items: center;
}

/* ── Toast ───────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 28px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 380px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--c-text);
  color: var(--c-bg);
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.toast.success { background: var(--c-success); color: #fff; }
.toast.error   { background: var(--c-error);   color: #fff; }
.toast.warning { background: var(--c-warning);  color: #fff; }

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px); }
}
.toast.hide { animation: toastOut 0.2s ease forwards; }

/* ── Settings Row ────────────────────────────────────────── */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--space-md);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}

.settings-row__label {
  font-size: 15px;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-row__icon {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-primary-lt);
  color: var(--c-primary);
  flex-shrink: 0;
}

/* ── Toggle Switch ───────────────────────────────────────── */
.toggle {
  width: 48px;
  height: 28px;
  background: var(--c-border-2);
  border-radius: var(--r-full);
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle.on { background: var(--c-primary); }

.toggle::before {
  content: 'OFF';
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  font-weight: 800;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.4px;
  pointer-events: none;
  z-index: 1;
  line-height: 1;
}

.toggle.on::before {
  content: 'ON';
  left: 7px;
  right: auto;
  color: rgba(255,255,255,0.9);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.toggle.on::after { transform: translateX(20px); }

/* ── News Card ───────────────────────────────────────────── */
.news-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: background var(--transition);
}

.news-card:active { background: var(--c-surface-2); }

.news-card__img {
  width: 80px;
  height: 80px;
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  object-fit: cover;
  flex-shrink: 0;
  overflow: hidden;
}

.news-card__body { flex: 1; min-width: 0; }

.news-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.news-card__date {
  font-size: 12px;
  color: var(--c-muted);
  margin-top: 6px;
}

/* ── Notification Item ───────────────────────────────────── */
.notif-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: background var(--transition);
}

.notif-item.unread { background: var(--c-primary-lt); }
.notif-item:active { background: var(--c-surface-2); }

.notif-item__icon {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--c-primary-lt);
  color: var(--c-primary);
}

.notif-item__body { flex: 1; min-width: 0; }

.notif-item__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}

.notif-item__desc {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 2px;
}

.notif-item__date {
  font-size: 12px;
  color: var(--c-muted-2);
  margin-top: 4px;
}

.notif-unread-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-primary);
  flex-shrink: 0;
  margin-top: 6px;
}

/* ── Progress / Timeline ─────────────────────────────────── */
.timeline {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: var(--space-md);
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: -8px;
  width: 2px;
  background: var(--c-border);
}

.timeline-item.done::before { background: var(--c-success); }

.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-surface-2);
  border: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--c-muted);
  z-index: 1;
}

.timeline-item.done .timeline-dot {
  background: var(--c-success-lt);
  border-color: var(--c-success);
  color: var(--c-success);
}

.timeline-item.active .timeline-dot {
  background: var(--c-primary-lt);
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.timeline-body {
  flex: 1;
  padding-bottom: var(--space-lg);
}

.timeline-body__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 2px;
}

.timeline-body__date {
  font-size: 12px;
  color: var(--c-muted);
}

/* ── FAQ Accordion ───────────────────────────────────────── */
.faq-item {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
}

.faq-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--space-md);
  cursor: pointer;
  gap: var(--space-md);
}

.faq-item__question {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text);
  flex: 1;
}

.faq-item__arrow {
  color: var(--c-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq-item.open .faq-item__arrow { transform: rotate(180deg); }

.faq-item__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-item__body { max-height: 400px; }

.faq-item__answer {
  padding: 0 var(--space-md) var(--space-md);
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.6;
}

/* ── Avatar ──────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  background: var(--c-primary-lt);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-sm  { width: 32px;  height: 32px;  font-size: 13px; }
.avatar-md  { width: 48px;  height: 48px;  font-size: 18px; }
.avatar-lg  { width: 72px;  height: 72px;  font-size: 26px; }
.avatar-xl  { width: 96px;  height: 96px;  font-size: 34px; }

/* ── Step Indicator ──────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-surface-2);
  border: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}

.step-dot.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.step-dot.done {
  background: var(--c-success);
  border-color: var(--c-success);
  color: #fff;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--c-border);
  transition: background var(--transition);
}

.step-line.done { background: var(--c-success); }

/* ── Data Table ──────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  padding: 10px 12px;
  background: var(--c-surface-2);
  color: var(--c-muted);
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}

.data-table td {
  padding: 10px 12px;
  color: var(--c-text-2);
  border-bottom: 1px solid var(--c-border);
}

.data-table tr:last-child td { border-bottom: none; }

/* ── Info Row (label : value) ────────────────────────────── */
.info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px var(--space-md);
  border-bottom: 1px solid var(--c-border);
  gap: var(--space-md);
}

.info-row:last-child { border-bottom: none; }

.info-row__label {
  font-size: 13px;
  color: var(--c-muted);
  flex-shrink: 0;
  max-width: 45%;
}

.info-row__value {
  font-size: 14px;
  color: var(--c-text);
  font-weight: 500;
  text-align: right;
}

/* ── Bar Chart ───────────────────────────────────────────── */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100px;
  padding: 0 4px;
}

.bar-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.bar-chart__bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height 0.4s ease;
  background: var(--c-primary);
  opacity: 0.75;
}

.bar-chart__bar.active { opacity: 1; }

.bar-chart__label {
  font-size: 9px;
  color: var(--c-muted);
  text-align: center;
  white-space: nowrap;
}

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-page {
  min-height: calc(100% + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
  margin-top: calc(-1 * env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  padding-top: calc(var(--space-xl) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.auth-header {
  margin-bottom: var(--space-xl);
}

.auth-header__back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--c-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  width: fit-content;
}

.auth-page__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-xl);
}

.auth-page__title {
  font-size: 26px;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-page__sub {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.5;
}

/* ── Splash ──────────────────────────────────────────────── */
.splash {
  height: calc(100% + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
  margin-top: calc(-1 * env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--c-primary-dk) 0%, var(--c-primary) 100%);
  color: #fff;
  gap: var(--space-md);
  /* Ensure content clears status bar */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.splash__logo-box {
  width: 160px;
  height: 160px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--r-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.splash__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
}

.splash__sub {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 25px;
  opacity: 0.75;
  letter-spacing: 0.5px;
}

.splash__sub-en {
  font-size: 13px;
  opacity: 0.55;
  letter-spacing: 0.4px;
}

.splash__loader {
  margin-top: var(--space-xl);
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Environment badge ───────────────────────────────────── */
.env-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   Login Screen v2 — Premium redesign
   ═══════════════════════════════════════════════════════════ */

/* Utility */
.lp-hidden { display: none !important; }

/* ── Root layout ─────────────────────────────────────────── */
.lp {
  position: relative;
  height: calc(100% + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
  margin-top: calc(-1 * env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(160deg, var(--c-primary-dk) 0%, var(--c-primary) 55%, rgba(var(--c-primary-rgb),0.75) 100%);
}

/* ── Animated background rings ───────────────────────────── */
.lp-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.lp-bg__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -70%);
  animation: lp-pulse 6s ease-in-out infinite;
}
.lp-bg__ring--lg { width: 420px; height: 420px; animation-delay: 0s; }
.lp-bg__ring--md { width: 300px; height: 300px; animation-delay: 1.5s; border-color: rgba(255,255,255,0.07); }
.lp-bg__ring--sm { width: 180px; height: 180px; animation-delay: 3s; border-color: rgba(255,255,255,0.14); }

@keyframes lp-pulse {
  0%, 100% { transform: translate(-50%, -70%) scale(1);   opacity: 1; }
  50%       { transform: translate(-50%, -70%) scale(1.06); opacity: 0.6; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.lp-hero {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(52px + env(safe-area-inset-top, 0px)) 20px 36px;
  text-align: center;
}

/* ── Language switcher ────────────────────────────────────── */
.lp-lang {
  display: flex;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  padding: 3px;
  gap: 2px;
}

.lp-lang__opt {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-muted);
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  letter-spacing: 0.3px;
}

.lp-lang__opt span { font-size: 14px; }

.lp-lang__opt.active {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--c-primary-rgb),0.3);
}

/* ── Logo ─────────────────────────────────────────────────── */
.lp-hero__logo {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.lp-hero__logo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  animation: lp-spin-slow 20s linear infinite;
}

@keyframes lp-spin-slow {
  to { transform: rotate(360deg); }
}

.lp-hero__logo-icon {
  width: 190px;
  height: 190px;
  background: transparent;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lp-hero__title {
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}

.lp-hero__sub {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
  letter-spacing: 0.2px;
}

/* ── Trust row ────────────────────────────────────────────── */
.lp-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.lp-trust__item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.lp-trust__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
}

/* ── Card (bottom sheet) ──────────────────────────────────── */
.lp-card {
  position: relative;
  z-index: 2;
  flex: 1;
  background: var(--c-surface);
  border-radius: 28px 28px 0 0;
  padding: 12px 24px;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
  animation: lp-slide-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow-y: auto;
}

@keyframes lp-slide-up {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.lp-card__handle {
  width: 36px;
  height: 4px;
  background: var(--c-border-2);
  border-radius: var(--r-full);
  margin: 0 auto 24px;
}

.lp-card__head {
  margin-bottom: 24px;
}

.lp-card__title {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.lp-card__sub {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.5;
}

/* ── Field ────────────────────────────────────────────────── */
.lp-field {
  margin-bottom: 20px;
}

.lp-field__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.lp-field__hint {
  font-size: 12px;
  color: var(--c-muted);
  margin-top: 7px;
  transition: color 0.2s;
}

.lp-field__hint.is-error { color: var(--c-error); }

.lp-field.is-error .lp-input {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

/* ── Input ────────────────────────────────────────────────── */
.lp-input {
  display: flex;
  align-items: center;
  height: 56px;
  background: var(--c-surface-2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.lp-input.is-focused {
  border-color: var(--c-primary);
  background: var(--c-surface);
  box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), 0.12);
}

.lp-input__prefix {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px 0 14px;
  flex-shrink: 0;
}

.lp-input__flag { font-size: 20px; line-height: 1; }

.lp-input__code {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
}

.lp-input__sep {
  width: 1px;
  height: 22px;
  background: var(--c-border-2);
  margin-left: 4px;
}

.lp-input__field {
  flex: 1;
  height: 100%;
  padding: 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--c-text);
  background: transparent;
  letter-spacing: 1.5px;
}

.lp-input__field::placeholder {
  font-size: 15px;
  font-weight: 400;
  color: var(--c-muted-2);
  letter-spacing: 0;
}

.lp-input__clear {
  width: 44px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  flex-shrink: 0;
  transition: color 0.15s;
}

.lp-input__clear:hover { color: var(--c-error); }

/* ── Submit button ────────────────────────────────────────── */
.lp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  background: linear-gradient(135deg, var(--c-primary-dk) 0%, var(--c-primary) 100%);
  color: #fff;
  border-radius: var(--r-lg);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(var(--c-primary-rgb),0.4);
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.lp-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.lp-btn:not(:disabled):hover {
  box-shadow: 0 6px 28px rgba(var(--c-primary-rgb),0.5);
  transform: translateY(-1px);
}

.lp-btn:not(:disabled):active {
  transform: scale(0.98) translateY(0);
  box-shadow: 0 2px 10px rgba(var(--c-primary-rgb),0.35);
}

.lp-btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.lp-btn.is-loading { opacity: 0.85; pointer-events: none; }

.lp-btn__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* ── Spinner (inline in button) ───────────────────────────── */
.lp-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lp-spin 0.7s linear infinite;
}

@keyframes lp-spin {
  to { transform: rotate(360deg); }
}

/* ── OR divider ───────────────────────────────────────────── */
.lp-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.lp-or__line {
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

.lp-or__text {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Social button ────────────────────────────────────────── */
.lp-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-xs);
}

.lp-social:hover {
  background: var(--c-surface-2);
  border-color: var(--c-border-2);
  box-shadow: var(--shadow-sm);
}

.lp-social:active { transform: scale(0.98); }

/* ── Register link ────────────────────────────────────────── */
.lp-register {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--c-muted);
}

.lp-register button {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-primary);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition: opacity 0.15s;
}

.lp-register button:hover { opacity: 0.75; }

/* ── Footer bar (lang + theme + version) ─────────────────── */
.lp-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  flex-wrap: wrap;
  background: var(--c-surface);
}

/* ── Theme toggle button ──────────────────────────────────── */
.lp-theme-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
}

.lp-theme-btn:hover {
  background: var(--c-surface-3);
  box-shadow: var(--shadow-sm);
}

.lp-theme-btn:active { transform: scale(0.92); }

/* ── Version ──────────────────────────────────────────────── */
.lp-version {
  font-size: 11px;
  color: var(--c-muted-2);
  width: 100%;
  text-align: center;
  margin: 0;
}

/* ── Dark theme ───────────────────────────────────────────── */
[data-theme="dark"] .lp {
  background: linear-gradient(160deg, var(--c-primary-dk) 0%, rgba(var(--c-primary-rgb),0.7) 55%, rgba(var(--c-primary-rgb),0.4) 100%);
}

[data-theme="dark"] .lp-card {
  background: var(--c-surface);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
}

[data-theme="dark"] .lp-input {
  background: var(--c-surface-2);
}

[data-theme="dark"] .lp-input.is-focused {
  background: var(--c-surface-3);
}

[data-theme="dark"] .lp-social {
  background: var(--c-surface-2);
}


/* ── Drawer section label ─────────────────────────────────── */
.drawer-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--c-muted);
  padding: 16px 20px 4px;
}

/* ─── Legacy login classes — kept so other screens don't break ─ */
.login-page {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════
   CHINESE NEW YEAR — Component overrides
   ══════════════════════════════════════════════════════════ */

/* Consumer card → CNY deep navy (keeps brand feel, contrasts red app) */
/* Consumer card — deep crimson red with gold foil, true CNY feel */
[data-season="cny"] .consumer-card {
  background: linear-gradient(135deg, #2E0808 0%, #5C1210 42%, #7A1810 72%, #3C0A08 100%);
  border: 1.5px solid rgba(255, 215, 0, 0.38);
  box-shadow: 0 8px 28px rgba(60, 10, 0, 0.60), inset 0 1px 0 rgba(255, 215, 0, 0.18);
}
[data-season="cny"] .consumer-card::before {
  background: rgba(255, 215, 0, 0.10);
}
[data-season="cny"] .consumer-card::after {
  background: rgba(255, 215, 0, 0.06);
}

/* Divider — gold tint instead of white */
[data-season="cny"] .consumer-card__divider {
  background: rgba(255, 215, 0, 0.28);
}

/* Status chip — gold glass */
[data-season="cny"] .consumer-card__status {
  background: rgba(255, 215, 0, 0.14);
  border: 1px solid rgba(255, 215, 0, 0.28);
}

/* Copy consumer-ID chip — gold glass */
[data-season="cny"] #copy-consumer-id {
  background: rgba(255, 215, 0, 0.12) !important;
  border-color: rgba(255, 215, 0, 0.28) !important;
}

/* Card options button (⋮) — gold tint */
[data-season="cny"] #card-options-btn {
  background: rgba(255, 215, 0, 0.12) !important;
  color: rgba(255, 215, 0, 0.85) !important;
}

/* Digital bill & Telegram chips (inactive state) — gold glass */
[data-season="cny"] #digital-bill-btn,
[data-season="cny"] #telegram-btn {
  background: rgba(255, 215, 0, 0.10) !important;
  border-color: rgba(255, 215, 0, 0.22) !important;
}

/* Pay Now button — gold border + gold text */
[data-season="cny"] #pay-now-btn {
  background: rgba(255, 215, 0, 0.16) !important;
  border-color: rgba(255, 215, 0, 0.55) !important;
  color: #FFD700 !important;
}

/* Payment logo containers and icon boxes — warm surface instead of white */
[data-season="cny"] [style*="background:#fff;border:1px solid var(--c-border)"],
[data-season="cny"] [style*="background:#fff; border:1px solid var(--c-border)"] {
  background: var(--c-surface) !important;
}

/* Large success icon containers */
[data-season="cny"] [style*="background:#fff;border-radius:20px"],
[data-season="cny"] [style*="background:#fff; border-radius:20px"],
[data-season="cny"] [style*="background:#fff;border-radius:var(--r-lg)"],
[data-season="cny"] [style*="background:#fff;border-radius:var(--r-xl)"] {
  background: var(--c-surface) !important;
}

/* Active dot indicators on consumer card → gold */
[data-season="cny"] #consumer-card span[style*="var(--c-primary)"] {
  background: #FFD700 !important;
}

/* btn-icon on peach surfaces (sub-screen back buttons, icon buttons in cards) */
[data-season="cny"] .btn-icon {
  background: rgba(139, 98, 0, 0.13);
  color: #6B4A00;
}

/* Customize dashboard button — light text on red background */
[data-season="cny"] #customize-dashboard-btn {
  color: rgba(255, 235, 210, 0.65) !important;
  border-color: rgba(255, 235, 210, 0.22) !important;
}

/* CNY quick action cards — dark red glass matching app bar style */
[data-season="cny"] .db-qa-item {
  background: rgba(120, 18, 5, 0.65) !important;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 215, 0, 0.25) !important;
  box-shadow: 0 4px 16px rgba(60, 5, 0, 0.30);
}
/* Gold icon containers */
[data-season="cny"] #qa-pay-all > div:first-child,
[data-season="cny"] #qa-quick-pay > div:first-child,
[data-season="cny"] #qa-auto-debit > div:first-child,
[data-season="cny"] #qa-bills > div:first-child {
  background: rgba(255, 215, 0, 0.20) !important;
  color: #FFD700 !important;
  border-radius: 50% !important;
}
/* Warm cream label text — clearly readable on dark red glass */
[data-season="cny"] #qa-pay-all > div:last-child,
[data-season="cny"] #qa-quick-pay > div:last-child,
[data-season="cny"] #qa-auto-debit > div:last-child,
[data-season="cny"] #qa-bills > div:last-child {
  color: rgba(255, 248, 225, 0.95) !important;
  font-weight: 700 !important;
}

/* QR center button → bright gold so it pops on the dark red nav */
[data-season="cny"] #qr-scan-btn > div {
  background: #FFD700 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22), 0 6px 20px rgba(255,215,0,0.50), 0 0 0 3px rgba(255,215,0,0.18) !important;
}
[data-season="cny"] #qr-scan-btn > div svg {
  stroke: #5C3F00;
}

/* Bottom nav → warm red glassmorphism */
[data-season="cny"] #bottom-nav {
  background: rgba(160, 45, 8, 0.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 205, 60, 0.18);
  box-shadow:
    0 -4px 24px rgba(120, 20, 0, 0.30),
    inset 0 1px 0 rgba(255, 205, 60, 0.12);
}
[data-season="cny"] .nav-item {
  color: rgba(255, 210, 150, 0.68);
}
[data-season="cny"] .nav-item.active {
  color: #FFD700;
}
[data-season="cny"] .nav-item__badge {
  border-color: rgba(160, 45, 8, 0.88);
}

/* Bottom nav → teal glassmorphism matching KNY background */
[data-season="kny"] #bottom-nav {
  background: rgba(14, 107, 114, 0.88);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 -4px 24px rgba(0, 60, 40, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
[data-season="kny"] .nav-item {
  color: rgba(255, 255, 255, 0.58);
}
[data-season="kny"] .nav-item.active {
  color: rgba(255, 230, 160, 0.95);
}
[data-season="kny"] .nav-item__badge {
  border-color: rgba(14, 107, 114, 0.88);
}

/* ── Startup Popup ───────────────────────────────────────── */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: var(--c-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.popup-overlay--out {
  animation: fadeOut 0.25s ease forwards;
}

@keyframes fadeOut {
  to { opacity: 0; }
}

.popup-card {
  background: var(--c-surface);
  border-radius: var(--r-2xl);
  width: 100%;
  max-width: 400px;
  max-height: 88dvh;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: scaleIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

.popup-image-area {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--c-surface-2);
}

.popup-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-select: none;
}

.popup-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.popup-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s, width 0.2s;
}

.popup-dot.active {
  background: #fff;
  width: 18px;
}

.popup-close-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s;
}
.popup-close-x:active { background: rgba(0, 0, 0, 0.55); }

.popup-body {
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.popup-footer {
  padding: var(--space-sm) var(--space-lg) max(env(safe-area-inset-bottom, 0px), var(--space-md));
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  flex-shrink: 0;
}

.popup-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.35;
  margin: 0;
}

.popup-desc {
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.65;
  margin: 0;
}

