/* Qumanity — dark modern theme (high-contrast text) */
:root {
  --qb-topbar-bg: #111111;
  --qb-topbar-text: #ffffff;
  --qb-topbar-muted: rgba(255, 255, 255, 0.72);
  --qb-topbar-accent: #ffd700;
  --qb-bg: #0f172a;
  --qb-surface: #1e293b;
  --qb-surface-elevated: #334155;
  --qb-surface-tint: #1e293b;
  --qb-border: #475569;
  --qb-text: #ffffff;
  --qb-muted: #cbd5e1;
  --qb-subtle: #fef08a;
  --qb-primary: #f59e0b;
  --qb-primary-hover: #d97706;
  --qb-primary-dim: rgba(245, 158, 11, 0.2);
  --qb-secondary: #3b82f6;
  --qb-secondary-hover: #2563eb;
  --qb-secondary-dim: rgba(59, 130, 246, 0.2);
  --qb-accent: #f59e0b;
  --qb-accent-dim: rgba(245, 158, 11, 0.18);
  --qb-danger: #ef4444;
  --qb-danger-dim: rgba(239, 68, 68, 0.18);
  --qb-warning: #fbbf24;
  --qb-warning-dim: rgba(251, 191, 36, 0.22);
  --qb-success: #10b981;
  --qb-success-bg: rgba(16, 185, 129, 0.15);
  --qb-sita-brand: #2d5016;
  --qb-highlight: #fef08a;
  --qb-btn-neutral: #d1d5db;
  --qb-btn-neutral-text: #000000;
  /* Varna functional colors (equal categories — not hierarchical) */
  --qb-varna-vidya: #ff9933;
  --qb-varna-raksha: #ff0000;
  --qb-varna-artha: #ffd700;
  --qb-varna-seva: #1e90ff;
  --font-sans: "Inter", system-ui, -apple-system, "DM Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  background: var(--qb-bg);
  color: var(--qb-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Accessibility: visible focus ring for keyboard users */
:focus-visible {
  outline: 2px solid var(--qb-secondary);
  outline-offset: 2px;
}

/* Skip-to-content link (hidden until focused) */
.qb-skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 2000;
  padding: 0.5rem 1rem;
  background: var(--qb-primary);
  color: #000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}

.qb-skip-link:focus {
  left: 0;
}

a {
  color: var(--qb-subtle);
  text-decoration: none;
}

a:hover {
  color: var(--qb-topbar-accent);
  text-decoration: underline;
}

/* Bootstrap text utilities — force light on dark backgrounds */
.text-secondary {
  color: var(--qb-subtle) !important;
}

.text-muted {
  color: var(--qb-muted) !important;
}

.text-info {
  color: #7dd3fc !important;
}

.text-success {
  color: var(--qb-success) !important;
}

.text-danger {
  color: #fca5a5 !important;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--qb-text);
}

p, li, label, td, th, span, div {
  color: inherit;
}

/* ── Top bar (black) ── */
.qb-language-dropdown-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0 0.25rem;
}

.qb-language-dropdown {
  font-size: 0.72rem;
  padding: 0.12rem 0.35rem;
  height: 1.75rem;
  line-height: 1.15;
  max-width: 7.25rem;
  min-height: 0;
  background: var(--qb-surface-elevated, #222);
  color: var(--qb-topbar-text, #fff);
  border-color: var(--qb-border, #444);
}

.qb-nav-actions .qb-language-dropdown-wrap {
  margin-right: 0.15rem;
}

.qb-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem clamp(0.75rem, 3vw, 1.25rem);
  background: var(--qb-topbar-bg);
  border-bottom: 1px solid #333333;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--qb-topbar-text);
}

.qb-brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--qb-topbar-text);
}

.qb-brand-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(100%, 28rem);
}

.qb-logo-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.qb-logo-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.qb-sita-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.qb-logo-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.qb-sita-logo {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--qb-topbar-accent);
}

.qb-foundation-logo {
  font-size: 0.5625rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--qb-topbar-text);
  text-transform: uppercase;
  margin-top: 2px;
}

.qb-logo-divider {
  width: 2px;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.qb-qumanity-block {
  display: flex;
  align-items: center;
}

.qb-qumanity-logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--qb-topbar-text);
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.3),
    0 0 20px rgba(255, 215, 0, 0.15);
  transition: text-shadow 0.3s ease;
}

.qb-brand:hover .qb-qumanity-logo,
.qb-brand:focus-visible .qb-qumanity-logo {
  text-shadow:
    0 0 12px rgba(255, 215, 0, 0.45),
    0 0 24px rgba(255, 215, 0, 0.25);
}

@media (max-width: 768px) {
  .qb-sita-logo,
  .qb-qumanity-logo {
    font-size: 1.25rem;
  }

  .qb-logo-divider {
    height: 1.875rem;
  }

  .qb-foundation-logo {
    font-size: 0.4375rem;
  }

  .qb-logo-left,
  .qb-logo-container {
    gap: 12px;
  }
}

.qb-brand-mark {
  flex-shrink: 0;
  width: 5.125rem;
  height: 2.5rem;
  line-height: 0;
}

.qb-brand-mark svg {
  display: block;
  width: 100%;
  height: auto;
}

.qb-brand-logo-img {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  margin-right: 0.5rem;
  display: block;
  object-fit: contain;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
}

.qb-brand-wordmark {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--qb-topbar-text);
}

.qb-brand-wordmark span {
  color: var(--qb-topbar-accent);
}

.qb-brand-sita-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--qb-topbar-accent);
  color: #000;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  line-height: 1.2;
}

.qb-footer-link {
  color: var(--qb-topbar-accent);
  text-decoration: underline;
  margin-left: 0.5rem;
}

.qb-donation-qr-img {
  max-width: 220px;
  height: auto;
  border: 1px solid var(--qb-border);
  border-radius: 8px;
  background: #fff;
}

.qb-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.qb-modal-backdrop[hidden] {
  display: none !important;
}

.qb-modal {
  max-width: 28rem;
  width: 100%;
}

.qb-nav-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.qb-nav-anchor {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--qb-topbar-text);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  transition: background 0.12s ease, color 0.12s ease;
}

.qb-nav-anchor:hover {
  color: var(--qb-topbar-accent);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
}

.qb-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Top-bar buttons & links */
.qb-navbar .qb-btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--qb-topbar-text);
}

.qb-navbar .qb-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--qb-topbar-accent);
  color: var(--qb-topbar-accent);
  text-decoration: none;
}

.qb-navbar .qb-btn-link {
  color: var(--qb-topbar-accent);
}

.qb-navbar .qb-btn-primary {
  background: var(--qb-primary);
  border: 1px solid var(--qb-primary-hover);
  color: #000000;
}

.qb-navbar .text-muted,
.qb-navbar .qb-timebox-cal-label {
  color: var(--qb-topbar-muted) !important;
}

.qb-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.qb-hero {
  margin-bottom: 2rem;
}

.qb-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 0.35rem;
}

.qb-hero-head__text {
  flex: 1 1 16rem;
  min-width: 0;
}

.qb-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
  color: var(--qb-text);
}

.qb-lead {
  color: var(--qb-muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0;
}

.qb-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.qb-humans-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 2rem;
}

.qb-cards-humans {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.qb-card {
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.qb-card-label-sentence {
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.qb-card-stat {
  font-size: 2rem;
  font-weight: 700;
  color: var(--qb-topbar-accent);
  margin-bottom: 0.25rem;
}

.qb-card-label {
  font-size: 0.85rem;
  color: var(--qb-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.qb-panel {
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 1.75rem);
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.qb-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--qb-text);
}

.qb-chart-wrap {
  position: relative;
  height: min(420px, 55vh);
  width: 100%;
}

@media (max-width: 576px) {
  .qb-chart-wrap {
    height: 320px;
  }
}

/* Buttons */
.qb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
  text-decoration: none;
}

.qb-btn:active {
  transform: scale(0.98);
}

.qb-btn-primary {
  background: var(--qb-primary);
  color: #000000;
  border: 1px solid var(--qb-primary-hover);
}

.qb-btn-primary:hover {
  background: var(--qb-primary-hover);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  text-decoration: none;
  color: #000000;
}

.qb-btn-outline {
  background: var(--qb-primary);
  border: 1px solid var(--qb-primary-hover);
  color: #000000;
}

.qb-btn-outline:hover {
  background: var(--qb-primary-hover);
  border-color: var(--qb-primary-hover);
  text-decoration: none;
  color: #000000;
}

.qb-btn-secondary {
  background: var(--qb-secondary);
  border: 1px solid var(--qb-secondary-hover);
  color: #ffffff;
}

.qb-btn-secondary:hover {
  background: var(--qb-secondary-hover);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
  color: #ffffff;
  text-decoration: none;
}

/* Neutral utility buttons (modal close, back navigation). */
.qb-btn-neutral,
.qb-btn-outline[data-qb-close-modal],
#qb-back-to-pcb-from-family,
#qb-back-to-pcb-from-social {
  background: var(--qb-btn-neutral);
  border: 1px solid #9ca3af;
  color: var(--qb-btn-neutral-text);
}

.qb-btn-neutral:hover,
.qb-btn-outline[data-qb-close-modal]:hover,
#qb-back-to-pcb-from-family:hover,
#qb-back-to-pcb-from-social:hover {
  background: #bfc5cd;
  border-color: #6b7280;
  color: #000000;
  text-decoration: none;
}

.qb-btn-danger {
  background: var(--qb-danger);
  color: #ffffff;
  border: 1px solid #dc2626;
}

.qb-btn-danger:hover {
  filter: brightness(1.06);
  color: #ffffff;
  text-decoration: none;
}

.qb-btn-warning {
  background: var(--qb-warning);
  color: #1e1e1e;
  border: 1px solid #d97706;
}

.qb-btn-warning:hover {
  filter: brightness(1.05);
  color: #1e1e1e;
  text-decoration: none;
}

.qb-btn-link {
  background: transparent;
  color: var(--qb-subtle);
  padding: 0.25rem 0.5rem;
}

.qb-btn-link:hover {
  color: var(--qb-topbar-accent);
}

.qb-form {
  max-width: 480px;
}

.qb-form-wide {
  max-width: 720px;
}

.qb-fieldset {
  border: 1px solid var(--qb-border);
  border-radius: 12px;
  padding: 1rem 1rem 1.25rem;
  margin: 0;
  background: var(--qb-surface);
}

.qb-fieldset legend {
  float: unset;
  width: auto;
  padding: 0 0.35rem;
  margin-bottom: 0;
  color: var(--qb-subtle);
  font-weight: 600;
}

.qb-public-badge {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--qb-primary);
  background: var(--qb-primary-dim);
}

.qb-public-id {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--qb-primary);
  letter-spacing: 0.04em;
}

.qb-stat-tile {
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
  border-radius: 12px;
  padding: 1rem;
  height: 100%;
}

.qb-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--qb-muted);
  margin-bottom: 0.25rem;
}

.qb-stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--qb-text);
}

.qb-form-group {
  margin-bottom: 1rem;
}

.qb-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--qb-muted);
}

.qb-form-control,
.qb-form select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--qb-border);
  background: var(--qb-surface);
  color: var(--qb-text);
  font-size: 1rem;
  font-family: inherit;
}

.qb-field-error,
.qb-form-control.qb-field-error,
.form-select.qb-field-error {
  border-color: var(--qb-danger) !important;
  box-shadow: 0 0 0 2px var(--qb-danger-dim);
}

.qb-form-group.has-error label {
  color: var(--qb-danger);
}

.qb-form-control:focus,
.qb-form select:focus {
  outline: 2px solid var(--qb-primary);
  outline-offset: 1px;
  border-color: var(--qb-primary);
}

.qb-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.qb-alert-success {
  background: var(--qb-success-bg);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--qb-success);
}

.qb-alert-error {
  background: var(--qb-danger-dim);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.qb-alert-warning {
  background: var(--qb-warning-dim);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: var(--qb-warning);
}

.qb-muted-box {
  color: var(--qb-muted);
  padding: 1rem;
  border: 1px dashed var(--qb-border);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  background: var(--qb-surface);
}

.qb-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--qb-muted);
  font-size: 0.85rem;
  background: var(--qb-surface);
  border-top: 1px solid var(--qb-border);
}

.hidden {
  display: none !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--qb-muted);
}

.breadcrumb-item.active {
  color: var(--qb-text);
}

.breadcrumb-item a {
  color: var(--qb-primary);
}

.qb-search-hit {
  border-radius: 8px;
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
}

.qb-search-hit-list {
  max-height: 320px;
  overflow-y: auto;
}

.form-control,
.form-select {
  background-color: var(--qb-surface);
  border-color: var(--qb-border);
  color: var(--qb-text);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--qb-surface);
  border-color: var(--qb-primary);
  color: var(--qb-text);
  box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.25);
}

.form-control::placeholder {
  color: var(--qb-muted);
  opacity: 1;
}

.table {
  --bs-table-color: var(--qb-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--qb-border);
  color: var(--qb-text);
}

.table td,
.table th {
  color: var(--qb-text);
  border-color: var(--qb-border);
}

/* Home — About section */
#about {
  scroll-margin-top: 5.5rem;
}

.qb-about {
  margin-bottom: 2.5rem;
}

.qb-about > h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
  color: var(--qb-primary);
}

.qb-about-intro {
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
  border-radius: 14px;
  padding: clamp(1.1rem, 3vw, 1.65rem);
  margin-bottom: 1.25rem;
}

.qb-about-intro p:last-child {
  margin-bottom: 0;
}

.qb-about-card {
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 1rem;
}

.qb-about-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  line-height: 1.35;
  color: var(--qb-text);
}

.qb-about-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  color: var(--qb-primary);
}

.qb-about-card p:last-child,
.qb-about-card ul:last-child {
  margin-bottom: 0;
}

.qb-about-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.qb-about-card li {
  margin-bottom: 0.4rem;
  color: var(--qb-text);
}

.qb-about-card li:last-child {
  margin-bottom: 0;
}

.qb-about-rule {
  border: none;
  border-top: 1px solid var(--qb-border);
  margin: 1.25rem 0;
  opacity: 0.85;
}

.qb-about-closing {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--qb-text);
  margin: 0 0 1.5rem;
  line-height: 1.45;
}

.qb-about-cta {
  margin-top: 0.25rem;
}

.qb-explorer {
  border: 1px solid var(--qb-border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  background: var(--qb-surface);
}

.time-box-inline {
  display: block;
  margin-left: auto;
  background: #000000;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  text-align: right;
  max-width: min(280px, 100%);
  line-height: 1.35;
  border: 1px solid #444444;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
}

.time-box-inline__line {
  margin: 0;
}

.time-box-inline__line--datetime {
  font-weight: 600;
}

.time-box-inline__tz {
  opacity: 0.85;
  font-weight: 400;
}

.time-box-inline__line--lunar2 {
  padding-left: 2.9em;
}

.time-box-inline__line--phase {
  opacity: 0.92;
  font-size: 11px;
}

@media (max-width: 576px) {
  .time-box-inline {
    display: block;
    width: 100%;
    max-width: none;
    text-align: center;
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .time-box-inline__line--lunar2 {
    padding-left: 0;
  }
}

/* Public location pages */
.qb-location-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 190px);
  gap: 1.25rem;
  align-items: start;
  padding-inline: clamp(0.25rem, 2vw, 0.5rem);
}

.qb-location-page-main {
  min-width: 0;
}

.qb-location-zodiac-rail {
  position: sticky;
  top: 5.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.qb-zodiac-rail-block {
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--qb-border);
  background: var(--qb-surface);
}

.qb-zodiac-rail-block--fire {
  border-left: 4px solid #ff6f61;
}

.qb-zodiac-rail-block--earth {
  border-left: 4px solid #b0e57c;
}

.qb-zodiac-rail-block--air {
  border-left: 4px solid #c0c0c0;
}

.qb-zodiac-rail-block--water {
  border-left: 4px solid #79e0ee;
}

.qb-zodiac-rail-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--qb-muted);
  margin-bottom: 0.35rem;
}

.qb-zodiac-rail-signs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.qb-zodiac-rail-chip {
  display: block;
  font-size: 0.78rem;
  padding: 0.28rem 0.4rem;
  border-radius: 6px;
  background: var(--qb-surface-elevated);
  color: var(--qb-text);
}

.qb-location-back-row .qb-btn {
  white-space: nowrap;
}

.qb-location-wallet-box {
  min-height: 9.5rem;
}

.qb-location-wallet-name {
  margin: 0.35rem 0 0.5rem;
  color: var(--qb-text);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
}

.qb-location-wallet-balance {
  color: var(--qb-success);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.qb-location-wallet-balance span {
  font-size: 0.8rem;
  font-weight: 600;
}

.qb-location-wallet-id {
  margin-top: 0.65rem;
  color: var(--qb-muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.qb-zodiac-count-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.qb-zodiac-count-row {
  font-size: 0.78rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--qb-border);
}

.qb-zodiac-count-row:last-child {
  border-bottom: none;
}

@media (max-width: 768px) {
  .qb-location-page-grid {
    grid-template-columns: 1fr;
  }

  .qb-location-zodiac-rail {
    position: relative;
    top: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .qb-zodiac-rail-block {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px;
  }
}

/* Homepage header */
.qb-home-header-inner {
  width: 100%;
}

.qb-home-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  width: 100%;
}

.qb-home-brand {
  flex: 0 0 auto;
}

.qb-home-header-trailing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 1.15rem;
  flex: 1 1 12rem;
  min-width: 0;
}

.qb-home-auth {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
}

.qb-home-btn-auth {
  white-space: nowrap;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.qb-home-btn-auth:hover {
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.qb-home-btn-signout {
  padding-inline: 0.5rem;
}

.qb-home-text-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.qb-home-text-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--qb-topbar-muted);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  transition: color 0.12s ease;
}

.qb-home-text-link:hover {
  color: var(--qb-topbar-accent);
}

.qb-home-timebox {
  flex: 0 1 auto;
  max-width: min(100%, 28rem);
}

/* Homepage — Earth hero with dark overlay */
body.qb-page-home {
  background-color: var(--qb-bg);
  background-image: url("/static/images/earth5.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.qb-page-home header.qb-navbar {
  background: var(--qb-topbar-bg);
  border-bottom: 1px solid #333333;
}

body.qb-page-home .qb-main {
  background: transparent;
}

.qb-home-mega-hero {
  position: relative;
  isolation: isolate;
  min-height: min(72vh, 920px);
  padding-bottom: clamp(1.25rem, 4vw, 2rem);
}

.qb-home-mega-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.45) 0%,
    rgba(15, 23, 42, 0.78) 42%,
    rgba(15, 23, 42, 0.92) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.qb-home-mega-hero > * {
  position: relative;
  z-index: 1;
}

body.qb-page-home .qb-home-mega-hero .qb-hero {
  margin-bottom: clamp(1.25rem, 4vw, 2rem);
  padding-top: clamp(1rem, 4vw, 2rem);
}

.hero-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.hero-overlay {
  background: rgba(30, 41, 59, 0.92);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border-radius: 12px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  color: var(--qb-text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--qb-border);
}

.hero-overlay h1 {
  color: var(--qb-topbar-accent);
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  margin: 0 0 0.65rem;
  letter-spacing: -0.03em;
}

.hero-overlay__lead {
  color: var(--qb-muted);
  margin: 0;
  max-width: 52ch;
  margin-inline: auto;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.55;
}

body.qb-page-home .qb-home-mega-hero .qb-card {
  background: rgba(30, 41, 59, 0.92);
  border-color: var(--qb-border);
}

body.qb-page-home .qb-explorer--mega {
  background: rgba(30, 41, 59, 0.92);
  border-color: var(--qb-border);
}

body.qb-page-home .qb-explorer--mega h2 {
  color: var(--qb-primary);
}

body.qb-page-home .qb-home-mega-hero .text-muted,
body.qb-page-home .qb-home-mega-hero .qb-home-mega-muted {
  color: var(--qb-muted) !important;
}

body.qb-page-home #about.qb-about {
  background: var(--qb-surface);
  border-radius: 14px;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--qb-border);
}

@media (max-width: 768px) {
  .qb-home-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .qb-home-brand {
    width: 100%;
  }

  .qb-home-header-trailing {
    justify-content: flex-start;
    flex-basis: 100%;
    gap: 0.55rem 0.85rem;
  }

  .qb-home-timebox {
    max-width: none;
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.74rem;
  }

  .qb-home-timebox .qb-timebox-main-text {
    font-size: 0.76rem;
  }

  body.qb-page-home .qb-home-mega-hero {
    min-height: 0;
  }

  .hero-overlay {
    padding: 1rem 1rem;
    border-radius: 10px;
  }

  .hero-overlay__lead {
    font-size: 0.92rem;
  }

  body.qb-page-home {
    background-attachment: scroll;
  }
}

/* ── Toast notifications (top-right, auto-dismiss) ── */
.qb-toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(90vw, 22rem);
  pointer-events: none;
}

.qb-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--qb-surface);
  color: var(--qb-text);
  border: 1px solid var(--qb-border);
  border-left: 4px solid var(--qb-secondary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font-size: 0.92rem;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.qb-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.qb-toast--success {
  border-left-color: var(--qb-success);
}

.qb-toast--error {
  border-left-color: var(--qb-danger);
}

.qb-toast--warning {
  border-left-color: var(--qb-warning);
}

.qb-toast__close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--qb-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}

.qb-toast__close:hover {
  color: var(--qb-text);
}

/* ── Loading spinner ── */
.qb-spinner {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: qb-spin 0.7s linear infinite;
  vertical-align: -0.15em;
}

.qb-btn[aria-busy="true"],
.qb-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .qb-toast {
    transition: none;
  }
  .qb-spinner {
    animation-duration: 1.6s;
  }
}

/* About Page (Qumanity) — uses Qumanity design tokens, no hardcoded hex */
.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.about-header {
  text-align: center;
  margin-bottom: 40px;
}

.about-header h1 {
  font-size: 48px;
  color: var(--qb-primary);
}

.subtitle {
  font-size: 20px;
  color: var(--qb-muted);
  font-style: italic;
}

.about-header .foundation {
  margin-top: 12px;
  color: var(--qb-muted);
}

.about-header .foundation strong {
  color: var(--qb-primary);
}

.about-section {
  margin-bottom: 48px;
}

.about-section h2 {
  font-size: 28px;
  border-bottom: 2px solid var(--qb-primary);
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.moksha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.moksha-card {
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid var(--qb-primary);
}

.moksha-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--qb-primary);
}

/* Hamburger menu (top-right) — uses Qumanity design tokens */
.qb-hamburger-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
  color: var(--qb-topbar-text);
  padding: 6px 12px;
}

.hamburger:hover,
.hamburger:focus-visible {
  border-color: var(--qb-topbar-accent);
  color: var(--qb-topbar-accent);
}

.dropdown-menu.qb-hamburger-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  z-index: 1000;
  display: none;
  padding: 6px 0;
}

.dropdown-menu.qb-hamburger-menu.show {
  display: block;
}

.qb-hamburger-menu a,
.qb-hamburger-menu button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  color: var(--qb-text);
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}

.qb-hamburger-menu a:hover,
.qb-hamburger-menu button:hover,
.qb-hamburger-menu a:focus-visible,
.qb-hamburger-menu button:focus-visible {
  background: var(--qb-surface-elevated);
  color: var(--qb-topbar-accent);
}

.qb-hamburger-lang {
  padding: 8px 16px;
  border-top: 1px solid var(--qb-border);
  border-bottom: 1px solid var(--qb-border);
  margin: 4px 0;
}

.qb-hamburger-lang-label {
  display: block;
  font-size: 12px;
  color: var(--qb-muted);
  margin-bottom: 4px;
}

.qb-hamburger-lang .qb-language-dropdown {
  width: 100%;
}

@media (max-width: 575.98px) {
  .dropdown-menu.qb-hamburger-menu {
    position: fixed;
    top: auto;
    right: 8px;
    left: 8px;
    min-width: 0;
  }
}

/* Translation loading overlay */
.qb-translation-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.7);
}

.qb-translation-loader[hidden] {
  display: none;
}

.qb-translation-loader-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
  border-radius: 10px;
  padding: 16px 24px;
  color: var(--qb-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.qb-translation-loader-text {
  font-size: 15px;
}

/* ==========================================================================
   Bottom Vinaya Patrika marquee (scrolling poem ticker)
   The amber/gold accent (#FFD700) is intentional for this devotional ticker;
   surfaces reuse the standard design tokens.
   ========================================================================== */

/* Keep page content/footer clear of the fixed 50px ticker. */
body {
  padding-bottom: 50px;
}

.marquee-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0;
  z-index: 1000;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.marquee-left {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
}

/* SITA + राम yellow button — the clickable dropdown trigger in the
   bottom-left corner of the marquee. */
.sita-ram-button {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  min-width: fit-content;
  height: 44px;
  margin: 0 8px;
  padding: 0 8px;
  background-color: #ffd700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.sita-ram-button:hover,
.sita-ram-button[aria-expanded="true"] {
  opacity: 0.88;
}

.sita-ram-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.sita-text {
  font-family: "DM Sans", Arial, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #000000;
}

.ram-circle {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background-color: #000000;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ram-text {
  font-family: "Noto Sans Devanagari", system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

/* Scrolling poem area — white background, black text. */
.marquee-scroll {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  align-self: stretch;
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: 0 10px;
}

.marquee-text {
  display: inline-block;
  white-space: nowrap;
  /* Fallback duration only — marquee.js overrides animation-duration per poem
     so the scroll speed (px/second) stays constant regardless of text length. */
  animation: scrollText 75s linear infinite;
  padding-left: 100%;
  font-size: 22px;
  font-weight: 600;
  color: #000000;
  will-change: transform;
}

/* Freeze in place — preserves the current scroll position on resume. */
.marquee-text.paused {
  animation-play-state: paused;
}

@keyframes scrollText {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.marquee-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
}

/* Play/Pause + scrub arrows — black background, white icons. */
.marquee-right button {
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 9px;
  border-radius: 6px;
}

.marquee-right button:hover {
  background: #1a1a1a;
  border-color: #fff;
}

/* Scrub arrows are hidden while playing, shown only when paused. */
.marquee-arrow {
  display: none;
}

.marquee-container.is-paused .marquee-arrow {
  display: inline-block;
}

.dropdown-menu-marquee {
  position: absolute;
  bottom: 55px;
  left: 0;
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  display: none;
  z-index: 1001;
  overflow: hidden;
}

.dropdown-menu-marquee.show {
  display: block;
}

.dropdown-menu-marquee a,
.dropdown-menu-marquee button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  color: #f1f5f9;
  cursor: pointer;
  font-size: 14px;
}

.dropdown-menu-marquee a:hover,
.dropdown-menu-marquee button:hover {
  background: var(--qb-surface-elevated);
}

.dropdown-menu-marquee .active {
  background: #ffd700;
  color: #000;
  font-weight: bold;
}

/* ==========================================================================
   Homepage redesign — hero, pillars, features, stats, CTA
   ========================================================================== */

.homepage-hero {
  position: relative;
  min-height: 480px;
  margin-bottom: 2rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff9933 0%, #7c3a0a 35%, #0a1929 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--qb-text);
  overflow: hidden;
}

.hero-overlay-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.homepage-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 24px;
}

.hero-logo img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.hero-title {
  font-size: clamp(36px, 7vw, 56px);
  font-weight: 700;
  margin: 20px 0 8px;
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: clamp(18px, 3.5vw, 24px);
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--qb-topbar-accent);
}

.hero-description {
  font-size: 18px;
  margin-bottom: 32px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-large {
  padding: 14px 32px;
  font-size: 18px;
}

.pillars-section {
  padding: 48px 20px;
  text-align: center;
}

.pillars-section h2 {
  font-size: 32px;
  margin-bottom: 40px;
  color: var(--qb-topbar-accent);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.pillar-card {
  background: var(--qb-surface);
  border-radius: 16px;
  padding: 30px 20px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  border: 1px solid var(--qb-border);
}

.pillar-card:hover {
  transform: translateY(-5px);
  border-color: var(--qb-topbar-accent);
}

.pillar-icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

.pillar-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--qb-varna-vidya);
}

.pillar-card p {
  color: var(--qb-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.features-section {
  padding: 48px 20px;
  text-align: center;
}

.features-section h2 {
  font-size: 28px;
  margin-bottom: 32px;
  color: var(--qb-topbar-accent);
}

.features-list {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--qb-surface);
  font-size: 17px;
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.stats-section {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 40px 20px;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--qb-surface) 0%, var(--qb-bg) 100%);
  border-radius: 18px;
}

.stat-card {
  text-align: center;
  padding: 20px 40px;
  background: var(--qb-surface);
  border: 1px solid var(--qb-border);
  border-radius: 16px;
  min-width: 180px;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--qb-topbar-accent);
}

.stat-label {
  font-size: 16px;
  color: var(--qb-muted);
  margin-top: 8px;
}

.cta-section {
  text-align: center;
  padding: 56px 20px;
  margin: 2rem 0;
  background: linear-gradient(135deg, #ff9933 0%, #ffd700 100%);
  color: #000000;
  border-radius: 18px;
}

.cta-section h2 {
  font-size: 32px;
  margin-bottom: 16px;
  color: #000000;
}

.cta-section p {
  color: #1f1300;
}

.cta-register-btn {
  display: inline-block;
  margin-top: 12px;
  background: #000000;
  color: #ffd700;
  border: none;
}

.cta-register-btn:hover {
  background: #1a1a1a;
  color: #ffffff;
}

.cta-note {
  margin-top: 20px;
  font-size: 14px;
}

.cta-note a {
  color: #000000;
  font-weight: 600;
}

/* ==========================================================================
   Login page redesign
   ========================================================================== */

.login-container {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-card {
  max-width: 480px;
  width: 100%;
  background: var(--qb-surface);
  border-radius: 24px;
  padding: 40px;
  border: 1px solid var(--qb-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #ffffff;
  padding: 5px;
}

.login-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--qb-topbar-accent);
}

.login-header p {
  color: var(--qb-muted);
  margin-bottom: 0;
}

.login-form .qb-form-group {
  margin-bottom: 24px;
}

.login-hint {
  display: block;
  margin-top: 6px;
  color: var(--qb-muted);
  font-size: 0.8rem;
}

.otp-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
  flex-wrap: nowrap;
  padding: 5px 0;
  width: 100%;
  max-width: 100%;
}

.otp-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
}

.id-prefix {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--qb-text);
  min-width: 2rem;
  flex-shrink: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.otp-box {
  width: 32px;
  height: 42px;
  min-width: 32px;
  flex: 0 0 32px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  border: 2px solid var(--qb-border);
  border-radius: 6px;
  background: var(--qb-surface-elevated);
  color: var(--qb-text);
  padding: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.otp-box:focus {
  border-color: var(--qb-primary);
  outline: none;
  background: var(--qb-surface);
  box-shadow: 0 0 0 2px var(--qb-primary-dim);
}

.otp-box:valid:not(:placeholder-shown) {
  border-color: var(--qb-success);
  background: var(--qb-success-bg);
}

@media (max-width: 420px) {
  .otp-box {
    width: 28px;
    height: 38px;
    min-width: 28px;
    flex-basis: 28px;
    font-size: 0.9rem;
  }

  .otp-container {
    gap: 3px;
  }

  .id-prefix {
    font-size: 0.95rem;
    min-width: 1.75rem;
  }
}

.password-options {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.forgot-link,
.recover-link {
  font-size: 13px;
  color: var(--qb-muted);
  text-decoration: none;
}

.forgot-link:hover,
.recover-link:hover {
  color: var(--qb-topbar-accent);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--qb-varna-vidya);
  color: #000000;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-login:hover {
  background: var(--qb-topbar-accent);
  transform: translateY(-2px);
}

.login-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--qb-border);
}

.login-footer a {
  color: var(--qb-topbar-accent);
  text-decoration: none;
}

/* ==========================================================================
   Registration page redesign — multi-step wizard
   ========================================================================== */

.register-container {
  max-width: 860px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

.register-header {
  text-align: center;
  margin-bottom: 28px;
}

.register-header h1 {
  font-size: 32px;
  color: var(--qb-topbar-accent);
  margin-bottom: 8px;
}

.register-header p {
  color: var(--qb-muted);
  margin-bottom: 4px;
}

.register-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
}

.register-steps::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--qb-border);
  z-index: 0;
}

.register-steps .step {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
}

.register-steps .step-number {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 36px;
  background: var(--qb-surface);
  border: 2px solid var(--qb-border);
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 8px;
}

.register-steps .step.active .step-number {
  background: var(--qb-varna-vidya);
  border-color: var(--qb-varna-vidya);
  color: #000000;
}

.register-steps .step.completed .step-number {
  background: var(--qb-success);
  border-color: var(--qb-success);
  color: #000000;
}

.register-steps .step-label {
  display: block;
  font-size: 12px;
  color: var(--qb-muted);
}

.register-steps .step.active .step-label {
  color: var(--qb-topbar-accent);
  font-weight: 600;
}

.register-form {
  background: var(--qb-surface);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--qb-border);
}

.form-step-title {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--qb-topbar-accent);
}

.step-hint {
  font-size: 13px;
  color: var(--qb-muted);
  margin-bottom: 20px;
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--qb-border);
}

.register-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--qb-border);
}

.register-footer a {
  color: var(--qb-topbar-accent);
}

/* ==========================================================================
   About page — Five Elements philosophy
   ========================================================================== */

.philosophy-section {
  padding: 40px 0;
}

.philosophy-section h2 {
  color: var(--qb-topbar-accent);
  text-align: center;
  margin-bottom: 16px;
}

.elements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.element-card {
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  color: var(--qb-text);
}

.element-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.element-card p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.92);
}

.element-card.space {
  background: linear-gradient(135deg, #1a0b2e 0%, var(--qb-bg) 100%);
  border: 1px solid #6b21a5;
}

.element-card.fire {
  background: linear-gradient(135deg, rgba(255, 153, 51, 0.55) 0%, var(--qb-surface) 100%);
  border: 1px solid var(--qb-varna-vidya);
}

.element-card.earth {
  background: linear-gradient(135deg, rgba(19, 136, 8, 0.55) 0%, var(--qb-surface) 100%);
  border: 1px solid #138808;
}

.element-card.air {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.45) 0%, var(--qb-surface) 100%);
  border: 1px solid #94a3b8;
}

.element-card.water {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.55) 0%, var(--qb-surface) 100%);
  border: 1px solid var(--qb-secondary);
}

.philosophy-hierarchy {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 640px) {
  .register-form {
    padding: 20px 16px;
  }

  .register-steps .step-label {
    font-size: 10px;
  }

  .stats-section {
    gap: 16px;
  }

  .stat-card {
    padding: 16px 24px;
    min-width: 140px;
  }
}

/* Admin Panel — hamburger trigger + modal grid */
.qb-hamburger-admin-panel-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.qb-hamburger-admin-panel-btn:hover,
.qb-hamburger-admin-panel-btn:focus-visible {
  background: rgba(245, 158, 11, 0.12);
  outline: none;
}

.qb-admin-panel-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.75);
}

.qb-admin-panel-modal[hidden] {
  display: none;
}

body.qb-admin-panel-open {
  overflow: hidden;
}

.qb-admin-panel-content {
  width: min(100%, 36rem);
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.qb-admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--qb-border);
}

.qb-admin-panel-close {
  min-width: 2rem;
  font-size: 1.25rem;
  line-height: 1;
}

.qb-admin-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 540px) {
  .qb-admin-panel-grid {
    grid-template-columns: 1fr;
  }
}

.qb-admin-tool-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--qb-border);
  border-radius: 8px;
  background: var(--qb-bg);
  color: var(--qb-text);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.qb-admin-tool-btn:hover,
.qb-admin-tool-btn:focus-visible {
  background: var(--qb-primary-dim);
  border-color: var(--qb-primary);
  color: var(--qb-text);
  transform: translateY(-1px);
  outline: none;
}

.qb-admin-tool-icon {
  flex-shrink: 0;
  font-size: 1.15rem;
  line-height: 1;
}
