@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;900&family=Lato:wght@300;400;700&family=Cinzel+Decorative:wght@400;700&display=swap');

/* =============================================================
 * KALPATARU VEDIC PREDICTIONS — Design System
 * Sacred Red #af380d | Gold #eda800 | Parchment #fdf6ec
 * ============================================================= */

:root {
  /* ── Brand Palette ── */
  --brand-red:         #af380d;
  --brand-red-deep:    #8a2c09;
  --brand-red-light:   #c94214;
  --brand-gold:        #eda800;
  --brand-gold-light:  #f5c842;
  --brand-gold-pale:   #fde88a;
  --brand-gold-glow:   rgba(237, 168, 0, 0.25);

  /* ── Light Theme (Parchment) ── */
  --bg-canvas:    #fdf6ec;
  --bg-surface:   #fffdf7;
  --bg-subtle:    #f7ede0;
  --bg-muted:     #eedfd0;
  --bg-input:     #fffdf7;

  --border-subtle:   rgba(175, 56, 13, 0.12);
  --border-strong:   rgba(175, 56, 13, 0.28);
  --border-gold:     rgba(237, 168, 0, 0.4);
  --border-focus:    #eda800;

  --text-primary:    #1a0a04;
  --text-secondary:  #6b3a20;
  --text-tertiary:   #a87450;
  --text-inverse:    #fdf6ec;
  --text-gold:       #eda800;

  /* ── Buttons ── */
  --btn-primary-bg:     #eda800;
  --btn-primary-fg:     #1a0a04;
  --btn-primary-hover:  #f5c842;

  --btn-secondary-bg:     transparent;
  --btn-secondary-fg:     #af380d;
  --btn-secondary-border: rgba(175, 56, 13, 0.35);
  --btn-secondary-hover:  rgba(175, 56, 13, 0.07);

  --btn-danger-bg:    #af380d;
  --btn-danger-fg:    #fdf6ec;
  --btn-danger-hover: #8a2c09;

  /* ── Status Pills (Vedic palette) ── */
  --pill-green-bg:     #edf6ec;
  --pill-green-text:   #2b5c3a;
  --pill-green-border: rgba(43, 92, 58, 0.22);

  --pill-blue-bg:     #edf3fd;
  --pill-blue-text:   #1c4a85;
  --pill-blue-border: rgba(28, 74, 133, 0.22);

  --pill-amber-bg:     #fff8e0;
  --pill-amber-text:   #8a5a00;
  --pill-amber-border: rgba(138, 90, 0, 0.22);

  --pill-rose-bg:     #fdeaea;
  --pill-rose-text:   #8e2020;
  --pill-rose-border: rgba(142, 32, 32, 0.22);

  --pill-saffron-bg:     rgba(237, 168, 0, 0.12);
  --pill-saffron-text:   #8a5a00;
  --pill-saffron-border: rgba(237, 168, 0, 0.35);

  --pill-neutral-bg:     rgba(175, 56, 13, 0.06);
  --pill-neutral-text:   #6b3a20;
  --pill-neutral-border: rgba(175, 56, 13, 0.15);

  /* ── Chat Bubbles ── */
  --bubble-inbound-bg:     #f7ede0;
  --bubble-inbound-border: rgba(175, 56, 13, 0.1);
  --bubble-inbound-text:   #1a0a04;

  --bubble-outbound-bg:     #af380d;
  --bubble-outbound-border: #8a2c09;
  --bubble-outbound-text:   #fdf6ec;

  /* ── Radii & Shadows ── */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 9999px;

  --shadow-subtle: 0 1px 3px rgba(175, 56, 13, 0.06), 0 1px 2px rgba(175, 56, 13, 0.04);
  --shadow-card:   0 4px 16px -4px rgba(175, 56, 13, 0.10), 0 1px 4px rgba(175, 56, 13, 0.05);
  --shadow-gold:   0 0 0 3px rgba(237, 168, 0, 0.25);
  --shadow-glow:   0 0 20px rgba(237, 168, 0, 0.18);

  /* ── Typography ── */
  --font-serif: 'Cinzel', 'Times New Roman', serif;
  --font-sans:  'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-deco:  'Cinzel Decorative', 'Cinzel', serif;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg-canvas:  #0e0503;
  --bg-surface: #160806;
  --bg-subtle:  #1f0d07;
  --bg-muted:   #2b1309;
  --bg-input:   #160806;

  --border-subtle: rgba(237, 168, 0, 0.12);
  --border-strong: rgba(237, 168, 0, 0.28);
  --border-gold:   rgba(237, 168, 0, 0.5);
  --border-focus:  #eda800;

  --text-primary:   #fdf6ec;
  --text-secondary: #d4a57a;
  --text-tertiary:  #8a5a30;
  --text-inverse:   #1a0a04;
  --text-gold:      #f5c842;

  --btn-primary-bg:    #eda800;
  --btn-primary-fg:    #1a0a04;
  --btn-primary-hover: #f5c842;

  --btn-secondary-bg:     transparent;
  --btn-secondary-fg:     #f5c842;
  --btn-secondary-border: rgba(237, 168, 0, 0.35);
  --btn-secondary-hover:  rgba(237, 168, 0, 0.1);

  --pill-green-bg:     rgba(43, 92, 58, 0.22);
  --pill-green-text:   #5adb8a;
  --pill-green-border: rgba(90, 219, 138, 0.25);

  --pill-blue-bg:     rgba(28, 74, 133, 0.22);
  --pill-blue-text:   #70b5fa;
  --pill-blue-border: rgba(112, 181, 250, 0.25);

  --pill-amber-bg:     rgba(138, 90, 0, 0.22);
  --pill-amber-text:   #ffc845;
  --pill-amber-border: rgba(255, 200, 69, 0.3);

  --pill-rose-bg:     rgba(142, 32, 32, 0.22);
  --pill-rose-text:   #f87575;
  --pill-rose-border: rgba(248, 117, 117, 0.3);

  --pill-saffron-bg:     rgba(237, 168, 0, 0.15);
  --pill-saffron-text:   #ffc845;
  --pill-saffron-border: rgba(237, 168, 0, 0.4);

  --pill-neutral-bg:     rgba(237, 168, 0, 0.08);
  --pill-neutral-text:   #d4a57a;
  --pill-neutral-border: rgba(237, 168, 0, 0.18);

  --bubble-inbound-bg:     #1f0d07;
  --bubble-inbound-border: rgba(237, 168, 0, 0.12);
  --bubble-inbound-text:   #fdf6ec;

  --bubble-outbound-bg:     #2b1309;
  --bubble-outbound-border: rgba(237, 168, 0, 0.2);
  --bubble-outbound-text:   #fdf6ec;

  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-card:   0 4px 20px rgba(0, 0, 0, 0.45);
  --shadow-glow:   0 0 24px rgba(237, 168, 0, 0.22);
}

/* =============================================================
 * ANIMATIONS
 * ============================================================= */

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50%       { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(237, 168, 0, 0); }
  50%       { box-shadow: 0 0 0 6px rgba(237, 168, 0, 0.15); }
}

@keyframes float-star {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  30%  { opacity: 0.9; }
  70%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-14px) scale(1); }
}

/* =============================================================
 * BASE RESET
 * ============================================================= */

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

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* =============================================================
 * LAYOUT
 * ============================================================= */

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem;
  width: 100%;
  flex: 1;
}

/* =============================================================
 * NAVIGATION
 * ============================================================= */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background-color: var(--brand-red);
  border-bottom: 2px solid rgba(237, 168, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .navbar {
  background-color: #0e0503;
  border-bottom-color: rgba(237, 168, 0, 0.3);
}

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--brand-gold);
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.brand-logo-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.brand-logo-wrap img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

/* Firefly sparkle particles on logo */
.brand-logo-wrap .star {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-gold-light);
  pointer-events: none;
  animation: float-star 2.5s ease-in-out infinite;
  opacity: 0;
}

.brand-logo-wrap .star:nth-child(2) { top: -2px; right: 2px;  animation-delay: 0s;    animation-duration: 2.2s; }
.brand-logo-wrap .star:nth-child(3) { top: 4px;  right: -3px; animation-delay: 0.7s;  animation-duration: 2.8s; width: 3px; height: 3px; }
.brand-logo-wrap .star:nth-child(4) { top: -3px; left: 6px;   animation-delay: 1.3s;  animation-duration: 2.4s; width: 2px; height: 2px; }
.brand-logo-wrap .star:nth-child(5) { top: 10px; left: -3px;  animation-delay: 0.4s;  animation-duration: 3s; }
.brand-logo-wrap .star:nth-child(6) { top: 0px;  left: 18px;  animation-delay: 1.8s;  animation-duration: 2.1s; width: 3px; height: 3px; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-sub {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 400;
  color: rgba(253, 232, 138, 0.75);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: rgba(253, 232, 138, 0.82);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 400;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-gold);
  background-color: rgba(237, 168, 0, 0.12);
}

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

/* =============================================================
 * THEME TOGGLE
 * ============================================================= */

.theme-toggle-btn {
  background: rgba(237, 168, 0, 0.12);
  border: 1px solid rgba(237, 168, 0, 0.3);
  color: var(--brand-gold-light);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: rgba(237, 168, 0, 0.2);
  border-color: rgba(237, 168, 0, 0.5);
  color: var(--brand-gold);
}

/* =============================================================
 * QUOTA BADGE
 * ============================================================= */

.quota-badge {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  user-select: none;
  /* Solid gold on red navbar — overrides pill-saffron transparency */
  background: var(--brand-gold) !important;
  color: #1a0a04 !important;
  border-color: var(--brand-gold-light) !important;
  font-weight: 700;
}

.quota-badge .indicator-dot {
  background-color: #1a0a04;
}

.quota-badge:hover {
  background: var(--brand-gold-light) !important;
  border-color: var(--brand-gold-light) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(237, 168, 0, 0.4);
}

/* =============================================================
 * PROFILE DROPDOWN
 * ============================================================= */

.profile-dropdown {
  position: relative;
  display: inline-block;
}

.profile-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(237, 168, 0, 0.12);
  border: 1px solid rgba(237, 168, 0, 0.35);
  padding: 3px 8px 3px 3px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--brand-gold-light);
  transition: all 0.15s ease;
  font-family: inherit;
}

.profile-avatar-btn:hover,
.profile-avatar-btn[aria-expanded="true"] {
  border-color: rgba(237, 168, 0, 0.65);
  background: rgba(237, 168, 0, 0.2);
  color: var(--brand-gold);
}

.profile-avatar-btn:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 2px;
}

.profile-avatar-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-red-deep);
  color: var(--brand-gold);
  border: 1px solid rgba(237, 168, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  user-select: none;
  font-family: var(--font-serif);
}

.profile-avatar-thumb.lg {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}

.dropdown-chevron {
  transition: transform 0.2s ease;
  color: rgba(253, 232, 138, 0.7);
}

.profile-avatar-btn[aria-expanded="true"] .dropdown-chevron {
  transform: rotate(180deg);
  color: var(--brand-gold);
}

/* Dropdown menu */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 248px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px -6px rgba(175, 56, 13, 0.18), 0 4px 12px rgba(0,0,0,0.1);
  padding: 0.45rem;
  display: none;
  flex-direction: column;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

[data-theme="dark"] .profile-dropdown-menu {
  box-shadow: 0 14px 36px rgba(0,0,0,0.55), 0 4px 12px rgba(0,0,0,0.4);
}

.profile-dropdown-menu.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-header {
  padding: 0.6rem 0.7rem 0.5rem;
}

.dropdown-user-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dropdown-user-info {
  min-width: 0;
  flex: 1;
}

.dropdown-user-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-meta {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-plan-row {
  margin-top: 0.5rem;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.35rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s ease;
}

.dropdown-item svg {
  flex-shrink: 0;
  color: var(--text-tertiary);
  transition: color 0.12s ease;
}

.dropdown-item:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.dropdown-item:hover svg {
  color: var(--brand-gold);
}

.dropdown-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
}

.dropdown-theme-toggle {
  justify-content: space-between;
  width: 100%;
}

.theme-mode-badge {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.dropdown-item-danger {
  color: var(--pill-rose-text);
}

.dropdown-item-danger svg {
  color: var(--pill-rose-text);
}

.dropdown-item-danger:hover {
  color: var(--pill-rose-text);
  background: var(--pill-rose-bg);
}

.dropdown-item-danger:hover svg {
  color: var(--pill-rose-text);
}

/* =============================================================
 * TYPOGRAPHY / PAGE HEADERS
 * ============================================================= */

.page-header {
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Gold shimmer heading utility */
.heading-gold {
  font-family: var(--font-serif);
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-gold-light), var(--brand-gold));
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease infinite;
}

/* =============================================================
 * CARDS & BENTO
 * ============================================================= */

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

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  animation: fadeUp 0.4s ease both;
  position: relative;
  overflow: hidden;
}

/* Subtle top-border gold accent on cards */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.card:hover::before {
  opacity: 1;
}

/* Stagger card animations */
.grid-bento .card:nth-child(1) { animation-delay: 0.05s; }
.grid-bento .card:nth-child(2) { animation-delay: 0.10s; }
.grid-bento .card:nth-child(3) { animation-delay: 0.15s; }
.grid-bento .card:nth-child(4) { animation-delay: 0.20s; }

.card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.card-metric {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand-red);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

[data-theme="dark"] .card-metric {
  color: var(--brand-gold);
}

.card-metric-sub {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Metric icon badge */
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(237, 168, 0, 0.1);
  border: 1px solid rgba(237, 168, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
}

/* =============================================================
 * LAYOUT SPLIT
 * ============================================================= */

.layout-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .layout-split {
    grid-template-columns: 1fr;
  }
}

/* =============================================================
 * BUTTONS
 * ============================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  font-family: var(--font-sans);
  letter-spacing: 0.03em;
}

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

.btn-primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-bg);
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
  box-shadow: 0 4px 14px rgba(237, 168, 0, 0.35);
}

.btn-secondary {
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-fg);
  border-color: var(--btn-secondary-border);
}

.btn-secondary:hover {
  background-color: var(--btn-secondary-hover);
  border-color: var(--brand-red);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* ── Navbar variant buttons ── */
.btn-nav {
  background: rgba(237, 168, 0, 0.15);
  color: var(--brand-gold);
  border-color: rgba(237, 168, 0, 0.4);
}

.btn-nav:hover {
  background: rgba(237, 168, 0, 0.25);
  border-color: var(--brand-gold);
}

.btn-nav-outline {
  background: transparent;
  color: rgba(253, 232, 138, 0.82);
  border-color: rgba(253, 232, 138, 0.3);
}

.btn-nav-outline:hover {
  color: var(--brand-gold);
  border-color: rgba(237, 168, 0, 0.5);
  background: rgba(237, 168, 0, 0.08);
}

/* =============================================================
 * PILLS / BADGES
 * ============================================================= */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  font-family: var(--font-sans);
}

.pill-green {
  background: var(--pill-green-bg);
  color: var(--pill-green-text);
  border-color: var(--pill-green-border);
}

.pill-blue {
  background: var(--pill-blue-bg);
  color: var(--pill-blue-text);
  border-color: var(--pill-blue-border);
}

.pill-amber {
  background: var(--pill-amber-bg);
  color: var(--pill-amber-text);
  border-color: var(--pill-amber-border);
}

.pill-rose {
  background: var(--pill-rose-bg);
  color: var(--pill-rose-text);
  border-color: var(--pill-rose-border);
}

.pill-saffron {
  background: var(--pill-saffron-bg);
  color: var(--pill-saffron-text);
  border-color: var(--pill-saffron-border);
}

.pill-neutral {
  background: var(--pill-neutral-bg);
  color: var(--pill-neutral-text);
  border-color: var(--pill-neutral-border);
}

.indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  animation: pulse-glow 2.5s ease-in-out infinite;
}

/* =============================================================
 * FORMS
 * ============================================================= */

.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: var(--shadow-gold);
}

/* =============================================================
 * PRICING GRID
 * ============================================================= */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.plan-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  animation: fadeUp 0.4s ease both;
  overflow: hidden;
}

.plan-box::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-gold));
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

.plan-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-gold);
}

.plan-box:hover::after {
  opacity: 1;
}

.plan-box.featured {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 1px var(--brand-gold), var(--shadow-glow);
}

.plan-box.featured::after {
  opacity: 1;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-gold-light), var(--brand-gold));
}

.plan-box-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
}

.plan-box-price {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-red);
  letter-spacing: -0.01em;
  margin: 1.25rem 0 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

[data-theme="dark"] .plan-box-price {
  color: var(--brand-gold);
}

.plan-box-price span {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.plan-feature-list {
  list-style: none;
  margin: 1.5rem 0;
  flex: 1;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.plan-feature-list li {
  padding: 0.45rem 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.plan-feature-list li svg {
  flex-shrink: 0;
  color: var(--brand-gold);
}

/* =============================================================
 * TABLES
 * ============================================================= */

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

th {
  background: var(--bg-subtle);
  padding: 0.75rem 1rem;
  color: var(--text-tertiary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-sans);
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

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

tr:hover td {
  background-color: rgba(237, 168, 0, 0.04);
}

/* =============================================================
 * CHAT INTERFACE
 * ============================================================= */

.chat-container {
  display: flex;
  flex-direction: column;
  height: 520px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.chat-header {
  padding: 0.8rem 1.2rem;
  background: var(--brand-red);
  border-bottom: 1px solid rgba(237, 168, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(253, 232, 138, 0.9);
}

[data-theme="dark"] .chat-header {
  background: #1a0603;
}

.chat-thread {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.msg-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.msg-row.inbound  { align-self: flex-start; }
.msg-row.outbound { align-self: flex-end; }

.msg-bubble {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-word;
}

.msg-row.inbound .msg-bubble {
  background: var(--bubble-inbound-bg);
  border: 1px solid var(--bubble-inbound-border);
  color: var(--bubble-inbound-text);
  border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md);
}

.msg-row.outbound .msg-bubble {
  background: var(--bubble-outbound-bg);
  border: 1px solid var(--bubble-outbound-border);
  color: var(--bubble-outbound-text);
  border-radius: var(--radius-md) 4px var(--radius-md) var(--radius-md);
}

.msg-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
  font-family: var(--font-sans);
}

.msg-row.outbound .msg-meta { text-align: right; }

.chat-input-dock {
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem 1.2rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

/* =============================================================
 * ALERTS
 * ============================================================= */

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.88rem;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-success {
  background: var(--pill-green-bg);
  color: var(--pill-green-text);
  border-color: var(--pill-green-border);
}

.alert-error, .alert-danger {
  background: var(--pill-rose-bg);
  color: var(--pill-rose-text);
  border-color: var(--pill-rose-border);
}

.alert-info {
  background: var(--pill-saffron-bg);
  color: var(--pill-saffron-text);
  border-color: var(--pill-saffron-border);
}

/* =============================================================
 * CODE / INLINE
 * ============================================================= */

.code-inline, kbd {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--brand-red);
}

/* =============================================================
 * FOOTER
 * ============================================================= */

footer {
  padding: 2rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font-size: 0.8rem;
  text-align: center;
  background: var(--bg-surface);
  margin-top: auto;
}

footer .footer-brand {
  font-family: var(--font-serif);
  color: var(--brand-red);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

[data-theme="dark"] footer .footer-brand {
  color: var(--brand-gold);
}

/* =============================================================
 * VEDIC / DECORATIVE COMPONENTS
 * ============================================================= */

/* Mandala divider */
.mandala-divider {
  text-align: center;
  margin: 2rem 0;
  color: rgba(237, 168, 0, 0.35);
  font-size: 1.4rem;
  letter-spacing: 0.8rem;
  user-select: none;
}

/* Nakshatra / zodiac icon badges */
.nakshatra-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .nakshatra-grid { grid-template-columns: repeat(4, 1fr); }
}

.nakshatra-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.65rem 0.35rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: center;
}

.nakshatra-cell:hover {
  border-color: var(--border-gold);
  background: rgba(237, 168, 0, 0.05);
}

.nakshatra-symbol {
  font-size: 1.4rem;
  line-height: 1;
}

.nakshatra-name {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Panchang widget */
.panchang-widget {
  background: linear-gradient(135deg, var(--brand-red-deep), var(--brand-red));
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  color: var(--brand-gold-pale);
  position: relative;
  overflow: hidden;
}

.panchang-widget::before {
  content: '✦';
  position: absolute;
  top: -10px;
  right: 12px;
  font-size: 4rem;
  opacity: 0.07;
  color: var(--brand-gold);
}

[data-theme="dark"] .panchang-widget {
  background: linear-gradient(135deg, #1a0603, #2b0e06);
  border: 1px solid rgba(237, 168, 0, 0.2);
}

.panchang-title {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253, 232, 138, 0.7);
  margin-bottom: 0.85rem;
}

.panchang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.panchang-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.panchang-key {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(253, 232, 138, 0.55);
}

.panchang-value {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-gold-light);
}

/* Auth page */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(ellipse at top, rgba(175, 56, 13, 0.08) 0%, transparent 60%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 40px rgba(175, 56, 13, 0.12), 0 0 0 1px rgba(237,168,0,0.08);
  animation: fadeUp 0.45s ease both;
}

.auth-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 12px;
  object-fit: cover;
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-align: center;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.3rem;
}

/* =============================================================
 * SCROLLBAR (webkit)
 * ============================================================= */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(175, 56, 13, 0.2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(175, 56, 13, 0.35); }

/* =============================================================
 * RESPONSIVE
 * ============================================================= */

@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .nav-links { display: none; }
  .container { padding: 1.5rem 1rem; }
  .grid-bento { grid-template-columns: 1fr 1fr; }
  .nakshatra-grid { grid-template-columns: repeat(4, 1fr); }
  .brand-sub { display: none; }
}

@media (max-width: 480px) {
  .grid-bento { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}
