:root {
  --primary: #2563eb;
  --primary-dark: #173ea9;
  --primary-soft: #dbeafe;
  --secondary: #f97316;
  --secondary-soft: #ffedd5;
  --accent: #14b8a6;
  --accent-soft: #ccfbf1;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --danger: #dc2626;
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --border: rgba(148, 163, 184, 0.24);
  --text: #0f172a;
  --muted: #64748b;
  --shadow-lg: 0 22px 50px rgba(15, 23, 42, 0.11);
  --shadow-md: 0 14px 34px rgba(37, 99, 235, 0.09);
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --nav-w: 104px;
  --top-h: 84px;
}

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

html {
  font-size: 16px;
  color-scheme: light;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 26%),
    radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.14), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f8fafc 48%, #eef6ff 100%);
  color: var(--text);
  font-family: 'Assistant', sans-serif;
  padding-top: var(--top-h);
  overflow-x: hidden;
}

body[data-drawer-open='true'] {
  overflow: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  filter: blur(16px);
  opacity: 0.6;
}

body::before {
  width: 320px;
  height: 320px;
  top: -120px;
  right: -90px;
  background: rgba(37, 99, 235, 0.14);
}

body::after {
  width: 360px;
  height: 360px;
  left: -140px;
  bottom: -180px;
  background: rgba(20, 184, 166, 0.12);
}

body[data-animations='reduced'] *,
body[data-animations='reduced'] *::before,
body[data-animations='reduced'] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

.glass-card,
.panel {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
}

.launch-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1000;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.16), transparent 34%),
    radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 56%, #eef6ff 100%);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.launch-screen.hide {
  opacity: 0;
  visibility: hidden;
}

.launch-bg {
  position: absolute;
  border-radius: 999px;
  filter: blur(16px);
  opacity: 0.6;
}

.launch-bg-a {
  width: 260px;
  height: 260px;
  top: 10%;
  left: 14%;
  background: rgba(37, 99, 235, 0.32);
  animation: floatSlow 7s ease-in-out infinite;
}

.launch-bg-b {
  width: 220px;
  height: 220px;
  right: 12%;
  bottom: 10%;
  background: rgba(249, 115, 22, 0.26);
  animation: floatSlow 9s ease-in-out infinite reverse;
}

.launch-card {
  position: relative;
  width: min(420px, calc(100vw - 40px));
  padding: 36px 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.12);
  color: var(--text);
  text-align: center;
  overflow: hidden;
}

.launch-logo {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 auto 22px;
}

.launch-logo-core {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: 'Sora', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #2563eb 55%, #f97316);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.35);
}

.launch-orbit {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.orbit-one {
  animation: orbitSpin 7s linear infinite;
}

.orbit-two {
  inset: 10px;
  animation: orbitSpin 10s linear infinite reverse;
}

.launch-kicker {
  color: rgba(37, 99, 235, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.launch-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 12px;
}

.launch-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 1.6em;
}

.launch-meter {
  margin-top: 28px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.launch-meter-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67e8f9, #60a5fa 60%, #fbbf24);
  transition: width 0.35s ease;
}

.launch-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.launch-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  font-size: 0.78rem;
  color: var(--text);
}

.side-nav {
  position: fixed;
  top: 14px;
  right: 14px;
  bottom: 14px;
  width: min(360px, 50vw);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(248, 250, 252, 0.52));
  backdrop-filter: blur(18px) saturate(1.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  z-index: 240;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.28s ease;
  touch-action: none;
}

body[data-drawer-open='true'] .side-nav {
  transform: translateX(0);
}

body[data-drawer-dragging='true'] .side-nav,
body[data-drawer-dragging='true'] .side-nav-backdrop {
  transition: none;
}

.drawer-swipe-zone {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 18px;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  opacity: 0.34;
  z-index: 235;
  touch-action: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.drawer-swipe-zone::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  width: 10px;
  height: 58px;
  border-radius: 999px 0 0 999px;
  background:
    linear-gradient(180deg, rgba(148, 163, 184, 0.18), rgba(96, 165, 250, 0.2), rgba(148, 163, 184, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-right: none;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
  opacity: 0.72;
}

.drawer-swipe-zone::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  width: 2px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

body[data-drawer-open='true'] .drawer-swipe-zone {
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px);
}

.side-nav-backdrop {
  position: fixed;
  inset: 0;
  border: none;
  background: rgba(15, 23, 42, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 230;
}

body[data-drawer-open='true'] .side-nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.side-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.side-nav-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 55%, var(--secondary) 100%);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-family: 'Assistant', sans-serif;
  color: var(--text);
  line-height: 1;
}

.brand-copy strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.brand-copy span {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
}

.side-nav-close {
  border: none;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.side-nav-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  position: relative;
  border: none;
  background: transparent;
  border-radius: 18px;
  padding: 14px 16px 14px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: start;
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(20, 184, 166, 0.08));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-item:hover {
  transform: translateY(-1px);
  color: var(--text);
}

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

.nav-item.active {
  color: #0f3fb3;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.92), rgba(191, 219, 254, 0.64));
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16), 0 14px 24px rgba(37, 99, 235, 0.14);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), #38bdf8);
}

.nav-item.active .nav-label {
  font-size: 0.98rem;
  font-weight: 800;
}

.nav-item.active .nav-icon {
  color: var(--primary-dark);
}

.nav-icon,
.nav-label {
  position: relative;
  z-index: 1;
}

.nav-icon {
  width: 22px;
  height: 22px;
}

.nav-label {
  font-size: 0.92rem;
  font-weight: 700;
}

.install-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 10px;
  width: 100%;
  margin-top: auto;
  font-family: 'Assistant', sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.topbar {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  backdrop-filter: blur(14px);
  background: rgba(248, 250, 252, 0.7);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  z-index: 200;
}

.topbar-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-kicker {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.topbar-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.topbar-badge,
.date-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.update-banner {
  position: fixed;
  top: var(--top-h);
  inset-inline-start: 0;
  inset-inline-end: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  animation: slideDown 0.35s ease;
}

.update-banner[hidden] {
  display: none;
}

.update-btn {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-family: 'Assistant', sans-serif;
  font-weight: 700;
  color: var(--primary);
  background: #fff;
  cursor: pointer;
}

.screen {
  display: none;
  padding: 24px 16px 34px;
  width: min(1080px, calc(100vw - 24px));
  margin-inline: auto;
  animation: fadeInUp 0.35s ease;
}

.screen.active {
  display: block;
}

.panel,
.glass-card {
  padding: 22px;
  margin-bottom: 18px;
}

.panel-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.04rem;
  font-weight: 700;
}

.panel-title-light {
  color: #fff;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-header-stack {
  align-items: flex-start;
}

.panel-subtitle,
.section-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 6px;
  line-height: 1.6;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 20px;
  padding: 28px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 26%),
    radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.3), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #0f766e 100%);
  border: none;
  overflow: hidden;
  position: relative;
}

.hero-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.hero-copy,
.hero-progress {
  position: relative;
  z-index: 1;
}

.hero-chip {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-subtitle {
  max-width: 420px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
  font-size: 0.95rem;
}

.hero-marketing-callout {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-marketing-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  flex-shrink: 0;
}

.hero-marketing-icon svg {
  width: 20px;
  height: 20px;
}

.hero-marketing-callout strong {
  font-size: 0.94rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn-primary,
.btn-secondary,
.btn-ai-goals {
  border: none;
  border-radius: 16px;
  font-family: 'Assistant', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ai-goals:hover,
.quick-card:hover,
.suggestion-chip:hover,
.install-btn:hover,
.update-btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  width: 100%;
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.btn-secondary {
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-sm);
}

.btn-large {
  min-width: 150px;
}

.hero-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hero-ring-card {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
}

.hero-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.hero-ring-center strong {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
}

.hero-ring-center span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.82);
}

.streak-pill {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
}

.orb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.orb-card {
  position: relative;
  min-height: 148px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.orb-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.56);
}

.orb-blue {
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.95), rgba(191, 219, 254, 0.8));
}

.orb-orange {
  background: linear-gradient(145deg, rgba(255, 237, 213, 0.95), rgba(253, 230, 138, 0.82));
}

.orb-green {
  background: linear-gradient(145deg, rgba(220, 252, 231, 0.95), rgba(167, 243, 208, 0.82));
}

.orb-label,
.orb-hint,
.orb-value {
  position: relative;
  z-index: 1;
}

.orb-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.orb-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
}

.orb-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.stats-row,
.dashboard-grid,
.stats-overview-grid,
.goals-summary {
  display: grid;
  gap: 16px;
}

.stats-row,
.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stat-tile,
.mini-panel,
.data-card,
.goal-stat-card {
  min-height: 118px;
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.tile-blue,
.card-blue {
  background: linear-gradient(145deg, #dbeafe, #f0f7ff);
}

.tile-orange,
.card-orange {
  background: linear-gradient(145deg, #ffedd5, #fff7ed);
}

.tile-green {
  background: linear-gradient(145deg, #dcfce7, #f0fdf4);
}

.card-purple {
  color: #fff;
  background: linear-gradient(145deg, #1d4ed8, #7c3aed);
}

.tile-val,
.mini-value,
.data-value,
.gsc-val {
  font-family: 'Sora', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
}

.tile-lbl,
.mini-label,
.data-label,
.gsc-lbl {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.card-purple .gsc-lbl,
.card-purple .gsc-val {
  color: #fff;
}

.link-btn {
  border: none;
  background: transparent;
  font-family: 'Assistant', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.log-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.log-item-name {
  font-weight: 700;
}

.log-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.log-prot-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
}

.log-cal-txt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.log-del {
  border: none;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.empty-log {
  padding: 20px 12px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 12px;
}

.quick-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  padding: 16px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-card:hover {
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 16px 26px rgba(37, 99, 235, 0.12);
}

.qc-name {
  font-weight: 700;
}

.qc-prot {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.84rem;
}

.qc-cal {
  color: var(--muted);
  font-size: 0.78rem;
}

.quick-no-results {
  padding: 22px 12px;
  text-align: center;
  color: var(--muted);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.search-wrap {
  position: relative;
  min-width: min(100%, 260px);
}

.search-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input,
.form-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  padding: 13px 14px;
  color: var(--text);
  outline: none;
  font-family: 'Assistant', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-input {
  padding-inline-start: 40px;
}

.search-input:focus,
.form-input:focus {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background: #fff;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 38px;
  cursor: pointer;
}

.collapsible-panel .collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, padding-top 0.28s ease;
}

.collapsible-panel.open .collapsible-body {
  max-height: 2200px;
  padding-top: 16px;
}

.collapsible-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: none;
  background: transparent;
  font-family: 'Assistant', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.chevron {
  transition: transform 0.2s ease;
}

.collapsible-panel.open .chevron {
  transform: rotate(180deg);
}

.log-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.day-totals-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.day-totals-header span {
  font-size: 0.78rem;
  color: var(--muted);
}

.day-totals-header .val-blue {
  color: var(--primary);
}

.day-totals-header .val-orange {
  color: var(--secondary);
}

.danger-btn-sm {
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  font-family: 'Assistant', sans-serif;
  font-weight: 700;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  cursor: pointer;
}

.hero-strip {
  padding: 26px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 22%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 62%, #0f766e 100%);
  border: none;
}

.hero-strip-settings {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 24%),
    linear-gradient(135deg, #0f172a 0%, #134e4a 62%, #1d4ed8 100%);
}

.hero-strip-text {
  margin-top: 10px;
  max-width: 520px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

.data-card {
  background: rgba(255, 255, 255, 0.78);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-row {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.history-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.history-day {
  font-weight: 700;
}

.history-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.history-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.history-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #60a5fa, var(--accent));
}

.progress-wrap {
  margin-bottom: 18px;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 700;
}

.progress-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  transition: width 0.5s ease;
}

.insights-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.insight-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-inline-end: 4px solid var(--primary);
}

.goals-btn-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.goals-btn-row-single {
  grid-template-columns: 1fr;
}

.goals-settings-bridge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px dashed rgba(37, 99, 235, 0.2);
}

.goals-settings-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.goals-settings-copy strong {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
}

.goals-settings-summary {
  margin-top: 0;
}

.goals-settings-btn {
  width: auto;
  min-width: 160px;
}

.btn-ai-goals {
  padding: 14px 16px;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.btn-ai-goals:disabled {
  opacity: 0.55;
  cursor: default;
}

.ai-goal-text {
  line-height: 1.8;
  white-space: pre-line;
}

.ai-loading {
  color: var(--muted);
}

.chat-wrap {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--top-h) - 44px);
  gap: 10px;
}

.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 2px 12px;
  overflow-y: auto;
}

.chat-bubble {
  max-width: 82%;
  padding: 14px 16px;
  border-radius: 20px;
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.bot-bubble {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.84);
  border-bottom-right-radius: 6px;
}

.user-bubble {
  align-self: flex-start;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  border-bottom-left-radius: 6px;
}

.typing-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  animation: typingBounce 1s ease-in-out infinite;
}

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

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

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-choice-note {
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.suggestion-chip {
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  font-family: 'Assistant', sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
}

.chat-input {
  flex: 1;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.88);
  font-family: 'Assistant', sans-serif;
  font-size: 0.95rem;
  outline: none;
}

.chat-input:focus {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.send-btn {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
  cursor: pointer;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.42);
  z-index: 380;
}

.modal-overlay.open {
  display: flex;
}

.modal-sheet {
  width: min(720px, 100%);
  max-height: min(88vh, 840px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 28px 28px 0 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -20px 48px rgba(15, 23, 42, 0.18);
  animation: slideUp 0.28s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.08rem;
}

.modal-close {
  border: none;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.modal-block + .modal-block {
  margin-top: 16px;
}

.section-header-inline {
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.modal-manual-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-row2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modal-divider {
  position: relative;
  margin: 18px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: rgba(148, 163, 184, 0.24);
}

.modal-divider::before {
  right: 0;
}

.modal-divider::after {
  left: 0;
}

.food-photo-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.food-photo-key-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.food-photo-picker {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.food-photo-preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: var(--shadow-sm);
  background: rgba(148, 163, 184, 0.08);
}

.food-photo-status {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.food-photo-status[data-tone='success'] {
  color: var(--success);
}

.food-photo-status[data-tone='error'] {
  color: var(--danger);
}

.food-scan-result {
  background: rgba(99, 202, 183, 0.08);
  border: 1px solid rgba(99, 202, 183, 0.25);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.food-scan-result-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.food-scan-result-macros {
  font-size: 0.9rem;
  color: var(--success);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.food-scan-ingredients {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.food-scan-ingredients-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.food-scan-ingredient-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.food-ingredient-tag {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
}

.food-scan-notes {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
}

.food-scan-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.food-scan-actions .btn-primary,
.food-scan-actions .btn-secondary {
  flex: 1;
  padding: 12px 8px;
  font-size: 0.88rem;
}

.toggle-card {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.16);
  cursor: pointer;
}

.toggle-card input {
  display: none;
}

.toggle-indicator {
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  position: relative;
  transition: background 0.2s ease;
}

.toggle-indicator::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease;
}

.toggle-card input:checked + .toggle-indicator {
  background: rgba(37, 99, 235, 0.54);
}

.toggle-card input:checked + .toggle-indicator::after {
  transform: translateX(-20px);
}

.toggle-card strong {
  display: block;
}

.toggle-card small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.6;
}

.settings-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.settings-status {
  color: var(--muted);
  line-height: 1.6;
}

.button-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.membership-actions,
.membership-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.membership-actions .btn-primary,
.membership-actions .btn-secondary,
.membership-links .btn-secondary {
  width: auto;
  min-width: 180px;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 30%),
    radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.16), transparent 28%),
    rgba(241, 245, 249, 0.96);
}

.access-gate[hidden] {
  display: none;
}

.access-card {
  width: min(520px, calc(100vw - 24px));
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
}

.access-chip {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
}

.access-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  margin-bottom: 10px;
}

.access-subtitle {
  color: var(--muted);
  line-height: 1.8;
}

.access-price-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 22px 0 18px;
}

.access-price-row .topbar-badge {
  flex-shrink: 0;
}

.access-price {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.access-trial {
  display: block;
  color: var(--muted);
  line-height: 1.6;
}

.access-highlights {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.access-highlights li {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.1);
  color: var(--text);
  line-height: 1.6;
}

.access-actions {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.access-phone-block {
  padding: 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px dashed rgba(148, 163, 184, 0.28);
}

.access-phone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 10px 0 10px;
}

.access-phone-row .btn-secondary {
  width: auto;
  min-width: 120px;
}

.access-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

body[data-access-locked='true'] {
  padding-top: 0;
}

body[data-access-locked='true'] .topbar,
body[data-access-locked='true'] .side-nav,
body[data-access-locked='true'] .side-nav-backdrop,
body[data-access-locked='true'] .drawer-swipe-zone,
body[data-access-locked='true'] .update-banner,
body[data-access-locked='true'] .screen,
body[data-access-locked='true'] .modal-overlay:not(#accessGate) {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  padding: 12px 22px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 420;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typingBounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@keyframes orbitSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

@media (max-width: 920px) {
  .stats-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --top-h: 74px;
  }

  body {
    padding-top: calc(var(--top-h) + 4px);
  }

  .topbar {
    padding: 14px 18px;
  }

  .screen {
    width: calc(100vw - 16px);
    padding: 18px 14px 30px;
  }

  .side-nav {
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: calc(50vw - 10px);
  }

  .drawer-swipe-zone {
    width: 16px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-progress {
    flex-direction: row;
    justify-content: space-between;
  }

  .orb-grid,
  .stats-row,
  .dashboard-grid,
  .goals-summary,
  .settings-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-row2,
  .goals-btn-row,
  .modal-row2 {
    grid-template-columns: 1fr;
  }

  .goals-settings-bridge {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-header-stack {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .screen {
    width: calc(100vw - 8px);
  }

  .orb-grid,
  .stats-row,
  .dashboard-grid,
  .stats-overview-grid,
  .goals-summary,
  .settings-actions {
    grid-template-columns: 1fr;
  }

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

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

  .update-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-marketing-callout {
    width: 100%;
  }

  .launch-card {
    padding: 28px 20px;
  }
}

.hero-panel-compact {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

.hero-progress-grid {
  width: min(100%, 360px);
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.hero-progress-grid .streak-pill {
  text-align: center;
}

.hero-progress-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-progress-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-progress-copy strong {
  font-family: 'Sora', sans-serif;
  font-size: 1.08rem;
}

.hero-progress-copy span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  line-height: 1.6;
}

.hero-progress-meter {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.hero-progress-meter-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 0.4s ease;
}

.hero-progress-meter-fill-protein {
  background: linear-gradient(90deg, #67e8f9, #93c5fd);
}

.hero-progress-meter-fill-calorie {
  background: linear-gradient(90deg, #fdba74, #f97316);
}

.home-log-panel {
  margin-top: 6px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.calendar-head-copy {
  flex: 1;
}

.calendar-toolbar-actions {
  display: flex;
  gap: 10px;
}

.calendar-nav-btn {
  width: auto;
  white-space: nowrap;
}

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

.calendar-weekdays {
  margin-bottom: 10px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 0;
}

.calendar-grid {
  direction: rtl;
}

.calendar-day {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  min-height: 112px;
  padding: 12px;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.calendar-day:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.26);
  box-shadow: var(--shadow-sm);
}

.calendar-day.is-outside {
  opacity: 0.42;
}

.calendar-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.34);
}

.calendar-day.has-data {
  border-color: rgba(37, 99, 235, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(219, 234, 254, 0.7));
}

.calendar-day-number {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

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

.calendar-day-protein,
.calendar-day-calories {
  font-size: 0.76rem;
  line-height: 1.5;
}

.calendar-day-protein {
  font-weight: 700;
  color: var(--primary);
}

.calendar-day-calories {
  color: var(--muted);
}

.calendar-day-protein:empty,
.calendar-day-calories:empty {
  display: none;
}

.stats-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.chart-bars {
  min-height: 220px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.chart-bars .quick-no-results {
  grid-column: 1 / -1;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 18px;
  line-height: 1.6;
}

.chart-bar {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.chart-bar-value,
.chart-bar-label {
  text-align: center;
}

.chart-bar-value {
  font-family: 'Sora', sans-serif;
  font-size: 0.76rem;
  color: var(--muted);
}

.chart-bar-label {
  font-size: 0.76rem;
  color: var(--muted);
}

.chart-bar-track {
  height: 160px;
  display: flex;
  align-items: flex-end;
  padding: 0 4px;
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.14);
}

.chart-bar-fill {
  display: block;
  width: 100%;
  min-height: 8px;
  border-radius: 14px 14px 8px 8px;
}

.chart-bar-protein .chart-bar-fill {
  background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.chart-bar-calories .chart-bar-fill {
  background: linear-gradient(180deg, #fb923c, #f97316);
}

.manual-goals-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.recommendation-panel {
  border-inline-start: 4px solid var(--primary);
}

.settings-note {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.88rem;
}

.language-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: 320px;
  overflow: auto;
}

.language-option {
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  text-align: start;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.language-option strong {
  font-size: 0.96rem;
}

.language-option span {
  font-size: 0.82rem;
  color: var(--muted);
}

.language-option:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: var(--shadow-sm);
}

.language-option.active {
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(37, 99, 235, 0.08);
}

.modal-sheet-small {
  width: min(520px, 100%);
}

.day-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.day-detail-card {
  min-height: 112px;
  border-radius: 22px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(145deg, #dbeafe, #f0f7ff);
  box-shadow: var(--shadow-sm);
}

.day-detail-card-orange {
  background: linear-gradient(145deg, #ffedd5, #fff7ed);
}

.day-detail-note {
  color: var(--muted);
  line-height: 1.7;
}

.day-detail-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
}

.day-detail-meals {
  margin-top: 16px;
}

.day-detail-meals-list {
  display: grid;
  gap: 12px;
}

.day-detail-meal-item {
  border-radius: 20px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.day-detail-meal-copy {
  display: grid;
  gap: 8px;
}

.day-detail-meal-name {
  font-size: 1rem;
  color: var(--ink);
}

.day-detail-meal-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.day-detail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 700;
}

.day-detail-badge-calories {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

@media (max-width: 760px) {
  .hero-panel-compact {
    grid-template-columns: 1fr;
  }

  .hero-progress-grid,
  .stats-charts-grid,
  .day-detail-grid {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .language-list {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar,
  .calendar-toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-day {
    min-height: 96px;
  }
}

@media (max-width: 560px) {
  .access-card {
    padding: 24px 18px;
  }

  .access-price-row,
  .access-phone-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 6px;
  }

  .chart-bars {
    gap: 8px;
  }

  .calendar-day {
    padding: 10px;
    min-height: 88px;
  }
}
