/* =========================================================================
   Night Recovery UI Kit — CSS
   Nguồn: 03-product/ui-kit/night-recovery-ui-kit.md + component-catalog.md
   Mục đích: bộ component HTML để dựng demo/prototype nhanh.
   Trạng thái: draft, chưa Approved-for-Code.
   ========================================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Night palette */
  --night-950: #050713;
  --night-900: #090d1d;
  --night-850: #0d1326;
  --night-800: #121a31;
  --night-700: #1b2540;
  --night-600: #27324f;

  /* Accent */
  --violet-500: #7c3aed;
  --violet-400: #a78bfa;
  --indigo-500: #4f46e5;
  --blue-400: #60a5fa;
  --green-400: #4ade80;
  --amber-400: #fbbf24;
  --rose-400: #fb7185;

  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-disabled: #64748b;

  /* Surface effects */
  --border-soft: rgba(148, 163, 184, 0.16);
  --border-active: rgba(167, 139, 250, 0.56);
  --glow-violet: 0 0 32px rgba(124, 58, 237, 0.28);
  --shadow-panel: 0 18px 48px rgba(0, 0, 0, 0.32);

  /* Gradients */
  --night-gradient: linear-gradient(180deg, #090d1d 0%, #050713 100%);
  --surface-gradient: linear-gradient(180deg, rgba(18, 26, 49, 0.96) 0%, rgba(9, 13, 29, 0.96) 100%);
  --cta-gradient: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);

  /* Spacing (4px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Type scale (token: size / line / weight) */
  --display-small: 650 28px/34px "Inter", -apple-system, "SF Pro", Roboto, sans-serif;
  --title-large: 650 24px/30px "Inter", -apple-system, "SF Pro", Roboto, sans-serif;
  --title-medium: 600 20px/26px "Inter", -apple-system, "SF Pro", Roboto, sans-serif;
  --body-large: 450 17px/24px "Inter", -apple-system, "SF Pro", Roboto, sans-serif;
  --body-medium: 450 15px/22px "Inter", -apple-system, "SF Pro", Roboto, sans-serif;
  --body-small: 450 13px/18px "Inter", -apple-system, "SF Pro", Roboto, sans-serif;
  --label-large: 600 15px/20px "Inter", -apple-system, "SF Pro", Roboto, sans-serif;
  --label-small: 550 12px/16px "Inter", -apple-system, "SF Pro", Roboto, sans-serif;

  --font-base: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro", Roboto, system-ui, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: var(--font-base);
  letter-spacing: 0;
  color: var(--text-primary);
  background: var(--night-950);
  -webkit-font-smoothing: antialiased;
}

/* Typography helpers */
.nr-display-small { font: var(--display-small); }
.nr-title-large   { font: var(--title-large); }
.nr-title-medium  { font: var(--title-medium); }
.nr-body-large    { font: var(--body-large); color: var(--text-secondary); }
.nr-body-medium   { font: var(--body-medium); color: var(--text-secondary); }
.nr-body-small    { font: var(--body-small); color: var(--text-muted); }
.nr-label-small   { font: var(--label-small); color: var(--text-muted); }

.nr-text-primary   { color: var(--text-primary); }
.nr-text-secondary { color: var(--text-secondary); }
.nr-text-muted     { color: var(--text-muted); }

/* =========================================================================
   1. App Shell & Navigation
   ========================================================================= */

/* Mobile phone frame for demos */
.nr-phone {
  width: 390px;
  max-width: 100%;
  min-height: 780px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  background: var(--night-gradient);
  box-shadow: var(--shadow-panel);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.nr-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--space-5) 0;
  gap: var(--space-5);
}
.nr-shell--dense  { padding-left: var(--space-4); padding-right: var(--space-4); }
.nr-shell--rescue { gap: var(--space-6); padding-top: var(--space-10); }
.nr-shell--player { padding: var(--space-6); align-items: center; text-align: center; }

.nr-shell__content { flex: 1; display: flex; flex-direction: column; gap: var(--space-4); }

/* Screen header */
.nr-header { display: flex; flex-direction: column; gap: var(--space-2); }
.nr-header__eyebrow { font: var(--label-small); color: var(--violet-400); text-transform: uppercase; letter-spacing: 0.04em; }
.nr-header__title   { font: var(--title-large); margin: 0; }
.nr-header__support { font: var(--body-medium); color: var(--text-secondary); margin: 0; max-width: 30ch; }

/* Bottom tab bar */
.nr-tabbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 72px;
  padding-bottom: var(--space-2);
  background: var(--night-900);
  border-top: 1px solid var(--border-soft);
}
.nr-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font: var(--label-small);
}
.nr-tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.nr-tab.is-active { color: var(--violet-400); }
.nr-tab.is-active .nr-tab__dot { opacity: 1; }
.nr-tab__dot { width: 4px; height: 4px; border-radius: var(--radius-full); background: var(--violet-400); opacity: 0; }

/* =========================================================================
   2. Buttons & Actions
   ========================================================================= */

.nr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 54px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  border: none;
  font: var(--label-large);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.2s ease;
}
.nr-btn:active { transform: scale(0.985); }
.nr-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }

/* Primary */
.nr-btn--primary {
  background: var(--cta-gradient);
  color: var(--text-primary);
  box-shadow: var(--glow-violet);
}
.nr-btn--primary:hover { box-shadow: 0 0 40px rgba(124, 58, 237, 0.36); }
.nr-btn--primary.is-loading { color: transparent; position: relative; pointer-events: none; }
.nr-btn--primary.is-loading::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border: 2px solid rgba(248, 250, 252, 0.4);
  border-top-color: var(--text-primary);
  border-radius: var(--radius-full);
  animation: nr-spin 0.8s linear infinite;
}
@keyframes nr-spin { to { transform: rotate(360deg); } }

/* Secondary */
.nr-btn--secondary {
  min-height: 48px;
  background: var(--night-800);
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
}
.nr-btn--secondary:hover { border-color: var(--border-active); color: var(--text-primary); }

/* Disabled */
.nr-btn:disabled, .nr-btn[aria-disabled="true"] {
  background: var(--night-700);
  color: var(--text-disabled);
  box-shadow: none;
  cursor: not-allowed;
}

/* Text link action */
.nr-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: none;
  border: none;
  padding: var(--space-2) 0;
  color: var(--violet-400);
  font: var(--label-large);
  cursor: pointer;
}
.nr-link:hover { color: var(--violet-500); }

/* Icon button */
.nr-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: var(--night-800);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nr-iconbtn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.nr-iconbtn:hover { border-color: var(--border-active); color: var(--text-primary); }
.nr-iconbtn--lg { width: 64px; height: 64px; background: var(--cta-gradient); border: none; color: var(--text-primary); box-shadow: var(--glow-violet); }
.nr-iconbtn--lg svg { width: 28px; height: 28px; }

/* =========================================================================
   3. State Selection
   ========================================================================= */

.nr-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 54px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--night-800);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  font: var(--body-large);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.nr-option:hover { border-color: var(--border-active); }
.nr-option:active { background: var(--night-700); }
.nr-option.is-selected {
  border-color: var(--border-active);
  background: rgba(124, 58, 237, 0.16);
}
.nr-option:disabled, .nr-option[aria-disabled="true"] { color: var(--text-disabled); cursor: not-allowed; }
.nr-option__icon { width: 22px; height: 22px; flex: none; stroke: var(--text-muted); fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.nr-option.is-selected .nr-option__icon { stroke: var(--violet-400); }
.nr-option__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nr-option__label { font: var(--body-large); }
.nr-option__helper { font: var(--body-small); color: var(--text-muted); }
.nr-option__check { width: 20px; height: 20px; flex: none; opacity: 0; stroke: var(--violet-400); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nr-option.is-selected .nr-option__check { opacity: 1; }

.nr-optionlist { display: flex; flex-direction: column; gap: var(--space-3); }

/* Progress dots */
.nr-dots { display: flex; gap: var(--space-2); align-items: center; }
.nr-dots__dot { width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--night-600); }
.nr-dots__dot.is-active { background: var(--violet-400); }
.nr-step-label { font: var(--label-small); color: var(--text-muted); }

/* =========================================================================
   Cards (shared base)
   ========================================================================= */

.nr-card {
  background: var(--surface-gradient);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.nr-card__eyebrow { font: var(--label-small); color: var(--violet-400); text-transform: uppercase; letter-spacing: 0.04em; }
.nr-card__title { font: var(--title-medium); margin: 0; }
.nr-card__meta { font: var(--body-small); color: var(--text-muted); }
.nr-card__body { font: var(--body-medium); color: var(--text-secondary); margin: 0; }

/* Card with leading icon header */
.nr-card__head { display: flex; align-items: center; gap: var(--space-3); }
.nr-card__head svg { width: 24px; height: 24px; flex: none; stroke: var(--violet-400); fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================================
   4. Protocol & Player
   ========================================================================= */

.nr-protocol .nr-protocol__duration {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font: var(--label-small); color: var(--text-secondary);
  background: var(--night-700); padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
}
.nr-protocol__fit {
  font: var(--body-small);
  color: var(--green-400);
  display: flex; align-items: center; gap: var(--space-2);
}
.nr-protocol__fit svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Alternative list */
.nr-altrow {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); border-radius: var(--radius-md);
  background: var(--night-800); border: 1px solid var(--border-soft);
}
.nr-altrow__body { flex: 1; }
.nr-altrow__title { font: var(--label-large); }
.nr-altrow__meta { font: var(--body-small); color: var(--text-muted); }

/* Player panel */
.nr-player { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); width: 100%; }
.nr-player__art {
  width: 200px; height: 200px; border-radius: var(--radius-full);
  background: radial-gradient(circle at 50% 35%, rgba(124,58,237,0.4), rgba(9,13,29,0.2) 70%);
  border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
}
.nr-player__art svg { width: 64px; height: 64px; stroke: var(--violet-400); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nr-player__title { font: var(--title-medium); text-align: center; }
.nr-player__times { display: flex; justify-content: space-between; width: 100%; font: var(--label-small); color: var(--text-muted); }
.nr-player__controls { display: flex; align-items: center; gap: var(--space-5); }
.nr-player__util { display: flex; justify-content: space-between; width: 100%; }

/* Progress bar */
.nr-progress { width: 100%; height: 4px; border-radius: var(--radius-full); background: var(--night-600); overflow: hidden; }
.nr-progress__fill { height: 100%; background: var(--violet-400); border-radius: var(--radius-full); }
.nr-progress--metric { height: 7px; }

/* =========================================================================
   5. Feedback & Follow-up
   ========================================================================= */

.nr-feedback { display: flex; flex-direction: column; gap: var(--space-3); }
.nr-feedback__q { font: var(--body-large); color: var(--text-primary); }

/* Low relief support card */
.nr-support { border-color: var(--border-soft); background: var(--night-800); }
.nr-support .nr-card__body { color: var(--text-secondary); }

/* =========================================================================
   6. Memory & Insight
   ========================================================================= */

.nr-insight__action { color: var(--text-primary); font: var(--body-medium); }
.nr-confidence { font: var(--label-small); color: var(--text-muted); font-style: italic; }

/* This week summary metrics */
.nr-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.nr-metric { background: var(--night-800); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: var(--space-3); }
.nr-metric__value { font: var(--title-medium); color: var(--text-primary); }
.nr-metric__label { font: var(--body-small); color: var(--text-muted); }

/* Recovery identity */
.nr-identity__name { font: var(--title-medium); color: var(--violet-400); }
.nr-taglist { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.nr-tag {
  font: var(--label-small); color: var(--text-secondary);
  background: var(--night-700); border: 1px solid var(--border-soft);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
}

/* =========================================================================
   7. Trust, Safety & Privacy
   ========================================================================= */

.nr-privacy { background: var(--night-850); border-color: var(--border-soft); }
.nr-privacy .nr-card__head svg { stroke: var(--blue-400); }

.nr-safety { background: var(--night-850); border-color: var(--border-soft); }
.nr-safety--soft .nr-card__head svg { stroke: var(--blue-400); }
.nr-safety--important { border-color: rgba(251, 191, 36, 0.4); }
.nr-safety--important .nr-card__head svg { stroke: var(--amber-400); }
.nr-safety--urgent { border-color: rgba(251, 113, 133, 0.5); }
.nr-safety--urgent .nr-card__head svg { stroke: var(--rose-400); }

/* Data control rows */
.nr-datarow {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 54px; padding: var(--space-3) var(--space-4);
  background: var(--night-800); border: 1px solid var(--border-soft);
  border-radius: var(--radius-md); cursor: pointer; color: var(--text-primary);
  font: var(--body-large);
}
.nr-datarow svg.nr-datarow__lead { width: 22px; height: 22px; stroke: var(--text-muted); fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.nr-datarow__label { flex: 1; }
.nr-datarow svg.nr-datarow__chev { width: 18px; height: 18px; stroke: var(--text-muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================================
   8. Monetization
   ========================================================================= */

.nr-badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font: var(--label-small); padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full); border: 1px solid var(--border-soft);
}
.nr-badge--free { color: var(--blue-400); background: rgba(96,165,250,0.1); }
.nr-badge--plus { color: var(--green-400); background: rgba(74,222,128,0.1); }
.nr-badge--pro  { color: var(--violet-400); background: rgba(167,139,250,0.12); }

.nr-plan__benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.nr-plan__benefits li { display: flex; align-items: flex-start; gap: var(--space-2); font: var(--body-medium); color: var(--text-secondary); }
.nr-plan__benefits svg { width: 18px; height: 18px; flex: none; margin-top: 2px; stroke: var(--green-400); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.nr-locked { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--night-800); border: 1px solid var(--border-soft); border-radius: var(--radius-md); }
.nr-locked svg { width: 20px; height: 20px; stroke: var(--text-muted); fill: none; stroke-width: 1.85; }
.nr-locked__body { flex: 1; }
.nr-locked__name { font: var(--label-large); }
.nr-locked__reason { font: var(--body-small); color: var(--text-muted); }

/* =========================================================================
   9. Empty / Loading / Error
   ========================================================================= */

.nr-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-4); padding: var(--space-8) var(--space-4); }
.nr-state__art {
  width: 72px; height: 72px; border-radius: var(--radius-full);
  background: var(--night-800); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
}
.nr-state__art svg { width: 32px; height: 32px; stroke: var(--violet-400); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nr-state__text { font: var(--body-medium); color: var(--text-secondary); max-width: 32ch; }

/* Matching loading breathing animation */
.nr-breathe { animation: nr-breathe 3s ease-in-out infinite; }
@keyframes nr-breathe { 0%,100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.06); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .nr-breathe, .nr-btn--primary.is-loading::after { animation: none; }
}

/* =========================================================================
   10. Foundational — Onboarding / Account / Settings / Subscription
   (luôn có ở mọi sản phẩm; dùng chung cho các flow nền tảng)
   ========================================================================= */

/* ---------- Onboarding ---------- */
.nr-onboard { display: flex; flex-direction: column; gap: var(--space-6); flex: 1; }
.nr-onboard__top { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.nr-onboard__skip { font: var(--label-small); color: var(--text-muted); background: none; border: none; cursor: pointer; padding: var(--space-2); }
.nr-onboard__hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-4); padding: var(--space-8) 0; }
.nr-onboard__mark {
  width: 88px; height: 88px; border-radius: var(--radius-full);
  background: radial-gradient(circle at 50% 35%, rgba(124,58,237,0.4), rgba(9,13,29,0.1) 70%);
  border: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: center;
}
.nr-onboard__mark svg { width: 40px; height: 40px; stroke: var(--violet-400); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nr-onboard__title { font: var(--display-small); margin: 0; }
.nr-onboard__sub { font: var(--body-medium); color: var(--text-secondary); margin: 0; max-width: 30ch; }
.nr-onboard__foot { margin-top: auto; padding-bottom: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.nr-onboard__progress { display: flex; align-items: center; justify-content: center; padding-top: var(--space-2); }

/* Opt-in / permission card (notification, ngữ cảnh) */
.nr-optin { gap: var(--space-4); }
.nr-optin__why { font: var(--body-small); color: var(--text-muted); }

/* ---------- Auth buttons (provider) ---------- */
.nr-authbtn {
  display: flex; align-items: center; justify-content: center; gap: var(--space-3);
  width: 100%; min-height: 52px; padding: 0 var(--space-4);
  border-radius: var(--radius-md); border: 1px solid var(--border-soft);
  background: var(--night-800); color: var(--text-primary);
  font: var(--label-large); cursor: pointer;
}
.nr-authbtn:hover { border-color: var(--border-active); }
.nr-authbtn svg { width: 20px; height: 20px; }
.nr-authbtn--apple { background: #fff; color: #000; border-color: transparent; }
.nr-authbtn--google { background: #fff; color: #1f1f1f; border-color: transparent; }
.nr-authbtn--email { background: var(--night-800); color: var(--text-secondary); }

/* Guest / account banner */
.nr-account { display: flex; align-items: center; gap: var(--space-4); }
.nr-account__avatar {
  width: 48px; height: 48px; border-radius: var(--radius-full); flex: none;
  background: var(--night-700); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
}
.nr-account__avatar svg { width: 24px; height: 24px; stroke: var(--text-muted); fill: none; stroke-width: 1.85; }
.nr-account__body { flex: 1; }
.nr-account__name { font: var(--title-medium); }
.nr-account__meta { font: var(--body-small); color: var(--text-muted); }

/* ---------- Settings list ---------- */
.nr-section { font: var(--label-small); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin: var(--space-5) 0 var(--space-2); }
.nr-list {
  display: flex; flex-direction: column;
  background: var(--night-800); border: 1px solid var(--border-soft);
  border-radius: var(--radius-md); overflow: hidden;
}
.nr-row {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 54px; padding: var(--space-3) var(--space-4);
  background: none; border: none; width: 100%; text-align: left;
  color: var(--text-primary); font: var(--body-large); cursor: pointer;
}
.nr-row + .nr-row { border-top: 1px solid var(--border-soft); }
.nr-row__lead { width: 22px; height: 22px; flex: none; stroke: var(--text-muted); fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.nr-row__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nr-row__label { font: var(--body-large); }
.nr-row__sub { font: var(--body-small); color: var(--text-muted); }
.nr-row__value { font: var(--body-medium); color: var(--text-muted); }
.nr-row__chev { width: 18px; height: 18px; flex: none; stroke: var(--text-muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nr-row--danger .nr-row__label, .nr-row--danger .nr-row__lead { color: var(--rose-400); stroke: var(--rose-400); }

/* ---------- Switch / toggle ---------- */
.nr-switch { position: relative; width: 48px; height: 28px; flex: none; display: inline-block; }
.nr-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.nr-switch__track {
  position: absolute; inset: 0; border-radius: var(--radius-full);
  background: var(--night-600); border: 1px solid var(--border-soft);
  transition: background 0.18s ease;
}
.nr-switch__thumb {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: var(--radius-full); background: var(--text-secondary);
  transition: transform 0.18s ease, background 0.18s ease;
}
.nr-switch input:checked ~ .nr-switch__track { background: var(--violet-500); border-color: transparent; }
.nr-switch input:checked ~ .nr-switch__thumb { transform: translateX(20px); background: #fff; }
.nr-switch input:focus-visible ~ .nr-switch__track { box-shadow: var(--glow-violet); }

/* ---------- Segmented control (billing period…) ---------- */
.nr-segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--night-800); border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}
.nr-segmented button {
  border: none; background: none; cursor: pointer;
  padding: var(--space-2) var(--space-4); border-radius: calc(var(--radius-md) - 3px);
  color: var(--text-muted); font: var(--label-large);
}
.nr-segmented button.is-active { background: var(--violet-500); color: var(--text-primary); }
.nr-seg-note { font: var(--label-small); color: var(--green-400); }

/* ---------- Subscription / Paywall ---------- */
.nr-paywall__lead { display: flex; flex-direction: column; gap: var(--space-2); text-align: center; align-items: center; }
.nr-paywall__lead svg { width: 40px; height: 40px; stroke: var(--violet-400); fill: none; stroke-width: 1.5; }

/* Pricing plan card */
.nr-plan-card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-3);
  background: var(--surface-gradient); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: var(--space-5);
}
.nr-plan-card--featured { border-color: var(--border-active); box-shadow: var(--glow-violet); }
.nr-plan-card__ribbon {
  position: absolute; top: -10px; right: var(--space-4);
  font: var(--label-small); color: var(--text-primary);
  background: var(--cta-gradient); padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
}
.nr-plan-card__name { font: var(--title-medium); }
.nr-plan-card__price { display: flex; align-items: baseline; gap: var(--space-2); }
.nr-plan-card__amount { font: var(--title-large); }
.nr-plan-card__period { font: var(--body-small); color: var(--text-muted); }
.nr-plan-card__outcome { font: var(--body-medium); color: var(--text-secondary); }

/* Entitlement comparison */
.nr-entitlement { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; font: var(--body-medium); color: var(--text-secondary); }
.nr-entitlement svg { width: 18px; height: 18px; flex: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.nr-entitlement--yes svg { stroke: var(--green-400); }
.nr-entitlement--no { color: var(--text-disabled); }
.nr-entitlement--no svg { stroke: var(--text-disabled); }

/* Trust line dưới paywall */
.nr-trustline { font: var(--body-small); color: var(--text-muted); text-align: center; }
