/* ===================================================================
   AifyCycle — Premium Feminine Wellness Design System
   Dedicated to Agatha & Aify
   Aesthetics: Refined, Warm, Sophisticated, Apple Health-class
   Typography: Plus Jakarta Sans (display) + Inter (body)
   =================================================================== */

/* Fonts: Plus Jakarta Sans for headings & body, Outfit for numbers & accents */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  /* Font Stacks */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-num: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Core Backgrounds — Silk Warm Neutrals */
  --bg-primary: #FAF8F6;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F4EFEB;
  --bg-elevated: #FFFFFF;
  --surface-card: #FFFFFF;
  --surface-card-hover: #FDFBF9;
  --surface-tinted: rgba(228, 112, 132, 0.04);

  /* Borders — Ultra-fine, luminous */
  --border-primary: rgba(140, 115, 128, 0.12);
  --border-secondary: rgba(140, 115, 128, 0.06);
  --border-accent: rgba(228, 112, 132, 0.26);
  --border-subtle: rgba(140, 115, 128, 0.04);

  /* Typography — Deep warm obsidian & velvety slate */
  --text-primary: #191418;
  --text-secondary: #5C525A;
  --text-muted: #968A93;
  --text-inverse: #FFFFFF;

  /* Accent Palette — Refined Luxury Wellness */
  --color-rose: #E06C82;
  --color-rose-deep: #C74E66;
  --color-rose-soft: #EE9EAF;
  --color-rose-bg: rgba(224, 108, 130, 0.08);
  --color-rose-bg-strong: rgba(224, 108, 130, 0.14);
  --color-blush: #F4C4CD;
  --color-peach: #ECC4AC;
  --color-sage: #6B9E8A;
  --color-lavender: #997FB4;
  --color-gold: #D6AF55;
  --color-coral: #DD8E70;
  --color-blue: #6A9EBD;
  --color-teal: #6B9E8A;
  --color-fuchsia: #997FB4;
  --color-purple: #997FB4;

  /* Functional Colors */
  --color-success: #6B9E8A;
  --color-warning: #D6AF55;
  --color-error: #D05353;

  /* Gradients — Radiant & Tactile */
  --grad-primary: linear-gradient(135deg, #E06C82 0%, #EA8E9F 100%);
  --grad-rose-soft: linear-gradient(135deg, #EE9EAF 0%, #F4C4CD 100%);
  --grad-warm: linear-gradient(145deg, #E06C82 0%, #ECC4AC 100%);
  --grad-bg-subtle: linear-gradient(180deg, #FAF8F6 0%, #F4EFEB 100%);
  --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.65) 100%);

  /* Shadows — Layered Physical Optics */
  --shadow-xs: 0 1px 2px rgba(18, 14, 16, 0.04);
  --shadow-sm: 0 1px 3px rgba(18, 14, 16, 0.05), 0 4px 10px rgba(18, 14, 16, 0.03);
  --shadow-md: 0 2px 4px rgba(18, 14, 16, 0.04), 0 8px 24px -4px rgba(18, 14, 16, 0.07);
  --shadow-lg: 0 4px 8px rgba(18, 14, 16, 0.04), 0 16px 44px -8px rgba(18, 14, 16, 0.1);
  --shadow-xl: 0 8px 16px rgba(18, 14, 16, 0.04), 0 24px 60px -12px rgba(18, 14, 16, 0.14);
  --shadow-card: 0 1px 2px rgba(18, 14, 16, 0.03), 0 8px 24px -4px rgba(18, 14, 16, 0.05);
  --shadow-card-hover: 0 4px 12px rgba(18, 14, 16, 0.05), 0 16px 36px -6px rgba(18, 14, 16, 0.08);
  --shadow-button: 0 2px 8px rgba(224, 108, 130, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  --shadow-glow: 0 0 0 1px rgba(224, 108, 130, 0.15), 0 8px 28px rgba(224, 108, 130, 0.18);

  /* Geometry */
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --max-width: 1120px;

  /* Transitions — Apple Fluid Physics */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================================================================
   Dark Theme — Velvety Obsidian & Warm Charcoal
   =================================================================== */
[data-theme="dark"] {
  --bg-primary: #131013;
  --bg-secondary: #1A161B;
  --bg-tertiary: #221D23;
  --bg-elevated: #262028;
  --surface-card: #1C181E;
  --surface-card-hover: #262028;
  --surface-tinted: rgba(224, 108, 130, 0.06);

  --border-primary: rgba(255, 255, 255, 0.09);
  --border-secondary: rgba(255, 255, 255, 0.05);
  --border-accent: rgba(224, 108, 130, 0.32);
  --border-subtle: rgba(255, 255, 255, 0.03);

  --text-primary: #F3EFF1;
  --text-secondary: #B4A9B1;
  --text-muted: #7E727A;
  --text-inverse: #131013;

  --color-rose-bg: rgba(224, 108, 130, 0.12);
  --color-rose-bg-strong: rgba(224, 108, 130, 0.22);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.2), 0 16px 44px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.25), 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.3), 0 16px 36px rgba(0, 0, 0, 0.45);
  --shadow-button: 0 2px 8px rgba(224, 108, 130, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  --shadow-glow: 0 0 0 1px rgba(224, 108, 130, 0.2), 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* ===================================================================
   Reset & Base
   =================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Apple Ambient Mesh Glow Background */
body {
  position: relative;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: -12%;
  right: -8%;
  width: 58vw;
  height: 58vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 142, 159, 0.18) 0%, rgba(236, 196, 172, 0.11) 40%, rgba(250, 248, 246, 0) 70%);
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
  animation: appleAmbientFloat 26s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  bottom: -15%;
  left: -10%;
  width: 62vw;
  height: 62vw;
  max-width: 760px;
  max-height: 760px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(153, 127, 180, 0.13) 0%, rgba(224, 108, 130, 0.08) 45%, rgba(250, 248, 246, 0) 70%);
  filter: blur(110px);
  z-index: 0;
  pointer-events: none;
  animation: appleAmbientFloat 28s ease-in-out infinite alternate-reverse;
}

[data-theme="dark"] body::before {
  background: radial-gradient(circle, rgba(224, 108, 130, 0.12) 0%, rgba(153, 127, 180, 0.06) 45%, transparent 70%);
  filter: blur(120px);
}

[data-theme="dark"] body::after {
  background: radial-gradient(circle, rgba(106, 158, 189, 0.08) 0%, rgba(224, 108, 130, 0.05) 45%, transparent 70%);
  filter: blur(120px);
}

@keyframes appleAmbientFloat {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-20px, 30px) scale(1.04); }
  66% { transform: translate(25px, -15px) scale(0.97); }
  100% { transform: translate(-10px, 20px) scale(1.02); }
}

/* ===================================================================
   Layout Container
   =================================================================== */
.app-container {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 6rem;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ===================================================================
   Header — Apple Frosted Glass Floating Bar
   =================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.6rem;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: 0 1px 2px rgba(18, 14, 16, 0.03), 0 8px 28px -4px rgba(18, 14, 16, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: all var(--transition-smooth);
}

[data-theme="dark"] .app-header {
  background: rgba(26, 22, 27, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #E06C82 0%, #F09AA9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #FFFFFF;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(224, 108, 130, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.15;
}

.brand-text .brand-tagline {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  letter-spacing: 0.01em;
  margin-top: 0.1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.user-greeting-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.user-avatar-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-rose);
  box-shadow: 0 0 6px var(--color-rose);
}

/* Icon Buttons — Circular Frosted Glass */
.btn-icon {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.btn-icon .icon-svg {
  stroke: currentColor;
  transition: transform var(--transition-fast);
}

.btn-icon:hover {
  background: var(--surface-card-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-icon:hover .icon-svg {
  transform: scale(1.08);
}

.btn-icon:active {
  transform: scale(0.95);
}

/* Quick Log Button — Tactile Apple Primary Pill */
.btn-quick-log {
  background: linear-gradient(135deg, #E06C82 0%, #D0586E 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 0.52rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: var(--shadow-button);
  transition: all var(--transition-fast);
}

.btn-quick-log .btn-action-icon {
  stroke: #FFFFFF;
}

.btn-quick-log:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(224, 108, 130, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-quick-log:active {
  transform: scale(0.96);
}

/* ===================================================================
   Navigation — Apple-style Segmented Pill Control
   =================================================================== */
.nav-tab-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem;
  background: rgba(244, 239, 235, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: var(--radius-full);
  margin: 0 auto 2.25rem;
  max-width: 680px;
  border: 1px solid var(--border-primary);
  box-shadow: inset 0 1px 2px rgba(18, 14, 16, 0.03), 0 2px 8px rgba(18, 14, 16, 0.02);
}

[data-theme="dark"] .nav-tab-bar {
  background: rgba(34, 29, 35, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: -0.015em;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-tab .tab-svg {
  stroke: currentColor;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .nav-tab:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
  background: #FFFFFF;
  color: var(--color-rose);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(18, 14, 16, 0.04), 0 4px 14px rgba(224, 108, 130, 0.12);
}

[data-theme="dark"] .nav-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.nav-tab:active {
  transform: scale(0.97);
}

/* View Containers */
.view-panel {
  display: none;
  animation: viewFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-panel.active {
  display: block;
}

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

/* ===================================================================
   Dashboard: Main Cycle Dial & Hero Grid
   =================================================================== */
.hero-cycle-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

/* ===================================================================
   TOP DASHBOARD DYNAMIC BANNER & BANNER PROFILE
   =================================================================== */
.dashboard-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.85rem;
  border-radius: var(--radius-xl);
  margin-bottom: 1.5rem;
  background: var(--surface-card);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.dashboard-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 110, 150, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.banner-profile-section,
.banner-left-profile {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex: 1;
  min-width: 0;
}

.banner-avatar-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.banner-user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-rose);
  box-shadow: 0 4px 14px rgba(224, 108, 130, 0.25);
}

.banner-provider-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 1.5px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.dashboard-greeting {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
  line-height: 1.2;
}

.dashboard-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84rem;
  flex-wrap: wrap;
}

.phase-capsule-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 158, 0, 0.14);
  color: #FF9E00;
  font-weight: 700;
  font-size: 0.78rem;
  border: 1px solid rgba(255, 158, 0, 0.25);
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF9E00;
  box-shadow: 0 0 8px #FF9E00;
  animation: pulseBeacon 1.8s infinite;
}

.meta-separator {
  color: var(--text-muted);
}

.meta-fertility-tag {
  color: var(--text-secondary);
  font-weight: 500;
}

.banner-right-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.streak-capsule {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  background: rgba(255, 87, 34, 0.1);
  border: 1px solid rgba(255, 87, 34, 0.22);
}

.streak-flame {
  font-size: 1.15rem;
  animation: flickerFlame 2.2s infinite ease-in-out;
}

.streak-count {
  font-family: var(--font-num);
  font-weight: 800;
  font-size: 0.95rem;
  color: #FF5722;
}

.streak-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.2rem;
}

.banner-date-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-tertiary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-secondary);
}

.btn-icon-subtle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-subtle:hover {
  background: var(--surface-card);
  color: var(--text-primary);
}

.banner-date-display {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 0.35rem;
  white-space: nowrap;
}

/* ===================================================================
   28-DAY BIOLOGICAL CYCLE TIMELINE RIBBON
   =================================================================== */
.cycle-timeline-ribbon {
  padding: 1.25rem 1.6rem;
  border-radius: var(--radius-xl);
  margin-bottom: 1.75rem;
  background: var(--surface-card);
  border: 1px solid var(--border-primary);
}

.timeline-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.timeline-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-icon {
  font-size: 1.05rem;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.timeline-phase-pills {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.phase-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: -0.35rem;
}

.dot-menstrual { background: #FF2E63; }
.dot-follicular { background: #845EC2; }
.dot-ovulatory { background: #FF9E00; }
.dot-luteal { background: #2C73D2; }

.timeline-track-wrap {
  position: relative;
  display: flex;
  height: 28px;
  border-radius: var(--radius-full);
  overflow: visible;
  padding: 3px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
}

.timeline-track-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  transition: opacity 0.2s;
  cursor: default;
}

.timeline-track-segment:first-child {
  border-top-left-radius: var(--radius-full);
  border-bottom-left-radius: var(--radius-full);
}

.timeline-track-segment:last-child {
  border-top-right-radius: var(--radius-full);
  border-bottom-right-radius: var(--radius-full);
}

.seg-menstrual { background: linear-gradient(90deg, #FF2E63, #FF6B8B); }
.seg-follicular { background: linear-gradient(90deg, #7B2CBF, #C77DFF); }
.seg-ovulatory { background: linear-gradient(90deg, #FF9E00, #FFD166); }
.seg-luteal { background: linear-gradient(90deg, #2C73D2, #00B4D8); }

.timeline-track-segment:hover {
  filter: brightness(1.1);
}

.timeline-active-cursor {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

.cursor-glow-beacon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #FF9E00;
  box-shadow: 0 0 14px #FF9E00, 0 2px 6px rgba(0,0,0,0.3);
  animation: beaconPulse 1.8s infinite;
}

.cursor-pin-badge {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #FF9E00;
  color: #000000;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  margin-top: 4px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* ===================================================================
   GRAND BIOLOGICAL CYCLE COMPASS / WHEEL
   =================================================================== */
.cycle-dial-card {
  padding: 2.25rem 2rem;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
}

.dial-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.dial-header-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dial-badge-gem {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(224, 108, 130, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.dial-card-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.live-synced-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.pulse-emerald {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
  animation: pulseBeacon 1.6s infinite;
}

.dial-container {
  position: relative;
  width: 340px;
  height: 340px;
  margin: 0.75rem auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dial-ambient-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 158, 0, 0.28) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
  transition: background 1.2s ease-in-out;
  filter: blur(20px);
}

.dial-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dial-guide-ring {
  fill: none;
  stroke: var(--border-secondary);
  stroke-width: 1;
  stroke-dasharray: 2 6;
  opacity: 0.55;
}

.dial-track {
  fill: none;
  stroke: var(--bg-tertiary);
  stroke-width: 16;
}

[data-theme="dark"] .dial-track {
  stroke: rgba(255, 255, 255, 0.05);
}

.dial-fertile-underlay {
  fill: none;
  stroke: rgba(255, 158, 0, 0.45);
  stroke-width: 22;
  filter: url(#dial-glow);
  stroke-linecap: round;
}

.dial-phase-arc {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  transition: stroke 0.4s;
}

.arc-menstrual { stroke: url(#grad-menstrual); }
.arc-follicular { stroke: url(#grad-follicular); }
.arc-ovulatory { stroke: url(#grad-ovulatory); }
.arc-luteal { stroke: url(#grad-luteal); }

.dial-progress {
  fill: none;
  stroke: url(#dial-gradient);
  stroke-width: 16;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.18));
}

/* Day Pips */
.dial-tick-pip {
  fill: var(--bg-tertiary);
  stroke: var(--border-secondary);
  stroke-width: 1.5;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dial-tick-pip:hover {
  transform: scale(1.6);
  stroke-width: 2;
  stroke: #FFFFFF;
}

.dial-tick-pip.phase-period { fill: #FF2E63; stroke: rgba(255, 46, 99, 0.6); }
.dial-tick-pip.phase-follicular { fill: #845EC2; stroke: rgba(132, 94, 194, 0.6); }
.dial-tick-pip.phase-fertile { fill: #FF9E00; stroke: rgba(255, 158, 0, 0.7); }
.dial-tick-pip.phase-luteal { fill: #2C73D2; stroke: rgba(44, 115, 210, 0.6); }

.dial-tick-pip.completed {
  opacity: 0.7;
}

.dial-tick-pip.active-today {
  fill: #FFFFFF !important;
  stroke: #FF9E00 !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 6px #FF9E00);
}

/* Ovulation Star Marker */
.ovulation-star-glow {
  fill: rgba(255, 158, 0, 0.35);
  animation: pulseBeacon 2s infinite ease-in-out;
}

.ovulation-star-core {
  fill: #FFD166;
  stroke: #FFFFFF;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 6px #FF9E00);
}

/* Orbital Bead */
.dial-orbital-bead {
  pointer-events: none;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bead-halo-outer {
  fill: rgba(255, 158, 0, 0.22);
  animation: orbitalBeadPulse 2s infinite ease-in-out;
}

.bead-halo-inner {
  fill: rgba(255, 158, 0, 0.5);
}

.bead-core {
  fill: #FFFFFF;
  stroke: #FF9E00;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(255, 158, 0, 0.8));
}

@keyframes orbitalBeadPulse {
  0%, 100% { r: 13; opacity: 0.6; }
  50% { r: 18; opacity: 0.2; }
}

@keyframes pulseBeacon {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0.35; }
}

@keyframes beaconPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px #FF9E00; }
  50% { transform: scale(1.2); box-shadow: 0 0 16px #FF9E00; }
}

@keyframes flickerFlame {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.12) rotate(-3deg); }
  75% { transform: scale(0.96) rotate(3deg); }
}

/* Dial Center Disc */
.dial-phase-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 218px;
  height: 218px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.82));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 36px rgba(180, 140, 160, 0.16), inset 0 1px 0 #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  z-index: 5;
}

[data-theme="dark"] .dial-phase-indicator {
  background: radial-gradient(circle at 50% 30%, rgba(38, 30, 38, 0.94), rgba(24, 18, 25, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dial-day-badge {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--color-rose-bg);
  color: var(--color-rose);
  margin-bottom: 0.25rem;
}

.dial-day-counter-flex {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.dial-day-number {
  font-family: var(--font-num);
  font-size: 4rem;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.06em;
  color: var(--text-primary);
}

.dial-total-days {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.dial-phase-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0.3rem 0 0.2rem 0;
}

.dial-fertility-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.75rem;
  border-radius: var(--radius-full);
  margin-top: 0.25rem;
}

.dial-fertility-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.fertility-low {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-secondary);
}

.fertility-medium {
  background: rgba(214, 175, 85, 0.12);
  color: var(--color-gold);
  border: 1px solid rgba(214, 175, 85, 0.25);
}

.fertility-high {
  background: rgba(221, 142, 112, 0.12);
  color: var(--color-coral);
  border: 1px solid rgba(221, 142, 112, 0.25);
}

.fertility-peak {
  background: var(--color-rose-bg-strong);
  color: var(--color-rose);
  border: 1px solid rgba(224, 108, 130, 0.3);
}

.dial-countdown-pill {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 500;
}

.btn-dial-reset {
  margin-top: 0.4rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--color-rose-bg);
  color: var(--color-rose);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-dial-reset:hover {
  background: var(--color-rose);
  color: #FFFFFF;
}

/* Horizon Legend Pills */
.wheel-legend-horizon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0.5rem 0 1rem;
  flex-wrap: wrap;
}

.wheel-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s;
}

.wheel-legend-pill:hover,
.wheel-legend-pill.active-phase {
  transform: translateY(-2px);
  color: var(--text-primary);
  border-color: var(--border-accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wheel-legend-pill.pill-menstrual:hover { border-color: #FF2E63; color: #FF2E63; }
.wheel-legend-pill.pill-follicular:hover { border-color: #845EC2; color: #845EC2; }
.wheel-legend-pill.pill-ovulatory:hover { border-color: #FF9E00; color: #FF9E00; }
.wheel-legend-pill.pill-luteal:hover { border-color: #2C73D2; color: #2C73D2; }

/* 3 Bottom Stat Micro-Cards */
.dial-footer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  width: 100%;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-secondary);
}

.stat-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition-fast);
}

.stat-item:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.stat-icon {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.stat-value {
  font-family: var(--font-num);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* ===================================================================
   INTERACTIVE DAILY VITALS HUB
   =================================================================== */
.hero-side-cards {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.vitals-card {
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
}

.vitals-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card-hover);
}

.vitals-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.vitals-emoji-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.vitals-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

.btn-sm-action {
  background: var(--color-rose-bg);
  color: var(--color-rose);
  border: 1px solid var(--border-accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sm-action:hover {
  background: var(--color-rose);
  color: #FFFFFF;
  transform: scale(1.05);
}

/* Hydration Glasses */
.hydration-glasses-rack {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.45rem;
  margin-top: 1rem;
}

.glass-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.glass-btn:hover {
  transform: translateY(-2px);
  border-color: #00B4D8;
  color: #00B4D8;
}

.glass-btn.filled {
  background: rgba(0, 180, 216, 0.12);
  border-color: rgba(0, 180, 216, 0.35);
  color: #00B4D8;
}

.glass-water-fill {
  fill: #00B4D8;
}

.glass-idx {
  font-family: var(--font-num);
  font-size: 0.65rem;
  font-weight: 700;
}

/* Vitals Split Row (Sleep & Energy) */
.vitals-card-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.sleep-score-pill,
.energy-score-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.sleep-score-pill {
  background: rgba(132, 94, 194, 0.15);
  color: #845EC2;
}

.energy-score-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.sleep-main-stat {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.5rem 0 0.25rem;
}

.vitals-big-num {
  font-family: var(--font-num);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.vitals-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.vitals-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0.25rem 0 0.6rem;
}

.vitals-counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
}

.btn-micro {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  color: var(--text-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-micro:hover {
  background: var(--surface-card);
  border-color: var(--border-accent);
}

.micro-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Energy Battery */
.energy-battery-bar {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  margin-top: 0.75rem;
  overflow: hidden;
}

.energy-fill-gauge {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #10B981, #FFD166);
  transition: width 0.8s ease;
}

.quick-mood-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.dash-mood-chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.dash-mood-chip:hover,
.dash-mood-chip.active {
  background: rgba(255, 107, 139, 0.15);
  border-color: var(--color-rose);
  color: var(--color-rose);
}

/* Hormone Matrix */
.hormone-phase-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
}

.hormone-bars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.25rem;
  margin: 1rem 0 0.85rem;
}

.hormone-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  margin-bottom: 0.35rem;
}

.hormone-name {
  color: var(--text-secondary);
  font-weight: 600;
}

.hormone-pct {
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--text-primary);
}

.hormone-progress-track {
  width: 100%;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  overflow: hidden;
}

.hormone-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-estrogen { background: linear-gradient(90deg, #FF6B8B, #FF9E00); }
.fill-lh { background: linear-gradient(90deg, #FF9E00, #FFD166); }
.fill-progesterone { background: linear-gradient(90deg, #7B2CBF, #C77DFF); }
.fill-fsh { background: linear-gradient(90deg, #2C73D2, #00B4D8); }

.hormone-summary-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-secondary);
}

/* AI Whisper Card */
.ai-whisper-quote {
  font-style: italic;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0.85rem 0;
  padding-left: 0.85rem;
  border-left: 3px solid var(--color-rose);
}

.ai-whisper-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.ai-quick-prompt-chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.ai-quick-prompt-chip:hover {
  background: var(--surface-card);
  border-color: var(--color-rose);
  color: var(--color-rose);
  transform: translateY(-1px);
}

/* Quick Symptoms Strip */
.dash-symptoms-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.dash-symptom-chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.dash-symptom-chip:hover,
.dash-symptom-chip.active {
  background: rgba(255, 46, 99, 0.15);
  border-color: #FF2E63;
  color: #FF2E63;
}

/* ===================================================================
   Interactive Calendar View (Apple Health & Bespoke Spec)
   =================================================================== */
.calendar-card {
  background: var(--surface-card);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-2xl);
  padding: 1.85rem 1.75rem;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  position: relative;
}

[data-theme="dark"] .calendar-card {
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.calendar-title-group h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

.calendar-title-group .calendar-subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
  margin-top: 0.2rem;
}

.calendar-nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
  box-sizing: border-box;
}

.calendar-weekday {
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 0.55rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-cell {
  min-height: 82px;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--surface-card-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.22s var(--ease-spring), 
              box-shadow 0.22s var(--ease-spring), 
              border-color 0.2s ease, 
              background 0.2s ease;
  position: relative;
  user-select: none;
}

.calendar-day-cell:hover {
  border-color: var(--border-accent);
  background: var(--surface-card);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  z-index: 2;
}

.calendar-day-cell:active {
  transform: scale(0.97);
}

.calendar-day-cell.empty {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  cursor: default;
  pointer-events: none;
}

.calendar-day-cell.today {
  border: 1.5px solid var(--color-rose);
  box-shadow: 0 0 0 3px var(--color-rose-glow), 0 4px 12px rgba(224, 108, 130, 0.12);
}

.calendar-day-cell.today .day-number {
  color: var(--color-rose);
  font-weight: 800;
}

.day-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-number {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.day-phase-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

/* Apple Day Type Micro-tints */
.calendar-day-cell.period-day {
  background: linear-gradient(145deg, rgba(224, 108, 130, 0.13) 0%, rgba(242, 165, 179, 0.06) 100%);
  border-color: rgba(224, 108, 130, 0.35);
}

.calendar-day-cell.period-day:hover {
  border-color: var(--color-rose);
  box-shadow: 0 10px 24px rgba(224, 108, 130, 0.18);
}

.calendar-day-cell.predicted-period-day {
  background: rgba(224, 108, 130, 0.06);
  border-color: rgba(224, 108, 130, 0.25);
  border-style: dashed;
}

.calendar-day-cell.ovulation-day {
  background: linear-gradient(145deg, rgba(212, 160, 23, 0.14) 0%, rgba(243, 209, 138, 0.05) 100%);
  border-color: rgba(212, 160, 23, 0.35);
}

.calendar-day-cell.ovulation-day:hover {
  border-color: var(--color-gold);
  box-shadow: 0 10px 24px rgba(212, 160, 23, 0.18);
}

.calendar-day-cell.fertile-day {
  background: linear-gradient(145deg, rgba(224, 138, 110, 0.1) 0%, rgba(242, 185, 165, 0.04) 100%);
  border-color: rgba(224, 138, 110, 0.25);
}

.calendar-day-cell.fertile-day:hover {
  border-color: var(--color-coral);
  box-shadow: 0 10px 24px rgba(224, 138, 110, 0.16);
}

.day-indicator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.indicator-badge {
  font-family: var(--font-body);
  font-size: 0.62rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.indicator-badge .badge-icon {
  display: inline-block;
  line-height: 1;
  flex-shrink: 0;
}

.indicator-badge .badge-text {
  display: inline;
}

.badge-fertile {
  background: rgba(255, 142, 83, 0.2);
  color: var(--color-coral);
  border: 1px solid rgba(255, 142, 83, 0.35);
}

.badge-period {
  background: linear-gradient(135deg, var(--color-rose) 0%, var(--color-rose-deep) 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(224, 108, 130, 0.25);
}

.badge-predicted {
  background: var(--color-rose-bg-strong);
  color: var(--color-rose);
  border: 1px dashed rgba(224, 108, 130, 0.4);
}

.badge-ovulation {
  background: linear-gradient(135deg, var(--color-gold) 0%, #D4A017 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(212, 160, 23, 0.25);
}

.badge-symptom-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-lavender);
  box-shadow: 0 0 6px var(--color-lavender);
  margin-left: auto;
  flex-shrink: 0;
}

/* Calendar Legend Pill */
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--surface-card-secondary);
  border: 1px solid var(--border-secondary);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-color-box {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===================================================================
   Cycle Syncing & Wellness Insights (Apple Glassmorphism + Gemini 3.6)
   =================================================================== */
.syncing-hero {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-xl);
  padding: 1.85rem 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: 0 12px 36px rgba(180, 140, 160, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .syncing-hero {
  background: rgba(32, 28, 33, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.syncing-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.syncing-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.apple-ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(232, 120, 138, 0.14) 0%, rgba(168, 142, 196, 0.14) 100%);
  border: 1px solid rgba(232, 120, 138, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-rose);
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ai-sparkle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-rose);
  box-shadow: 0 0 8px var(--color-rose);
  animation: pulseAiDot 2s infinite ease-in-out;
}

@keyframes pulseAiDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.cycle-day-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(180, 140, 160, 0.12);
  border: 1px solid rgba(180, 140, 160, 0.18);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-refresh-sync {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(232, 120, 138, 0.3);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-rose);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(232, 120, 138, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="dark"] .btn-refresh-sync {
  background: rgba(45, 38, 44, 0.85);
  border: 1px solid rgba(232, 120, 138, 0.4);
}

.btn-refresh-sync:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 14px rgba(232, 120, 138, 0.25);
  background: rgba(255, 255, 255, 1);
}

.btn-refresh-sync:active {
  transform: scale(0.97);
}

.btn-refresh-sync.loading .refresh-icon.spinning {
  display: inline-block;
  animation: spinIcon 1s linear infinite;
}

@keyframes spinIcon {
  100% { transform: rotate(360deg); }
}

.syncing-hero-content h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.syncing-hero-content p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 600px;
  line-height: 1.55;
}

/* Dynamic Hormone Biomarker Bar */
.sync-hormone-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(180, 140, 160, 0.15);
}

.hormone-pill, .energy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(180, 140, 160, 0.15);
  font-size: 0.8rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .hormone-pill,
[data-theme="dark"] .energy-pill {
  background: rgba(45, 38, 44, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hormone-label, .energy-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hormone-value {
  color: var(--text-primary);
  font-weight: 600;
}

.energy-value {
  color: var(--color-rose);
  font-weight: 700;
}

/* Syncing 4 Pillars Grid */
.syncing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.sync-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(180, 140, 160, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .sync-card {
  background: rgba(32, 28, 33, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sync-card:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 18px 45px rgba(232, 120, 138, 0.14), inset 0 1px 0 #FFFFFF;
  border-color: rgba(232, 120, 138, 0.4);
}

.sync-card-highlight {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(242, 165, 179, 0.15)) !important;
  border-color: rgba(232, 120, 138, 0.35) !important;
}

[data-theme="dark"] .sync-card-highlight {
  background: linear-gradient(145deg, rgba(32, 28, 33, 0.8), rgba(232, 120, 138, 0.15)) !important;
  border-color: rgba(232, 120, 138, 0.45) !important;
}

.sync-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.sync-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sync-card-icon.nutrition {
  background: rgba(0, 201, 167, 0.14);
  color: var(--color-teal);
}

.sync-card-icon.workout {
  background: rgba(255, 107, 139, 0.14);
  color: var(--color-rose);
}

.sync-card-icon.mindset {
  background: rgba(132, 94, 194, 0.14);
  color: var(--color-fuchsia);
}

.sync-card-icon.wellness {
  background: rgba(232, 195, 106, 0.16);
  color: var(--color-gold);
}

.sync-card-ai-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(232, 120, 138, 0.12);
  color: var(--color-rose);
  border: 1px solid rgba(232, 120, 138, 0.25);
}

.sync-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.sync-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.85rem;
}

.sync-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.sync-list li {
  font-size: 0.84rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.48;
}

.sync-item-bullet {
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: -0.05rem;
}

.sync-tip-box {
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  border: 1px solid rgba(180, 140, 160, 0.12);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.55;
  font-style: italic;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .sync-tip-box {
  background: rgba(45, 38, 44, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-scientific-pill {
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-secondary);
  background: rgba(127, 176, 158, 0.12);
  border: 1px solid rgba(127, 176, 158, 0.25);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  margin-top: 0.6rem;
}

/* Skeleton Loading Shimmer */
.skeleton-shimmer {
  background: linear-gradient(90deg, rgba(180, 140, 160, 0.12) 25%, rgba(180, 140, 160, 0.22) 50%, rgba(180, 140, 160, 0.12) 75%);
  background-size: 200% 100%;
  animation: appleShimmerWave 1.6s infinite ease-in-out;
}

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

/* ===================================================================
   History & Analytics
   =================================================================== */
.analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.metric-card {
  background: var(--surface-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: var(--shadow-card);
}

.metric-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.metric-info .metric-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}

.metric-info .metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 500;
}

.history-card {
  background: var(--surface-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.history-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cycle-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.timeline-row:hover {
  background: var(--surface-tinted);
}

.timeline-dates {
  display: flex;
  flex-direction: column;
}

.timeline-dates-main {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-dates-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.timeline-tags {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pill-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

/* ===================================================================
   Modals — Clean sheet style
   =================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(29, 26, 30, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  max-width: 580px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: scale(0.96);
  transition: transform 0.28s var(--ease-spring);
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.75rem;
  border-bottom: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.btn-close-modal {
  background: var(--surface-card-secondary);
  border: 1px solid var(--border-secondary);
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.btn-close-modal:hover {
  color: var(--text-primary);
  background: var(--surface-card);
  border-color: var(--border-accent);
  transform: scale(1.05);
}

.btn-close-modal:active {
  transform: scale(0.95);
}

.modal-scroll-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  -webkit-overflow-scrolling: touch;
}

/* ===================================================================
   Forms, Chips, Inputs — Apple Tactile
   =================================================================== */
.form-section {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip-select {
  background: var(--surface-card-secondary);
  border: 1.5px solid var(--border-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 0.45rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s var(--ease-spring), border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}

.chip-select:hover {
  border-color: var(--color-rose);
  color: var(--text-primary);
  background: var(--surface-card);
  transform: translateY(-1px);
}

.chip-select:active {
  transform: scale(0.95);
}

.chip-select.active {
  background: linear-gradient(135deg, var(--color-rose) 0%, var(--color-rose-deep) 100%);
  border-color: var(--color-rose);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(224, 108, 130, 0.32);
}

/* Stepper */
.stepper-control {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-stepper {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-card-secondary);
  border: 1.5px solid var(--border-secondary);
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s var(--ease-spring), border-color 0.16s ease, background 0.16s ease;
}

.btn-stepper:hover {
  border-color: var(--color-rose);
  background: var(--color-rose-bg);
  transform: translateY(-1px);
}

.btn-stepper:active {
  transform: scale(0.94);
}

.stepper-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  min-width: 65px;
  text-align: center;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Range Slider */
.range-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.range-slider {
  flex: 1;
  accent-color: var(--color-rose);
  cursor: pointer;
  height: 6px;
  border-radius: var(--radius-full);
}

.range-value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-rose);
  min-width: 44px;
  font-variant-numeric: tabular-nums;
}

/* Text Inputs */
.form-input, .form-textarea {
  width: 100%;
  background: var(--surface-card-secondary);
  border: 1.5px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  background: var(--surface-card);
  border-color: var(--color-rose);
  box-shadow: 0 0 0 3.5px var(--color-rose-glow);
}

.form-textarea {
  min-height: 85px;
  resize: vertical;
}

/* Modal Actions */
.modal-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.15rem 1.75rem;
  border-top: 1px solid var(--border-secondary);
  background: var(--surface-card-secondary);
  flex-shrink: 0;
  margin-top: 0;
}

/* ===================================================================
   Toast Notifications
   =================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: toastSlideUp 0.3s ease forwards;
  pointer-events: auto;
}

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

/* ===================================================================
   RESPONSIVE DESIGN SYSTEM — TABLET & MOBILE EXCELLENCE
   Breakpoints:
   - <= 1024px: Tablets & Compact Desktops
   - <= 768px: Tablets (Portrait) & Large Handhelds
   - <= 640px: Mobile Phones (Standard)
   - <= 420px: Compact Mobile Phones (iPhone SE, 320px-390px)
   =================================================================== */

/* Tablet & Compact Landscape (<= 1024px) */
@media (max-width: 1024px) {
  .hero-cycle-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cycle-dial-card {
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
  }

  .dial-container {
    width: 300px;
    height: 300px;
    margin: 0 auto;
  }

  .dashboard-banner {
    padding: 1.25rem 1.5rem;
  }

  .dashboard-greeting {
    font-size: 1.45rem;
  }
}

/* Tablet Portrait & Large Handhelds (<= 768px) */
@media (max-width: 768px) {
  .app-container {
    padding: 0.85rem 0.85rem 5rem;
  }

  /* 1. Top Header Scaling */
  .app-header {
    padding: 0.65rem 0.95rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md);
  }

  .user-greeting-chip,
  #header-user-chip {
    display: none !important; /* Hide duplicate greeting in header on tablet/mobile */
  }

  .brand-text .brand-tagline {
    display: none !important;
  }

  .brand-wrapper {
    gap: 0.6rem;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }

  .brand-text h1 {
    font-size: 1.2rem;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .btn-icon {
    width: 36px;
    height: 36px;
  }

  .btn-quick-log {
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    gap: 0.35rem;
  }

  /* 2. Top Welcome & Status Banner */
  .dashboard-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.15rem 1.15rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
  }

  .banner-profile-section,
  .banner-left-profile {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    width: 100%;
  }

  .banner-avatar-wrap {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
  }

  .banner-text-group {
    flex: 1;
    min-width: 0;
  }

  .dashboard-greeting {
    font-size: clamp(1.2rem, 4.2vw, 1.45rem);
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    word-break: break-word;
  }

  .dashboard-meta-row {
    gap: 0.45rem;
    font-size: 0.78rem;
    flex-wrap: wrap;
  }

  .phase-capsule-live {
    font-size: 0.74rem;
    padding: 0.2rem 0.65rem;
  }

  .meta-fertility-tag {
    font-size: 0.75rem;
  }

  .banner-right-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.65rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-secondary);
  }

  .streak-capsule {
    padding: 0.38rem 0.8rem;
    font-size: 0.76rem;
  }

  .banner-date-nav {
    padding: 0.2rem 0.5rem;
  }

  .banner-date-display {
    font-size: 0.78rem;
  }

  /* 3. 28-Day Cycle Timeline Ribbon */
  .cycle-timeline-ribbon {
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-lg);
  }

  .timeline-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
  }

  .timeline-phase-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem 0.85rem;
    width: 100%;
    font-size: 0.75rem;
  }

  .timeline-track-wrap {
    height: 32px;
    border-radius: 10px;
  }

  .track-seg-label {
    font-size: 0.65rem;
  }

  /* 4. Calendar View */
  .calendar-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-xl);
  }

  .calendar-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .calendar-nav-buttons {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .calendar-day-cell {
    min-height: 68px;
    padding: 0.35rem 0.25rem;
  }
}

/* Mobile Phones (Standard <= 640px) */
@media (max-width: 640px) {
  .app-container {
    padding: 0.65rem 0.65rem 4.5rem;
  }

  /* Navigation Bar */
  .nav-tab-bar {
    max-width: 100%;
    width: 100%;
    margin: 0 0 1.15rem;
    padding: 0.25rem;
    gap: 0.2rem;
  }

  .nav-tab span.tab-text {
    display: none !important;
  }

  .nav-tab {
    padding: 0.6rem 0.4rem;
    justify-content: center;
  }

  .nav-tab .tab-svg {
    width: 18px;
    height: 18px;
  }

  /* Dial Wheel Scaling */
  .dial-container {
    width: 250px;
    height: 250px;
    max-width: 100%;
    margin: 0 auto;
  }

  .dial-card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .dial-day-number {
    font-size: clamp(2.4rem, 10vw, 2.9rem);
  }

  .dial-phase-title {
    font-size: 0.95rem;
  }

  /* Timeline Segment Labels on Small Mobile */
  .track-seg-label {
    display: none;
  }

  .cursor-pin-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }

  /* Calendar View - Full 7-column fit with zero clipping */
  .calendar-card {
    padding: 0.85rem 0.45rem;
    border-radius: var(--radius-lg);
  }

  .calendar-title-group h2 {
    font-size: 1.18rem;
  }

  .calendar-subtitle {
    font-size: 0.72rem;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.2rem;
    width: 100%;
  }

  .calendar-weekday {
    font-size: 0.65rem;
    padding-bottom: 0.35rem;
    letter-spacing: 0.02em;
  }

  .calendar-day-cell {
    min-height: 52px;
    padding: 0.25rem 0.18rem;
    border-radius: var(--radius-sm);
  }

  .day-number {
    font-size: 0.74rem;
  }

  .day-phase-dot {
    width: 5px;
    height: 5px;
  }

  /* Hide lengthy text in badges on mobile, keep crystal-clear colored icon */
  .indicator-badge .badge-text {
    display: none !important;
  }

  .indicator-badge {
    padding: 0.12rem 0.25rem;
    font-size: 0.62rem;
    border-radius: 4px;
    line-height: 1;
    justify-content: center;
  }

  .day-indicator-row {
    gap: 0.12rem;
    padding-top: 0.12rem;
    justify-content: center;
  }

  .badge-symptom-dot {
    width: 5px;
    height: 5px;
  }

  .calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    font-size: 0.72rem;
    padding-top: 0.85rem;
  }

  /* Vitals Grid */
  .vitals-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .vitals-card {
    padding: 0.95rem;
  }

  .hormone-bars-grid {
    gap: 0.55rem;
  }

  .dash-symptoms-chip-row {
    gap: 0.35rem;
  }

  .dash-symptom-chip {
    padding: 0.35rem 0.65rem;
    font-size: 0.74rem;
  }

  .ai-whisper-prompts {
    gap: 0.35rem;
  }

  .ai-quick-prompt-chip {
    font-size: 0.74rem;
    padding: 0.35rem 0.65rem;
  }
}

/* Compact Mobile (<= 420px: iPhone SE, mini devices) */
@media (max-width: 420px) {
  .app-header {
    padding: 0.55rem 0.75rem;
  }

  .btn-quick-log span.btn-quick-log-text {
    display: none !important;
  }

  .btn-quick-log {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .banner-profile-section,
  .banner-left-profile {
    gap: 0.75rem;
  }

  .banner-avatar-wrap {
    width: 44px;
    height: 44px;
  }

  .dashboard-greeting {
    font-size: 1.18rem;
  }

  .dial-container {
    width: 220px;
    height: 220px;
  }

  .calendar-card {
    padding: 0.75rem 0.25rem;
  }

  .calendar-grid {
    gap: 0.15rem;
  }

  .calendar-day-cell {
    min-height: 46px;
    padding: 0.2rem 0.12rem;
  }

  .calendar-weekday {
    font-size: 0.6rem;
    letter-spacing: 0;
  }

  .day-number {
    font-size: 0.68rem;
  }

  .glass-btn {
    width: 28px;
    height: 38px;
  }
}

/* ===================================================================
   AUTH SCREEN — Clean, centered, warm
   =================================================================== */

.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  z-index: 9999;
  overflow: hidden;
}

/* Subtle warm gradient — no animated blobs */
.auth-bg-effects {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(232, 120, 138, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(168, 142, 196, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

/* Hide animated blobs */
.auth-blob, .auth-particles {
  display: none;
}

.auth-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 400px;
  width: 100%;
  padding: 1.5rem;
}

/* Brand */
.auth-brand {
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-brand-icon {
  font-size: 3rem;
  margin-bottom: 0.4rem;
  animation: none; /* Remove pulsing */
}

.auth-brand-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.auth-brand-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Auth Card */
.auth-card {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-2xl);
  padding: 2rem 1.85rem;
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: cardFadeIn 0.4s var(--ease-spring);
}

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

/* Auth Tabs — Apple segmented control style */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-card-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 1.35rem;
  position: relative;
}

.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6rem 0.85rem;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  position: relative;
  z-index: 2;
}

.auth-tab.active {
  color: var(--text-primary);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.auth-tab:hover:not(.active) {
  color: var(--text-secondary);
}

/* Auth Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 0.9rem;
  pointer-events: none;
  opacity: 0.5;
}

.auth-input-wrap .form-input {
  padding-left: 2.5rem;
}

.auth-optional {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.auth-submit-btn {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  padding: 0.8rem 1.25rem;
  font-weight: 600;
}

/* Auth Error */
.auth-error-display {
  background: rgba(217, 107, 107, 0.08);
  border: 1px solid rgba(217, 107, 107, 0.2);
  border-radius: var(--radius-xs);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.4rem;
}

.auth-error-display p {
  font-size: 0.8rem;
  color: var(--color-error);
  margin-bottom: 0.2rem;
}

.auth-error-display p:last-child {
  margin-bottom: 0;
}

.auth-error-display.shake {
  animation: shakeError 0.35s ease-out;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-secondary);
}

.auth-divider span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* OAuth Social Buttons (Google & Apple) */
.auth-oauth-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.btn-oauth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.72rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  text-decoration: none;
}

.btn-oauth:active {
  transform: scale(0.97);
}

.btn-oauth-google {
  background: var(--surface-card, #ffffff);
  color: var(--text-primary, #1e1e1e);
  border: 1.5px solid var(--border-secondary, rgba(0, 0, 0, 0.12));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-oauth-google:hover {
  background: var(--bg-secondary, #f8f9fa);
  border-color: var(--border-primary, rgba(0, 0, 0, 0.2));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-oauth-apple {
  background: #000000;
  color: #ffffff;
  border: 1.5px solid #000000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.btn-oauth-apple:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .btn-oauth-google {
  background: var(--surface-card, #1c1c1e);
  color: #ffffff;
  border: 1.5px solid var(--border-secondary, rgba(255, 255, 255, 0.15));
}

[data-theme="dark"] .btn-oauth-google:hover {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .btn-oauth-apple {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

[data-theme="dark"] .btn-oauth-apple:hover {
  background: #e5e5e7;
  border-color: #e5e5e7;
}

.oauth-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Guest Button */
.auth-guest-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  font-weight: 600;
}

.auth-footer-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

/* ===================================================================
   ONBOARDING SCREEN — Spacious, clean
   =================================================================== */

.onboarding-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  z-index: 9998;
  overflow-y: auto;
}

.onboarding-container {
  max-width: 520px;
  width: 100%;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Progress Bar */
.onboarding-progress-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.onboarding-progress-track {
  flex: 1;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.onboarding-progress-fill {
  height: 100%;
  background: var(--color-rose);
  border-radius: var(--radius-full);
  transition: width 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.onboarding-step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

/* Step Content */
.onboarding-step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 0;
}

/* Welcome Step */
.onboarding-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.onboarding-hero-icon {
  font-size: 3.5rem;
  animation: none; /* No pulsing */
}

.onboarding-hero-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.onboarding-hero-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 380px;
  line-height: 1.6;
}

.onboarding-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
  width: 100%;
  max-width: 360px;
}

.onboarding-feature-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  transition: all var(--transition-fast);
}

.onboarding-feature-card:hover {
  border-color: var(--border-accent);
  background: var(--surface-tinted);
}

.feature-icon {
  font-size: 1.15rem;
}

.feature-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
}

.onboarding-name-field {
  width: 100%;
  max-width: 300px;
  margin-top: 0.85rem;
  text-align: left;
}

.onboarding-name-field .form-input {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
}

/* Cycle Basics Step */
.onboarding-cycle-basics,
.onboarding-last-period,
.onboarding-symptoms,
.onboarding-ai-coach,
.onboarding-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.onboarding-section-icon {
  font-size: 2.5rem;
  margin-bottom: 0.15rem;
}

.onboarding-cycle-basics h3,
.onboarding-last-period h3,
.onboarding-symptoms h3,
.onboarding-ai-coach h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.onboarding-help-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 380px;
  line-height: 1.55;
}

.onboarding-slider-group {
  width: 100%;
  max-width: 380px;
  text-align: left;
  margin-top: 0.35rem;
}

.onboarding-slider-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.onboarding-slider-row .range-slider {
  flex: 1;
}

.range-value-lg {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-rose);
  min-width: 65px;
  text-align: right;
}

.onboarding-slider-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Date Picker */
.onboarding-date-picker-wrap {
  width: 100%;
  max-width: 260px;
  margin-top: 0.35rem;
}

.form-input-lg {
  font-size: 1.05rem !important;
  padding: 0.8rem 0.9rem !important;
  text-align: center;
}

.onboarding-info-box {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(232, 195, 106, 0.06);
  border: 1px solid rgba(232, 195, 106, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  max-width: 380px;
  width: 100%;
  text-align: left;
  margin-top: 0.4rem;
}

.onboarding-info-box p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Symptoms Grid */
.onboarding-symptom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  width: 100%;
  max-width: 440px;
  margin-top: 0.35rem;
}

.ob-symptom-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 0.5rem;
  background: var(--surface-card);
  border: 1.5px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s var(--ease-spring), all var(--transition-fast);
}

.ob-symptom-chip:hover {
  border-color: var(--border-accent);
  background: var(--surface-tinted);
}

.ob-symptom-chip.active {
  background: var(--color-rose-bg-strong);
  border-color: var(--color-rose);
  color: var(--color-rose);
  font-weight: 600;
}

/* AI Coach Intro Step */
.onboarding-ai-avatar {
  margin-bottom: 0.35rem;
}

.ai-avatar-glow {
  font-size: 3.5rem;
  display: inline-block;
  animation: none; /* Remove glow animation */
}

.onboarding-ai-features {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 380px;
  margin-top: 0.35rem;
}

.ai-feature-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  text-align: left;
  background: var(--surface-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  transition: all var(--transition-fast);
}

.ai-feature-row:hover {
  border-color: var(--border-accent);
}

.ai-feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.ai-feature-row strong {
  font-size: 0.82rem;
  color: var(--text-primary);
}

.ai-feature-row p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Complete Step */
.onboarding-confetti-wrap {
  margin-bottom: 0.35rem;
}

.confetti-emoji {
  font-size: 3.5rem;
  animation: confettiPop 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes confettiPop {
  0% { transform: scale(0) rotate(-15deg); }
  60% { transform: scale(1.15) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}

.onboarding-summary-card {
  background: var(--surface-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  width: 100%;
  max-width: 360px;
  margin-top: 0.85rem;
  text-align: left;
}

.onboarding-summary-card h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-secondary);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.summary-row strong {
  font-size: 0.82rem;
  color: var(--text-primary);
}

/* Onboarding Navigation */
.onboarding-nav {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.25rem 0;
  margin-top: auto;
}

.onboarding-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--surface-card-secondary);
}

/* ===================================================================
   AI COACH / CHAT — Apple Health & Editorial Design Spec
   =================================================================== */

.ai-coach-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
  min-height: 520px;
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--surface-card);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-2xl);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .ai-coach-container {
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Chat Header */
.ai-coach-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.ai-coach-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ai-coach-avatar {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(224, 108, 130, 0.15) 0%, rgba(168, 142, 196, 0.15) 100%);
  border: 1px solid rgba(224, 108, 130, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(224, 108, 130, 0.15);
}

.ai-coach-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.ai-coach-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Suggested Questions Pills */
.ai-suggested-questions {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 0;
  overflow-x: auto;
  flex-shrink: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.ai-suggested-questions::-webkit-scrollbar {
  display: none;
}

.suggested-question-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  background: var(--surface-card-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.suggested-question-btn:hover {
  border-color: var(--color-rose);
  color: var(--color-rose);
  background: var(--surface-card);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(224, 108, 130, 0.15);
}

.suggested-question-btn:active {
  transform: scale(0.96);
}

/* Chat Messages Viewport */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Empty State */
.ai-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 3rem 1.5rem;
  gap: 0.75rem;
}

.ai-chat-empty-icon {
  font-size: 3.2rem;
  animation: pulseAiDot 3s infinite ease-in-out;
}

.ai-chat-empty h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.ai-chat-empty p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 360px;
  line-height: 1.6;
}

/* Chat Bubbles */
.chat-message {
  display: flex;
  animation: msgFadeIn 0.28s var(--ease-spring);
}

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

.chat-message-user {
  justify-content: flex-end;
}

.chat-message-ai {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 78%;
  display: flex;
  gap: 0.65rem;
}

.bubble-user {
  flex-direction: row-reverse;
}

.bubble-user .chat-bubble-content {
  background: linear-gradient(135deg, var(--color-rose) 0%, var(--color-rose-deep) 100%);
  color: #FFFFFF;
  border-radius: 20px 20px 4px 20px;
  padding: 0.85rem 1.15rem;
  box-shadow: 0 4px 14px rgba(224, 108, 130, 0.28);
}

.bubble-ai .chat-bubble-content {
  background: var(--surface-card-secondary);
  border: 1px solid var(--border-secondary);
  color: var(--text-primary);
  border-radius: 20px 20px 20px 4px;
  padding: 0.85rem 1.15rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.chat-ai-avatar {
  width: 30px;
  height: 30px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(224, 108, 130, 0.15) 0%, rgba(168, 142, 196, 0.15) 100%);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.chat-text {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.62;
}

.chat-text p {
  margin-bottom: 0.5rem;
}

.chat-text p:last-child {
  margin-bottom: 0;
}

.chat-text ul {
  padding-left: 1.25rem;
  margin: 0.45rem 0;
}

.chat-text li {
  margin-bottom: 0.3rem;
}

.chat-text strong {
  font-weight: 700;
}

.bubble-user .chat-text strong {
  color: #FFFFFF;
}

.chat-time {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bubble-user .chat-time {
  color: rgba(255, 255, 255, 0.7);
}

/* Typing Indicator */
.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.3rem 0.2rem;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-rose);
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.35;
  }
  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* Chat Input Bar */
.ai-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 0 0.25rem 0;
  border-top: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.ai-chat-input {
  flex: 1;
  background: var(--surface-card-secondary);
  border: 1.5px solid var(--border-secondary);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.ai-chat-input::placeholder {
  color: var(--text-muted);
}

.ai-chat-input:focus {
  border-color: var(--color-rose);
  background: var(--surface-card);
  box-shadow: 0 0 0 3.5px var(--color-rose-glow);
}

.ai-chat-send-btn,
.ai-coach-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  padding: 0;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-rose) 0%, var(--color-rose-deep) 100%);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(224, 108, 130, 0.35);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}

.ai-chat-send-btn:hover,
.ai-coach-send-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(224, 108, 130, 0.45);
}

.ai-chat-send-btn:active,
.ai-coach-send-btn:active {
  transform: scale(0.94);
}

/* Header Right & Memory Button */
.ai-coach-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-agent-memory {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--surface-card);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.btn-agent-memory:hover {
  background: var(--color-rose-bg);
  border-color: var(--color-rose);
  color: var(--color-rose);
  transform: translateY(-1px);
}

.memory-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-rose);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  padding: 0 4px;
}

/* AI Engine Status Badge */
.ai-engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
  border: 1.5px solid transparent;
}

.ai-engine-badge.badge-active {
  background: rgba(0, 201, 167, 0.12);
  border-color: rgba(0, 201, 167, 0.35);
  color: var(--color-teal);
}

.ai-engine-badge.badge-active:hover {
  background: rgba(0, 201, 167, 0.2);
  transform: translateY(-1px);
}

.ai-engine-badge.badge-local {
  background: rgba(255, 199, 95, 0.14);
  border-color: rgba(255, 199, 95, 0.4);
  color: #B8860B;
}

[data-theme="dark"] .ai-engine-badge.badge-local {
  color: var(--color-gold);
}

.ai-engine-badge.badge-local:hover {
  background: rgba(255, 199, 95, 0.24);
  transform: translateY(-1px);
}

.engine-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.engine-dot.live {
  background: var(--color-teal);
  box-shadow: 0 0 8px rgba(0, 201, 167, 0.8);
  animation: pulse-live 2s infinite ease-in-out;
}

.engine-dot.local {
  background: var(--color-gold);
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* Settings AI Section Styles */
.btn-input-eye {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.btn-input-eye:hover {
  opacity: 1;
}

.ai-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.ai-status-pill.pill-server,
.ai-status-pill.pill-client {
  background: rgba(0, 201, 167, 0.15);
  color: var(--color-teal);
  border: 1px solid rgba(0, 201, 167, 0.3);
}

.ai-status-pill.pill-local {
  background: rgba(255, 199, 95, 0.18);
  color: #B8860B;
  border: 1px solid rgba(255, 199, 95, 0.35);
}

[data-theme="dark"] .ai-status-pill.pill-local {
  color: var(--color-gold);
}

/* Quick Hints in Empty Chat */
.ai-chat-quick-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.5rem;
  max-width: 420px;
}

.ai-chat-quick-hints span {
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
  background: var(--surface-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

/* Real-Time Apple Health-Style Action Card */
.agent-action-card {
  margin-top: 0.65rem;
  background: rgba(232, 120, 138, 0.08);
  border: 1px solid rgba(232, 120, 138, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  animation: actionCardPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .agent-action-card {
  background: rgba(232, 120, 138, 0.12);
  border-color: rgba(232, 120, 138, 0.35);
}

@keyframes actionCardPop {
  0% { opacity: 0; transform: scale(0.96) translateY(4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.action-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(232, 120, 138, 0.15);
}

.action-card-sparkle {
  font-size: 0.85rem;
  margin-right: 0.35rem;
}

.action-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-rose);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex: 1;
}

.action-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-success);
  background: rgba(127, 176, 158, 0.15);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-success);
  animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.action-card-chips {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.action-chip-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  background: var(--surface-card);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-secondary);
}

.action-chip-icon {
  font-size: 0.95rem;
  line-height: 1.2;
}

.action-chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.action-chip-text strong {
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
}

.action-chip-text span {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Agent Memory Modal Styles */
.memory-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 0.85rem;
  border-bottom: 1px solid var(--border-secondary);
}

.memory-filter-chip {
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  border-radius: var(--radius-full);
}

.agent-memory-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 290px;
  overflow-y: auto;
  padding: 0.85rem 0;
}

.memory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  transition: all var(--transition-fast);
}

.memory-item:hover {
  border-color: var(--border-accent);
  background: var(--surface-card);
}

.memory-item-left {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  flex: 1;
}

.memory-item-cat-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.memory-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.memory-item-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-rose);
}

.memory-item-fact {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

.memory-item-date {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.btn-delete-memory {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all var(--transition-fast);
  line-height: 1;
}

.btn-delete-memory:hover {
  color: var(--color-error);
  background: rgba(217, 107, 107, 0.12);
}

.form-add-memory {
  margin-top: 0.6rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-secondary);
}

.memory-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  gap: 0.5rem;
}

.memory-empty-state p {
  font-size: 0.82rem;
  max-width: 280px;
}

/* ===================================================================
   RESPONSIVE: Auth, Onboarding, AI Coach
   =================================================================== */

@media (max-width: 600px) {
  .auth-brand-title {
    font-size: 1.6rem;
  }

  .auth-card {
    padding: 1.25rem;
  }

  .onboarding-features-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-symptom-grid {
    grid-template-columns: 1fr 1fr;
  }

  .onboarding-hero-title {
    font-size: 1.4rem;
  }

  .ai-coach-container {
    height: calc(100vh - 110px);
  }

  .chat-bubble {
    max-width: 90%;
  }

  .ai-coach-header h2 {
    font-size: 0.95rem;
  }
}

/* ===================================================================
   LEGAL, COMPLIANCE & PRIVACY CONSENT STYLES
   =================================================================== */

/* Consent Banner */
.consent-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2.5rem);
  max-width: 860px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  padding: 1.15rem 1.4rem;
  z-index: 9999;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.consent-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.consent-text {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1;
  min-width: 280px;
}

.consent-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.consent-text strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.consent-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.consent-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Legal text link buttons */
.btn-link-legal {
  background: transparent;
  border: none;
  color: var(--color-rose);
  font-size: inherit;
  font-family: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  display: inline;
}

.btn-link-legal:hover {
  color: var(--color-coral);
}

.auth-compliance-links {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.65rem;
}

/* Compliance Alert Box */
.compliance-alert-box {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.compliance-alert-box.alert-danger {
  background: rgba(255, 107, 139, 0.1);
  border: 1.5px solid rgba(255, 107, 139, 0.4);
  color: var(--text-primary);
}

.compliance-alert-box.alert-danger strong {
  color: var(--color-rose);
}

.modal-scroll-body {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
  margin-bottom: 1rem;
}

/* Telemetry Dashboard */
.telemetry-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.telemetry-stat-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.telemetry-stat-box:hover {
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.telemetry-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.telemetry-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.telemetry-stat-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Telemetry Audit Log List */
.telemetry-audit-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.audit-log-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  transition: background var(--transition-fast);
}

.audit-log-item:hover {
  background: var(--bg-tertiary);
}

.audit-log-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  background: rgba(132, 94, 194, 0.14);
  color: var(--color-fuchsia);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.audit-log-detail {
  flex: 1;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-log-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ===================================================================
   APPLE GLASSMORPHISM MASTER DESIGN SYSTEM (visionOS / iOS 18 Aesthetic)
   =================================================================== */

/* 1. Universal Glass Cards & Surfaces */
.cycle-dial-card,
.daily-status-card,
.quick-log-card,
.metric-card,
.ai-coach-container,
.auth-card,
.onboarding-container,
.calendar-container,
.compliance-summary-card,
.settings-compliance-card,
.consent-banner,
.modal-content {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 12px 36px rgba(180, 140, 160, 0.08), 
              0 2px 8px rgba(180, 140, 160, 0.04), 
              inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  border-radius: var(--radius-xl);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .cycle-dial-card,
[data-theme="dark"] .daily-status-card,
[data-theme="dark"] .quick-log-card,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .ai-coach-container,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .onboarding-container,
[data-theme="dark"] .calendar-container,
[data-theme="dark"] .compliance-summary-card,
[data-theme="dark"] .settings-compliance-card,
[data-theme="dark"] .consent-banner,
[data-theme="dark"] .modal-content {
  background: rgba(30, 26, 32, 0.78) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 
              0 2px 8px rgba(0, 0, 0, 0.2), 
              inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Card Hover Lift & Glow */
.daily-status-card:hover,
.quick-log-card:hover,
.metric-card:hover,
.sync-card:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 18px 45px rgba(232, 120, 138, 0.13), inset 0 1px 0 #FFFFFF !important;
  border-color: rgba(232, 120, 138, 0.35) !important;
}

[data-theme="dark"] .daily-status-card:hover,
[data-theme="dark"] .quick-log-card:hover,
[data-theme="dark"] .metric-card:hover,
[data-theme="dark"] .sync-card:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(232, 120, 138, 0.45) !important;
}

/* 2. Apple Sheet Modals with Pinned Action Headers & Footers */
.modal-overlay {
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  background: rgba(18, 14, 18, 0.5) !important;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.25rem !important;
}

.modal-content {
  border-radius: var(--radius-2xl) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  max-height: 86vh !important;
  overflow: hidden !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28), 
              0 2px 10px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  animation: appleModalPop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .modal-content {
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.65), 
              0 2px 12px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

.modal-header {
  padding: 1.35rem 1.75rem !important;
  border-bottom: 1px solid var(--border-secondary) !important;
  margin-bottom: 0 !important;
  flex-shrink: 0 !important;
  background: transparent !important;
}

.modal-scroll-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  padding: 1.5rem 1.75rem !important;
  -webkit-overflow-scrolling: touch !important;
}

.modal-footer-actions {
  padding: 1.15rem 1.75rem !important;
  border-top: 1px solid var(--border-secondary) !important;
  background: var(--surface-card-secondary) !important;
  flex-shrink: 0 !important;
  margin-top: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.75rem !important;
}

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

/* 3. Apple Intelligence Settings Panel */
.apple-intelligence-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(242, 165, 179, 0.08));
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  border: 1px solid rgba(232, 120, 138, 0.2);
  margin-top: 1rem;
}

[data-theme="dark"] .apple-intelligence-panel {
  background: linear-gradient(145deg, rgba(40, 34, 38, 0.7), rgba(232, 120, 138, 0.1));
  border-color: rgba(232, 120, 138, 0.3);
}

.apple-ai-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-rose) 0%, var(--color-lavender) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(232, 120, 138, 0.3);
}

.apple-ai-info-card {
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
  border: 1px solid rgba(180, 140, 160, 0.15);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

[data-theme="dark"] .apple-ai-info-card {
  background: rgba(45, 38, 44, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

.ai-feature-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.ai-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 201, 167, 0.16);
  color: var(--color-teal);
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.ai-feature-row strong {
  font-size: 0.82rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.15rem;
}

.ai-feature-row p {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* 4. Apple Glass Inputs & Form Fields */
.form-input,
.form-textarea {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(180, 140, 160, 0.22) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.7rem 0.95rem !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  color: var(--text-primary) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea {
  background: rgba(45, 38, 44, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-primary) !important;
}

.form-input:focus,
.form-textarea:focus {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: var(--color-rose) !important;
  box-shadow: 0 0 0 3px rgba(232, 120, 138, 0.18), inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  outline: none !important;
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus {
  background: rgba(55, 46, 52, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(232, 120, 138, 0.25) !important;
}

/* 5. Apple Buttons & Spring Interaction */
.btn-primary {
  background: linear-gradient(135deg, #E8788A 0%, #F2A5B3 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 16px rgba(232, 120, 138, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-primary:hover {
  transform: translateY(-1.5px) scale(1.02) !important;
  box-shadow: 0 6px 22px rgba(232, 120, 138, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.btn-primary:active {
  transform: scale(0.97) !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(180, 140, 160, 0.22) !important;
  border-radius: var(--radius-full) !important;
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="dark"] .btn-secondary {
  background: rgba(45, 38, 44, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: var(--color-rose) !important;
  color: var(--color-rose) !important;
  transform: translateY(-1px) scale(1.01) !important;
}

.btn-secondary:active {
  transform: scale(0.97) !important;
}

/* 6. AI Coach Chat Bubbles & Bar Glassmorphism */
.ai-coach-header {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 16px rgba(180, 140, 160, 0.05);
}

[data-theme="dark"] .ai-coach-header {
  background: rgba(45, 38, 44, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}

.ai-message.assistant .ai-message-content {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 6px 20px rgba(180, 140, 160, 0.06), inset 0 1px 0 #FFFFFF !important;
  border-radius: 20px 20px 20px 4px !important;
}

[data-theme="dark"] .ai-message.assistant .ai-message-content {
  background: rgba(45, 38, 45, 0.82) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.ai-message.user .ai-message-content {
  background: linear-gradient(135deg, var(--color-rose) 0%, #f095a5 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 20px rgba(232, 120, 138, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  border-radius: 20px 20px 4px 20px !important;
}

.ai-chat-input-bar {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-radius: var(--radius-full) !important;
  box-shadow: 0 8px 28px rgba(180, 140, 160, 0.09), inset 0 1px 0 #FFFFFF !important;
  padding: 0.35rem 0.5rem 0.35rem 1.15rem !important;
}

[data-theme="dark"] .ai-chat-input-bar {
  background: rgba(45, 38, 44, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

/* 7. Action Cards in Chat */
.ai-action-card {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(232, 120, 138, 0.25) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 6px 22px rgba(232, 120, 138, 0.12), inset 0 1px 0 #FFFFFF !important;
}

[data-theme="dark"] .ai-action-card {
  background: rgba(45, 38, 44, 0.85) !important;
  border-color: rgba(232, 120, 138, 0.35) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

/* 8. Glass Pill & Timeline Refinements */

/* 9. Timeline Rows */
.timeline-row {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(180, 140, 160, 0.14) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 4px 16px rgba(180, 140, 160, 0.05), inset 0 1px 0 #FFFFFF !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="dark"] .timeline-row {
  background: rgba(42, 36, 42, 0.65) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.timeline-row:hover {
  transform: translateY(-2px);
  border-color: var(--border-accent) !important;
  box-shadow: 0 8px 24px rgba(232, 120, 138, 0.12), inset 0 1px 0 #FFFFFF !important;
}

/* 10. Apple Smooth Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(180, 140, 160, 0.25);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-rose-soft);
}

/* ===================================================================
   OAuth Modals: Google & Apple Authentic Sheets
   =================================================================== */
.modal-auth-oauth {
  max-width: 440px;
  width: 92%;
  border-radius: var(--radius-2xl);
  background: var(--surface-card);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border-secondary);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
  padding: 0;
  animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .modal-auth-oauth {
  background: rgba(30, 26, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.oauth-modal-header {
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-secondary);
}

.oauth-brand-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.oauth-modal-logo {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.oauth-modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0 0 0.25rem;
}

.oauth-modal-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.oauth-modal-body {
  padding: 1.35rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Google Account Selection Card */
.oauth-account-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.oauth-account-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--surface-card-secondary);
  border: 1.5px solid var(--border-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.oauth-account-card:hover {
  background: var(--surface-card);
  border-color: #4285F4;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(66, 133, 244, 0.12);
}

.oauth-account-card.active {
  border-color: #4285F4;
  background: rgba(66, 133, 244, 0.08);
  box-shadow: 0 0 0 1px #4285F4, 0 6px 18px rgba(66, 133, 244, 0.15);
}

.oauth-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.oauth-account-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.oauth-account-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oauth-account-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oauth-check-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4285F4;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Custom account toggle */
.oauth-custom-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-toggle-custom-oauth {
  background: transparent;
  border: none;
  color: #4285F4;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  padding: 0.35rem 0.2rem;
  transition: opacity 0.2s;
}

.btn-toggle-custom-oauth:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.oauth-custom-inputs {
  padding: 0.85rem;
  background: var(--surface-card-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-secondary);
}

.oauth-privacy-note {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.oauth-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-google-confirm {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.92rem;
  background: #1a73e8;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.3);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-google-confirm:hover {
  background: #1557b0;
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
  transform: translateY(-1px);
}

/* Apple Modal Theme */
.modal-apple-theme {
  max-width: 420px;
}

.apple-id-profile-summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--surface-card-secondary);
  border: 1px solid var(--border-secondary);
}

.apple-id-badge-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
}

.apple-id-caption {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.apple-email-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.apple-option-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-secondary);
  background: var(--surface-card-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.apple-option-row:hover {
  border-color: var(--text-secondary);
}

.apple-option-row input[type="radio"] {
  margin-top: 0.2rem;
  accent-color: var(--text-primary);
}

.apple-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.option-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.option-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Apple Biometric Pulsing Animation */
.apple-biometric-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 0.5rem;
}

.biometric-fingerprint {
  width: 60px;
  height: 60px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.biometric-icon {
  font-size: 1.8rem;
  color: var(--text-primary);
  z-index: 2;
}

.biometric-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--color-rose);
  animation: biometricPulse 1.8s ease-out infinite;
}

.biometric-ring.ring-1 {
  width: 50px;
  height: 50px;
  animation-delay: 0s;
}

.biometric-ring.ring-2 {
  width: 50px;
  height: 50px;
  animation-delay: 0.6s;
}

@keyframes biometricPulse {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.biometric-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-rose);
  animation: pulseAiDot 1.4s ease-in-out infinite;
}

.btn-apple-confirm {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.92rem;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-apple-confirm:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-apple-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}




/* ===================================================================
   FLOATING AIFY ASSISTANT (ORB + DISCREET GREETING + MINI-CHAT DRAWER)
   =================================================================== */
.aify-floating-dock {
  position: fixed;
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  pointer-events: none;
}

.aify-floating-dock > * {
  pointer-events: auto;
}

.aify-floating-orb {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem 0.7rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 120, 138, 0.45);
  background: linear-gradient(135deg, rgba(255, 107, 139, 0.95), rgba(199, 109, 176, 0.95));
  color: #ffffff;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 28px -6px rgba(232, 120, 138, 0.55), 0 2px 8px rgba(18, 14, 16, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.aify-floating-orb:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 34px -6px rgba(232, 120, 138, 0.7), 0 4px 12px rgba(18, 14, 16, 0.16);
}

.aify-floating-orb:active {
  transform: scale(0.97);
}

.aify-orb-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.aify-orb-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid rgba(255, 107, 139, 0.45);
  animation: aifyOrbPulse 2.8s infinite ease-out;
  pointer-events: none;
}

@keyframes aifyOrbPulse {
  0% { transform: scale(0.98); opacity: 0.75; }
  70% { transform: scale(1.14); opacity: 0; }
  100% { transform: scale(1.14); opacity: 0; }
}

/* Discreet Greeting Bubble */
.aify-floating-greeting {
  width: min(330px, calc(100vw - 2rem));
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(232, 120, 138, 0.28);
  box-shadow: 0 18px 42px -10px rgba(28, 16, 24, 0.18), 0 4px 14px rgba(232, 120, 138, 0.12);
  animation: aifySlideUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] .aify-floating-greeting {
  background: rgba(30, 23, 32, 0.94);
  border-color: rgba(232, 120, 138, 0.32);
  box-shadow: 0 18px 44px -8px rgba(0, 0, 0, 0.55);
}

@keyframes aifySlideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.aify-greeting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.aify-greeting-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.aify-greeting-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 107, 139, 0.2), rgba(132, 94, 194, 0.2));
  font-size: 0.9rem;
}

.aify-greeting-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-rose, #E8788A);
}

.aify-greeting-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  border-radius: 8px;
  cursor: pointer;
}

.aify-greeting-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.aify-greeting-text {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-primary);
  margin: 0 0 0.85rem;
}

.aify-greeting-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.aify-greeting-btn-accept {
  flex: 1;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 999px;
  justify-content: center;
}

.aify-greeting-btn-dismiss {
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 999px;
}

/* Compact Floating Mini-Chat Drawer */
.aify-floating-drawer {
  width: min(380px, calc(100vw - 1.75rem));
  height: min(530px, calc(100vh - 6.5rem));
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(232, 120, 138, 0.3);
  box-shadow: 0 24px 60px -12px rgba(24, 14, 22, 0.26), 0 4px 16px rgba(232, 120, 138, 0.14);
  animation: aifySlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] .aify-floating-drawer {
  background: rgba(26, 20, 29, 0.96);
  border-color: rgba(232, 120, 138, 0.32);
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.65);
}

.aify-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(255, 107, 139, 0.12), rgba(132, 94, 194, 0.1));
  border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.07));
  flex-shrink: 0;
}

.aify-drawer-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.aify-drawer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF6B8B, #C76DB0);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 3px 10px rgba(232, 120, 138, 0.35);
}

.aify-drawer-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.aify-drawer-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.aify-drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.aify-drawer-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .aify-drawer-icon-btn {
  background: rgba(255, 255, 255, 0.07);
}

.aify-drawer-icon-btn:hover {
  background: rgba(232, 120, 138, 0.16);
  color: var(--color-rose, #E8788A);
}

.aify-drawer-suggestions {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06));
  flex-shrink: 0;
  scrollbar-width: none;
}

.aify-drawer-suggestions::-webkit-scrollbar {
  display: none;
}

.aify-drawer-suggestions .suggested-question-btn {
  white-space: nowrap;
  font-size: 0.74rem;
  padding: 0.32rem 0.65rem;
  flex-shrink: 0;
}

.aify-drawer-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.aify-drawer-input-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  background: var(--surface-card, rgba(255, 255, 255, 0.8));
  flex-shrink: 0;
}

.aify-drawer-input {
  flex: 1;
  border: 1px solid var(--border-secondary, rgba(0, 0, 0, 0.12));
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  font-family: var(--font-body);
  background: var(--bg-primary, #fff);
  color: var(--text-primary);
  outline: none;
}

.aify-drawer-input:focus {
  border-color: var(--color-rose, #E8788A);
  box-shadow: 0 0 0 3px rgba(232, 120, 138, 0.15);
}

.aify-drawer-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .aify-floating-dock {
    right: 0.85rem;
    bottom: 0.85rem;
  }
  .aify-floating-drawer {
    width: calc(100vw - 1.7rem);
    height: min(470px, calc(100vh - 5.5rem));
  }
}
