:root {
  --bg: #fbf7f0;
  --bg-alt: #f4ecdc;
  --panel: #ffffff;
  --border: #e9ddc4;
  --text: #15120d;
  --text-dim: #857a63;
  --gold: #d9291f;
  --gold-light: #e85a4f;
  --gold-deep: #a81f17;
  --glow: rgba(217, 41, 31, 0.25);
  --metal-gold: #b8860b;
  --metal-gold-bg: #fbf3dd;
  --metal-gold-border: #ecd9a0;
  --diamond: #2f6fb0;
  --diamond-bg: #eaf3fb;
  --diamond-border: #bcdcf4;
  --labour: #2f7d5c;
  --labour-bg: #eaf5ef;
  --labour-border: #c3e3d3;
  --wastage: #8a5a7a;
  --wastage-bg: #f8eef5;
  --wastage-border: #e7d1e0;
  --metallic-1: #f5efe0;
  --metallic-2: #ddd0b0;
  --metallic-3: #c2b28c;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, #2a241a 0%, #17140f 55%, #0c0a07 100%);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 40px 20px;
}

.stage-label {
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ===================== ANDROID PHONE FRAME ===================== */
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  background: #0b0b0d;
  border-radius: 46px;
  padding: 12px;
  box-shadow:
    0 40px 90px -20px rgba(0,0,0,0.65),
    0 0 0 2px rgba(255,255,255,0.04) inset,
    0 0 0 1px rgba(0,0,0,0.9);
}

.phone-punchhole {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.03);
  z-index: 40;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 36px;
  overflow: hidden;
}

.statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 22px;
  z-index: 30;
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
  pointer-events: none;
}
.sb-icons { display: flex; align-items: center; gap: 6px; }

.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 4px;
  border-radius: 4px;
  background: var(--text);
  opacity: 0.55;
  z-index: 40;
}

/* ===================== SCREENS ===================== */
.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  /* no opacity transition here on purpose: the outgoing screen must snap to
     hidden immediately on goForward, otherwise it keeps fading out while the
     incoming screen's enter-right animation fades in on top of it, and the
     two semi-transparent screens visibly ghost/blend into each other */
}

/* native-app feel: no visible scrollbars on any scrolling surface */
.screen, .home-scroll, .rev-card-scroll, .inv-page-wrap, .inv-table-wrap {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.screen::-webkit-scrollbar, .home-scroll::-webkit-scrollbar, .rev-card-scroll::-webkit-scrollbar,
.inv-page-wrap::-webkit-scrollbar, .inv-table-wrap::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.screen.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

/* ================= SPLASH — premium light reveal ================= */
.screen.splash {
  background: linear-gradient(160deg, #fffdf9 0%, var(--bg) 55%, var(--bg-alt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.screen.splash.exit {
  transform: scale(1.04);
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(.4,0,.6,1), transform 0.5s cubic-bezier(.4,0,.6,1);
}

.splash-glow {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at 50% 46%, rgba(217,41,31,0.10), transparent 58%);
  opacity: 0;
  animation: glowIn 1.6s ease forwards;
}
@keyframes glowIn {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0.85; }
}

/* ---- ambient gold dust ---- */
.dust { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.mote {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-light), transparent 70%);
  opacity: 0;
  animation: moteDrift 3.6s ease-in-out infinite;
  animation-delay: var(--md, 0s);
}
@keyframes moteDrift {
  0%   { opacity: 0; transform: translateY(14px) scale(0.6); }
  20%  { opacity: 0.7; }
  80%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-46px) scale(1); }
}

/* ---- reticle: refined thin focus-lock, scoped to logo-stage so it always frames the card ---- */
.reticle-lite {
  position: absolute; z-index: 7;
  width: 300px; height: 75px;
  top: 50%; left: 50%;
  margin: -37px 0 0 -150px;
  opacity: 0;
  animation: rlIn 0.42s ease-out forwards;
}
.rl-corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 1.5px solid var(--gold-deep);
  opacity: 0.8;
}
.rl-tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.rl-tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.rl-br { bottom: 0; right: 0; border-left: none; border-top: none; }
.rl-bl { bottom: 0; left: 0; border-right: none; border-top: none; }
@keyframes rlIn {
  0%   { opacity: 0; transform: scale(1.25); }
  100% { opacity: 0.8; transform: scale(1); }
}
.reticle-lite.settle {
  animation: rlSettle 0.45s cubic-bezier(.4,0,.6,1) forwards;
}
@keyframes rlSettle {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.88); }
}

/* scan-line sweeping inside the frame — perfectly locked to the logo's clip-reveal below
   (same delay/duration/easing on both = the line IS what's revealing the logo, not a separate effect) */
.rl-scanline {
  position: absolute;
  left: 2%; right: 2%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 15%, #fff 50%, var(--gold) 85%, transparent);
  box-shadow: 0 0 14px 3px rgba(217,41,31,0.6);
  opacity: 0;
  animation: scanSweep 0.9s cubic-bezier(.45,0,.55,1) forwards;
  animation-delay: 0.25s;
}
.rl-scanline::after {
  content: '';
  position: absolute; left: 0; right: 0; top: -18px; height: 18px;
  background: linear-gradient(180deg, transparent, rgba(217,41,31,0.14));
}
@keyframes scanSweep {
  0%   { top: 4%; opacity: 0; }
  6%   { opacity: 1; }
  94%  { opacity: 1; }
  100% { top: 96%; opacity: 0; }
}

.splash-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ---- logo card: real object drop + settle ---- */
.logo-stage {
  position: relative;
  perspective: 1200px;
  width: 300px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ground-shadow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 150px; height: 20px;
  transform: translateX(-50%) scaleX(0.4);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(21,18,13,0.28), transparent 72%);
  opacity: 0;
  animation: shadowIn 0.7s cubic-bezier(.3,.6,.3,1) forwards;
  animation-delay: 0.3s;
}
@keyframes shadowIn {
  0%   { opacity: 0; transform: translateX(-50%) scaleX(0.2); }
  100% { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

.logo-card-wrap {
  position: relative;
  width: 270px;
  transform-style: preserve-3d;
  filter: drop-shadow(0 18px 24px rgba(21,18,13,0.16));
  /* clip-path reveal is driven by the exact same delay/duration/easing as .rl-scanline above,
     so the scan-line's position always matches the reveal edge — the line IS what's scanning the logo in. */
  animation-name: cardDrop, cardFloat;
  animation-duration: 0.9s, 4.8s;
  animation-timing-function: cubic-bezier(.45,0,.55,1), ease-in-out;
  animation-delay: 0.25s, 1.15s;
  animation-iteration-count: 1, infinite;
  animation-fill-mode: forwards, none;
}
@keyframes cardDrop {
  0%   { clip-path: inset(0 0 100% 0); transform: rotateX(16deg) rotateY(-12deg) scale(0.93); }
  100% { clip-path: inset(0 0 0% 0); transform: rotateX(4deg) rotateY(-9deg) scale(1); }
}
@keyframes cardFloat {
  0%, 100% { transform: rotateX(4deg) rotateY(-9deg) translateY(0); }
  50%      { transform: rotateX(2deg) rotateY(-6deg) translateY(-3px); }
}

.logo-card { width: 100%; height: auto; display: block; overflow: visible; }

.card-shimmer {
  position: absolute; inset: -15% -10%;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.75) 48%, rgba(255,255,255,0.95) 51%, rgba(255,255,255,0.75) 54%, transparent 66%);
  mix-blend-mode: overlay;
  transform: translateX(-150%) rotate(6deg);
  opacity: 0;
  animation-name: shimSweep, shimLoop;
  animation-duration: 0.6s, 3.2s;
  animation-timing-function: ease-out, ease-in-out;
  animation-delay: 1.3s, 1.9s;
  animation-iteration-count: 1, infinite;
  animation-fill-mode: forwards, none;
}
@keyframes shimSweep {
  0%   { opacity: 0; transform: translateX(-150%) rotate(6deg); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(150%) rotate(6deg); }
}
@keyframes shimLoop {
  0%, 78%, 100% { opacity: 0; transform: translateX(-150%) rotate(6deg); }
  88%           { opacity: 0.6; }
  97%           { opacity: 0; transform: translateX(150%) rotate(6deg); }
}

.mini-tag { width: 128px; height: auto; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- AUTH SCREENS ---- */
.screen.login, .screen.signup, .screen.home, .screen.forgot-mpin, .screen.profile-verify {
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.screen.login, .screen.signup { transform: translateX(0); }
.screen.signup.enter { animation: slideUpIn 0.6s cubic-bezier(.16,.84,.44,1) forwards; }

.screen.enter-right { animation: slideInRight 0.4s cubic-bezier(.16,.84,.44,1) forwards; }
.screen.exit-right { animation: slideOutRight 0.35s cubic-bezier(.6,0,.9,.4) forwards; }
.screen.enter-left { animation: slideInLeft 0.4s cubic-bezier(.16,.84,.44,1) forwards; }

@keyframes slideUpIn {
  from { transform: translateY(28px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-40px); opacity: 0; }
}
@keyframes slideInLeft {
  from { transform: translateX(-40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.auth-scroll {
  position: relative;
  padding: 92px 28px 40px;
  min-height: 100%;
}

.auth-brand { margin-bottom: 28px; }
.auth-brand .mini-tag { filter: drop-shadow(0 6px 12px rgba(21,18,13,0.15)); }
.mini-tag-lg { width: 168px; }

.back-btn {
  position: absolute;
  top: 54px;
  left: 28px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 20px;
}

.screen.signup { scrollbar-width: none; -ms-overflow-style: none; }
.screen.signup::-webkit-scrollbar { display: none; }

.auth-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}
.screen.signup .auth-title {
  margin: 0 -28px 20px;
  padding: 16px 28px 12px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
.auth-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 4px 0 18px;
  letter-spacing: -0.01em;
}

#gstSectionCollapse, #mpinSectionCollapse { scroll-margin-top: 96px; }

.account-popup-backdrop {
  position: absolute; inset: 0;
  z-index: 44;
  background: rgba(21,18,13,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.account-popup-backdrop.show { opacity: 1; pointer-events: auto; }

.success-toast.center-popup {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  z-index: 45;
  width: calc(100% - 56px);
  max-width: 320px;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(.2,.8,.25,1), transform 0.3s cubic-bezier(.2,.8,.25,1);
}
.success-toast.center-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.auth-sub {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 30px;
  line-height: 1.5;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.field input {
  height: 50px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: #fff;
  padding: 0 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--glow);
}
.field input::placeholder { color: #b8ac8f; }
.field select {
  height: 50px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: #fff;
  padding: 0 40px 0 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23857a63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--glow); }

.field-error {
  display: none;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gold-deep);
  margin-top: -1px;
}
.field.invalid input,
.field.invalid .input-wrap input {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 4px var(--glow);
}
.field.invalid .field-error { display: block; }
.login-error { text-align: center; margin-top: -6px; }
.login-error.show { display: block; }

.signup-autohint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.4;
  margin-top: 2px;
  transition: color 0.2s ease;
}

.input-wrap { position: relative; }
.input-wrap input { width: 100%; padding-right: 46px; }
.eye-btn {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 8px;
}
.eye-btn:hover { background: var(--bg-alt); color: var(--text); }
.eye-icon { width: 20px; height: 20px; }
.icon-eye { display: none; }
.eye-btn.showing .icon-eye { display: block; }
.eye-btn.showing .icon-eye-off { display: none; }

/* ---- inline verify button + OTP (progressive disclosure, kept compact) ---- */
.input-wrap.has-verify input { padding-right: 92px; }
.verify-btn {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--gold-deep);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.verify-btn:hover { background: #fff; border-color: var(--gold); }
.verify-btn:disabled { opacity: 0.55; cursor: default; }

.otp-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(.4,0,.2,1);
}
.otp-collapse.open { grid-template-rows: 1fr; }
.otp-collapse .otp-inner { overflow: hidden; min-height: 0; }
.otp-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 16px;
  margin: 2px 0 2px;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.otp-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
}

.otp-digits { display: flex; gap: 8px; justify-content: space-between; }
.otp-digit {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 44px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.otp-digit:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--glow); }
.otp-digit.filled { border-color: rgba(21,18,13,0.3); }

.otp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.otp-meta b { color: var(--text); }
.resend-link {
  display: none;
  color: var(--gold-deep);
  font-weight: 700;
  text-decoration: none;
}
.resend-link.active { display: inline; }

/* ---- MPIN entry (4-digit boxes + show/hide toggle) ---- */
.mpin-row { display: flex; align-items: center; gap: 10px; }
.mpin-digits { display: flex; gap: 10px; flex: 1; }
.mpin-digits .mpin-digit { max-width: 56px; }
.mpin-eye-btn { position: static; transform: none; flex-shrink: 0; }

.otp-box.shake, .shake { animation: otpShake 0.4s ease; }
@keyframes otpShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* ---- GST verification screen ---- */
.gst-hint {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.gst-input { text-transform: uppercase; letter-spacing: 0.05em; }

.gst-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(.4,0,.2,1);
}
.gst-collapse.open { grid-template-rows: 1fr; }
.gst-collapse .gst-inner { overflow: hidden; min-height: 0; }
.gst-result-card {
  margin-top: 4px;
  padding: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gst-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.85rem;
}
.gst-result-row span { color: var(--text-dim); flex-shrink: 0; }
.gst-result-row b { color: var(--text); text-align: right; font-weight: 700; }
.gst-status-active { color: #1a8a4a !important; }

/* ---- generic reveal-after-OTP collapse (forgot user id / forgot password) ---- */
.reveal-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(.4,0,.2,1);
}
.reveal-collapse.open { grid-template-rows: 1fr; }
.reveal-collapse .reveal-inner {
  overflow: hidden; min-height: 0; padding-top: 4px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.2,.8,.25,1);
}
.reveal-collapse.open .reveal-inner { opacity: 1; transform: translateY(0); }

.recovered-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 20px;
  margin-bottom: 18px;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 14px;
  text-align: center;
}
.recovered-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.recovered-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--gold-deep);
  letter-spacing: 0.15em;
}

.success-toast {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #15120d;
  color: #fffdf9;
  border-radius: 16px;
  box-shadow: 0 14px 28px -14px rgba(21,18,13,0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.2,.8,.25,1);
}
.success-toast.show { opacity: 1; transform: translateY(0); }
.success-check {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #1a8a4a;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.success-toast p { font-size: 0.85rem; font-weight: 600; line-height: 1.35; }

/* ==================== HOME / DASHBOARD (matches real app structure) ==================== */
.screen.home { overflow: hidden; display: flex; flex-direction: column; }
.home-scroll { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 56px 20px 96px; }

.dash-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.dash-icon-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 50%; border: none;
  background: var(--bg-alt);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.dash-brand {
  flex: 1;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.02rem;
  font-weight: 700;
}
.dash-bell-btn { position: relative; }
.dash-bell-dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-deep);
  border: 1.5px solid var(--bg);
  display: none;
}
.dash-bell-dot.show { display: block; }

.dash-wishlist-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.74rem; font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
}

.dash-top-row { display: flex; gap: 10px; margin-bottom: 14px; }
.dash-trial-tile {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 16px;
  padding: 14px 16px;
  overflow: hidden;
  background: linear-gradient(150deg, #e0897c 0%, #c25f4e 55%, #a8483a 100%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 10px 22px -14px rgba(60,20,15,0.55);
  color: rgba(255,255,255,0.96);
}
.dash-trial-tile::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.03) 35%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}
.dash-trial-tile > * { position: relative; z-index: 1; }
.dash-trial-msg { font-size: 0.78rem; font-weight: 700; line-height: 1.3; }
.dash-trial-cta {
  align-self: flex-start;
  border: none; background: rgba(255,255,255,0.22);
  color: #fff; font-family: inherit; font-weight: 700; font-size: 0.68rem;
  border-radius: 999px; padding: 5px 10px; cursor: pointer;
}
.dash-time-tile {
  position: relative;
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 16px;
  padding: 14px 14px;
  overflow: hidden;
  background: linear-gradient(155deg, var(--metallic-1) 0%, var(--metallic-2) 55%, var(--metallic-3) 100%);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 10px 20px -14px rgba(120,100,65,0.4);
  color: var(--text);
  min-width: 84px;
}
.dash-time-tile::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.1) 35%, rgba(255,255,255,0) 58%);
  pointer-events: none;
}
.dash-time-tile > * { position: relative; z-index: 1; }
.dash-trial-day { font-size: 0.62rem; font-weight: 700; opacity: 0.7; letter-spacing: 0.04em; }
.dash-trial-date { font-size: 0.8rem; font-weight: 700; text-align: center; }
.dash-trial-time { font-size: 0.65rem; opacity: 0.75; font-weight: 600; }

.dash-mcx-card {
  display: flex; flex-direction: column;
  border-radius: 14px;
  padding: 10px 12px 9px;
  margin-bottom: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.dash-mcx-row { display: flex; align-items: center; justify-content: space-between; }
.dash-mcx-label-block { display: flex; flex-direction: column; gap: 1px; }
.dash-mcx-label { font-size: 0.86rem; font-weight: 600; color: #6b6150; }
.dash-mcx-sub { font-size: 0.72rem; font-weight: 600; color: var(--text-dim); }
.dash-mcx-value { font-size: 1.2rem; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.dash-mcx-sources:empty { display: none; }
.dash-mcx-sources { margin-top: 8px; border-top: 1px solid rgba(21,18,13,0.12); }
.dash-src { padding-top: 8px; }
.dash-src + .dash-src { margin-top: 8px; border-top: 1px dashed rgba(21,18,13,0.14); }
.dash-src-badla { display: flex; gap: 8px; font-variant-numeric: tabular-nums; }
.dash-badge {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 6px 4px 5px;
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.dash-badge b { font-size: 1.08rem; font-weight: 800; color: var(--text); line-height: 1.25; white-space: nowrap; }
.dash-badge small { font-size: 0.7rem; font-weight: 700; color: #6b6150; line-height: 1.2; }
.dash-src-by { display: block; margin-top: 5px; text-align: center; font-size: 0.72rem; font-weight: 700; color: #6b6150; line-height: 1.2; }


/* ---- live rate cards (Home + Dashboard Settings), fed by the gold-rate-tracker API ---- */
.rc-list { display: flex; flex-direction: column; gap: 12px; }
.rc-card {
  position: relative;
  display: block;
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rc-name { font-size: 0.95rem; font-weight: 800; color: var(--text); }
.rc-sub { display: block; margin-top: 2px; font-size: 0.68rem; font-weight: 600; color: var(--text-dim); }
.rc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rc-table th {
  text-align: right; padding-bottom: 6px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim);
}
.rc-table th:first-child { text-align: left; }
.rc-table td { padding: 9px 0; border-top: 1px solid var(--border); }
.rc-table td.rc-label { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.rc-table td.rc-sell { text-align: right; font-size: 1rem; font-weight: 800; color: var(--metal-gold); }
.rc-na { color: var(--text-dim); font-weight: 400; }
.rc-badla { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.rc-badla-title { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.rc-badla-items { display: flex; gap: 22px; }
.rc-badla-items small { display: block; font-size: 0.66rem; font-weight: 600; color: var(--text-dim); margin-bottom: 1px; }
.rc-badla-items b { font-size: 1.1rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

.rc-list-settings .rc-card { cursor: pointer; }
.rc-list-settings .rc-card:has(.ds-check:checked) { border-color: var(--metal-gold); box-shadow: 0 8px 20px -14px rgba(184,134,11,0.6); }
.rc-list-settings { margin-bottom: 18px; }

.floating-nav {
  position: absolute;
  left: 20px; right: 20px;
  bottom: 22px;
  z-index: 35;
  display: flex;
  gap: 4px;
  background: #fffdf9;
  border-radius: 28px;
  padding: 8px 10px;
  box-shadow: 0 14px 30px -12px rgba(21,18,13,0.28);
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.floating-nav.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.dash-tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim);
  padding: 4px 0;
  border-radius: 18px;
}
.dash-tab b { font-size: 0.62rem; font-weight: 600; }
.dash-tab.active { color: var(--gold-deep); }

/* ==================== SETTINGS / MENU (full-page, opened from hamburger) ==================== */
.screen.settings { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.set-scroll { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 52px 20px 96px; }

.set-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.set-header-title { font-size: 1.15rem; font-weight: 700; }

.set-profile-banner {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  border-radius: 20px;
  padding: 18px 18px;
  margin-bottom: 22px;
  overflow: hidden;
  background: linear-gradient(150deg, #e0897c 0%, #c25f4e 55%, #a8483a 100%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 10px 22px -14px rgba(60,20,15,0.55);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.set-profile-banner:active { transform: scale(0.98); }
.set-profile-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.03) 35%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}
.set-profile-banner > * { position: relative; z-index: 1; }
.set-avatar {
  flex-shrink: 0;
  width: 58px; height: 58px; border-radius: 50%;
  background: #fff; color: var(--gold-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem; font-weight: 800;
  box-shadow: 0 4px 10px -4px rgba(0,0,0,0.3);
}
.set-profile-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; color: #fff; }
.set-biz-name { font-size: 1rem; font-weight: 800; line-height: 1.25; }
.set-biz-sub { font-size: 0.75rem; opacity: 0.85; font-weight: 600; }
.set-profile-banner svg { color: rgba(255,255,255,0.85); flex-shrink: 0; }
.set-profile-edit-btn {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.16);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.set-profile-edit-btn:active { transform: scale(0.92); background: rgba(255,255,255,0.26); }

.set-menu-list { display: flex; flex-direction: column; gap: 12px; }
.set-menu-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  box-shadow: 0 3px 10px -6px rgba(21,18,13,0.15);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.set-menu-item:active { transform: scale(0.98); box-shadow: 0 1px 4px -2px rgba(21,18,13,0.15); }
.set-menu-icon {
  flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
}
.set-menu-icon-glyph { font-size: 1.15rem; font-weight: 800; font-family: 'Playfair Display', Georgia, serif; }
.set-menu-label { flex: 1; min-width: 0; font-size: 0.94rem; font-weight: 800; color: var(--text); }
.set-menu-chevron { flex-shrink: 0; color: var(--text-dim); }

.set-menu-icon-diamond .set-menu-icon { background: var(--diamond-bg); color: var(--diamond); }
.set-menu-icon-gold .set-menu-icon { background: var(--metal-gold-bg); color: var(--metal-gold); }
.set-menu-icon-red .set-menu-icon { background: rgba(217,41,31,0.12); color: var(--gold-deep); }
.set-menu-logout .set-menu-icon { background: rgba(217,41,31,0.12); color: var(--gold-deep); }
.set-menu-logout .set-menu-label { color: var(--gold-deep); }

/* ==================== DASHBOARD SETTINGS (rate-card visibility toggles) ==================== */
.screen.dash-settings, .screen.dash-settings-menu, .screen.gold-rate-view { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.ds-add-bullion-btn {
  width: 100%; height: 48px; margin-top: 14px; border-radius: 999px;
  border: none; background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #fff; font-family: inherit; font-weight: 800; font-size: 0.88rem;
  cursor: pointer; box-shadow: 0 10px 22px -10px var(--glow);
  transition: transform 0.12s ease;
}
.ds-add-bullion-btn:active { transform: scale(0.97); }
.ds-hint { font-size: 0.78rem; color: var(--text-dim); line-height: 1.4; margin-bottom: 16px; }
.ds-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.ds-card-spaced { margin-bottom: 14px; }
.ds-section-head {
  background: var(--bg-alt);
  color: var(--text-dim);
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 9px 16px;
}
.ds-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.ds-row-last { border-bottom: none; }
.ds-row span { font-size: 0.86rem; font-weight: 600; color: var(--text); }
.ds-check {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  border: 1.5px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ds-check:checked {
  background-color: var(--metal-gold);
  border-color: var(--metal-gold);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 13l4 4L19 7' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px;
}
.ds-radio {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--border);
  background-color: var(--panel);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.ds-radio:checked {
  border-color: var(--metal-gold);
  background-image: radial-gradient(circle, var(--metal-gold) 42%, transparent 44%);
}
.ds-card.emp-perm-block { margin-bottom: 14px; }

.perm-dropdown-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-alt);
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  padding: 11px 16px;
}
.perm-dropdown-title {
  color: var(--text-dim);
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.4;
}
.perm-dropdown-meta { flex-shrink: 0; display: flex; align-items: center; }
.perm-dropdown-chevron { color: var(--text-dim); flex-shrink: 0; transition: transform 0.25s ease; }
.perm-dropdown-head.open .perm-dropdown-chevron { transform: rotate(90deg); }
.perm-dropdown-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.perm-dropdown-body.show { max-height: 1000px; }

/* ==================== FAQs ==================== */
.faq-search-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.faq-search {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--text-dim);
}
.faq-search input {
  flex: 1; border: none; background: none; outline: none;
  font-family: inherit; font-size: 0.85rem; color: var(--text);
}
.faq-search input::placeholder { color: var(--text-dim); }
.faq-search-clear {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: var(--bg-alt); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.faq-search-clear[hidden] { display: none; }

.faq-lang-wrap { position: relative; flex-shrink: 0; }
.faq-lang-btn {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.12s ease;
}
.faq-lang-btn:active { transform: scale(0.93); }
.faq-lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 130px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 30px -14px rgba(21,18,13,0.3);
  z-index: 30;
}
.faq-lang-menu[hidden] { display: none; }
.faq-lang-opt {
  display: block; width: 100%; text-align: left;
  padding: 12px 16px;
  background: none; border: none;
  font-family: inherit; font-size: 0.84rem; font-weight: 600; color: var(--text);
  cursor: pointer;
}
.faq-lang-opt.active { color: var(--gold-deep); font-weight: 800; background: var(--bg-alt); }
.faq-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.faq-list[hidden] { display: none; }

.faq-section-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.faq-section-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-alt);
  border: none; text-align: left;
  cursor: pointer; font-family: inherit;
  padding: 13px 16px;
}
.faq-section-title {
  font-size: 0.72rem; font-weight: 800; color: var(--gold-deep);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.faq-section-chevron { flex-shrink: 0; color: var(--text-dim); transition: transform 0.25s ease; }
.faq-section-head.open .faq-section-chevron { transform: rotate(90deg); }
.faq-section-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-section-body.show { max-height: 3000px; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q-head {
  width: 100%;
  display: flex; align-items: flex-start; gap: 10px;
  background: none; border: none; text-align: left;
  cursor: pointer; font-family: inherit;
  padding: 13px 16px;
}
.faq-q-num { flex-shrink: 0; font-size: 0.86rem; font-weight: 800; color: var(--gold-deep); }
.faq-q-text { flex: 1; font-size: 0.86rem; font-weight: 700; color: var(--text); line-height: 1.4; }
.faq-chevron { flex-shrink: 0; color: var(--text-dim); margin-top: 2px; transition: transform 0.25s ease; }
.faq-q-head.open .faq-chevron { transform: rotate(90deg); }
.faq-a-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a-body.show { max-height: 600px; }
.faq-a-text { padding: 0 16px 15px 40px; font-size: 0.82rem; color: var(--text-dim); line-height: 1.55; }
.faq-empty { text-align: center; font-size: 0.82rem; color: var(--text-dim); padding: 30px 0; }

/* ==================== BUSINESS PROFILE ==================== */
.screen.biz-profile { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.set-profile-banner-static { cursor: default; }
.set-profile-banner-static:active { transform: none; }
.bp-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.bp-card-head {
  background: var(--bg-alt);
  color: var(--text-dim);
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 9px 16px;
}
.bp-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.bp-row-last { border-bottom: none; }
.bp-row span { font-size: 0.78rem; color: var(--text-dim); font-weight: 600; flex-shrink: 0; }
.bp-row b { font-size: 0.86rem; color: var(--text); font-weight: 700; text-align: right; }

/* ==================== WISHLIST ==================== */
.screen.wishlist { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.wl-top { display: flex; margin-bottom: 14px; }
.wl-close-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--text); cursor: pointer;
}
.wl-title-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.wl-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.6rem; font-weight: 800; }
.wl-clear-link { font-size: 0.78rem; font-weight: 600; color: var(--text-dim); text-decoration: none; }
.wl-list { display: flex; flex-direction: column; gap: 12px; }
.wl-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.wl-card:active { transform: scale(0.98); }
.wl-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wl-card-title { font-size: 0.92rem; font-weight: 800; color: var(--text); }
.wl-card-time { font-size: 0.7rem; color: var(--text-dim); font-weight: 600; flex-shrink: 0; }
.wl-card-divider { height: 1px; background: var(--border); margin: 10px 0; }
.wl-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wl-price-pill {
  display: flex; flex-direction: column;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #fff;
  border-radius: 999px;
  padding: 7px 14px;
}
.wl-price-pill b { font-size: 0.82rem; font-weight: 700; }
.wl-price-pill small { font-size: 0.62rem; opacity: 0.85; font-weight: 600; }
.wl-delete-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  border: none; background: rgba(217,41,31,0.1); color: var(--gold-deep);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.wl-empty { display: none; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 60px 20px; }
.wl-empty.show { display: flex; }
.wl-empty-title { font-size: 1rem; font-weight: 800; color: var(--text); }
.wl-empty-sub { font-size: 0.8rem; color: var(--text-dim); line-height: 1.4; max-width: 240px; }

/* ==================== MASTERS / MASTERS -> RATES (nav-only list screens) ==================== */
.screen.master-rates { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.set-header-titles { display: flex; flex-direction: column; gap: 2px; }
.set-header-sub { font-size: 0.72rem; font-weight: 600; color: var(--text-dim); }

.mst-list { display: flex; flex-direction: column; gap: 10px; }
.mst-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.mst-row:active { transform: scale(0.98); }
.mst-row span { font-size: 0.9rem; font-weight: 800; color: var(--text); }
.mst-row svg { flex-shrink: 0; color: var(--text-dim); }

/* ==================== EMPLOYEE MANAGER ==================== */
.screen.emp-list, .screen.emp-add, .screen.emp-credentials, .screen.emp-permissions, .screen.emp-mpin, .screen.mpin-manager, .screen.emp-detail {
  background: var(--bg); overflow: hidden; display: flex; flex-direction: column;
}

.emp-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 14px;
  margin-bottom: 16px;
  color: var(--text-dim);
}
.emp-search input {
  flex: 1; border: none; background: none; outline: none;
  font-family: inherit; font-size: 0.85rem; color: var(--text);
}
.emp-search input::placeholder { color: var(--text-dim); }

.emp-cards { display: flex; flex-direction: column; gap: 10px; padding-bottom: 60px; }
.emp-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.emp-card:active { transform: scale(0.98); }
.emp-avatar {
  flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--metal-gold-bg); color: var(--metal-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 800;
}
.emp-avatar-lg { width: 64px; height: 64px; font-size: 1.15rem; }
.emp-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.emp-card-name { font-size: 0.88rem; font-weight: 800; color: var(--text); }
.emp-card-desig { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }
.emp-card-perm-btn {
  flex-shrink: 0;
  background: var(--bg-alt);
  border: 1px solid var(--metal-gold-border);
  color: var(--gold-deep);
  font-family: inherit; font-weight: 700; font-size: 0.68rem;
  border-radius: 999px;
  padding: 9px 13px;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.emp-card-perm-btn:active { transform: scale(0.94); }

.screen.emp-credentials .emp-form-card { margin-top: 14px; margin-bottom: 14px; }
.emp-cred-note { font-size: 0.78rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 16px; }
.emp-cred-share-btn {
  width: 100%; height: 50px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--gold-deep); font-family: inherit; font-weight: 700; font-size: 0.86rem;
  cursor: pointer; margin-bottom: 14px;
  transition: transform 0.12s ease;
}
.emp-cred-share-btn:active { transform: scale(0.97); }

.emp-fab {
  position: absolute; right: 20px; bottom: 100px; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #fff;
  border: none; border-radius: 999px;
  padding: 14px 18px;
  font-family: inherit; font-weight: 700; font-size: 0.82rem;
  box-shadow: 0 14px 26px -10px var(--glow);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.emp-fab:active { transform: scale(0.96); }

.emp-form-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}
.emp-form-body { padding: 16px; display: flex; flex-direction: column; gap: 16px; }

.bp-row-action { display: flex; align-items: center; gap: 10px; }
.bp-edit-btn {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: var(--bg-alt); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.emp-profile-head {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.emp-profile-name { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.emp-profile-actions { display: flex; gap: 10px; }
.emp-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--panel); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.emp-icon-btn-danger { color: var(--gold-deep); border-color: rgba(217,41,31,0.25); background: rgba(217,41,31,0.08); }

.emp-status-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
}
.emp-status-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.emp-status-title { font-size: 0.88rem; font-weight: 800; color: var(--text); }
.emp-status-sub { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }
.emp-switch { position: relative; flex-shrink: 0; width: 46px; height: 26px; display: block; cursor: pointer; }
.emp-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.emp-switch-track {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.emp-switch-track::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
.emp-switch input:checked + .emp-switch-track { background: var(--metal-gold); }
.emp-switch input:checked + .emp-switch-track::after { transform: translateX(20px); }

/* ==================== INVOICE GENERATION / PREVIEW ==================== */
.screen.invoice-gen, .screen.invoice-preview { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }

.inv-page-wrap {
  position: relative;
  background: transparent;
  padding: 0;
  margin-bottom: 14px;
  touch-action: pan-x pan-y;
}
.inv-sheet {
  background: #fff;
  color: #101010;
  font-family: Arial, Helvetica, sans-serif;
  border: 1.5px solid #000;
  border-radius: 0;
  padding: 0;
  display: flex; flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: calc(480px * 297 / 210);
  box-shadow: 0 8px 24px -6px rgba(21,18,13,0.22);
  zoom: 1;
  transform-origin: top center;
}
.inv-sheet-top {
  display: flex; justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid #000;
  font-size: 0.6rem; font-weight: 700; color: #000;
  text-transform: none; letter-spacing: 0;
}
.inv-sheet-brand {
  text-align: center; display: flex; flex-direction: column; gap: 3px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid #000;
}
.inv-tax-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #333; }
.inv-sheet-brand h2 { font-family: Arial, Helvetica, sans-serif; font-size: 1.2rem; font-weight: 800; color: #000; letter-spacing: 0.01em; }
.inv-address { font-size: 0.64rem; color: #333; line-height: 1.4; }

.inv-divider { display: none; }

.inv-meta-row { display: flex; border-bottom: 1px solid #000; }
.inv-meta-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 7px 10px; }
.inv-meta-col:first-child { border-right: 1px solid #000; }
.inv-meta-item { display: flex; justify-content: space-between; gap: 6px; font-size: 0.64rem; }
.inv-meta-item span { color: #333; }
.inv-meta-item b { color: #000; font-weight: 700; }

.inv-block { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-bottom: 1px solid #000; }
.inv-block-label { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #000; margin-bottom: 2px; }
.inv-billed-name { font-size: 0.82rem; font-weight: 800; color: #000; }
.inv-billed-line { font-size: 0.66rem; color: #222; line-height: 1.4; }

.inv-table-wrap { overflow-x: auto; border-bottom: 1px solid #000; }
.inv-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.56rem; }
.inv-table th {
  text-align: left; font-weight: 700; color: #000;
  padding: 4px 4px; border: 1px solid #000; background: #eee;
  text-transform: none; font-size: 0.52rem; letter-spacing: 0;
  white-space: normal; word-break: break-word; line-height: 1.25;
}
.inv-table td { padding: 4px 4px; border: 1px solid #333; color: #000; white-space: normal; word-break: break-word; line-height: 1.3; }
.inv-table th:nth-child(1), .inv-table td:nth-child(1) { width: 7%; }
.inv-table th:nth-child(2), .inv-table td:nth-child(2) { width: 30%; }
.inv-table th:nth-child(3), .inv-table td:nth-child(3) { width: 17%; }
.inv-table th:nth-child(4), .inv-table td:nth-child(4) { width: 16%; }
.inv-table th:nth-child(5), .inv-table td:nth-child(5), .inv-table th:nth-child(6), .inv-table td:nth-child(6) { width: 15%; text-align: right; }

.inv-totals { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-bottom: 1px solid #000; }
.inv-totals-row { display: flex; justify-content: space-between; font-size: 0.7rem; }
.inv-totals-row span { color: #333; }
.inv-totals-row b { color: #000; font-weight: 700; }
.inv-grand-total { padding-top: 6px; border-top: 1px solid #000; }
.inv-grand-total span { font-weight: 800; color: #000; }
.inv-grand-total b { font-size: 0.9rem; font-weight: 900; color: #000; }

.inv-words { font-size: 0.68rem; font-style: normal; color: #000; padding: 8px 10px; border-bottom: 1px solid #000; }

.inv-bank, .inv-terms { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-bottom: 1px solid #000; }

.inv-sign {
  display: flex; flex-direction: column; align-items: flex-end; gap: 20px;
  font-size: 0.68rem; font-weight: 700; color: #000; text-align: right;
  padding: 16px 10px;
}

/* IRN / QR block — only shown when the invoice was reached via "E-Invoice" */
.inv-irn-divider, .inv-irn-block { display: none; }
.inv-irn-divider.show { display: block; }
.inv-irn-block.show { display: flex; }
.inv-irn-block {
  flex-direction: column; gap: 8px;
  padding: 10px;
  background: #f7f7f7;
}
.inv-irn-row { display: flex; flex-direction: column; gap: 2px; font-size: 0.64rem; color: #000; }
.inv-irn-row span { color: #555; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.58rem; }
.inv-irn-row b { font-weight: 600; word-break: break-all; }
.inv-irn-meta { display: flex; gap: 16px; font-size: 0.62rem; color: #333; }
.inv-irn-meta b { color: #000; }
.inv-qr { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.inv-qr-graphic { border: 1px solid #999; flex-shrink: 0; }
.inv-qr span { font-size: 0.6rem; color: #555; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }

.inv-zoom-bar {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  width: fit-content;
  margin: 0 auto 16px;
  padding: 9px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  box-shadow: 0 6px 16px -8px rgba(21,18,13,0.25);
}
.inv-zoom-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-alt); border: none;
  color: var(--text); font-size: 1.1rem; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.inv-zoom-btn:active { transform: scale(0.92); }

.inv-share-row { padding-bottom: 24px; }
#invShareBtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* "Download" prints just the invoice sheet — the browser's print dialog offers Save as PDF */
@media print {
  body * { visibility: hidden; }
  #invSheet, #invSheet * { visibility: visible; }
  #invSheet {
    position: fixed; inset: 0;
    width: auto; max-width: none; min-height: auto;
    box-shadow: none; margin: 0; padding: 24px;
    zoom: 1 !important;
  }
}

/* ==================== SUBSCRIPTION (Free Trial vs one-time purchase) ==================== */
.screen.subscription { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }

.sub-hero { text-align: center; margin-bottom: 16px; }
.sub-hero h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem; font-weight: 800; color: var(--text);
  margin-bottom: 4px;
}
.sub-hero p { font-size: 0.78rem; color: var(--text-dim); font-weight: 600; }

.sub-compare {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 36px -16px rgba(21,18,13,0.35);
}
.sub-divider {
  position: relative;
  width: 1px; flex-shrink: 0;
  background: rgba(0,0,0,0.16);
  z-index: 2;
}
.sub-divider-badge {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 800; color: var(--text-dim);
  box-shadow: 0 4px 12px rgba(21,18,13,0.2);
}

.sub-panel {
  position: relative;
  overflow: hidden;
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  gap: 18px;
  padding: 26px 18px;
}
.sub-panel > * { position: relative; z-index: 1; }
.sub-panel::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
}

.sub-panel-trial {
  background: linear-gradient(165deg, var(--metallic-1) 0%, var(--metallic-2) 55%, var(--metallic-3) 100%);
}
.sub-panel-trial::before {
  background: linear-gradient(120deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.12) 35%, rgba(255,255,255,0) 58%);
}

.sub-panel-premium {
  background: linear-gradient(165deg, #e6947f 0%, #c25f4e 50%, #8f2f22 100%);
}
.sub-panel-premium::before {
  background: linear-gradient(120deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.06) 35%, rgba(255,255,255,0) 58%);
}

.sub-panel-eyebrow {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem; font-weight: 800;
}
.sub-panel-trial .sub-panel-eyebrow { color: var(--text); }
.sub-panel-premium .sub-panel-eyebrow { color: #fff; }

.sub-check-list { display: flex; flex-direction: column; gap: 15px; flex: 1; justify-content: space-between; }
.sub-check-list li { display: flex; align-items: flex-start; gap: 7px; font-size: 0.74rem; font-weight: 700; line-height: 1.35; }
.sub-check-list li svg { flex-shrink: 0; margin-top: 2px; }
.sub-panel-trial .sub-check-list li { color: var(--text); }
.sub-panel-trial .sub-check-list svg { color: var(--metal-gold); }
.sub-panel-premium .sub-check-list li { color: rgba(255,255,255,0.97); }
.sub-panel-premium .sub-check-list svg { color: #fff; }

.sub-price-block { display: flex; flex-direction: column; align-items: flex-start; }
.sub-price-amt { font-size: 1.02rem; font-weight: 900; line-height: 1.3; }
.sub-price-gst { font-size: 0.78rem; font-weight: 700; line-height: 1.3; margin-top: 1px; opacity: 0.9; }
.sub-check-price small { display: block; margin-top: 3px; font-size: 0.64rem; font-weight: 600; opacity: 0.85; }

.sub-panel-btn {
  height: 46px; border-radius: 999px; border: none;
  font-family: inherit; font-weight: 800; font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.sub-panel-btn:active { transform: scale(0.96); }
.sub-btn-secondary { background: rgba(255,255,255,0.62); color: var(--text); border: 1px solid rgba(255,255,255,0.75); }
.sub-btn-primary { background: #fff; color: var(--gold-deep); box-shadow: 0 8px 18px -8px rgba(0,0,0,0.35); }

.sub-note {
  text-align: center;
  margin-top: 16px;
  font-size: 0.72rem; font-weight: 600; color: var(--text-dim);
}

.recharge-title {
  font-size: 0.95rem; font-weight: 800; color: var(--text);
  margin: 24px 0 10px;
}
.recharge-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.recharge-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  background: none; border: none;
  padding: 16px 18px;
  font-family: inherit; font-size: 0.9rem; font-weight: 800; color: var(--text);
  cursor: pointer;
}
.recharge-chevron { color: var(--text-dim); flex-shrink: 0; transition: transform 0.25s ease; }
.recharge-head.open .recharge-chevron { transform: rotate(180deg); }
.recharge-body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.recharge-label { font-size: 0.78rem; font-weight: 700; color: var(--text); }
.recharge-hint { font-size: 0.72rem; color: var(--text-dim); margin-top: -6px; margin-bottom: 2px; }
.recharge-input-wrap {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  transition: border-color 0.15s ease;
}
.recharge-input-wrap:focus-within { border-color: var(--metal-gold); }
.recharge-input-prefix { font-weight: 800; color: var(--text-dim); }
.recharge-input-wrap input {
  flex: 1; border: none; background: none; outline: none;
  font-family: inherit; font-size: 1.05rem; font-weight: 800; color: var(--text);
}
.recharge-input-wrap input::placeholder { color: #b8ac8f; font-weight: 700; }
.recharge-input-wrap input::-webkit-outer-spin-button,
.recharge-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.recharge-input-wrap input[type="number"] { -moz-appearance: textfield; }
.recharge-quick-row { display: flex; gap: 8px; margin-top: 2px; }
.recharge-quick-btn {
  flex: 1;
  height: 38px; border-radius: 999px;
  border: 1px solid var(--metal-gold-border);
  background: var(--metal-gold-bg);
  color: var(--metal-gold);
  font-family: inherit; font-size: 0.76rem; font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.recharge-quick-btn:active { transform: scale(0.93); }
.recharge-purchase-btn {
  margin-top: 8px;
  transition: opacity 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
}
.recharge-purchase-btn:disabled {
  filter: grayscale(1);
  opacity: 0.45;
  box-shadow: none;
  cursor: not-allowed;
}

/* ==================== PROFILE -> EDIT PROFILE ==================== */
.screen.edit-profile { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.ep-list { display: flex; flex-direction: column; gap: 12px; }
.ep-tile {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.ep-tile.open { border-color: var(--metal-gold); }
.ep-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 17px 16px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.95rem; font-weight: 800; color: var(--text); text-align: left;
}
.ep-chevron { flex-shrink: 0; color: var(--text-dim); transition: transform 0.25s ease; }
.ep-tile.open .ep-chevron { transform: rotate(180deg); }
.ep-body { padding: 2px 16px 18px; display: flex; flex-direction: column; }
.ep-body .otp-box, .ep-body .gst-result-card { margin: 12px 0 0; }
.ep-body .btn-lg { margin-top: 16px; }

/* ==================== MASTERS -> GOLD ==================== */
.screen.gold-rates, .screen.gold-rate-settings, .screen.gold-karat-settings { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }

.grs-card-list { display: flex; flex-direction: column; gap: 12px; }
.grs-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.grs-block-title { font-size: 0.95rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.grs-block-title small { font-weight: 700; color: var(--text-dim); }
.grs-block-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.grs-block-title-row .grs-block-title { flex: 1; min-width: 0; }
.grs-block-title-row .ds-radio { flex-shrink: 0; margin-top: 2px; }
.grs-sub { display: block; font-size: 0.74rem; font-weight: 600; color: var(--text-dim); margin-bottom: 12px; }
.grs-block-title + .grs-label { margin-top: 10px; }
.grs-label { display: block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.grs-current-pill {
  background: var(--bg-alt); border-radius: 10px; padding: 10px 12px;
  font-size: 1rem; font-weight: 800; color: var(--gold-deep);
  margin-bottom: 12px;
}
.grs-change-row { display: flex; gap: 8px; margin-bottom: 12px; }
.grs-sign-toggle {
  display: flex; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--bg-alt);
}
.grs-sign-btn {
  width: 36px; height: 38px; border: none; background: none;
  font-family: inherit; font-size: 1rem; font-weight: 800; color: var(--text-dim);
  cursor: pointer;
}
.grs-sign-btn.active { background: var(--panel); color: var(--gold-deep); box-shadow: 0 1px 3px rgba(21,18,13,0.15); }
.grs-amt-input {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 10px; padding: 0 12px;
  background: var(--panel);
}
.grs-amt-input span { font-size: 0.85rem; color: var(--text-dim); font-weight: 700; }
.grs-amt-input input { flex: 1; min-width: 0; border: none; background: none; outline: none; height: 38px; font-family: inherit; font-size: 0.9rem; color: var(--text); }
.grs-tax-input {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 10px; padding: 0 12px;
  background: var(--panel);
}
.grs-tax-input span { font-size: 0.85rem; font-weight: 700; color: var(--text-dim); flex-shrink: 0; }
.grs-tax-input input { flex: 1; min-width: 0; border: none; background: none; outline: none; height: 38px; font-family: inherit; font-size: 0.9rem; font-weight: 700; color: var(--text); }
.grs-final-value { font-size: 1.25rem; font-weight: 900; color: var(--gold-deep); }
.grs-final-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.grs-final-row .grs-final-label { font-size: 0.86rem; font-weight: 800; color: var(--text); }
.grs-final-row .grs-final-value { font-size: 1.1rem; }

/* Gold Karat Settings table */
.gks-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.gks-head-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: var(--bg-alt); padding: 10px 16px;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim);
}
.gks-head-row span:nth-child(2) { text-align: center; }
.gks-head-row span:last-child { text-align: right; }
.gks-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center;
  padding: 13px 16px; border-top: 1px solid var(--border);
}
.gks-karat { font-size: 0.9rem; font-weight: 800; color: var(--text); }
.gks-purity { display: flex; align-items: center; justify-content: center; gap: 6px; }
.gks-purity input {
  width: 44px; border: none; background: none; outline: none;
  font-family: inherit; font-size: 0.88rem; font-weight: 700; color: var(--text);
  text-align: right;
  border-bottom: 1.5px dashed transparent;
}
.gks-purity input:not([readonly]) { border-bottom-color: var(--gold-deep); }
.gks-edit-btn {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: none; background: rgba(217,41,31,0.1); color: var(--gold-deep);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.gks-icon-save { display: none; }
.gks-edit-btn.editing .gks-icon-edit { display: none; }
.gks-edit-btn.editing .gks-icon-save { display: block; }
.gks-edit-btn.editing { background: rgba(26,138,74,0.16); color: #1a8a4a; }
.gks-eye-btn {
  position: static;
  justify-self: end;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--bg-alt); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ==================== MASTERS -> SALES INVOICE ==================== */
.screen.sales-invoice { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.sinv-list { display: flex; flex-direction: column; gap: 10px; }
.sinv-card {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.sinv-card.applied { border-color: var(--metal-gold); }
.sinv-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: none; border: none;
  padding: 16px;
  font-family: inherit; text-align: left;
  cursor: pointer;
}
.sinv-head-text { font-size: 0.88rem; font-weight: 800; color: var(--text); }
.sinv-head-text em { font-style: normal; font-weight: 700; color: var(--text-dim); }
.sinv-check { flex-shrink: 0; color: var(--metal-gold); opacity: 0; transform: scale(0.6); transition: opacity 0.2s ease, transform 0.2s ease; }
.sinv-card.applied .sinv-check { opacity: 1; transform: scale(1); }
.sinv-apply-btn {
  width: 100%; height: 44px; border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #fff;
  font-family: inherit; font-weight: 800; font-size: 0.84rem;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.2s ease, filter 0.2s ease;
}
.sinv-apply-btn:active { transform: scale(0.97); }
.sinv-apply-btn:disabled {
  filter: grayscale(1);
  opacity: 0.5;
  cursor: not-allowed;
}
.sinv-card .reveal-collapse .reveal-inner { padding-left: 16px; padding-right: 16px; }
.sinv-card .reveal-collapse.open .reveal-inner { padding-bottom: 16px; }

/* ==================== MASTERS -> ITEM CODE ==================== */
.screen.item-code, .screen.wastage-master { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.itc-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.itc-row {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}
.itc-icon-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--bg-alt); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.itc-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.itc-icon-btn-danger { background: rgba(217,41,31,0.1); color: var(--gold-deep); }
.itc-icon-btn-save:not(:disabled) { background: rgba(26,138,74,0.16); color: #1a8a4a; }
.itc-row-main { display: flex; align-items: flex-start; gap: 10px; }
.itc-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; margin-top: 2px; }
.wst-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; margin-top: 2px; }
.wst-toggle-btn .wst-icon-edit { display: none; }
.wst-toggle-btn.locked .wst-icon-save { display: none; }
.wst-toggle-btn.locked .wst-icon-edit { display: block; }
.wst-toggle-btn.locked { background: var(--bg-alt); color: var(--text-dim); }
.wst-toggle-btn:not(.locked) { background: rgba(26,138,74,0.16); color: #1a8a4a; }
.itc-num { flex-shrink: 0; min-width: 16px; font-size: 0.82rem; font-weight: 800; color: var(--text-dim); margin-top: 4px; }
.itc-row-fields-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.itc-row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.itc-field { display: flex; flex-direction: column; gap: 5px; }
.itc-field span { font-size: 0.64rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em; }
.itc-field input {
  width: 9ch; border: none; border-bottom: 1.5px dashed var(--border);
  background: none; padding: 4px 0; font-family: inherit;
  font-size: 0.82rem; color: var(--text);
  outline: none;
}
.itc-field input:focus { border-bottom-color: var(--gold-deep); border-bottom-style: solid; }
.itc-field input::placeholder { color: #b8ac8f; }
.itc-field input[readonly] { color: var(--text-dim); cursor: default; }

.itc-add-btn {
  width: 100%; height: 46px; border-radius: 999px;
  border: 1.5px dashed var(--border); background: var(--bg-alt);
  color: var(--gold-deep); font-family: inherit; font-weight: 700; font-size: 0.86rem;
  cursor: pointer; margin-bottom: 20px;
  transition: transform 0.12s ease;
}
.itc-add-btn:active { transform: scale(0.97); }


/* ==================== EARN & INVITE ==================== */
.screen.earn-invite, .screen.contact-us, .screen.faqs { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }

.earn-stats-row {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 8px;
  margin-bottom: 18px;
}
.earn-stat { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.earn-stat + .earn-stat { border-left: 1px solid var(--border); }
.earn-stat b { font-size: 1.15rem; font-weight: 900; color: var(--gold-deep); }
.earn-stat span { font-size: 0.6rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.02em; }

.earn-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--metal-gold-bg);
  border: 1px solid var(--metal-gold-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.earn-card-title { flex: 1; font-size: 0.84rem; font-weight: 800; color: var(--text); line-height: 1.35; }
.earn-send-btn {
  flex-shrink: 0;
  height: 40px; padding: 0 16px; border-radius: 999px;
  border: none; background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #fff; font-family: inherit; font-weight: 700; font-size: 0.76rem;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease;
}
.earn-send-btn:active { transform: scale(0.95); }

.share-sheet-backdrop {
  position: absolute; inset: 0; z-index: 45;
  background: rgba(21,18,13,0.55);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.share-sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.share-sheet {
  width: 100%;
  background: var(--panel);
  border-radius: 22px 22px 0 0;
  padding: 10px 20px 24px;
  display: flex; flex-direction: column; align-items: center;
  transform: translateY(24px);
  transition: transform 0.28s cubic-bezier(.2,.8,.25,1);
}
.share-sheet-backdrop.show .share-sheet { transform: translateY(0); }
.share-sheet-handle { width: 38px; height: 4px; border-radius: 999px; background: var(--border); margin-bottom: 14px; }
.share-sheet-title { font-size: 0.8rem; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; align-self: flex-start; margin-bottom: 14px; }
.share-sheet-grid { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.share-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; font-family: inherit; }
.share-opt span:last-child { font-size: 0.68rem; font-weight: 700; color: var(--text); }
.share-opt-icon { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.share-opt-whatsapp { background: #25D366; }
.share-opt-instagram { background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7); }
.share-opt-sms { background: var(--gold-deep); }
.share-opt-copy { background: var(--text-dim); }
.share-opt:active .share-opt-icon { transform: scale(0.93); }
.share-sheet-cancel {
  width: 100%; height: 48px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-alt);
  color: var(--text); font-family: inherit; font-weight: 700; font-size: 0.86rem;
  cursor: pointer;
}
.share-sheet-cancel:active { transform: scale(0.97); }

/* ==================== NOTIFICATIONS ==================== */
.screen.notifications { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.notif-list { display: flex; flex-direction: column; gap: 12px; }
.notif-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.notif-card.notif-unread { background: var(--bg-alt); border-color: var(--metal-gold-border); }
.notif-icon {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.notif-icon-credit { background: var(--metal-gold-bg); }
.notif-icon-invite { background: rgba(217,41,31,0.1); }
.notif-icon-warning { background: rgba(217,41,31,0.1); }
.notif-icon-trial { background: var(--diamond-bg); }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.notif-text { font-size: 0.8rem; font-weight: 600; color: var(--text); line-height: 1.45; }
.notif-text b { font-weight: 800; color: var(--gold-deep); }
.notif-time { font-size: 0.66rem; font-weight: 600; color: var(--text-dim); }

/* ==================== SCANNER: CAMERA CAPTURE ==================== */
.screen.scan-capture { background: #0b0906; overflow: hidden; }
.cap-viewfinder {
  position: relative; height: 100%; display: flex; flex-direction: column;
  overflow: hidden;
  --frame-w: 240px; --frame-h: 150px;
  --frame-top: calc(50% - 90px);
  --frame-bottom: calc(50% + 60px);
  --frame-left: calc(50% - 120px);
  --frame-right: calc(50% + 120px);
  background:
    radial-gradient(circle at 28% 32%, rgba(255,196,120,0.22), transparent 55%),
    radial-gradient(circle at 74% 68%, rgba(120,90,55,0.28), transparent 60%),
    #14100a;
}

/* simulated camera feed: sharp only inside the frame, blurred everywhere else */
.cap-blur-top, .cap-blur-bottom, .cap-blur-left, .cap-blur-right {
  position: absolute;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  background: rgba(11,9,6,0.4);
  pointer-events: none;
  z-index: 2;
}
.cap-blur-top { top: 0; left: 0; right: 0; height: var(--frame-top); }
.cap-blur-bottom { top: var(--frame-bottom); left: 0; right: 0; bottom: 0; }
.cap-blur-left { top: var(--frame-top); height: var(--frame-h); left: 0; width: var(--frame-left); }
.cap-blur-right { top: var(--frame-top); height: var(--frame-h); left: var(--frame-right); right: 0; }

.cap-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  padding: 52px 18px 14px;
  display: flex; align-items: center; gap: 14px;
}
.cap-back {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.cap-instruction {
  position: absolute; left: 16px; right: 16px;
  top: calc(var(--frame-top) - 36px);
  z-index: 6;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: #fff; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.cap-first-preview {
  position: absolute; left: 50%;
  top: calc(var(--frame-top) - 36px - 14px - 80px);
  width: 128px; height: 80px;
  z-index: 6;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.35);
  box-shadow: 0 10px 22px -8px rgba(0,0,0,0.7);
  opacity: 0; transform: translateX(-50%) scale(0.85); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.2,.8,.25,1);
}
.cap-first-preview.show { opacity: 1; transform: translateX(-50%) scale(1); }
.cap-first-preview > svg { display: block; width: 100%; height: 100%; border-radius: 10.5px; }
.cap-first-check {
  position: absolute; right: -8px; top: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #1a8a4a; border: 2px solid #14100a;
  display: flex; align-items: center; justify-content: center;
}

.cap-frame {
  position: absolute;
  top: 50%; left: 50%;
  width: 240px; height: 150px;
  transform: translate(-50%, -60%);
  z-index: 3;
}
.cap-corner { position: absolute; width: 26px; height: 26px; }
.cap-tl { top: 0; left: 0; border-left: 3px solid var(--gold); border-top: 3px solid var(--gold); border-radius: 6px 0 0 0; }
.cap-tr { top: 0; right: 0; border-right: 3px solid var(--gold); border-top: 3px solid var(--gold); border-radius: 0 6px 0 0; }
.cap-br { bottom: 0; right: 0; border-right: 3px solid var(--gold); border-bottom: 3px solid var(--gold); border-radius: 0 0 6px 0; }
.cap-bl { bottom: 0; left: 0; border-left: 3px solid var(--gold); border-bottom: 3px solid var(--gold); border-radius: 0 0 0 6px; }
.cap-scanline {
  position: absolute; left: 4%; right: 4%; top: 0;
  height: 2px; border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 12px 2px rgba(217,41,31,0.9);
  animation: capScan 2s ease-in-out infinite;
}
@keyframes capScan {
  0%, 100% { top: 6%; opacity: 0.4; }
  50% { top: 92%; opacity: 1; }
}
.cap-side-icon-btn {
  position: absolute;
  bottom: -6px; right: -54px;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(251, 247, 240, 0.97);
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px -6px rgba(0,0,0,0.55);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.cap-side-icon-btn:active { transform: scale(0.92); }

.cap-controls {
  position: absolute; left: 50%;
  top: calc(var(--frame-bottom) + 28px);
  transform: translateX(-50%);
  width: var(--frame-w);
  z-index: 6;
  display: flex; align-items: stretch; gap: 10px;
}
.cap-controls[hidden] { display: none; }
.cap-controls-stacked { flex-direction: column; gap: 10px; }
.cap-controls-stacked .cap-action-btn { flex: 0 0 auto; height: 56px; }
.cap-or-divider {
  text-align: center;
  font-size: 0.7rem; font-weight: 700;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.cap-action-btn {
  flex: 1 1 50%;
  height: 48px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.cap-action-full { flex: 1 1 100%; height: 56px; }
.cap-action-btn b { font-size: 0.82rem; font-weight: 700; }
.cap-action-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  box-shadow: 0 10px 22px -10px var(--glow);
}
.cap-action-primary b { color: #fff; }
#capCalcBtn b { font-size: 1.02rem; font-weight: 800; letter-spacing: 0.01em; }
.cap-action-secondary {
  background: rgba(251, 247, 240, 0.95);
  border: 1px solid rgba(255,255,255,0.6);
}
.cap-action-secondary b { color: var(--text); }

/* ==================== SCANNER: PROCESSING ==================== */
.screen.scan-processing {
  background: radial-gradient(120% 100% at 50% 30%, #221a12 0%, #0b0906 70%);
}
.proc-center { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 32px; text-align: center; }
.proc-ring { position: relative; margin-bottom: 18px; }
.proc-spinner { animation: procSpin 1.1s linear infinite; transform-origin: center; }
@keyframes procSpin { to { transform: rotate(360deg); } }
.proc-percent { font-size: 2.6rem; font-weight: 800; color: #fff; }
.proc-stage { margin-top: 14px; font-size: 1.05rem; font-weight: 700; color: #fff; }
.proc-sub { margin-top: 8px; font-size: 0.82rem; color: rgba(253,250,244,0.65); line-height: 1.4; }

/* ==================== SCANNER: REVIEW / FINAL — floating card system ==================== */
.screen.scan-review { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.rev-card-wrap {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  padding: 52px 16px 96px;
  gap: 10px;
}
.rev-floating-card {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--panel);
  border-radius: 22px;
  box-shadow: 0 18px 40px -18px rgba(21,18,13,0.22);
  border: 1px solid var(--border);
  overflow: hidden;
}
.rev-sticky-head {
  flex: 0 0 auto;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.rev-sticky-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rev-back-btn {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
}
.rev-sticky-title { font-size: 1rem; font-weight: 700; }

.mrp-amount-card {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  border-radius: 14px;
  padding: 14px 16px;
  color: #fff;
}
.mrp-amount-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; }
.mrp-amount-value { display: flex; align-items: baseline; gap: 5px; margin-top: 2px; }
.mrp-rupee { font-size: 1.3rem; font-weight: 800; opacity: 0.95; }
.mrp-amount-value b { font-size: 2.35rem; font-weight: 900; letter-spacing: 0; }

.mrp-amount-card-compact { padding: 10px 14px; margin-bottom: 10px; }
.mrp-amount-card-compact .mrp-amount-value { margin-top: 0; }
.mrp-amount-card-compact .mrp-rupee { font-size: 1rem; }
.mrp-amount-card-compact .mrp-amount-value b { font-size: 1.3rem; }

.fin-item-row { display: flex; gap: 10px; }
.fin-item-tile {
  flex: 1 1 0%; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 12px;
}
.fin-item-tile span { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
.fin-item-tile b { font-size: 0.84rem; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rev-card-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 14px 16px 18px; }


.metal-tile {
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
}
.metal-tile-title {
  font-size: 0.82rem; font-weight: 800;
  margin-bottom: 10px;
}
.gold-tile { background: var(--metal-gold-bg); border-color: var(--metal-gold-border); }
.gold-tile .metal-tile-title { color: var(--metal-gold); }
.diamond-tile { background: var(--diamond-bg); border-color: var(--diamond-border); }
.diamond-tile .metal-tile-title { color: var(--diamond); }
.labour-tile { background: var(--labour-bg); border-color: var(--labour-border); }
.labour-tile .metal-tile-title { color: var(--labour); }
.wastage-tile { background: var(--wastage-bg); border-color: var(--wastage-border); }
.wastage-tile .metal-tile-title { color: var(--wastage); }

.metal-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.metal-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.metal-field span { font-size: 0.66rem; font-weight: 600; color: var(--text-dim); }
.metal-field input, .metal-field select {
  width: 100%; min-width: 0;
  height: 38px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel); padding: 0 9px; font-family: inherit;
  font-size: 0.8rem; color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.amount-field span { color: var(--text); font-weight: 800; }
.amount-field input {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text);
  height: 42px;
}
/* labour + wastage have one field per row above, so the amount holds the right column */
.labour-tile .amount-field input, .wastage-tile .amount-field input { width: 100%; }

.metal-field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23857a63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px;
  padding-right: 28px;
}
.metal-field input:focus, .metal-field select:focus, .input-icon:focus-within {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px var(--glow);
}
.metal-field.invalid input, .metal-field.invalid .input-icon {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px var(--glow);
}
.input-icon {
  display: flex; align-items: center; min-width: 0;
  height: 38px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel); padding: 0 9px; gap: 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-icon span { font-size: 0.8rem; color: var(--text-dim); }
.input-icon input { flex: 1; border: none; background: none; padding: 0; height: auto; font-size: 0.8rem; color: var(--text); font-family: inherit; }

.charges-tile {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.charges-tile span { font-size: 0.78rem; font-weight: 700; color: var(--text); }
.add-charge-btn {
  border: none; background: var(--bg-alt); color: var(--gold-deep);
  font-family: inherit; font-weight: 700; font-size: 0.74rem;
  border-radius: 999px; padding: 7px 12px; cursor: pointer;
}
.charge-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
}
.charge-row input {
  flex: 1; height: 38px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel); padding: 0 9px; font-family: inherit;
  font-size: 0.8rem; color: var(--text);
}

.fin-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; font-size: 0.8rem; }
.fin-row span { color: var(--text-dim); }
.fin-row b { color: var(--text); }
.fin-row-amount b { font-size: 1.1rem; font-weight: 900; color: var(--text); }

.fin-note {
  font-size: 0.76rem; color: var(--text-dim); line-height: 1.5;
  background: var(--bg-alt); border-radius: 12px; padding: 12px;
}

.rev-outer-btn {
  height: 46px; border-radius: 999px; border: none;
  font-family: inherit; font-weight: 700; font-size: 0.86rem; cursor: pointer;
  flex: 0 0 auto;
  transition: transform 0.12s ease;
}
.rev-outer-btn:active { transform: scale(0.96); }
.rev-back-btn:active, .cap-action-btn:active, .dash-tab:active, .add-charge-btn:active, .dash-trial-cta:active { transform: scale(0.94); }
.rev-back-btn, .cap-action-btn, .dash-tab, .add-charge-btn, .dash-trial-cta { transition: transform 0.12s ease; }
.rev-rescan-outer { height: 52px; font-size: 0.95rem; background: var(--bg-alt); color: var(--text); }
.rev-outer-row { display: flex; gap: 10px; flex: 0 0 auto; }
.rev-outer-row .rev-outer-btn { flex: 1 1 0%; }
.rev-wishlist-outer { background: var(--bg-alt); color: var(--gold-deep); }
.rev-invoice-outer { background: linear-gradient(135deg, var(--gold-light), var(--gold-deep)); color: #fff; }

.rev-inline-foot {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.rev-inline-foot > .rev-invoice-outer { width: 100%; height: 52px; }

.forgot {
  align-self: flex-end;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-deep);
  text-decoration: none;
  margin-top: -4px;
}

.auth-switch {
  text-align: center;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-dim);
  margin: 2px 0 0;
}
.auth-switch a {
  color: var(--gold-deep);
  font-weight: 700;
  text-decoration: none;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border-radius: 999px; font-weight: 700; font-size: 0.98rem;
  cursor: pointer; border: none; font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.25s ease, opacity 0.25s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled {
  filter: grayscale(1);
  opacity: 0.45;
  cursor: not-allowed;
}
.btn:disabled:active { transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #fff;
  box-shadow: 0 12px 26px -10px var(--glow);
}
.btn-lg { width: 100%; height: 52px; margin-top: 6px; }

.auth-switch {
  text-align: center;
  margin-top: 26px;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.auth-switch a { color: var(--gold-deep); font-weight: 700; text-decoration: none; }

/* staggered reveal used inside auth screens */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.55s cubic-bezier(.16,.84,.44,1) forwards;
  animation-delay: calc(var(--d, 0) * 0.06s);
}
.screen.active .reveal { animation-play-state: running; }

/* ===================== REPLAY BUTTON ===================== */
.replay-btn {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}
.replay-btn:hover { background: rgba(255,255,255,0.16); }

@media (max-width: 430px) {
  .phone { width: 100vw; height: 100vh; border-radius: 0; padding: 0; }
  .phone-screen { border-radius: 0; }
  .phone-punchhole { top: 14px; }
}

/* ==================== WISHLIST: check-select + bin + add to cart ==================== */
.wl-card { display: flex; align-items: center; gap: 12px; transition: transform 0.12s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.wl-card { padding: 11px 14px 11px 12px; }
.wl-card.selected { border-color: var(--gold-deep); background: #fff8f6; }
.wl-card-divider { margin: 8px 0; }
.wl-price-pill { flex-direction: row; align-items: center; padding: 5px 13px; }
.wl-card-body { flex: 1; min-width: 0; }
.wl-check {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--panel); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s cubic-bezier(.2,.8,.25,1);
}
.wl-check svg { opacity: 0; transform: scale(0.4); transition: opacity 0.15s ease, transform 0.2s cubic-bezier(.2,.8,.25,1); }
.wl-card.selected .wl-check { background: linear-gradient(135deg, var(--gold-light), var(--gold-deep)); border-color: var(--gold-deep); transform: scale(1.06); }
.wl-card.selected .wl-check svg { opacity: 1; transform: scale(1); }
.wl-actions { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.wl-bin-btn, .wl-cart-btn { display: none; }
.wl-actions.has-sel .wl-bin-btn { display: flex; animation: wlPop 0.22s cubic-bezier(.2,.8,.25,1); }
.wl-actions.multi .wl-cart-btn { display: inline-flex; animation: wlPop 0.22s cubic-bezier(.2,.8,.25,1); }
.wl-bin-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none; flex-shrink: 0;
  background: rgba(217,41,31,0.1); color: var(--gold-deep);
  align-items: center; justify-content: center; cursor: pointer;
}
.wl-cart-btn {
  height: 36px; padding: 0 16px; border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep)); color: #fff;
  font-family: inherit; font-size: 0.78rem; font-weight: 800; align-items: center;
}
.wl-bin-btn:active, .wl-cart-btn:active { transform: scale(0.94); }
@keyframes wlPop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }

/* ==================== SETTINGS: History & Cart card ==================== */
.hc-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  box-shadow: 0 3px 10px -6px rgba(21,18,13,0.15);
}
.hc-card .hc-tile:first-child { border-top: none; }
.screen.history-cart { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.hc-tile { border-top: 1px solid var(--border); }
.hc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.88rem; font-weight: 700; color: var(--text); text-align: left;
}
.hc-head svg { flex-shrink: 0; color: var(--text-dim); transition: transform 0.25s ease; }
.hc-head.open svg { transform: rotate(180deg); }
.hc-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background: var(--bg); }
.hc-body.show { max-height: 440px; overflow-y: auto; }
.hc-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 16px; border-top: 1px solid var(--border); cursor: pointer;
}
.hc-entry:active { background: var(--bg-alt); }
.hc-entry-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hc-entry-title { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.hc-entry-sub { font-size: 0.7rem; color: var(--text-dim); font-weight: 600; }
.hc-entry-price { font-size: 0.8rem; font-weight: 800; color: var(--gold-deep); white-space: nowrap; }
.hc-chip {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.03em; vertical-align: middle;
  background: var(--metal-gold-bg); color: var(--metal-gold); border: 1px solid var(--metal-gold-border);
}
.hc-empty { padding: 14px 16px; font-size: 0.78rem; color: var(--text-dim); border-top: 1px solid var(--border); }

/* ==================== ADD TO CART ==================== */
.screen.cart { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.screen.cart .set-scroll { padding-bottom: 190px; }
.cart-card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 3px 10px -6px rgba(21,18,13,0.15); }
.cart-list { display: flex; flex-direction: column; }
.cart-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}
.cart-row:active { background: var(--bg-alt); }
.cart-num { flex-shrink: 0; min-width: 18px; font-size: 0.86rem; font-weight: 800; color: var(--gold-deep); }
.cart-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cart-name b { font-size: 0.86rem; font-weight: 700; color: var(--text); }
.cart-name small { font-size: 0.68rem; color: var(--text-dim); font-weight: 600; }
.cart-mrp { font-size: 0.86rem; font-weight: 800; color: var(--text); white-space: nowrap; }
.cart-chev { flex-shrink: 0; color: var(--text-dim); display: flex; }
.cart-total { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px 17px; background: var(--bg-alt); }
.cart-total span { font-size: 0.72rem; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.cart-total b { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.cart-footer {
  position: absolute; left: 20px; right: 20px; bottom: 80px; z-index: 34;
  background: #fffdf9; border: 1px solid var(--border); border-radius: 24px; padding: 9px;
  box-shadow: 0 14px 30px -12px rgba(21,18,13,0.28);
}
.cart-footer .rev-outer-btn { width: 100%; height: 48px; }

/* ==================== E-INVOICE POPUP ==================== */
.einv-popup-backdrop {
  position: absolute; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 0 22px;
  background: rgba(21,18,13,0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease; cursor: pointer;
}
.einv-popup-backdrop.show { opacity: 1; pointer-events: auto; }
.einv-popup-card {
  position: relative; width: 100%; background: #fff; border-radius: 26px; padding: 34px 22px 30px;
  text-align: center; box-shadow: 0 24px 50px -18px rgba(21,18,13,0.45);
  transform: scale(0.92); transition: transform 0.28s cubic-bezier(.2,.8,.25,1);
}
.einv-popup-backdrop.show .einv-popup-card { transform: scale(1); }
.einv-popup-icon {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 18px;
  background: #e6f4ea; color: #1a8a4a; display: flex; align-items: center; justify-content: center;
}
.einv-popup-card p { font-size: 0.96rem; font-weight: 500; line-height: 1.55; color: var(--text); }
.einv-popup-close {
  position: absolute; top: 10px; right: 14px; border: none; background: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--text-dim); padding: 4px;
}

.hc-card, .cart-card { flex-shrink: 0; }
.hc-tile { flex-shrink: 0; }

/* ==================== WISHLIST: slim single-row cards ==================== */
.wl-list { gap: 10px; }
.wl-card { padding: 10px 12px; gap: 12px; border-radius: 14px; }
.wl-card-body { display: flex; flex-direction: column; gap: 1px; }
.wl-card-title { font-size: 0.88rem; }
.wl-card-time { font-size: 0.68rem; }
.wl-price-pill { flex-shrink: 0; padding: 6px 13px; }

/* ==================== SCANNER CAMERA + PROCESSING: +30% size ==================== */
.cap-viewfinder {
  --frame-w: 312px; --frame-h: 195px;
  --frame-top: calc(50% - 117px);
  --frame-bottom: calc(50% + 78px);
  --frame-left: calc(50% - 156px);
  --frame-right: calc(50% + 156px);
}
.cap-frame { width: 312px; height: 195px; }
.cap-corner { width: 34px; height: 34px; }
.cap-tl, .cap-tr, .cap-br, .cap-bl { border-width: 4px; }
.cap-instruction { font-size: 1.05rem; top: calc(var(--frame-top) - 44px); }
.cap-first-preview { width: 166px; height: 104px; top: calc(var(--frame-top) - 44px - 16px - 104px); }
.cap-side-icon-btn { right: 12px; bottom: 12px; width: 48px; height: 48px; }
.cap-controls { top: calc(var(--frame-bottom) + 34px); }
.cap-action-btn { height: 62px; }
.cap-controls-stacked .cap-action-btn { height: 72px; }
.cap-action-full { height: 72px; }
.cap-action-btn b { font-size: 1.06rem; }
#capCalcBtn b { font-size: 1.3rem; }
.proc-spinner { width: 125px; height: 125px; }
.proc-percent { font-size: 3.4rem; }
.proc-stage { font-size: 1.36rem; }
.proc-sub { font-size: 1.06rem; }
