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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at 0 0, #fee2e2 0, transparent 50%),
    radial-gradient(circle at 100% 0, #e0f2fe 0, transparent 55%),
    radial-gradient(circle at 50% 100%, #f5f3ff 0, transparent 60%),
    var(--clr-bg);
  color: var(--clr-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

:root {
  --color-bg-primary: #ffeef8;
  --color-bg-secondary: #fff5fa;
  --color-bg-gradient: linear-gradient(165deg, #ffeef8 0%, #f8f0ff 100%);
  --color-surface: rgba(255, 255, 255, 0.9);
  --color-surface-elevated: rgba(255, 255, 255, 0.95);
  --color-surface-glass: rgba(255, 255, 255, 0.7);
  --color-primary-50: #fff0f6;
  --color-primary-100: #ffe4f0;
  --color-primary-200: #ffc9e0;
  --color-primary-300: #ff9dc6;
  --color-primary-400: #ff6ba8;
  --color-primary-500: #ff3b8f;
  --color-primary-600: #f71c7a;
  --color-primary-700: #d90c62;
  --color-primary-800: #b30f52;
  --color-primary-900: #94124a;
  --color-secondary-50: #f5f3ff;
  --color-secondary-100: #ede9fe;
  --color-secondary-200: #ddd6fe;
  --color-secondary-300: #c4b5fd;
  --color-secondary-400: #a78bfa;
  --color-secondary-500: #8b5cf6;
  --color-secondary-600: #7c3aed;
  --color-secondary-700: #6d28d9;
  --color-secondary-800: #5b21b6;
  --color-secondary-900: #4c1d95;
  --color-accent-rose: #ff6b9d;
  --color-accent-lavender: #c4b5fd;
  --color-accent-peach: #ffb4a2;
  --color-accent-mint: #a7f3d0;
  --color-text-primary: #1a1a2e;
  --color-text-secondary: #4a4a68;
  --color-text-muted: #8b8b9f;
  --color-text-soft: #b8b8cc;
  --color-text-inverse: #ffffff;
  --color-status-haid: #ff6b9d;
  --color-status-suci: #10b981;
  --color-status-istihadhah: #f59e0b;
  --color-status-nifas: #8b5cf6;
  --color-status-unknown: #94a3b8;
  --color-success: #10b981;
  --color-success-bg: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-bg: #fef3c7;
  --color-danger: #ef4444;
  --color-danger-bg: #fee2e2;
  --color-info: #3b82f6;
  --color-info-bg: #dbeafe;
  --color-border-soft: rgba(203, 188, 227, 0.3);
  --color-border-medium: rgba(203, 188, 227, 0.5);
  --color-border-strong: rgba(203, 188, 227, 0.7);
  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(203, 188, 227, 0.15);
  --shadow-md: 0 4px 16px rgba(203, 188, 227, 0.2);
  --shadow-lg: 0 8px 24px rgba(203, 188, 227, 0.25);
  --shadow-xl: 0 12px 32px rgba(203, 188, 227, 0.3);
  --shadow-primary: 0 8px 24px rgba(255, 59, 143, 0.25);
  --shadow-secondary: 0 8px 24px rgba(139, 92, 246, 0.25);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --app-max-width: 480px;
  --bottom-nav-height: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius-pill: 999px;
  --clr-surface: #ffffff;
  --clr-surface-soft: #f9fafb;
  --clr-border-soft: rgba(226, 232, 240, 0.9);
  --clr-primary: #ec4899;
  --clr-primary-soft: rgba(236, 72, 153, 0.1);
  --clr-text-main: #0f172a;
  --clr-text-soft: #6b7280;
  --clr-text-softer: #9ca3af;
  --shadow-soft: 0 20px 40px rgba(148, 163, 184, 0.35);
  --bg-body: #f9f5ff;
  --bg-shell: linear-gradient(180deg, #fdfbff 0%, #f4f4ff 50%, #f3f9ff 100%);
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-soft: linear-gradient(135deg, #ffffff 0%, #fdf2ff 40%, #ecfeff 100%);
  --bg-hero: linear-gradient(135deg, #fce7f3 0%, #ede9fe 40%, #cffafe 100%);
  --bg-chip: rgba(148, 163, 184, 0.12);
  --bg-chip-selected: rgba(56, 189, 248, 0.18);
  --text-main: #111827;
  --text-soft: #6b7280;
  --text-muted: #9ca3af;
  --text-strong: #030712;
  --accent: #22c55e;
  --accent-soft: #a855f7;
  --accent-strong: #06b6d4;
  --danger: #fb7185;
  --success: #22c55e;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --shadow-header: 0 16px 30px rgba(148, 163, 184, 0.35);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  --nav-height: 72px;
  --clr-bg: #fdf2ff;
  --clr-bg-soft: #fef9ff;
  --shadow-shell: 0 18px 40px rgba(15, 23, 42, 0.16);
  --shadow-nav: 0 12px 30px rgba(15, 23, 42, 0.18);
}

#app {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  position: relative;
  background: linear-gradient(165deg, 
    #ffeef8 0%, 
    #fff0f9 25%, 
    #fef3fb 50%, 
    #f8f0ff 75%, 
    #f0f4ff 100%);
}

#app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: radial-gradient(ellipse at top, 
    rgba(255, 59, 143, 0.15) 0%, 
    rgba(139, 92, 246, 0.1) 50%, 
    transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.app-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  padding: env(safe-area-inset-top, 12px)
    env(safe-area-inset-right, 16px)
    calc(88px + env(safe-area-inset-bottom, 16px))
    env(safe-area-inset-left, 16px);
  position: relative;
  z-index: 1;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: transparent;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  border: none;
  overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
}

h3 {
  font-size: clamp(1.125rem, 3vw, 1.25rem);
}

.page-title {
  font-size: clamp(1.375rem, 4vw, 1.625rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary-600), var(--color-secondary-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.025em;
}

.page-subtitle {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.page-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0 var(--space-sm);
  margin-bottom: var(--space-md);
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, 
    rgba(255, 240, 249, 0.95) 0%, 
    rgba(255, 240, 249, 0.8) 80%, 
    transparent 100%);
  backdrop-filter: blur(10px);
}

.page-header-main {
  flex: 1;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-surface-glass);
  backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-back:hover {
  background: var(--color-surface-elevated);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-back:active {
  transform: translateY(0);
}

.page-section {
  margin: var(--space-lg) 0;
  margin-bottom: 18px;
}

.section-intro {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--clr-text-soft);
  line-height: 1.6;
}

.card,
.settings-block,
.dashboard-widget {
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.8) 50%, 
    transparent 100%);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  margin: 0;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--space-xs);
  margin: 4px 0 0;
}

.bottom-nav {
  position: fixed;
  left: 0;
  bottom: 0;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 388px;
  z-index: 40;
  padding: 0;
  right: 0;
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
  border: none;
  display: flex;
  animation: slideUp var(--transition-base) ease-out 400ms both;
  height: var(--nav-height);
  align-items: center;
  justify-content: center;
}

.bottom-nav-inner {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  box-shadow: var(--shadow-nav);
  border: 1px solid rgba(229, 231, 235, 0.9);
  pointer-events: auto;
  max-width: var(--app-max-width);
  margin: 0 auto calc(8px + var(--safe-bottom));
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  color: var(--clr-text-softer);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    transform 0.08s ease;
  position: relative;
  min-width: 0;
  outline: none;
  justify-content: center;
  letter-spacing: -0.01em;
}

.bottom-nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-secondary-500));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.bottom-nav-item .icon {
  font-size: 1.375rem;
  transition: all var(--transition-bounce);
  position: relative;
  z-index: 1;
  filter: grayscale(0.3);
}

.bottom-nav-item .label {
  line-height: 1;
  position: relative;
  z-index: 1;
}

.bottom-nav-item:active {
  transform: translateY(1px) scale(0.98);
}

.bottom-nav-item.active {
  color: var(--color-text-inverse);
}

.bottom-nav-item.active::before {
  opacity: 1;
}

.bottom-nav-item.active .icon {
  transform: scale(1.1);
  filter: grayscale(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease,
    border-color 0.12s ease, color 0.12s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
  min-height: 38px;
  text-decoration: none;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, 
    rgba(255, 255, 255, 0.3) 0%, 
    transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

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

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

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #ec4899, #fb7185, #f97316);
  color: #fff;
  box-shadow: 0 12px 26px rgba(236, 72, 153, 0.6);
}

.btn-primary:hover {
  box-shadow: 0 16px 32px rgba(236, 72, 153, 0.7);
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary-400), var(--color-secondary-600));
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-secondary);
}

.btn-secondary:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid var(--color-border-medium);
  color: #111827;
  box-shadow: var(--shadow-sm);
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  background: #f9fafb;
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary-600);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--color-primary-50);
  border-color: var(--color-primary-200);
}

.btn-link {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.875rem;
  color: #7c3aed;
  cursor: pointer;
  font-weight: 600;
  min-height: 0;
}

.btn-link:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
}

.form-group {
  margin-bottom: 8px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: -0.01em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="time"],
input[type="date"],
select,
textarea {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border-soft);
  padding: 12px var(--space-md);
  font-size: 0.9375rem;
  background: var(--color-surface-glass);
  backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

textarea {
  border-radius: var(--radius-lg);
  min-height: 80px;
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(129, 140, 248, 0.9);
  background: var(--color-surface-elevated);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.6);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-soft);
}

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

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

.text-muted {
  color: var(--clr-text-softer);
}

.text-soft {
  color: var(--clr-text-soft);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary-600), var(--color-secondary-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-xs {
  margin-top: var(--space-xs);
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mb-xs {
  margin-bottom: var(--space-xs);
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.pt-xs {
  padding-top: var(--space-xs);
}

.pt-sm {
  padding-top: var(--space-sm);
}

.pt-md {
  padding-top: var(--space-md);
}

.pt-lg {
  padding-top: var(--space-lg);
}

.pt-xl {
  padding-top: var(--space-xl);
}

.pb-xs {
  padding-bottom: var(--space-xs);
}

.pb-sm {
  padding-bottom: var(--space-sm);
}

.pb-md {
  padding-bottom: var(--space-md);
}

.pb-lg {
  padding-bottom: var(--space-lg);
}

.pb-xl {
  padding-bottom: var(--space-xl);
}

.animate-fade-in {
  animation: fadeIn var(--transition-base) ease-out;
}

.animate-slide-up {
  animation: slideUp var(--transition-base) ease-out;
}

.animate-scale-in {
  animation: scaleIn var(--transition-base) ease-out;
}

.animate-delay-1 {
  animation-delay: 100ms;
}

.animate-delay-2 {
  animation-delay: 200ms;
}

.animate-delay-3 {
  animation-delay: 300ms;
}

.animate-delay-4 {
  animation-delay: 400ms;
}

*:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 60px;
}

.app-header-blur {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.96),
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.7),
    transparent
  );
  border-bottom: 1px solid var(--clr-border-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: none;
}

.app-header-inner {
  position: relative;
  z-index: 1;
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-header-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-header-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--clr-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header-subtitle {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--clr-text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header-subtitle--muted {
  color: var(--clr-text-softer);
}

.header-back-btn,
.header-profile-btn {
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--clr-text-main);
  border-radius: var(--radius-pill);
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px var(--clr-border-soft);
  cursor: pointer;
  transition: background-color 0.12s ease, box-shadow 0.12s ease,
    transform 0.08s ease;
}

.header-back-btn--hidden {
  visibility: hidden;
  pointer-events: none;
}

.header-back-icon {
  font-size: 18px;
  margin-top: -1px;
}

.header-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #fb923c, #ec4899);
  font-size: 13px;
  color: #f9fafb;
}

.header-back-btn:hover,
.header-profile-btn:hover {
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.8);
}

.header-back-btn:active,
.header-profile-btn:active {
  transform: scale(0.96);
}

.app-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 var(--nav-height);
}

.page-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 16px calc(var(--bottom-nav-height) + var(--safe-bottom) + 14px);
  overflow-y: auto;
  box-sizing: border-box;
  background: radial-gradient(circle at top,
      rgba(255, 255, 255, 0.9),
      rgba(249, 250, 251, 0.95));
}

.section-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.page-bottom-spacer {
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
}

.bottom-nav-item--active {
  background: var(--clr-primary-soft);
  color: var(--clr-primary);
}

.bottom-nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #f9fafb;
  box-shadow: 0 0 0 1px var(--clr-border-soft);
  border: 1px solid rgba(148, 163, 184, 0.7);
  position: relative;
}

.bottom-nav-icon--home::before {
  content: "âŒ‚";
  font-size: 14px;
}

.bottom-nav-icon--calendar::before {
  content: "ðŸ“…";
}

.bottom-nav-icon--insights::before {
  content: "âœ¨";
}

.bottom-nav-icon--more::before {
  content: "â‹¯";
  font-size: 17px;
  margin-top: -2px;
}

.bottom-nav-item--active .bottom-nav-icon {
  background: radial-gradient(circle at 25% 0, #fb923c, #ec4899);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.96);
}

.bottom-nav-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.no-scroll {
  overflow: hidden;
}

#app::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: radial-gradient(ellipse at bottom, 
    rgba(139, 92, 246, 0.1) 0%, 
    rgba(255, 59, 143, 0.05) 50%, 
    transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 88px;
  animation: fadeIn var(--transition-base) ease-out;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
}

.page-header-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.page-body {
  flex: 1;
  padding-bottom: var(--space-lg);
}

.page-main {
  flex: 1;
  animation: slideUp var(--transition-base) ease-out;
}

.home-section {
  padding: 0 0 var(--space-lg);
  animation: fadeIn var(--transition-base) ease-out forwards;
  opacity: 0;
}

.home-section:nth-child(1) {
  animation-delay: 0ms;
  opacity: 1;
}

.home-section:nth-child(2) {
  animation-delay: 100ms;
}

.home-section:nth-child(3) {
  animation-delay: 200ms;
}

.home-section:nth-child(4) {
  animation-delay: 300ms;
}

.home-section--quick-actions {
  padding-bottom: var(--space-xl);
}

.page-section--chat {
  padding-bottom: 5rem;
}

.bottom-nav-item:hover {
  transform: translateY(-2px);
  background: rgba(243, 244, 246, 0.9);
}

.bottom-nav-item.is-active,
.bottom-nav-item.active {
  color: var(--color-text-inverse);
}

.bottom-nav-item.is-active::before,
.bottom-nav-item.active::before {
  opacity: 1;
}

.bottom-nav-item.is-active .icon,
.bottom-nav-item.active .icon {
  transform: scale(1.15);
  filter: grayscale(0);
}

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.justify-end {
  justify-content: flex-end;
}

.gap-xs {
  gap: var(--space-xs);
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.gap-xl {
  gap: var(--space-xl);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-sm {
  max-width: 640px;
}

.container-xs {
  max-width: 480px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.overflow-scroll {
  overflow: scroll;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.z-0 {
  z-index: 0;
}

.z-10 {
  z-index: 10;
}

.z-20 {
  z-index: 20;
}

.z-30 {
  z-index: 30;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.min-h-screen {
  min-height: 100vh;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.font-normal {
  font-weight: 400;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.font-extrabold {
  font-weight: 800;
}

.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.rounded-2xl {
  border-radius: var(--radius-2xl);
}

.rounded-full {
  border-radius: var(--radius-full);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-xl {
  box-shadow: var(--shadow-xl);
}

.shadow-none {
  box-shadow: none;
}

.opacity-0 {
  opacity: 0;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

.opacity-100 {
  opacity: 1;
}

.pointer-events-none {
  pointer-events: none;
}

.pointer-events-auto {
  pointer-events: auto;
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-not-allowed {
  cursor: not-allowed;
}

.cursor-default {
  cursor: default;
}

.select-none {
  user-select: none;
}

.select-text {
  user-select: text;
}

.select-all {
  user-select: all;
}

.status-banner {
  background: linear-gradient(135deg, 
    rgba(255, 240, 246, 0.95) 0%, 
    rgba(237, 233, 254, 0.95) 100%);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(255, 59, 143, 0.2);
}

.status-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, 
    rgba(255, 59, 143, 0.15) 0%, 
    transparent 70%);
  border-radius: 50%;
  animation: pulse 4s ease-in-out infinite;
}

.status-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.5rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-sm);
}

.status-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary-500);
  animation: dotPulse 2s ease-in-out infinite;
}

.status-title {
  margin-top: var(--space-md);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.status-meta {
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.status-card {
  position: relative;
}

.status-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.status-badge--danger {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
}

.status-badge--success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

.status-badge--warning {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.status-badge--neutral {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #475569;
}

.status-date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.status-description {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.prediction-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.prediction-row {
  padding: var(--space-md);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.6) 0%, 
    rgba(255, 240, 246, 0.4) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.prediction-row h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prediction-row p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.prediction-row strong {
  color: var(--color-primary-600);
  font-weight: 700;
}

.prediction-meta {
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-soft);
}

.prediction-meta p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: var(--space-xs) 0;
  line-height: 1.6;
}

.prediction-meta strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: var(--bg-chip);
  backdrop-filter: blur(10px);
  color: var(--text-soft);
  transition: all var(--transition-fast);
}

.chip:hover {
  background: var(--color-surface-elevated);
  border-color: var(--color-border-medium);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.chip-primary {
  background: var(--color-primary-50);
  border-color: var(--color-primary-200);
  color: var(--color-primary-700);
}

.chip-secondary {
  background: var(--color-secondary-50);
  border-color: var(--color-secondary-200);
  color: var(--color-secondary-700);
}

.calendar-card {
  background: var(--color-surface-elevated);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.calendar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.calendar-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-surface-glass);
  backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.calendar-nav-btn:hover {
  background: var(--color-surface-elevated);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

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

.auth-card {
  max-width: 400px;
  margin: var(--space-lg) auto;
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.auth-title {
  margin: 0 0 var(--space-sm);
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary-600), var(--color-secondary-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  margin: 0 0 var(--space-lg);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
}

.auth-form {
  margin-top: var(--space-md);
}

.auth-switch {
  margin-top: var(--space-lg);
  text-align: center;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.auth-switch a {
  color: var(--color-primary-600);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.settings-block h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 var(--space-xs);
  color: var(--color-text-primary);
}

.settings-intro {
  margin: 0 0 var(--space-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.chat-container {
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
  min-height: 400px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding-right: var(--space-sm);
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(203, 188, 227, 0.1);
  border-radius: var(--radius-full);
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--color-primary-300);
  border-radius: var(--radius-full);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-400);
}

.chat-bubble {
  max-width: 85%;
  padding: 12px var(--space-md);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  line-height: 1.6;
  animation: slideUp var(--transition-base) ease-out;
}

.chat-bubble.me {
  margin-left: auto;
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-secondary-500));
  color: var(--color-text-inverse);
  border-bottom-right-radius: var(--space-xs);
  box-shadow: var(--shadow-md);
}

.chat-bubble.ai {
  margin-right: auto;
  background: var(--color-surface-elevated);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-soft);
  border-bottom-left-radius: var(--space-xs);
  box-shadow: var(--shadow-sm);
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
}

.chat-input-row textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  border: none;
  background: transparent;
  padding: 10px 0;
  resize: none;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.chat-input-row textarea:focus {
  box-shadow: none;
  border: none;
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: none;
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-secondary-500));
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-primary);
  font-size: 1.25rem;
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

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

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-pill {
  border-radius: var(--radius-full);
}

.badge-soft-primary {
  background: var(--color-primary-50);
  color: var(--color-primary-700);
}

.badge-soft-secondary {
  background: var(--color-secondary-50);
  color: var(--color-secondary-700);
}

.badge-soft-success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.badge-soft-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.badge-soft-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(203, 188, 227, 0.15);
  color: var(--color-text-secondary);
  border: 1px solid rgba(203, 188, 227, 0.25);
  transition: all var(--transition-fast);
}

.tag-pill:hover {
  background: rgba(203, 188, 227, 0.25);
  border-color: rgba(203, 188, 227, 0.4);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  animation: fadeIn var(--transition-base) ease-out;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--color-primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  color: var(--color-text-inverse);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: var(--space-md);
}

.toast {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  max-width: 360px;
  padding: 10px 14px;
  background: #111827;
  backdrop-filter: blur(20px);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 1);
  border: 1px solid rgba(148, 163, 184, 0.8);
  font-size: 13px;
  color: #f9fafb;
  z-index: 10000;
  animation: slideInRight var(--transition-base) ease-out;
  min-width: 260px;
}

.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast-error {
  border-left: 4px solid var(--color-danger);
}

.toast-warning {
  border-left: 4px solid var(--color-warning);
}

.toast-info {
  border-left: 4px solid var(--color-info);
}

.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.empty-state-description {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--color-border-soft) 50%, 
    transparent 100%);
  margin: var(--space-lg) 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

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

.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-400), var(--color-secondary-400));
  color: var(--color-text-inverse);
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.25rem;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(203, 188, 227, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary-500), var(--color-secondary-500));
  border-radius: var(--radius-full);
  transition: width var(--transition-base) ease-out;
}

.skeleton {
  background: linear-gradient(90deg, 
    rgba(203, 188, 227, 0.1) 0%, 
    rgba(203, 188, 227, 0.2) 50%, 
    rgba(203, 188, 227, 0.1) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-sm);
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: var(--space-md);
}

.skeleton-card {
  height: 200px;
  width: 100%;
}

body.no-scroll {
  overflow: hidden;
}

.app-root {
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-height: 100vh;
  padding: 0;
}

.app-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-button,
.icon-button-spacer {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button {
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(148, 163, 184, 0.55);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.65);
}

.icon-back {
  width: 14px;
  height: 14px;
  border-left: 2px solid var(--text-main);
  border-bottom: 2px solid var(--text-main);
  transform: rotate(45deg) translateX(1px);
}

.app-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #f97316, #f97316 20%, #a855f7 40%, #22c55e 100%);
  position: relative;
  box-shadow: 0 0 0 4px rgba(254, 202, 202, 0.5);
}

.brand-moon {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #f9fafb;
  box-shadow: -3px 0 0 0 rgba(254, 249, 195, 0.8);
}

.brand-petal {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(254, 249, 195, 0.9);
}

.brand-petal-1 {
  left: 6px;
  bottom: 9px;
}

.brand-petal-2 {
  right: 5px;
  bottom: 6px;
  opacity: 0.6;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #27272a;
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-muted);
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-bell {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.9);
  position: relative;
}

.icon-bell::before,
.icon-bell::after {
  content: "";
  position: absolute;
}

.icon-bell::before {
  width: 6px;
  height: 7px;
  border-radius: 4px 4px 0 0;
  border: 2px solid rgba(148, 163, 184, 0.9);
  border-bottom: none;
  left: 50%;
  top: 3px;
  transform: translateX(-50%);
}

.icon-bell::after {
  width: 9px;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.9);
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
}

.avatar-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.6);
}

.app-header-meta {
  margin-top: 8px;
  padding: 4px 2px 4px;
}

.app-main-inner {
  padding: 12px 16px
    calc(var(--bottom-nav-height) + var(--safe-bottom) + 14px);
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
  overflow-y: auto;
  background: linear-gradient(
    180deg,
    var(--clr-bg-soft) 0%,
    #ffffff 60%,
    #fefce8 100%
  );
}

.mt-4 {
  margin-top: 10px;
}

.mt-8 {
  margin-top: 14px;
}

.mb-4 {
  margin-bottom: 10px;
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  padding: 14px 14px 14px;
  backdrop-filter: blur(12px);
}

.card-soft {
  background: var(--bg-card-soft);
}

.hero-card {
  border-radius: 22px;
  padding: 14px 14px 16px;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(148, 163, 184, 0.35);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.hero-card[data-fiqh-status="haid"] {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 40%, #fef9c3 100%);
  border-color: rgba(248, 113, 113, 0.7);
}

.hero-card[data-fiqh-status="suci"] {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 40%, #e0f2fe 100%);
  border-color: rgba(45, 212, 191, 0.7);
}

.hero-card[data-fiqh-status="istihadhah"] {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 40%, #e0f2fe 100%);
  border-color: rgba(129, 140, 248, 0.7);
}

.hero-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(250, 250, 255, 0.9);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4b5563;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(187, 247, 208, 0.9);
}

.hero-next-period {
  text-align: right;
}

.hero-next-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4b5563;
}

.hero-next-days {
  display: inline-block;
  margin-top: 4px;
  font-size: 26px;
  font-weight: 700;
  color: #111827;
}

.cycle-phase-label {
  margin: 0;
  font-size: 13px;
  color: #111827;
}

.cycle-phase-label strong {
  font-weight: 600;
  color: #4b5563;
}

.cycle-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}

.hero-next-unit {
  font-size: 11px;
  margin-left: 4px;
  color: #6b7280;
}

.hero-main {
  margin-top: 12px;
  display: flex;
  gap: 14px;
}

.cycle-visual {
  flex: 0 0 96px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cycle-ring {
  --cycle-progress: 0.3;
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: conic-gradient(
      from 270deg,
      #ec4899 calc(var(--cycle-progress) * 360deg),
      rgba(226, 232, 240, 0.9) 0
    );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.45);
}

.cycle-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cycle-ring-day {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.cycle-ring-caption {
  font-size: 10px;
  color: #6b7280;
}

.cycle-info {
  flex: 1;
}

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.info-card {
  min-height: 120px;
}

.info-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.info-card-subtitle {
  margin: 3px 0 0;
  font-size: 11px;
  color: #6b7280;
}

.info-card-body {
  margin: 6px 0 0;
  font-size: 12px;
  color: #374151;
}

.info-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.info-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: #f9fafb;
  box-shadow: 0 3px 6px rgba(148, 163, 184, 0.4);
}

.info-card--health {
  background: linear-gradient(135deg, #fefce8 0%, #ecfccb 50%, #e0f2fe 100%);
  border-left: 3px solid #22c55e;
}

.info-card--insight {
  background: linear-gradient(135deg, #fdf2ff 0%, #e9d5ff 45%, #e0f2fe 100%);
  border-left: 3px solid #a855f7;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.form-inline-row {
  display: flex;
  gap: 8px;
}

.form-inline-row .form-group {
  flex: 1;
}

.chip-select {
  cursor: pointer;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.9);
}

.chip-select.chip-selected {
  background: var(--bg-chip-selected);
  border-color: rgba(56, 189, 248, 1);
  color: #0f172a;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.chip-toggle {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
}

.chip-toggle input {
  display: none;
}

.chip-toggle input:checked + span {
  font-weight: 500;
  color: #0f172a;
}

.bottom-nav-item.is-active {
  background: rgba(243, 244, 246, 0.9);
  color: #111827;
  transform: translateY(-1px);
}

.bottom-nav-icon-home::before {
  content: "";
  position: absolute;
  inset: 7px 6px 4px;
  border-bottom: 2px solid rgba(148, 163, 184, 0.9);
}

.bottom-nav-icon-home::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-left: 2px solid rgba(148, 163, 184, 0.9);
  border-top: 2px solid rgba(148, 163, 184, 0.9);
  border-radius: 3px 0 0 0;
  left: 2px;
  top: 4px;
  transform: skewX(-10deg);
}

.bottom-nav-icon-log::before {
  content: "";
  position: absolute;
  inset: 4px 6px 4px;
  border-left: 2px solid rgba(148, 163, 184, 0.9);
}

.bottom-nav-icon-log::after {
  content: "";
  position: absolute;
  inset: 4px 6px 8px;
  border-top: 2px solid rgba(148, 163, 184, 0.9);
}

.bottom-nav-icon-calendar::before {
  content: "";
  position: absolute;
  inset: 6px 4px 4px;
  border-radius: 6px;
  border: 2px solid rgba(148, 163, 184, 0.9);
}

.bottom-nav-icon-calendar::after {
  content: "";
  position: absolute;
  inset: 4px 4px auto;
  border-top: 2px solid rgba(148, 163, 184, 0.9);
}

.bottom-nav-icon-insight::before {
  content: "";
  position: absolute;
  inset: 4px 4px 4px;
  border-left: 2px solid rgba(148, 163, 184, 0.9);
  border-bottom: 2px solid rgba(148, 163, 184, 0.9);
  transform: skewX(-10deg);
}

.bottom-nav-icon-settings::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.9);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  z-index: 30;
}

.no-scroll .bottom-nav {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.sheet-backdrop-visible {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  width: 100%;
  max-width: 480px;
  max-height: 100vh;
  border-radius: 20px 20px 0 0;
  background: #ffffff;
  box-shadow: 0 -16px 36px rgba(148, 163, 184, 0.6);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  transform: translateY(100%);
  transition: transform 0.18s ease-out;
  display: flex;
  flex-direction: column;
}

.sheet-visible {
  transform: translateY(0);
}

.sheet-header {
  padding: 12px 16px 4px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.sheet-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.sheet-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}

.sheet-close {
  border: none;
  background: rgba(243, 244, 246, 0.95);
  color: #111827;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.sheet-body {
  padding: 4px 16px 10px;
  flex: 1;
  overflow-y: auto;
}

.sheet-section {
  margin-top: 10px;
}

.sheet-footer {
  padding: 8px 16px 14px;
  border-top: 1px solid rgba(243, 244, 246, 0.9);
  background: #ffffff;
}

.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
}

.loading-overlay-box {
  padding: 10px 16px;
  border-radius: 16px;
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.8);
  font-size: 13px;
  color: #f9fafb;
}

.hero-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hero-card-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4b5563;
}

.hero-status-caption {
  font-size: 11px;
  color: #4b5563;
}

.hero-card-cycle-meta {
  text-align: right;
}

.hero-cycle-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

.hero-cycle-day {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.hero-cycle-length {
  display: block;
  font-size: 11px;
  color: #6b7280;
}

.hero-card-main {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-countdown {
  flex: 1;
}

.hero-count-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
}

.hero-count-number-row {
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hero-count-number {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
}

.hero-count-unit {
  font-size: 11px;
  color: #4b5563;
}

.hero-count-date {
  margin: 4px 0 0;
  font-size: 11px;
  color: #4b5563;
}

.hero-cycle-visual {
  flex: 0 0 88px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cycle-ring-day-label {
  font-size: 10px;
  color: #6b7280;
}

.cycle-ring-day-value {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 600;
  color: #111827;
}

.hero-cta {
  margin-top: 10px;
  width: 100%;
}

.home-mood-row {
  display: flex;
  gap: 8px;
}

.home-mood-chip {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 8px 6px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.home-mood-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.45);
}

.home-mood-chip-selected {
  background: linear-gradient(135deg, #fef3c7, #e9d5ff);
  box-shadow: 0 10px 22px rgba(129, 140, 248, 0.45);
}

.home-mood-emoji {
  font-size: 18px;
}

.home-mood-label {
  font-size: 11px;
  color: #374151;
}

.home-symptom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-symptom-chip {
  font-size: 12px;
  background: #ffffff;
}

.home-mood-hint {
  font-size: 11px;
  color: #6b7280;
}

.calendar-hero-card {
  border-radius: 20px;
  padding: 14px 14px 16px;
  background: linear-gradient(135deg, #fdf2ff 0%, #e0f2fe 40%, #dcfce7 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 26px rgba(148, 163, 184, 0.35);
}

.calendar-hero-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.calendar-hero-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.calendar-hero-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #4b5563;
}

.calendar-hero-log-btn {
  padding-inline: 12px;
  min-height: 32px;
  font-size: 12px;
}

.calendar-hero-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.calendar-hero-stat {
  flex: 1;
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.calendar-hero-stat-label {
  display: block;
  font-size: 11px;
  color: #6b7280;
}

.calendar-hero-stat-value {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.calendar-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.calendar-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calendar-filter-chip {
  font-size: 11px;
  padding: 4px 10px;
}

.calendar-filter-chip-active {
  background: linear-gradient(135deg, #fef3c7, #e9d5ff);
  border-color: rgba(129, 140, 248, 0.8);
  color: #111827;
}

.calendar-filter-today {
  font-size: 11px;
}

.calendar-timeline {
  margin-top: 8px;
}

.calendar-empty {
  font-size: 12px;
  color: #6b7280;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(209, 213, 219, 1);
}

.calendar-days {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-day-card {
  border-radius: 18px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 6px 14px rgba(148, 163, 184, 0.28);
}

.calendar-day-card-today {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 10px 22px rgba(129, 140, 248, 0.45);
}

.calendar-day-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.calendar-day-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.calendar-day-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #6b7280;
}

.calendar-day-status {
  flex-shrink: 0;
}

.cal-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(243, 244, 246, 0.9);
  color: #4b5563;
}

.cal-status-badge-haid {
  background: rgba(254, 202, 202, 0.9);
  color: #b91c1c;
}

.cal-status-badge-suci {
  background: rgba(187, 247, 208, 0.9);
  color: #166534;
}

.cal-status-badge-istihadhah {
  background: rgba(221, 214, 254, 0.9);
  color: #4338ca;
}

.calendar-day-body {
  margin-top: 6px;
}

.cal-entry-line {
  font-size: 12px;
  color: #374151;
}

.insights-hero-card {
  border-radius: 18px;
  padding: 12px 14px 14px;
  background: linear-gradient(135deg, #e0f2fe 0%, #f5d0fe 45%, #fee2e2 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 26px rgba(148, 163, 184, 0.35);
}

.insights-hero-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.insights-hero-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #4b5563;
}

.insights-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.insights-summary-card {
  border-radius: 14px;
  padding: 8px 8px 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 14px rgba(148, 163, 184, 0.28);
}

.insights-summary-label {
  display: block;
  font-size: 11px;
  color: #6b7280;
}

.insights-summary-value {
  display: inline-block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.insights-summary-unit {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: #6b7280;
}

.insights-cycle-list {
  margin-top: 8px;
}

.insights-empty {
  font-size: 12px;
  color: #6b7280;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(209, 213, 219, 1);
}

.insights-cycle-item {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.insights-cycle-bar-wrap {
  width: 24px;
  height: 80px;
  border-radius: 999px;
  background: rgba(243, 244, 246, 0.9);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.insights-cycle-bar {
  width: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4f46e5, #ec4899);
  position: relative;
  overflow: hidden;
}

.insights-cycle-bar-inner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(248, 250, 252, 0.85);
}

.insights-cycle-label {
  flex: 1;
}

.insights-cycle-label-main {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.insights-cycle-label-sub {
  font-size: 11px;
  color: #6b7280;
}

.insights-fiqh-bar {
  margin-top: 8px;
  height: 12px;
  border-radius: 999px;
  background: rgba(243, 244, 246, 0.9);
  overflow: hidden;
}

.insights-fiqh-bar-inner {
  display: flex;
  height: 100%;
}

.insights-fiqh-seg {
  height: 100%;
}

.insights-fiqh-seg-haid {
  background: #f97373;
}

.insights-fiqh-seg-suci {
  background: #4ade80;
}

.insights-fiqh-seg-istihadhah {
  background: #818cf8;
}

.insights-fiqh-legend {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 11px;
  color: #4b5563;
}

.insights-fiqh-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.insights-fiqh-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.insights-fiqh-dot-haid {
  background: #f97373;
}

.insights-fiqh-dot-suci {
  background: #4ade80;
}

.insights-fiqh-dot-istihadhah {
  background: #818cf8;
}

.insights-mood-card {
  font-size: 12px;
}

.app-main-bottom-spacer {
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
}

.bottom-nav-icon--log::before {
  content: "ðŸ©¸";
}

.bottom-nav-icon--settings::before {
  content: "âš™ï¸Ž";
  font-size: 13px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-primary: #1a1a2e;
    --color-bg-secondary: #252540;
    --color-surface: rgba(37, 37, 64, 0.9);
    --color-surface-elevated: rgba(42, 42, 72, 0.95);
    --color-text-primary: #f0f0f5;
    --color-text-secondary: #c8c8d8;
    --color-text-muted: #9898b0;
  }
}

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 359px) {
  .app-shell {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }
  
  .card,
  .settings-block,
  .dashboard-widget {
    padding: var(--space-md);
  }
}

@media (min-width: 420px) {
  .app-shell {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 768px) {
  .app-shell {
    max-width: var(--app-max-width);
    margin: 12px auto;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
  }
}

@media (max-width: 359px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 359px) {
  .page-header {
    padding: var(--space-sm) 0;
  }
  
  .home-section {
    padding: 0 0 var(--space-md);
  }
  
  .bottom-nav {
    width: calc(100% - 16px);
    bottom: env(safe-area-inset-bottom, 8px);
  }
  
  .bottom-nav-inner {
    padding: 6px;
    gap: 4px;
  }
  
  .bottom-nav-item {
    padding: 8px 4px;
  }
  
  .bottom-nav-item .icon {
    font-size: 1.125rem;
  }
  
  .bottom-nav-item .label {
    font-size: 0.625rem;
  }
}

@media (min-width: 480px) {
  .home-section {
    padding: 0 var(--space-md) var(--space-xl);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes dotPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

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

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@media (min-width: 768px) {
  .app-root {
    padding: 16px 0;
  }

  .app-shell {
    max-width: 480px;
    min-height: 640px;
    max-height: 900px;
    margin: 0 auto;
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.4);
  }
}

@media (min-width: 420px) {
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 400px) {
  .insights-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .app-shell {
    max-width: var(--app-max-width);
    margin: 16px auto;
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-shell);
    overflow: hidden;
  }
}

@media (min-width: 768px) {
  .bottom-nav {
    inset-inline: 0;
  }
}
/* === Siklusku unified stylesheet - 2025 === */
/* Mobileâ€‘first, single source of truth. Delete old base.css, layout.css, components.css. */

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* TOKENS */
:root {
  --bg-shell: radial-gradient(circle at top, #fdf2ff 0, #fef9ff 40%, #eef2ff 100%);
  --bg-page: transparent;

  --color-text-main: #0f172a;
  --color-text-soft: #6b7280;
  --color-text-muted: #9ca3af;

  --color-primary: #ec4899;
  --color-primary-soft: #fdf2ff;
  --color-primary-strong: #db2777;

  --color-accent: #06b6d4;
  --color-success: #22c55e;
  --color-danger: #fb7185;

  --color-surface: rgba(255, 255, 255, 0.96);
  --color-surface-soft: linear-gradient(135deg, #ffffff 0%, #fdf2ff 40%, #ecfeff 100%);

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --shadow-soft: 0 22px 40px rgba(148, 163, 184, 0.50);
  --shadow-nav: 0 18px 40px rgba(148, 163, 184, 0.55);

  --nav-height: 72px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 14px;
  --space-lg: 18px;
  --space-xl: 24px;
}

/* BODY / ROOT LAYOUT */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-main);
  background: var(--bg-shell);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
}

/* The SPA root (#app) just centers the current page column. */
#app {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: var(--bg-shell);
}

/* Page wrapper from PageWrapper.js */
.page {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  padding: var(--space-lg) var(--space-md) calc(var(--nav-height) + var(--space-lg));
  position: relative;
}

.page-header {
  padding-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.page-header-text {
  display: flex;
  flex-direction: column;
}

.page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-main);
}

.page-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--color-text-soft);
}

.btn-icon.btn-back {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.4);
}

/* Scrollable body area */
.page-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Sections & typography */
.page-section {
  margin-bottom: 16px;
}

.section-heading {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-main);
}

.section-intro {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-soft);
}

.text-soft {
  color: var(--color-text-soft);
}
.text-muted {
  color: var(--color-text-muted);
}
.mt-4 {
  margin-top: 10px;
}
.mt-8 {
  margin-top: 14px;
}
.mb-4 {
  margin-bottom: 10px;
}

/* ===== CARDS & CONTAINERS ===== */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: var(--color-surface);
  padding: 14px 14px 14px;
  box-shadow: 0 14px 28px rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(12px);
}

.card-soft {
  background: var(--color-surface-soft);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-main);
}

.card-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--color-text-soft);
}

/* Hero card on Home */
.hero-card {
  border-radius: 24px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, #fefce8 0%, #ecfccb 45%, #e0f2fe 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-soft);
}

.hero-card[data-fiqh-status="haid"] {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 40%, #fef9c3 100%);
}

.hero-card[data-fiqh-status="suci"] {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 35%, #e0f2fe 100%);
}

.hero-card[data-fiqh-status="istihadhah"] {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 40%, #e0f2fe 100%);
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.hero-card-status {
  max-width: 68%;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.9);
  color: #4b5563;
}

.hero-status-caption {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-main);
}

.hero-card-cycle-meta {
  text-align: right;
  font-size: 11px;
  color: var(--color-text-soft);
}

.hero-cycle-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
}

.hero-cycle-day {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-main);
}

.hero-cycle-length {
  display: block;
  margin-top: 2px;
}

.hero-card-main {
  margin-top: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.hero-countdown {
  flex: 1;
}

.hero-count-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4b5563;
}

.hero-count-number-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
}

.hero-count-number {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text-main);
}

.hero-count-unit {
  font-size: 11px;
  color: var(--color-text-soft);
}

.hero-count-date {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--color-text-soft);
}

.hero-cycle-visual {
  flex: 0 0 96px;
  display: flex;
  justify-content: center;
}

.cycle-ring {
  --cycle-progress: 0.2;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background:
    conic-gradient(
      from 270deg,
      var(--color-primary) calc(var(--cycle-progress) * 360deg),
      rgba(226, 232, 240, 0.9) 0
    );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.55);
}

.cycle-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cycle-ring-day-label {
  font-size: 10px;
  color: var(--color-text-soft);
}

.cycle-ring-day-value {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-main);
}

/* CTA */
.hero-cta {
  margin-top: 12px;
  width: 100%;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.96);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #ec4899, #fb7185, #f97316);
  color: #fff;
  box-shadow: 0 12px 26px rgba(236, 72, 153, 0.6);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(236, 72, 153, 0.7);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--color-text-main);
}

.btn-outline:hover {
  background: #f9fafb;
}

.btn-link {
  background: transparent;
  color: #7c3aed;
  border: none;
  padding: 0;
  min-height: 0;
}

/* ===== CHIPS & TAGS ===== */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 12px;
  color: var(--color-text-soft);
  background: rgba(148, 163, 184, 0.08);
}

.chip-select {
  cursor: pointer;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.95);
}

.chip-select.chip-selected {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 1);
  color: #0f172a;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.chip-toggle {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.95);
}
.chip-toggle input {
  display: none;
}
.chip-toggle input:checked + span {
  font-weight: 500;
  color: #0f172a;
}

/* Home mood & symptoms */
.home-mood-row,
.home-symptom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-mood-chip {
  flex: 1;
  min-width: 90px;
  padding: 8px 10px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
}

.home-mood-chip-selected {
  border-color: var(--color-primary);
  box-shadow: 0 10px 22px rgba(236, 72, 153, 0.3);
}

.home-mood-emoji {
  font-size: 18px;
}

.home-symptom-chip {
  font-size: 12px;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 8px;
}

.form-group label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--color-text-soft);
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.6);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.form-inline-row {
  display: flex;
  gap: 8px;
}
.form-inline-row .form-group {
  flex: 1;
}

/* ===== BOTTOM NAV (BottomNav.js) ===== */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 0 16px;
  z-index: 30;
}

.bottom-nav {
  display: flex;
  gap: 4px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(12px);
}

.bottom-nav-item {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--color-text-soft);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.12s ease, color 0.12s ease, transform 0.1s ease;
}

.bottom-nav-item:hover {
  background: rgba(243, 244, 246, 0.9);
}

.bottom-nav-item.is-active {
  background: rgba(243, 244, 246, 0.9);
  color: var(--color-text-main);
  transform: translateY(-1px);
}

.bottom-nav-label {
  white-space: nowrap;
}

/* Hide nav when sheet open */
.no-scroll .bottom-nav {
  transform: translateX(-50%) translateY(110%);
  opacity: 0;
  pointer-events: none;
}

/* ===== BOTTOM SHEET (quick log) ===== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  z-index: 40;
}

.sheet-backdrop-visible {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  width: 100%;
  max-width: 480px;
  max-height: 100vh;
  border-radius: 20px 20px 0 0;
  background: #ffffff;
  box-shadow: 0 -16px 36px rgba(148, 163, 184, 0.6);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  transform: translateY(100%);
  transition: transform 0.18s ease-out;
  display: flex;
  flex-direction: column;
}

.sheet-visible {
  transform: translateY(0);
}

.sheet-header {
  padding: 12px 16px 4px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.sheet-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-main);
}

.sheet-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--color-text-soft);
}

.sheet-close {
  border: none;
  background: rgba(243, 244, 246, 0.95);
  color: var(--color-text-main);
  border-radius: 999px;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.sheet-body {
  padding: 4px 16px 10px;
  flex: 1;
  overflow-y: auto;
}

.sheet-section {
  margin-top: 10px;
}

.sheet-footer {
  padding: 8px 16px 14px;
  border-top: 1px solid rgba(243, 244, 246, 0.9);
  background: #ffffff;
}

/* ===== CALENDAR PAGE ===== */
.calendar-hero-card {
  border-radius: 18px;
  padding: 12px 14px 10px;
  background: linear-gradient(135deg, #fdf2ff 0%, #e0f2fe 100%);
  border: 1px solid rgba(221, 214, 254, 0.8);
}

.calendar-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.calendar-hero-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.calendar-hero-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--color-text-soft);
}

.calendar-hero-log-btn {
  font-size: 12px;
  min-height: 32px;
  padding-inline: 12px;
}

.calendar-hero-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.calendar-hero-stat {
  flex: 1;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 11px;
}

.calendar-hero-stat-label {
  display: block;
  color: var(--color-text-muted);
}

.calendar-hero-stat-value {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
}

.calendar-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.calendar-filter-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
}

.calendar-filter-chip {
  font-size: 11px;
  white-space: nowrap;
}

.calendar-filter-chip-active {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 1);
  color: #0f172a;
}

.calendar-filter-today {
  font-size: 11px;
}

.calendar-timeline {
  margin-top: 8px;
}

.calendar-empty {
  font-size: 12px;
  color: var(--color-text-soft);
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px dashed rgba(148, 163, 184, 0.5);
}

.calendar-days {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-day-card {
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.calendar-day-card-today {
  border-color: var(--color-primary);
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.18);
}

.calendar-day-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.calendar-day-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

.calendar-day-sub {
  display: block;
  font-size: 11px;
  color: var(--color-text-soft);
}

.cal-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.cal-status-badge-haid {
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
}
.cal-status-badge-suci {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}
.cal-status-badge-istihadhah {
  background: rgba(129, 140, 248, 0.12);
  color: #4338ca;
}

.calendar-day-body {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-soft);
}

.cal-entry-line + .cal-entry-line {
  margin-top: 2px;
}

/* ===== INSIGHTS PAGE (ringkas) ===== */
.insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 420px) {
  .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.insight-card {
  border-radius: 18px;
  padding: 12px 12px 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.insight-metric-value {
  font-size: 18px;
  font-weight: 600;
}

.insight-metric-label {
  font-size: 11px;
  color: var(--color-text-soft);
}

/* ===== AUTH & SETTINGS (simple) ===== */
.auth-card {
  margin-top: 24px;
}

.auth-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.auth-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-soft);
}

.auth-switch {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
}
.auth-switch button {
  border: none;
  background: none;
  color: #7c3aed;
  font-size: 12px;
  cursor: pointer;
}

.settings-block {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.settings-section-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 6px 0;
}

.settings-item + .settings-item {
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}

/* ===== CHAT PAGE (Ustadzah AI) ===== */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-messages {
  flex: 1;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.chat-row {
  display: flex;
}

.chat-row-user {
  justify-content: flex-end;
}
.chat-row-ai {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 80%;
  padding: 8px 10px;
  border-radius: 16px;
  font-size: 13px;
}

.chat-bubble-user {
  background: linear-gradient(135deg, #ec4899, #fb7185);
  color: #f9fafb;
  border-bottom-right-radius: 4px;
}

.chat-bubble-ai {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-bottom-left-radius: 4px;
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 8px;
}

.chat-input-bar textarea {
  min-height: 40px;
  max-height: 96px;
}

/* ===== TOAST & LOADING (optional) ===== */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.8);
  color: #f9fafb;
  font-size: 13px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 1);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 98;
}

.loading-overlay-inner {
  min-width: 220px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.95);
  color: #f9fafb;
  font-size: 13px;
}



/* === Bottom nav refined override (2025) === */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  pointer-events: none;
  background: transparent;
  transform: none;
  width: 100%;
  max-width: none;
  padding: 0;
  display: flex;
  justify-content: center;
}

.bottom-nav-inner {
  pointer-events: auto;
  max-width: 480px;
  width: calc(100% - 32px);
  margin: 0 auto calc(12px + env(safe-area-inset-bottom, 0px));
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 6px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--color-text-soft);
  font-size: 11px;
  cursor: pointer;
  position: relative;
  min-width: 0;
  transition: background-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.bottom-nav-item .icon {
  font-size: 18px;
  line-height: 1;
}

.bottom-nav-item .label,
.bottom-nav-label {
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.bottom-nav-item.is-active,
.bottom-nav-item--active {
  background: rgba(236, 72, 153, 0.10);
  color: var(--color-text-main);
  transform: translateY(-1px);
}

.bottom-nav-item.is-active .icon,
.bottom-nav-item--active .icon {
  transform: scale(1.05);
}