/* Plate My Diet — theme */
:root {
  --ink: #17201B;
  --muted: #56615A;
  --ground: #F4F6F3;
  --line: #E2E7E1;
  --brand: #1F7A4D;
  --brand-dark: #165C3A;
  --brand-tint: #E6F2EA;
  --turmeric: #F2B21B;
  --turmeric-ink: #7A4E00;
  --masala: #B5562B;
  --fruit: #E66A4A;
  --dahi: #7FA6D6;
  --bs-body-font-family: Inter, 'Noto Sans Devanagari', system-ui, sans-serif;
  --bs-body-color: var(--ink);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-dark);
  --bs-border-color: var(--line);
}
body { background: var(--ground); color: var(--ink); }
h1, h2, h3, h4, .display-font { font-family: 'Space Grotesk', Inter, sans-serif; font-weight: 700; letter-spacing: -0.01em; }
a { text-decoration: none; }
.text-muted, .muted { color: var(--muted) !important; }

/* Buttons */
.btn-brand { background: var(--brand); color: #fff; border: 0; font-weight: 600; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; font-weight: 600; }
.btn-ink:hover { background: #000; color: #fff; }
.btn-icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn, .form-control, .form-select { min-height: 44px; }
.btn-sm { min-height: 36px; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(31,122,77,.18); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* Brand mark */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand-plate { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line);
  background: conic-gradient(#3E9B5F 0 40%, #F2B21B 40% 65%, #B5562B 65% 90%, #E66A4A 90% 100%); }

/* App shell */
.topbar { background: #fff; border-bottom: 1px solid var(--line); min-height: 60px; }
.app-shell { display: flex; min-height: calc(100vh - 60px); }
.sidebar { width: 260px; background: var(--ink) !important; color: #D6E4DA; flex-shrink: 0; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; } }
.sidebar .brand { color: #fff; }
.sidebar .nav-link { color: #C6D3CA; border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; }
.sidebar .nav-link:hover { background: #222D26; color: #fff; }
.sidebar .nav-link.active { background: #2C3A31; color: #fff; font-weight: 600; }
.sidebar-note { color: #9FB0A5; }
.app-main { flex: 1; min-width: 0; padding: 24px; padding-bottom: 96px; }
@media (min-width: 992px) { .app-main { padding: 28px 36px 48px; } }

/* Mobile bottom nav */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; height: 72px; background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; z-index: 1030; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); min-height: 44px; justify-content: center; }
.bottom-nav a i { font-size: 20px; }
.bottom-nav a.active { color: var(--brand); font-weight: 600; }
.bottom-nav a.add span { width: 54px; height: 54px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(31,122,77,.35); }
.bottom-nav a.add i { font-size: 24px; }

/* Cards */
.card-soft { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.card-dark { background: var(--ink); color: #fff; border-radius: 20px; padding: 20px; }
.card-dark .muted-light { color: #B9C6BE; }
.card-tip { background: #FFF6DE; border: 1px solid #F3E2B0; border-radius: 16px; padding: 14px 16px; color: #4A3000; }
.card-info { background: #EEF4FB; border-radius: 14px; padding: 12px 14px; color: #1E3A5F; }
.stat-label { font-size: .8rem; color: var(--muted); }
.stat-value { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.75rem; line-height: 1.1; }

/* Plate */
.plate { width: 220px; height: 220px; border-radius: 50%; border: 12px solid #fff; flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--line), 0 10px 24px rgba(23,32,27,.10); display: flex; align-items: center; justify-content: center; }
.plate-center { width: 96px; height: 96px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.plate-center strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; }
.plate-sm { width: 150px; height: 150px; border-width: 9px; }
.plate-sm .plate-center { width: 64px; height: 64px; }
.plate-sm .plate-center strong { font-size: 1.1rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.bar { height: 8px; border-radius: 4px; background: #EDF0EC; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 4px; }

/* Day strip */
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
.day-strip a { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 8px 0; text-align: center; color: var(--ink); min-height: 44px; }
.day-strip a small { display: block; font-size: 11px; color: var(--muted); }
.day-strip a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.day-strip a.active small { color: #DDEFE3; }

/* Meal cards */
.meal-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.meal-card.next { border: 2px solid var(--brand); }
.meal-card.eaten { background: #FAFCFA; }
.badge-soft { font-weight: 600; font-size: 11px; padding: 4px 8px; border-radius: 8px; }
.badge-eaten { background: var(--brand-tint); color: #1F5135; }
.badge-next { background: #FFF1CC; color: #5E4300; }
.badge-plan { background: #F0F2EF; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; }

/* Choice chips (radio/checkbox styled) */
.choice input { position: absolute; opacity: 0; }
.choice label { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 10px 16px; cursor: pointer; display: inline-block; min-height: 44px; }
.choice input:checked + label { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.choice input:focus-visible + label { outline: 3px solid rgba(31,122,77,.4); outline-offset: 2px; }

/* Food search results */
.food-result { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; text-align: left; width: 100%; }
.food-result:hover, .food-result.selected { border-color: var(--brand); }
.food-result.selected { border-width: 2px; }

/* Planner table */
.planner { min-width: 860px; border-collapse: separate; border-spacing: 6px; }
.planner th { font-size: 12px; color: var(--muted); font-weight: 600; }
.planner td { vertical-align: top; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; }
.planner td.slot { background: transparent; border: 0; font-weight: 600; font-size: 13px; color: var(--ink); }
.planner td.today { background: var(--brand-tint); border-color: #B9DCC6; }

/* Public pages */
.layout-public { background: #fff; }
.public-nav { border-bottom: 1px solid var(--line); }
.public-nav a:not(.btn) { color: var(--ink); }
.hero { background: var(--ground); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05; }
.hero-plate { width: min(320px, 70vw); height: min(320px, 70vw); border-radius: 50%; border: 16px solid #fff;
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px rgba(23,32,27,.14);
  background: conic-gradient(#3E9B5F 0 40%, #F2B21B 40% 65%, #B5562B 65% 90%, #E66A4A 90% 100%); }
.hero-katori { width: 88px; height: 88px; border-radius: 50%; background: #DCE7F5; border: 8px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark .step { background: #222D26; border-radius: 18px; padding: 20px; height: 100%; }
.section-dark .step .n { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: var(--turmeric); }
.section-dark .step p { color: #C6D3CA; }
.price-card { border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: #fff; height: 100%; display: flex; flex-direction: column; gap: 10px; }
.price-card.hot { border: 2px solid var(--brand); box-shadow: 0 12px 28px rgba(31,122,77,.14); }
.public-footer { border-top: 1px solid var(--line); color: var(--muted); }
.auth-card { max-width: 440px; margin: 48px auto; }

/* Onboarding steps */
.ob-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ob-progress span { height: 6px; border-radius: 3px; background: var(--line); }
.ob-progress span.on { background: var(--brand); }
.ob-step { display: none; }
.ob-step.active { display: block; }

.visually-hidden-focusable:focus { position: static; }
