:root {
  --green: #22c55e;
  --green-dark: #16a34a;
  --cyan: #22d3ee;
  --protein: #3b82f6;
  --carbs: #f59e0b;
  --fat: #ef4444;
  --fiber: #8b5cf6;
  --salt: #64748b;
  --radius: 16px;
  --radius-lg: 24px;
  --nav-h: 68px;
  --header-h: 56px;
  --transition: 0.2s ease;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f0fdf4;
  --bg2: #ffffff;
  --bg3: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: rgba(148, 163, 184, 0.25);
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  --header-bg: rgba(255, 255, 255, 0.92);
  --nav-bg: rgba(255, 255, 255, 0.96);
  --card-bg: #ffffff;
  --input-bg: #f8fafc;
  --accent-glow: rgba(34, 197, 94, 0.15);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f1a;
  --bg2: #111827;
  --bg3: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --header-bg: rgba(17, 24, 39, 0.95);
  --nav-bg: rgba(17, 24, 39, 0.98);
  --card-bg: #131a28;
  --input-bg: #0f172a;
  --accent-glow: rgba(34, 197, 94, 0.2);
}

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

body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* Views */
.view { display: none; min-height: 100dvh; }
.view.active { display: flex; flex-direction: column; }

/* Auth */
.auth-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.auth-logo { text-align: center; margin-bottom: 40px; }
.auth-logo h1 {
  font-size: 2.4rem;
  margin-top: 12px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-logo p { color: var(--text-muted); margin-top: 8px; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form label span { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.auth-switch { text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 0.9rem; }

.back-btn {
  background: none; border: none; font-size: 1.5rem; color: var(--text);
  cursor: pointer; margin-bottom: 24px; align-self: flex-start;
}

/* Buttons */
button { font-family: inherit; cursor: pointer; border: none; }
.btn-primary {
  background: var(--green);
  color: #04130a; padding: 14px 24px; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; width: 100%;
  transition: transform var(--transition), background var(--transition);
}
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary {
  background: var(--bg3); color: var(--text); padding: 12px 20px;
  border-radius: var(--radius); font-weight: 600; border: 1px solid var(--border);
}
.btn-ghost {
  background: transparent; color: var(--green); padding: 12px;
  font-weight: 600; width: 100%;
}
.btn-danger {
  background: #ef4444; color: white; padding: 14px; border-radius: var(--radius);
  font-weight: 700; width: 100%;
}
.link-btn { background: none; color: var(--green); font-weight: 700; cursor: pointer; }
.icon-btn {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--text);
}

input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--input-bg);
  color: var(--text); font-size: 1rem; font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--accent-glow); }

label { display: block; }
label span { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }

/* Onboarding */
.onboarding-shell { padding: 24px; max-width: 480px; margin: 0 auto; width: 100%; }
.onboarding-progress { height: 4px; background: var(--bg3); border-radius: 99px; margin-bottom: 32px; overflow: hidden; }
.onboarding-progress div { height: 100%; background: var(--green); width: 50%; transition: width 0.3s; }
.onboarding-step { display: none; }
.onboarding-step.active { display: block; }
.onboarding-step h2 { font-size: 1.6rem; margin-bottom: 8px; }
.muted { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.compact { margin-bottom: 0; }
.form-row { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.form-row label { flex: 1; }

.goal-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px;
}
.goal-card {
  padding: 14px; border-radius: var(--radius); background: var(--card-bg);
  border: 1px solid var(--border); text-align: center;
}
.goal-card strong { display: block; font-size: 1.3rem; color: var(--green); }
.goal-card span { font-size: 0.8rem; color: var(--text-muted); }

/* App shell */
#view-app { display: none; flex-direction: column; min-height: 100dvh; }
#view-app.active { display: flex; }

.app-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; height: var(--header-h);
  background: var(--header-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-title { font-weight: 800; font-size: 1.15rem; }
.header-right { display: flex; align-items: center; gap: 8px; }
.streak-badge {
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: white; padding: 4px 10px; border-radius: 99px;
  font-size: 0.82rem; font-weight: 700;
}

.app-main {
  flex: 1; overflow-y: auto; padding: 16px 16px calc(var(--nav-h) + 16px);
  max-width: 520px; margin: 0 auto; width: 100%;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex; height: var(--nav-h);
  background: var(--nav-bg); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  max-width: 520px; margin: 0 auto;
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; background: none;
  color: var(--text-muted); font-size: 0.68rem; font-weight: 600;
  transition: color var(--transition);
}
.nav-btn.active { color: var(--green); }
.nav-icon { font-size: 1.3rem; display: flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 23px; height: 23px; display: block; }

/* Cards */
.card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 16px;
  border: 1px solid var(--border);
}
.card h3 { font-size: 0.95rem; margin-bottom: 14px; color: var(--text-muted); font-weight: 600; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-header strong { font-size: 1.1rem; }

.ad-banner {
  background: var(--bg3); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  text-align: center; font-size: 0.78rem; color: var(--text-muted);
  margin-bottom: 16px;
}

.date-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-bottom: 16px; font-weight: 700;
}

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

.progress-bar {
  height: 8px; background: var(--bg3); border-radius: 99px; overflow: hidden;
}
.progress-bar.lg { height: 12px; }
.progress-fill {
  height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width 0.4s ease; width: 0%;
}
.progress-fill.water { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.progress-fill.over { background: linear-gradient(90deg, #f97316, #ef4444); }

.remaining { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }

.donut-card { display: flex; flex-direction: column; align-items: center; }
.donut-card canvas { margin: 8px 0; }
.donut-legend { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.donut-legend span { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; }
.donut-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.water-quick { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.water-btn {
  flex: 1; min-width: 60px; padding: 8px; border-radius: 12px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 600; color: var(--text);
}
.water-btn.custom { flex: 0; min-width: 44px; background: var(--green); color: white; border: none; }

.macro-progress-list { display: flex; flex-direction: column; gap: 12px; }
.macro-row { display: flex; flex-direction: column; gap: 4px; }
.macro-row-header { display: flex; justify-content: space-between; font-size: 0.85rem; }
.macro-row-header strong { font-weight: 700; }

/* Meals */
.meals-section { margin-top: 8px; }
.meal-type-block { margin-bottom: 20px; }
.meal-type-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-weight: 700; font-size: 0.95rem;
}
.meal-type-header span { color: var(--text-muted); font-weight: 500; font-size: 0.82rem; }
.meal-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border); margin-bottom: 8px;
}
.meal-item-info strong { display: block; font-size: 0.92rem; }
.meal-item-info span { font-size: 0.78rem; color: var(--text-muted); }
.meal-item-actions { display: flex; gap: 6px; }
.meal-item-actions button {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 8px; font-size: 0.78rem; color: var(--text);
}
.meal-item-actions .delete { color: #ef4444; }

.empty-meals {
  text-align: center; padding: 20px; color: var(--text-muted);
  font-size: 0.88rem; border: 1px dashed var(--border); border-radius: var(--radius);
}

/* Add food */
.add-tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; }
.add-tab {
  flex-shrink: 0; padding: 8px 14px; border-radius: 99px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
}
.add-tab.active { background: var(--green); color: white; border-color: var(--green); }

.add-panel { display: none; }
.add-panel.active { display: block; }

.search-results { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.search-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 14px; background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border); cursor: pointer; gap: 12px;
  transition: border-color var(--transition), background var(--transition);
}
.search-item:hover { border-color: var(--green); background: var(--bg3); }
.search-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-item strong { font-size: 0.92rem; }
.search-item span { font-size: 0.78rem; color: var(--text-muted); }
.search-item-arrow {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg3); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.search-item-arrow svg { width: 15px; height: 15px; }
.search-more { text-align: center; font-size: 0.8rem; color: var(--text-muted); padding: 6px 0 2px; }

.barcode-view { margin: 12px 0; border-radius: var(--radius); overflow: hidden; }
.barcode-view video { width: 100%; display: block; background: #000; }
.barcode-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.barcode-manual { display: flex; gap: 8px; margin-top: 12px; }
.status-text { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }

.food-detail {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.food-detail-card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 22px 20px 20px;
  width: 100%; max-width: 420px; position: relative;
  max-height: 88vh; overflow-y: auto;
}
.food-detail-card h3 { margin-bottom: 14px; padding-right: 36px; }
.food-detail-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--bg3); color: var(--text-muted); border: none;
  cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.food-detail-close:hover { color: var(--text); background: var(--border); }
.fd-preview {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 12px 0; font-size: 0.85rem; text-align: center;
}
.fd-preview div { padding: 8px; background: var(--bg3); border-radius: 10px; }
.fd-preview strong { display: block; font-size: 1rem; }

.quick-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.quick-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.quick-item button { padding: 6px 12px; border-radius: 8px; background: var(--green); color: white; font-size: 0.82rem; font-weight: 600; }

/* Stats */
#weekly-chart, #weight-chart { width: 100%; height: auto; display: block; }

.month-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 0.75rem; font-weight: 600;
  background: var(--bg3); color: var(--text-muted);
}
.cal-day.empty { background: transparent; }
.cal-day.under { background: rgba(34, 197, 94, 0.25); color: var(--green); }
.cal-day.hit { background: rgba(34, 197, 94, 0.55); color: white; }
.cal-day.over { background: rgba(239, 68, 68, 0.35); color: #ef4444; }
.cal-day.today { outline: 2px solid var(--green); }

.calendar-legend { display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-muted); }
.calendar-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.dot.under { background: rgba(34, 197, 94, 0.4); }
.dot.hit { background: var(--green); }
.dot.over { background: rgba(239, 68, 68, 0.5); }

.weight-form { display: flex; gap: 8px; margin-top: 14px; }
.weight-form input { flex: 1; }

.streak-card { text-align: center; }
.streak-display { margin-bottom: 8px; }
.streak-number { font-size: 3rem; font-weight: 800; color: var(--green); display: block; }

/* AI */
.ai-suggestions, .ai-prediction { font-size: 0.88rem; line-height: 1.5; }
.ai-suggestions h4, .ai-prediction h4 { margin-bottom: 8px; color: var(--green); font-size: 0.9rem; }

.chat-window {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 320px; overflow-y: auto; margin: 16px 0; padding: 4px;
}
.chat-msg {
  max-width: 85%; padding: 10px 14px; border-radius: 16px;
  font-size: 0.88rem; line-height: 1.45;
}
.chat-msg.user {
  align-self: flex-end; background: var(--green); color: white;
  border-bottom-right-radius: 4px;
}
.chat-msg.bot {
  align-self: flex-start; background: var(--card-bg);
  border: 1px solid var(--border); border-bottom-left-radius: 4px;
}

.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; }
.chat-form button { width: auto; padding: 12px 18px; }

/* Settings */
.settings-group { margin-bottom: 28px; }
.settings-group h3 {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); margin-bottom: 12px;
}
.toggle-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.toggle-row span { font-size: 0.92rem; }
.toggle-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--green); }
.toggle-row select { width: auto; min-width: 120px; }

.profile-info {
  padding: 14px; background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border); font-size: 0.88rem; line-height: 1.6;
}

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-content {
  background: var(--card-bg); border-radius: var(--radius-lg);
  padding: 24px; width: 100%; max-width: 420px;
  border: 1px solid var(--border); max-height: 90dvh; overflow-y: auto;
}
.modal-content.small { max-width: 320px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

.rb-ingredients { margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.rb-ing {
  display: flex; justify-content: space-between; padding: 8px 12px;
  background: var(--bg3); border-radius: 10px; font-size: 0.85rem;
}

/* Toast */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%;
  transform: translateX(-50%); z-index: 300;
  background: var(--text); color: var(--bg); padding: 10px 20px;
  border-radius: 99px; font-size: 0.88rem; font-weight: 600;
  white-space: nowrap; transition: opacity 0.3s;
}

@media (min-width: 521px) {
  body { background: var(--bg2); }
  #view-app.active { background: var(--bg); }
}

@media (max-width: 380px) {
  .form-grid { grid-template-columns: 1fr; }
  .nav-btn span { display: none; }
}

/* Pás dní v týždni (nahrádza vrchné prepínanie dní) */
.week-nav { display: flex; align-items: center; gap: 2px; margin-bottom: 16px; }
.week-strip { flex: 1; display: flex; justify-content: space-between; gap: 4px; }
.week-arrow { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 10px; transition: var(--transition); }
.week-arrow:hover { background: var(--bg3); color: var(--text); }
.week-day {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px 0;
  color: var(--text-muted); transition: var(--transition);
}
.week-day .wd-name { font-size: 0.68rem; text-transform: capitalize; }
.week-day .wd-num {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 600; font-size: 0.9rem; color: var(--text);
  border: 2px solid transparent; transition: var(--transition);
}
.week-day.today .wd-num { border-color: var(--green); }
.week-day.selected .wd-num { background: var(--green); color: #fff; border-color: var(--green); }
.week-day.future { opacity: 0.35; cursor: default; }
.week-day:not(.future):not(.selected):hover .wd-num { background: var(--bg3); }

/* Kruhový progres živín */
.macro-rings { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-around; }
.macro-ring { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; min-width: 64px; color: var(--text); }
.macro-ring-label { font-size: 0.72rem; color: var(--text-muted); }
.macro-ring-val { font-size: 0.66rem; color: var(--text-muted); }

/* Zelené + tlačidlo pri jedlách */
.meal-type-right { display: inline-flex; align-items: center; gap: 8px; }
.meal-add-btn {
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 1.1rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.meal-add-btn:hover { background: var(--green-dark); }

/* Prepracované nastavenia – zoznamové riadky */
.settings-section {
  font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); margin: 22px 0 8px 4px;
}
#tab-settings .profile-info { margin-bottom: 4px; }
.settings-list {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.settings-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; background: none; color: var(--text);
  text-align: left; cursor: pointer; font-family: inherit;
  border-bottom: 1px solid var(--border); transition: background var(--transition);
}
.settings-list .settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: var(--bg3); }
.row-icon {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.row-icon svg { width: 18px; height: 18px; }
.row-label { flex: 1; font-size: 0.95rem; }
.row-hint { font-size: 0.8rem; color: var(--text-muted); margin-right: 2px; }
.row-chevron { color: var(--text-muted); opacity: 0.55; display: flex; }
.row-chevron svg { width: 16px; height: 16px; }
.ic-green { background: rgba(34, 197, 94, 0.14); color: var(--green); }
.ic-blue { background: rgba(59, 130, 246, 0.16); color: var(--protein); }
.ic-purple { background: rgba(139, 92, 246, 0.16); color: var(--fiber); }
.ic-red { background: rgba(226, 75, 74, 0.16); color: #e24b4a; }
.settings-row.danger .row-label { color: #e24b4a; }
.logout-list { margin-top: 18px; }

/* Pozdrav na domove */
.home-greeting { font-size: 1.3rem; font-weight: 600; margin: 4px 4px 16px; }

/* Rýchle akcie nad jedlami */
.quick-actions { display: flex; gap: 8px; margin: 4px 0 18px; }
.qa-primary {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: #04130a; border: none; border-radius: var(--radius);
  padding: 13px; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background var(--transition);
}
.qa-primary:hover { background: var(--green-dark); }
.qa-primary svg { width: 18px; height: 18px; }
.qa-btn {
  background: var(--card-bg); border: 1px solid var(--border); color: var(--text-muted);
  border-radius: var(--radius); padding: 0 16px; cursor: pointer; transition: var(--transition);
}
.qa-btn:hover { color: var(--text); background: var(--bg3); }
.qa-btn svg { width: 19px; height: 19px; }

/* Ikonka pri položke jedla */
.meal-item-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34, 197, 94, 0.14); color: var(--green); margin-right: 12px;
}
.meal-item-icon svg { width: 18px; height: 18px; }
.meal-item-info { flex: 1; }

/* Obľúbené – akcie (pridať + odstrániť) */
.quick-item-info { flex: 1; min-width: 0; }
.quick-item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.quick-item .fav-remove {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  background: rgba(226, 75, 74, 0.14); color: #e24b4a; border: none; padding: 0;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.quick-item .fav-remove:hover { background: rgba(226, 75, 74, 0.24); }
.quick-item .fav-remove svg { width: 16px; height: 16px; }

/* Profilová karta v nastaveniach */
.profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: rgba(34, 197, 94, 0.16); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 600;
}
.profile-id { min-width: 0; }
.profile-name { font-size: 1rem; font-weight: 600; color: var(--text); }
.profile-email { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; word-break: break-all; }
.profile-sub { font-size: 0.8rem; color: var(--green); margin-top: 4px; }
.profile-stats { display: flex; gap: 8px; }
.profile-stat {
  flex: 1; background: var(--input-bg); border-radius: 12px;
  padding: 12px 6px; text-align: center;
}
.profile-stat strong { display: block; font-size: 1.15rem; font-weight: 600; }
.profile-stat .bmi { color: var(--green); }
.profile-stat span { font-size: 0.72rem; color: var(--text-muted); }

/* Odznak a checkbox pre vlastné potraviny */
.custom-badge {
  font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  background: rgba(34, 197, 94, 0.16); color: var(--green);
  padding: 2px 6px; border-radius: 6px; margin-left: 4px; vertical-align: middle;
}
.checkbox-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; cursor: pointer; }
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); }
.checkbox-row span { font-size: 0.9rem; color: var(--text); margin: 0; }

/* Krokový onboarding – voľby a vstupy */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 8px; }
.choice-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 12px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); cursor: pointer; color: var(--text);
  font-size: 0.95rem; font-weight: 500; transition: var(--transition);
}
.choice-card svg { width: 30px; height: 30px; color: var(--text-muted); transition: var(--transition); }
.choice-card:hover { border-color: var(--green); }
.choice-card.selected { border-color: var(--green); background: rgba(34, 197, 94, 0.1); }
.choice-card.selected svg { color: var(--green); }

.choice-list { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 8px; }
.choice-row {
  display: flex; align-items: center; padding: 16px 18px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer;
  color: var(--text); text-align: left; font-size: 0.95rem; transition: var(--transition);
}
.choice-row:hover { border-color: var(--green); }
.choice-row.selected { border-color: var(--green); background: rgba(34, 197, 94, 0.1); }

.ob-input-wrap { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 24px 0; }
.ob-big-input {
  width: 140px; text-align: center; font-size: 2rem; font-weight: 600;
  padding: 14px 8px; background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
}
.ob-unit { font-size: 1.1rem; color: var(--text-muted); }

.ob-nav { display: flex; gap: 10px; align-items: center; }
.ob-nav .btn-primary { flex: 1; }
.ob-back {
  background: var(--card-bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 0 18px; height: 50px; font-size: 1.2rem;
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.ob-back:hover { border-color: var(--green); color: var(--green); }
.ob-back-top { height: 40px; padding: 0 14px; margin-bottom: 4px; }
