/* ─────────────────────────────────────────────────────────────────────
   Mata Ji 🪔 — Dark navy + cyan theme.
   Adapted from the pet_nutrition customer theme, with Devanagari display
   font pairing and Mata-Ji-specific surfaces (chat, coupon, remedy, doctor).
   ───────────────────────────────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700;9..144,900&family=Hind:wght@400;500;600;700&family=Nunito:wght@400;600;700;800;900&family=Tiro+Devanagari+Hindi&display=swap");

:root {
  --navy:        #0a1628;
  --navy-light:  #0f1f3d;
  --navy-card:   #111e38;
  --navy-input:  #0d1830;
  --navy-deep:   #060f1f;
  --navy-glass:  rgba(17, 30, 56, 0.72);
  --navy-border: rgba(0, 229, 212, 0.18);
  --navy-border-strong: rgba(0, 229, 212, 0.32);
  --input-border:       rgba(0, 229, 212, 0.55);
  --input-border-hover: rgba(0, 229, 212, 0.75);

  --cyan:        #00e5d4;
  --cyan-2:      #00f5e4;
  --cyan-dim:    rgba(0, 229, 212, 0.10);
  --cyan-glow:   rgba(0, 229, 212, 0.22);
  --cyan-soft:   rgba(0, 229, 212, 0.06);

  /* Sharp accent for warmth / दीया callout — used sparingly */
  --gold:        #f5b94d;
  --gold-glow:   rgba(245, 185, 77, 0.20);

  --white:       #ffffff;
  --text-main:   #e8f4f3;
  --text-muted:  rgba(232, 244, 243, 0.55);
  --text-faint:  rgba(232, 244, 243, 0.28);

  --error:       #ff6b8a;
  --error-bg:    rgba(255, 107, 138, 0.10);
  --success:     #4adea2;
  --success-bg:  rgba(74, 222, 162, 0.10);
  --warning:     #ffc94d;

  --r-sm: 0.5rem;
  --r-md: 0.875rem;
  --r-lg: 1.25rem;
  --r-xl: 1.6rem;
  --r-full: 9999px;

  --font: "Nunito", "Helvetica Neue", sans-serif;
  --font-display: "Fraunces", "Tiro Devanagari Hindi", serif;
  --font-hindi: "Tiro Devanagari Hindi", "Nunito", serif;
  /* Readable Devanagari UI font with real bold weights (400-700) — used for
     chat bubbles & remedy text where Tiro (regular-only) can't go bold. */
  --font-read: "Hind", "Nunito", "Tiro Devanagari Hindi", sans-serif;

  --tx-xs:   clamp(0.70rem, 0.65rem + 0.20vw, 0.78rem);
  --tx-sm:   clamp(0.82rem, 0.78rem + 0.20vw, 0.92rem);
  --tx-base: clamp(0.95rem, 0.90rem + 0.30vw, 1.05rem);
  --tx-lg:   clamp(1.10rem, 1.00rem + 0.50vw, 1.30rem);
  --tx-xl:   clamp(1.35rem, 1.20rem + 0.80vw, 1.75rem);
  --tx-2xl:  clamp(1.70rem, 1.40rem + 1.50vw, 2.40rem);

  --shadow-sm:   0 4px 12px rgba(0, 0, 0, 0.30);
  --shadow-md:   0 8px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 229, 212, 0.04);
  --shadow-lg:   0 14px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 229, 212, 0.06);
  --shadow-glow: 0 0 32px rgba(0, 229, 212, 0.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--text-main);
  min-height: 100dvh;
  line-height: 1.6;
  /* Subtle radial accent — gives the dark canvas atmosphere instead of a flat fill */
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 229, 212, 0.07), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(245, 185, 77, 0.04), transparent 60%);
  background-attachment: fixed;
}
img { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Hindi / Devanagari text gets the display-serif companion for hierarchy. */
.devanagari, .hindi-display {
  font-family: var(--font-hindi);
  font-weight: 400;
}

/* ── Skip link (a11y) ─────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 1rem;
  background: var(--cyan); color: var(--navy);
  padding: 0.5rem 1rem; border-radius: var(--r-sm);
  font-weight: 800; font-size: var(--tx-sm);
  transition: top 0.2s; z-index: 999; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ── Page wrapper ─────────────────────────────────────────────────── */
.page {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: 2rem;
}
.page.wide { max-width: 720px; }
@media (min-width: 768px) {
  .page      { max-width: 720px; padding-bottom: 2.5rem; }
  .page.wide { max-width: 980px; }
}
@media (min-width: 1024px) {
  .page      { max-width: 900px; }
  .page.wide { max-width: 1280px; }
}
@media (min-width: 1440px) {
  .page.wide { max-width: 1360px; }
}

/* ── Top bar ──────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.85rem 1.25rem;
  background: var(--navy-light);
  border-bottom: 1px solid var(--navy-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 900; font-size: var(--tx-base);
  color: var(--white);
  text-decoration: none;
}
.brand .diya {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--cyan), #007a72 80%);
  display: grid; place-items: center;
  font-size: 20px;
  box-shadow: 0 0 18px var(--cyan-glow), inset 0 0 12px rgba(0,0,0,0.25);
  position: relative;
}
.brand .diya::before {
  content: ""; position: absolute;
  width: 6px; height: 8px; top: -7px; left: 50%; transform: translateX(-50%);
  background: var(--gold); border-radius: 50% 50% 30% 30%;
  box-shadow: 0 0 12px var(--gold), 0 0 24px var(--gold-glow);
  animation: flame 2.4s ease-in-out infinite;
}
@keyframes flame {
  0%, 100% { transform: translateX(-50%) scaleY(1); }
  50%      { transform: translateX(-50%) scaleY(1.15); }
}
.brand .name { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
.brand .sub  { font-size: var(--tx-xs); font-weight: 400; color: var(--text-muted); display: block; line-height: 1.1; margin-top: 1px; font-family: var(--font-hindi); }
.clinic-badge {
  font-size: var(--tx-xs);
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--navy-border);
  padding: 0.32rem 0.8rem;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.clinic-badge:hover { background: var(--cyan-glow); text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }

/* ── Container ────────────────────────────────────────────────────── */
.container { padding: 1rem 1rem 0; width: 100%; }
@media (min-width: 768px) { .container { padding: 1.25rem 1.5rem 0; } }
@media (min-width: 1024px) { .container { padding: 1.5rem 2rem 0; } }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 2.25rem 1.5rem 1.75rem;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 25% 0%, rgba(0, 229, 212, 0.14), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(245, 185, 77, 0.10), transparent 50%);
  border-bottom: 1px solid var(--navy-border);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 0.45rem;
}
.hero h1 .accent { color: var(--cyan); }
.hero h1 .devanagari { color: var(--white); font-family: var(--font-hindi); display: inline-block; }
.hero p {
  font-size: var(--tx-base);
  color: var(--text-muted);
  max-width: 32ch;
  margin: 0 auto;
}
.hero .pill-tag { margin-bottom: 0.6rem; }

/* ── Cards ────────────────────────────────────────────────────────── */
.card {
  background: var(--navy-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--navy-border);
  padding: 1.4rem 1.25rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}
.card.compact { padding: 1.1rem 1rem; }
.card.glass {
  background: var(--navy-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--navy-border-strong);
}

.pill-tag {
  display: inline-block;
  font-size: var(--tx-xs);
  font-weight: 800;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--navy-border);
  padding: 0.28rem 0.75rem;
  border-radius: var(--r-full);
  margin-bottom: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Headings */
h1, h2, h3, h4 { color: var(--white); }
.card h2 {
  font-size: var(--tx-xl);
  font-weight: 900;
  font-family: var(--font-display);
  line-height: 1.2;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}
.card h2 .accent { color: var(--cyan); }
.lead {
  font-size: var(--tx-sm);
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  line-height: 1.55;
}
.muted { color: var(--text-muted); font-size: var(--tx-sm); }

.section-title {
  font-size: var(--tx-xs);
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 1.5rem 0 0.65rem;
}

/* ── Form fields ──────────────────────────────────────────────────── */
label {
  display: block;
  font-size: var(--tx-sm);
  font-weight: 800;
  color: var(--text-main);
  margin: 0.85rem 0 0.35rem;
}
.card label:first-of-type { margin-top: 0; }

input:not([type]),
input[type="text"], input[type="tel"], input[type="number"],
input[type="password"], input[type="email"], input[type="search"],
input[type="url"], input[type="date"],
select, textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--navy-input);
  border: 2px solid var(--input-border);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: var(--tx-base);
  font-weight: 600;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); font-weight: 400; }

input:-webkit-autofill, input:-webkit-autofill:hover,
input:-webkit-autofill:focus, textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--navy-input) inset !important;
  box-shadow: 0 0 0 1000px var(--navy-input) inset !important;
  -webkit-text-fill-color: var(--white) !important;
  caret-color: var(--white);
  transition: background-color 9999s ease-out 0s;
  border-color: var(--input-border) !important;
}

input:hover, select:hover, textarea:hover { border-color: var(--input-border-hover); }
input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}
textarea { resize: vertical; min-height: 80px; line-height: 1.45; }

select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2300e5d4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  color-scheme: dark;
}
select option { background-color: var(--navy-input); color: var(--white); padding: 8px 12px; }

input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; min-width: 20px;
  border: 2px solid var(--input-border);
  border-radius: 5px;
  background-color: var(--navy-input);
  background-repeat: no-repeat; background-position: center;
  background-size: 14px 14px;
  cursor: pointer; vertical-align: middle; display: inline-block;
  flex: 0 0 auto;
  transition: border-color 0.15s, background-color 0.15s;
}
input[type="checkbox"]:hover { border-color: var(--cyan); }
input[type="checkbox"]:checked {
  background-color: var(--cyan); border-color: var(--cyan);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3.5 3.5 6.5-7' stroke='%230a1628' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
}

.row   { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@media (max-width: 600px) { .row, .row-3 { grid-template-columns: 1fr; } }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.95rem 1.25rem;
  background: var(--cyan);
  color: var(--navy);
  font-family: var(--font);
  font-size: var(--tx-base);
  font-weight: 900;
  border-radius: var(--r-lg);
  border: none;
  cursor: pointer;
  min-height: 50px;
  box-shadow: 0 4px 20px rgba(0, 229, 212, 0.28);
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  margin-top: 0.4rem;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  background: var(--cyan-2);
  box-shadow: 0 6px 28px rgba(0, 229, 212, 0.42);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

.btn.secondary {
  background: transparent;
  color: var(--cyan);
  border: 1.5px solid var(--cyan);
  box-shadow: none;
  margin-top: 0.5rem;
}
.btn.secondary:hover { background: var(--cyan-dim); box-shadow: none; transform: none; }

.btn.ghost {
  background: var(--navy-card);
  color: var(--text-main);
  border: 1px solid var(--navy-border);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--cyan); color: var(--white); background: var(--cyan-soft); box-shadow: none; transform: none; }

.btn.danger {
  background: linear-gradient(135deg, #ff6b8a 0%, #c2185b 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 138, 0.28);
}
.btn.inline {
  width: auto; min-height: 0;
  padding: 0.55rem 1rem; font-size: var(--tx-sm);
  margin-top: 0;
}

/* Status banners */
.error, .success {
  font-size: var(--tx-xs); font-weight: 700;
  border-radius: var(--r-md);
  margin: 0; padding: 0;
  min-height: 0;
  transition: padding 0.15s;
}
.error:not(:empty) {
  color: var(--error); background: var(--error-bg);
  padding: 0.55rem 0.8rem;
  margin-top: 0.5rem;
  border: 1px solid rgba(255, 107, 138, 0.25);
}
.success:not(:empty) {
  color: var(--success); background: var(--success-bg);
  padding: 0.55rem 0.8rem;
  margin-top: 0.5rem;
  border: 1px solid rgba(74, 222, 162, 0.25);
}

.trust-row {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  margin-top: 1rem; padding-top: 0.85rem;
  border-top: 1px solid var(--navy-border);
}
.trust-row span {
  font-size: var(--tx-xs); font-weight: 700; color: var(--cyan);
}

/* OTP step indicator */
.steps {
  display: flex; justify-content: center; gap: 8px;
  margin: 1rem 0 1.25rem;
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%; background: var(--navy-border);
  transition: all 0.25s;
}
.step-dot.active {
  background: var(--cyan); width: 28px;
  border-radius: var(--r-full);
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* OTP-only big code field */
.otp-input {
  font-family: 'Nunito', monospace !important;
  font-size: 26px !important;
  letter-spacing: 10px !important;
  text-align: center !important;
  font-weight: 900 !important;
}

#masked { font-weight: 900; color: var(--cyan); }

/* ── Chat ─────────────────────────────────────────────────────────── */
.chat-shell {
  display: flex; flex-direction: column;
  min-height: calc(100dvh - 70px);
}
.chat-area {
  flex: 1;
  padding: 1rem 1rem 6.5rem;
  display: flex; flex-direction: column; gap: 14px;
}
.chat-area .day-stamp {
  font-size: var(--tx-xs); color: var(--text-faint);
  text-align: center; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.msg {
  display: flex; gap: 10px; max-width: 100%;
  animation: msgIn 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg-ai { align-items: flex-start; }
.msg-user { flex-direction: row-reverse; }
.msg-avatar {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 18px;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
}
.msg-ai .msg-avatar {
  background: linear-gradient(140deg, var(--cyan), #007a72 90%);
  color: var(--navy); border-color: var(--cyan-glow);
  box-shadow: 0 0 18px var(--cyan-glow);
}
.msg-user .msg-avatar { color: var(--cyan); background: var(--cyan-soft); border-color: var(--navy-border-strong); }

.msg-bubble {
  max-width: min(78%, 520px);
  padding: 0.95rem 1.15rem;
  border-radius: 1.1rem;
  font-size: var(--tx-lg);
  line-height: 1.6;
  font-weight: 600;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-read);
}
.msg-ai .msg-bubble {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  color: var(--text-main);
  border-top-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.msg-user .msg-bubble {
  background: linear-gradient(140deg, var(--cyan) 0%, #00b8a8 100%);
  color: var(--navy);
  font-weight: 700;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 229, 212, 0.22);
}

/* Resume banner — shown at the top of a hydrated previous chat. */
.resume-banner {
  align-self: center;
  background: var(--cyan-soft);
  border: 1px dashed var(--cyan-glow);
  color: var(--cyan);
  padding: 0.55rem 1rem;
  border-radius: var(--r-full);
  font-size: var(--tx-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: msgIn 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.resume-banner .tiny { color: var(--text-muted); margin-left: 4px; font-weight: 600; text-transform: none; letter-spacing: 0; }

/* Quick reply chips */
.quick-replies {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-left: 46px; margin-top: -4px;
  animation: msgIn 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.quick-reply {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--navy-card);
  color: var(--cyan);
  border: 1.5px solid var(--navy-border-strong);
  padding: 0.55rem 1rem;
  border-radius: var(--r-full);
  font-size: var(--tx-base);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: var(--font-hindi);
}
.quick-reply:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--white);
  transform: translateY(-1px);
}
.quick-reply:active { transform: translateY(0); }

/* Remedy card (inline in chat) */
.remedy-card {
  margin-left: 46px;
  background: linear-gradient(140deg, rgba(0, 229, 212, 0.08), rgba(245, 185, 77, 0.06));
  border: 1px solid var(--navy-border-strong);
  border-radius: var(--r-xl);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  animation: msgIn 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
  font-family: var(--font-hindi);
}
.remedy-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cyan);
  font-size: var(--tx-lg);
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--navy-border);
  display: flex; align-items: center; gap: 8px;
}
.remedy-card h4 .remedy-leaf {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0, 229, 212, 0.12);
  font-size: 16px;
}
.remedy-step {
  display: flex; gap: 12px; align-items: center;
  padding: 0.5rem 0;
  font-size: var(--tx-base);
  color: var(--text-main);
  line-height: 1.5;
  font-family: var(--font-read);
  font-weight: 600;
}
.remedy-step + .remedy-step { border-top: 1px dashed var(--navy-border); }
.remedy-icon {
  flex-shrink: 0;
  min-width: 44px; height: 44px;
  padding: 0 7px;
  border-radius: 13px;
  background: rgba(0, 229, 212, 0.10);
  border: 1px solid var(--navy-border);
  display: grid; place-items: center;
  font-size: 21px; line-height: 1;
  white-space: nowrap;
}
.remedy-text { flex: 1; }
.remedy-step.warn .remedy-icon {
  background: rgba(255, 201, 77, 0.13);
  border-color: rgba(255, 201, 77, 0.38);
}
.remedy-step.warn .remedy-text {
  color: var(--warning);
  font-weight: 700;
}

/* Post-remedy decision: "Did the upchaar work, or see a doctor?" */
.remedy-prompt {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--navy-border);
  font-size: var(--tx-sm);
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-hindi);
}
.remedy-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.remedy-btn {
  flex: 1 1 200px;
  min-height: 46px;
  padding: 0.7rem 1rem;
  border-radius: var(--r-lg);
  font-family: var(--font-hindi);
  font-weight: 800;
  font-size: var(--tx-sm);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}
.remedy-btn.relief {
  background: var(--success-bg);
  color: var(--success);
  border: 1.5px solid var(--success);
}
.remedy-btn.relief:hover {
  background: var(--success);
  color: var(--navy);
  box-shadow: 0 4px 18px rgba(74, 222, 162, 0.32);
  transform: translateY(-1px);
}
.remedy-btn.see-doc {
  background: var(--cyan);
  color: var(--navy);
  border: 1.5px solid var(--cyan);
  box-shadow: 0 4px 16px var(--cyan-glow);
}
.remedy-btn.see-doc:hover {
  background: var(--cyan-2);
  box-shadow: 0 6px 22px var(--cyan-glow);
  transform: translateY(-1px);
}
.remedy-btn:disabled {
  opacity: 0.5; cursor: default; transform: none;
  box-shadow: none;
}

@media (max-width: 480px) {
  .remedy-actions { flex-direction: column; gap: 8px; }
  .remedy-btn     { flex: 1 1 auto; width: 100%; }
}

/* Helper hint shown above the doctor list — "type or speak the name". */
.doctor-hint {
  margin-left: 46px;
  padding: 0.6rem 0.85rem;
  background: var(--cyan-soft);
  border: 1px dashed var(--navy-border-strong);
  border-radius: var(--r-md);
  font-size: var(--tx-sm);
  color: var(--text-main);
  font-family: var(--font-hindi);
  line-height: 1.5;
  animation: msgIn 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.doctor-hint b { color: var(--cyan); font-weight: 800; }
@media (max-width: 480px) { .doctor-hint { margin-left: 0; } }

/* Escalate banner (when AI signals doctor stage) */
.escalate-banner {
  margin-left: 46px;
  background: linear-gradient(135deg, rgba(255, 107, 138, 0.12), rgba(245, 185, 77, 0.08));
  border: 1px solid rgba(245, 185, 77, 0.35);
  color: var(--gold);
  padding: 0.85rem 1rem;
  border-radius: var(--r-lg);
  font-size: var(--tx-sm);
  font-weight: 700;
  text-align: center;
  font-family: var(--font-hindi);
  animation: msgIn 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Doctor / provider card in chat — action-oriented: profile + fee math + CTA */
.doctor-card {
  margin-left: 46px;
  display: block;
  background: var(--navy-card);
  border: 1.5px solid var(--navy-border);
  border-radius: var(--r-xl);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  animation: msgIn 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.doctor-card::after {
  content: "";
  position: absolute;
  top: -36px; right: -36px;
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--cyan); opacity: 0;
  transition: opacity 0.3s;
}
.doctor-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 229, 212, 0.20);
}
.doctor-card:hover::after { opacity: 0.10; }

.doc-top { display: flex; gap: 13px; align-items: flex-start; position: relative; z-index: 1; }
.doc-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), #007a72);
  color: var(--navy);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 0 18px var(--cyan-glow);
}
.doc-info { flex: 1; min-width: 0; }
.doc-info h4 { font-size: var(--tx-lg); font-weight: 900; color: var(--white); margin-bottom: 3px; font-family: var(--font); }
.doc-info .speciality { font-size: var(--tx-sm); color: var(--cyan); font-weight: 800; font-family: var(--font-read); }
.doc-info .meta { font-size: var(--tx-sm); color: var(--text-muted); margin-top: 4px; }

/* Big % OFF chip, top-right */
.doc-discount {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 54px;
  background: linear-gradient(140deg, var(--cyan), #00b8a8);
  color: var(--navy);
  font-weight: 900;
  font-size: var(--tx-lg); line-height: 1;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 4px 14px var(--cyan-glow);
}
.doc-discount span { font-size: 9px; letter-spacing: 1.5px; margin-top: 2px; font-weight: 800; }

/* Fee math row — original price struck → discounted price + savings */
.doc-fee {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 0.85rem;
  padding: 0.6rem 0.85rem;
  background: var(--cyan-soft);
  border: 1px dashed var(--navy-border);
  border-radius: var(--r-md);
  position: relative; z-index: 1;
}
.fee-old   { color: var(--text-muted); text-decoration: line-through; font-size: var(--tx-sm); font-weight: 700; }
.fee-arrow { color: var(--text-muted); font-weight: 800; }
.fee-new   { color: var(--cyan); font-weight: 900; font-size: var(--tx-xl); }
.fee-save  {
  margin-left: auto;
  font-size: var(--tx-xs); font-weight: 800;
  color: var(--success); background: var(--success-bg);
  padding: 4px 9px; border-radius: var(--r-full);
  border: 1px solid rgba(74, 222, 162, 0.25);
}

/* Primary book CTA */
.doc-book-btn {
  width: 100%; margin-top: 0.85rem;
  padding: 0.82rem 1rem;
  background: var(--cyan); color: var(--navy);
  border: none; border-radius: var(--r-lg);
  font-family: var(--font-read); font-weight: 800;
  font-size: var(--tx-base);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px var(--cyan-glow);
  position: relative; z-index: 1;
}
.doc-book-btn:hover  { background: var(--cyan-2); transform: translateY(-1px); box-shadow: 0 6px 22px var(--cyan-glow); }
.doc-book-btn:active { transform: translateY(0); }

/* Inline coupon card emitted in chat / on the coupons page */
.coupon {
  position: relative;
  background:
    radial-gradient(ellipse at top, rgba(0, 229, 212, 0.10), transparent 60%),
    var(--navy-card);
  border: 1.5px dashed var(--cyan);
  border-radius: var(--r-xl);
  padding: 1.3rem 1.2rem 1.15rem;
  text-align: center;
  margin: 0.5rem 0;
  overflow: hidden;
}
.coupon.in-chat { margin-left: 46px; }
.coupon.used { opacity: 0.55; border-style: solid; }
.coupon::before, .coupon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px; height: 18px;
  background: var(--navy);
  border-radius: 50%;
  transform: translateY(-50%);
  border: 1px dashed var(--cyan);
}
.coupon::before { left: -10px; }
.coupon::after  { right: -10px; }
.coupon .label {
  font-size: var(--tx-xs); color: var(--text-muted);
  font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase;
}
.coupon .code {
  font-family: "Nunito", monospace;
  font-size: 30px;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: 6px;
  margin: 8px 0;
  text-shadow: 0 0 18px var(--cyan-glow);
  user-select: all;
}
.coupon .discount {
  display: inline-block;
  background: var(--cyan);
  color: var(--navy);
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: var(--tx-xs);
  font-weight: 900;
}
.coupon .hint {
  font-size: var(--tx-xs);
  color: var(--text-muted);
  margin-top: 0.85rem;
  line-height: 1.45;
  font-family: var(--font-hindi);
}

/* ── Chat input footer (sticky) ───────────────────────────────────── */
.chat-input {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--navy-light);
  border-top: 1px solid var(--navy-border);
  padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
  display: flex; gap: 8px; align-items: center;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.chat-input input {
  flex: 1;
  padding: 0.85rem 1.1rem;
  background: var(--navy-input);
  border: 1.5px solid var(--navy-border);
  border-radius: var(--r-full);
  font-size: var(--tx-lg);
  color: var(--white);
  margin: 0;
}
.chat-input input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-glow); background: var(--navy-input); }
.chat-input button.send {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.chat-input button.send svg { display: block; }
.chat-input button.send svg path { transition: transform 180ms ease; }
.chat-input button.send:hover svg { transform: translateX(1px); }
.chat-input button.mic {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: transparent;
  color: var(--cyan);
  border: 1.5px solid var(--cyan);
  display: grid; place-items: center;
  font-size: 18px;
  transition: all 0.2s;
  margin: 0;
}
.chat-input button.mic:hover { background: var(--cyan-dim); }
.chat-input button.mic.listening {
  background: var(--cyan); color: var(--navy);
  border-color: var(--cyan);
  animation: mic-pulse 1.5s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--cyan-glow); }
  50%      { box-shadow: 0 0 0 14px transparent; }
}

/* ── Bottom nav (patient) ─────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy-light);
  border-top: 1px solid var(--navy-border);
  display: flex; justify-content: space-around;
  padding: 0.55rem 0 calc(0.55rem + env(safe-area-inset-bottom));
  z-index: 40;
}
.nav-item {
  flex: 1; text-align: center; padding: 0.45rem 0;
  color: var(--text-muted);
  font-size: var(--tx-xs); font-weight: 700;
  cursor: pointer; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: color 0.15s;
}
.nav-item .icon { font-size: 22px; }
.nav-item.active { color: var(--cyan); }
.nav-item:hover { color: var(--white); text-decoration: none; }

/* ── Stats grid (dashboards) ──────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin-bottom: 1rem;
}
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--r-lg);
  padding: 0.95rem 1rem;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  top: -18px; right: -18px;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--cyan); opacity: 0.08;
}
.stat .num { font-size: var(--tx-xl); font-weight: 900; color: var(--cyan); font-family: var(--font-display); letter-spacing: -0.02em; }
.stat .lbl { font-size: var(--tx-xs); color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Tabs ─────────────────────────────────────────────────────────── */
.tab-row {
  display: flex; gap: 6px;
  margin-bottom: 1rem;
  overflow-x: auto; padding-bottom: 4px;
}
.tab {
  padding: 0.55rem 1rem;
  border-radius: var(--r-full);
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  font-size: var(--tx-sm); font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap; cursor: pointer;
  transition: all 0.15s;
}
.tab:hover { color: var(--white); border-color: var(--navy-border-strong); }
.tab.active {
  background: var(--cyan); color: var(--navy);
  border-color: var(--cyan);
  box-shadow: 0 4px 16px var(--cyan-glow);
}

/* ── Data table ──────────────────────────────────────────────────── */
.data-wrap {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--r-lg);
  /* Horizontal scroll on narrow screens — table keeps its column rhythm. */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.data-wrap > table.data { min-width: 640px; }
@media (min-width: 900px) {
  .data-wrap > table.data { min-width: 0; }
}
.data-wrap + .data-wrap { margin-top: 0.85rem; }
table.data {
  width: 100%; border-collapse: collapse;
  font-size: var(--tx-sm);
}
table.data th, table.data td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--navy-border);
  text-align: left; vertical-align: top;
}
table.data th {
  background: var(--navy-light);
  font-weight: 800;
  color: var(--cyan);
  /* --tx-sm (was --tx-xs): Devanagari headers like "गाँव" / "शिकायत" are
     unreadable at the tiny xs size. Hind renders Devanagari cleanly, and the
     gentler letter-spacing keeps matras (ाँ) attached to their base letter. */
  font-size: var(--tx-sm);
  font-family: var(--font-read);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.data td { color: var(--text-main); }
table.data td b { color: var(--white); }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--cyan-soft); }
.mono { font-family: "Nunito", monospace; letter-spacing: 2px; color: var(--cyan); font-weight: 800; }
.tiny { font-size: var(--tx-xs); color: var(--text-muted); }

.pill {
  display: inline-block;
  font-size: var(--tx-xs); font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--r-full);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.pill-active { background: var(--cyan-dim); color: var(--cyan); border: 1px solid var(--cyan-glow); }
.pill-used   { background: var(--success-bg); color: var(--success); border: 1px solid rgba(74, 222, 162, 0.25); }
.pill-warn   { background: rgba(255, 201, 77, 0.1); color: var(--warning); border: 1px solid rgba(255, 201, 77, 0.25); }
.pill-off    { background: var(--error-bg); color: var(--error); border: 1px solid rgba(255, 107, 138, 0.25); }

/* ── Modal ───────────────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(6, 15, 31, 0.78);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 1rem;
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--navy-card);
  border: 1px solid var(--navy-border-strong);
  border-radius: var(--r-xl);
  width: 100%; max-width: 560px;
  padding: 1.4rem 1.3rem;
  max-height: 92vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal h2 {
  font-family: var(--font-display);
  font-size: var(--tx-xl);
  font-weight: 900;
  margin-bottom: 0.85rem;
}

/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%; transform: translateX(-50%) translateY(20px);
  bottom: 90px;
  background: var(--navy-card);
  color: var(--white);
  border: 1px solid var(--cyan);
  padding: 0.7rem 1.25rem;
  border-radius: var(--r-full);
  font-size: var(--tx-sm); font-weight: 700;
  z-index: 300;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Footer ──────────────────────────────────────────────────────── */
.page-footer {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0.5rem;
  padding: 1.5rem 1.25rem 1rem;
  font-size: var(--tx-xs);
  color: var(--text-muted);
}
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.hidden { display: none !important; }

/* Browsers default disabled form controls to the 🚫 circle-slash cursor.
   Mata Ji disables the chat input + send button while a message is in
   flight and while the mic is recording — keep the cursor neutral so it
   doesn't flash a "not-allowed" hint at the user during normal use. */
input:disabled,
textarea:disabled,
select:disabled,
button:disabled { cursor: default; }

/* ─────────────────────────────────────────────────────────────────────
   MOBILE RESPONSIVE
   Narrow-phone refinements + chat-input that stacks above the bottom-nav
   on the chat page (without that, the fixed input would cover the nav).
   ───────────────────────────────────────────────────────────────────── */

/* Chat page: stack chat-input above the bottom-nav so both stay visible.
   The bottom-nav is taller than it looks once you add the icon (22px) +
   label (14px) + gap (3px) + its own padding + the device safe-area inset.
   We give the input enough clearance to keep the nav icons fully visible. */
body.chat-page .chat-input {
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  padding-bottom: 0.6rem;
  border-top: 1px solid var(--navy-border);
}
body.chat-page .chat-area {
  /* nav (~76px) + input (~76px) + safe-area + breathing room */
  padding-bottom: 13rem;
}

/* Admin filter row — each control stays usable even when wrapped. */
.filter-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-row > select,
.filter-row > .btn { flex: 1 1 auto; min-width: 140px; width: auto; margin: 0; }

/* Compact action button cluster (Edit / Del in tables). */
.action-bar { display: flex; gap: 6px; }

/* ── Phones (≤ 480px) ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Tighter outer padding so cards aren't cramped horizontally. */
  .container { padding: 0.85rem 0.85rem 0; }
  .card      { padding: 1.15rem 1rem; border-radius: 1.25rem; }
  .modal     { padding: 1.1rem 1rem; border-radius: 1.25rem; }
  .topbar    { padding: 0.7rem 0.9rem; gap: 8px; }

  /* Brand stays readable but drops its subtitle to free space for actions. */
  .brand          { gap: 10px; min-width: 0; }
  .brand .name    { font-size: var(--tx-sm); }
  .brand .sub     { display: none; }
  .brand .diya    { width: 34px; height: 34px; font-size: 18px; }
  .clinic-badge   { padding: 0.32rem 0.7rem; font-size: 11px; }

  /* Hero loses some vertical padding; H1 already uses clamp(). */
  .hero { padding: 1.55rem 1.1rem 1.35rem; }

  /* Reclaim the avatar gutter for chat surfaces on narrow phones. */
  .quick-replies,
  .remedy-card,
  .escalate-banner,
  .doctor-card,
  .coupon.in-chat { margin-left: 0; }

  /* Chat bubble can use more of the row on phones. Keep the large size +
     600 weight so Hindi/Hinglish stays easily readable without zooming. */
  .msg          { gap: 8px; }
  .msg-avatar   { width: 34px; height: 34px; font-size: 17px; }
  .msg-bubble   { max-width: 88%; padding: 0.9rem 1.1rem; font-size: var(--tx-lg); font-weight: 600; }

  /* Doctor card stays comfortable when stretched edge-to-edge. */
  .doc-avatar { width: 48px; height: 48px; font-size: 16px; }
  .doc-info h4 { font-size: var(--tx-base); }

  /* Chat input: bigger text so typing in Hindi/Hinglish is legible. */
  .chat-input          { padding: 0.6rem 0.65rem calc(0.6rem + env(safe-area-inset-bottom)); gap: 6px; }
  .chat-input input    { padding: 0.8rem 1rem; font-size: var(--tx-base); }
  .chat-input button.send { width: 44px; height: 44px; min-height: 44px; padding: 0; }
  .chat-input button.mic  { width: 44px; height: 44px; font-size: 17px; }

  /* Bottom nav slightly smaller so it doesn't dominate. */
  .bottom-nav      { padding: 0.45rem 0 calc(0.45rem + env(safe-area-inset-bottom)); }
  .nav-item        { padding: 0.35rem 0; }
  .nav-item .icon  { font-size: 20px; }

  /* Stack chat-input above nav at this width too (adjust pad). */
  body.chat-page .chat-input { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  body.chat-page .chat-area  { padding-bottom: 12rem; }

  /* OTP / coupon code — keep them legible but stop overflowing on 320px. */
  .otp-input { font-size: 22px !important; letter-spacing: 6px !important; }
  .coupon       { padding: 1.1rem 1rem 1rem; }
  .coupon .code { font-size: 26px; letter-spacing: 4px; }

  /* Stats: keep the 2-col layout but trim each tile. */
  .stat       { padding: 0.85rem 0.9rem; border-radius: var(--r-md); }
  .stat .num  { font-size: var(--tx-lg); }
  .stat .lbl  { font-size: 10px; }

  /* Tab pills slightly tighter so 3 tabs fit on one row at 360px. */
  .tab { padding: 0.5rem 0.85rem; font-size: var(--tx-xs); }

  /* Action buttons stay horizontal — the table scrolls horizontally rather
     than squishing the buttons character-by-character. */
  .action-bar              { flex-direction: row; gap: 4px; flex-wrap: nowrap; }
  .action-bar .btn.inline  { width: auto; padding: 0.4rem 0.7rem; white-space: nowrap; }
  table.data th, table.data td { padding: 0.55rem 0.65rem; }
  /* Bump table min-width on phones so columns don't squeeze pill/button text. */
  .data-wrap > table.data  { min-width: 780px; }
}

/* ── Very narrow phones (≤ 360px) — single-column rows ────────────── */
@media (max-width: 360px) {
  .row, .row-3 { grid-template-columns: 1fr !important; }
  .clinic-badge { padding: 0.28rem 0.55rem; font-size: 10.5px; }
  .hero h1 { font-size: 1.6rem; line-height: 1.15; }
}

/* ── Larger touch devices (landscape phones / small tablets) ──────── */
@media (min-width: 481px) and (max-width: 720px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 2rem 1.5rem; }
}

/* ── iOS Safari fallback for safe-area when not present ───────────── */
@supports not (padding: env(safe-area-inset-bottom)) {
  .bottom-nav, .chat-input { padding-bottom: 0.65rem; }
}

/* ── Doctor verify card — live coupon preview ──────────────────────── */
.coupon-preview {
  background: linear-gradient(140deg, rgba(0, 229, 212, 0.10), rgba(0, 229, 212, 0.03));
  border: 1px solid var(--navy-border-strong);
  border-radius: var(--r-lg);
  padding: 0.85rem 1rem;
  margin: 0.85rem 0 0.5rem;
  animation: msgIn 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
  font-family: var(--font-hindi);
}
.coupon-preview.is-used {
  background: linear-gradient(140deg, rgba(255, 201, 77, 0.10), rgba(255, 201, 77, 0.03));
  border-color: rgba(255, 201, 77, 0.35);
}
.coupon-preview .preview-head {
  display: flex; justify-content: flex-end;
  margin-bottom: 0.5rem;
}
.coupon-preview .preview-tag {
  font-size: 10.5px;
  font-weight: 900;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-full);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.coupon-preview.is-used .preview-tag {
  color: var(--warning);
  background: rgba(255, 201, 77, 0.12);
}
.coupon-preview .preview-row {
  display: flex; gap: 10px; align-items: baseline;
  padding: 0.35rem 0;
  font-size: var(--tx-sm);
  color: var(--text-main);
}
.coupon-preview .preview-row + .preview-row {
  border-top: 1px dashed var(--navy-border);
}
.coupon-preview .preview-label {
  flex: 0 0 100px;
  font-size: var(--tx-xs);
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.coupon-preview b { color: var(--white); }
.coupon-preview .preview-warn {
  margin-top: 0.55rem;
  padding: 0.5rem 0.7rem;
  background: rgba(255, 201, 77, 0.10);
  border: 1px solid rgba(255, 201, 77, 0.30);
  border-radius: var(--r-md);
  color: var(--warning);
  font-size: var(--tx-sm);
  font-weight: 700;
}

@media (max-width: 480px) {
  .coupon-preview .preview-row { flex-direction: column; gap: 2px; padding: 0.4rem 0; }
  .coupon-preview .preview-label { flex: 0 0 auto; }
}

/* Default table cells use normal wrapping (no mid-word breaks). The wrappers
   already scroll horizontally on phones, so columns stay readable. */
table.data td       { overflow-wrap: normal; word-break: normal; }
table.data .mono    { white-space: nowrap; }
table.data .wrap    { overflow-wrap: anywhere; word-break: break-word; }

/* Status pills and inline action buttons never wrap their labels. */
.pill               { white-space: nowrap; }
.action-bar         { white-space: nowrap; }
.action-bar .btn    { white-space: nowrap; }

/* Subtle right-edge fade hints that the table scrolls horizontally. */
.data-wrap {
  position: relative;
  background-image: linear-gradient(to right, transparent calc(100% - 24px), rgba(0, 229, 212, 0.10));
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 24px 100%;
  background-attachment: local;
}
@media (min-width: 900px) { .data-wrap { background-image: none; } }
