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

:root {
  --primary: #C2410C;
  --primary-light: #FFF7ED;
  --primary-mid: #EA580C;
  --primary-dark: #9A3412;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --red: #dc2626;
  --amber: #d97706;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--primary);
  color: white;
  padding: 16px 20px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.header-sub {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 2px;
}


.tabs {
  display: flex;
  background: var(--primary-dark);
  padding: 0 20px;
}

.tab {
  flex: 1;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.tab.active {
  color: white;
  border-bottom-color: white;
}

main {
  flex: 1;
  padding: 0 0 20px;
  overflow-y: auto;
}

/* ── Hero Receta e Ditës ─────────────────────────────────────────────────────── */
.hero-dia {
  position: sticky;
  top: 0;
  z-index: 9;
  background: linear-gradient(135deg, #C2410C 0%, #7c2d12 100%);
  padding: 12px 20px 14px;
  margin-bottom: 0;
  box-shadow: 0 3px 14px rgba(0,0,0,0.18);
  overflow: hidden;
  max-height: 120px;
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
}
.hero-dia.hero-hidden {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.hero-dia-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  margin-bottom: 5px;
}
.hero-dia-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hero-dia-left { flex: 1; min-width: 0; }
.hero-dia-zona {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-dia-emri {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-dia-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}
.hero-dia-cta {
  flex-shrink: 0;
  background: white;
  color: #C2410C;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.hero-dia-cta:hover { background: #fff7ed; }
.hero-dia-cta:active { transform: scale(0.96); }


.panel { display: none; }
.panel.active { display: block; padding: 16px 20px 0; }

.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}

.search-box input:focus {
  border-color: var(--primary);
}

.btn {
  padding: 12px 18px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn:active { background: var(--primary-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.btn-outline:active { background: var(--primary-light); }

.btn-random {
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 12px 14px;
  font-size: 18px;
  flex-shrink: 0;
}
.btn-random:hover  { border-color: var(--primary); background: var(--primary-light); }
.btn-random:active { background: var(--primary-light); border-color: var(--primary); transform: scale(0.95); }
.dark-mode .btn-random { background: var(--white); border-color: var(--border); }

.result-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

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

.result-name {
  font-size: 21px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.result-generic {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4px;
}

.favorite-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.favorite-btn:hover {
  background: var(--primary-light);
}

.favorite-btn.active {
  color: #ffd700;
}

.empty-favorites {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}


.section-label {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 14px 0 8px;
}

.info-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 14px;
  line-height: 1.5;
}

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

.info-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.pill {
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
}

.warning-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
}

.steps-list {
  list-style: none;
  counter-reset: step;
}

.steps-list li {
  counter-increment: step;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 16px;
  line-height: 1.65;
}

.steps-list li:last-child { border-bottom: none; }

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.loading {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted);
  font-weight: 500;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px;
}

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

.error-box {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #991b1b;
  font-size: 14px;
}

.not-found {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.not-found strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.not-found-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  animation: fadeIn 0.2s ease;
}

.not-found-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.not-found-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.not-found-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.not-found-btn {
  display: inline-block;
  width: auto;
  padding: 10px 24px;
}


.stock-list { display: flex; flex-direction: column; gap: 8px; }

.stock-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-ka { background: var(--primary); }
.dot-mbaron { background: var(--amber); }
.dot-ska { background: var(--red); }

.stock-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

.stock-status {
  font-size: 12px;
  font-weight: 500;
}

.status-ka { color: var(--primary-dark); }
.status-mbaron { color: #92400e; }
.status-ska { color: var(--red); }

.stock-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  border-radius: 4px;
}

.stock-delete:hover { color: var(--red); background: #fef2f2; }

.stock-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  border-radius: 4px;
}

.stock-edit-btn:hover { color: var(--primary); background: var(--primary-light); }

.stock-edit-input {
  flex: 1;
  padding: 4px 8px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  outline: none;
  min-width: 0;
}

.stock-save {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.stock-save:hover { background: var(--primary-dark); }

.stock-search-box {
  margin-bottom: 10px;
}

.stock-search-box input {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.stock-search-box input:focus { border-color: var(--primary); }

.empty-stock {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.hint {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

.stock-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
}

.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Dark Mode Styles */
.dark-mode {
  --primary: #EA580C;
  --primary-light: #431407;
  --primary-mid: #F97316;
  --primary-dark: #7C2D12;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #374151;
  --bg: #111827;
  --white: #1f2937;
  --red: #ef4444;
  --amber: #f59e0b;
}

.dark-mode header {
  background: var(--primary-dark);
}

.dark-mode .result-card {
  background: var(--white);
  border-color: var(--border);
}

.dark-mode .stock-item {
  background: var(--white);
  border-color: var(--border);
}

.dark-mode .tab {
  color: rgba(255,255,255,0.7);
}

.dark-mode .tab.active {
  color: white;
}

/* ── Update banner ───────────────────────────────────────────────────────── */
.update-banner {
  background: var(--primary-mid);
  color: white;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 25;
}

.update-banner button {
  background: white;
  color: var(--primary-dark);
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.update-banner button:hover { opacity: 0.88; }

/* ── Offline banner ──────────────────────────────────────────────────────── */
.offline-banner {
  display: none;
  background: #dc2626;
  color: white;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 20;
}

/* ── Header layout ───────────────────────────────────────────────────────── */
.header-info { flex: 1; }
.header-btns { display: flex; gap: 6px; }

.icon-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 6px;
  padding: 0;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover  { background: rgba(255,255,255,0.28); }
.icon-btn:active { background: rgba(255,255,255,0.42); }

/* ── Search history ──────────────────────────────────────────────────────── */
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 10px;
}

.clear-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: inherit;
}
.clear-btn:hover { background: var(--bg); color: var(--red); }

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

.history-pill {
  padding: 5px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
}
.history-pill:hover { border-color: var(--primary); color: var(--primary); }

.history-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.history-card:hover { border-color: var(--primary); background: var(--primary-light); }

.history-card-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.history-card-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.history-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.hist-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}
.hist-rx  { background: #fee2e2; color: #991b1b; }
.hist-otc { background: var(--primary-light); color: var(--primary-dark); }

.dark-mode .history-card { background: var(--white); border-color: var(--border); }
.dark-mode .history-card:hover { background: var(--primary-dark); border-color: var(--primary); }
.dark-mode .history-card-name { color: var(--text); }
.dark-mode .hist-otc { background: #7C2D12; color: #FDBA74; }
.dark-mode .hist-rx  { background: #4a1515; color: #fca5a5; }

/* ── Stock stats ─────────────────────────────────────────────────────────── */
.stats-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.stat-box {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  animation: fadeIn 0.2s ease;
}


.btn-sm {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-sm:hover  { border-color: var(--primary); color: var(--primary); }
.btn-sm:active { background: var(--primary-light); border-color: var(--primary); }
.import-label { cursor: pointer; }


/* ── Retry button ────────────────────────────────────────────────────────── */
.retry-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  background: #fca5a5;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: #7f1d1d;
  font-weight: 500;
  transition: background 0.15s;
}
.retry-btn:hover { background: #f87171; }

/* ── Dark mode — new components ──────────────────────────────────────────── */
.dark-mode input {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
}
.dark-mode .history-pill   { background: var(--white); border-color: var(--border); color: var(--text); }
.dark-mode .btn-sm         { background: var(--white); border-color: var(--border); color: var(--text); }
.dark-mode .error-box      { background: #2d1a1a; border-color: #7f1d1d; color: #fca5a5; }
.dark-mode .result-name    { color: #FDBA74; }

/* ── Input clear button ──────────────────────────────────────────────────────── */
.input-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
  padding: 0;
}
.input-clear-btn:hover { background: var(--border); color: var(--text); }

.search-input-wrap input { padding-right: 34px; }

/* ── Autocomplete ────────────────────────────────────────────────────────────── */
.search-input-wrap {
  position: relative;
  flex: 1;
}

.search-input-wrap input {
  width: 100%;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 100;
  overflow: hidden;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  min-height: 48px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.autocomplete-item:active { background: var(--primary-light); }

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--primary-light); }

.autocomplete-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.autocomplete-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-generic {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-stock-btn {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  white-space: nowrap;
}

.autocomplete-stock-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.autocomplete-stock-btn.in-stock { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-light); }

/* ── Expiry label ─────────────────────────────────────────────────────────────── */
.expiry-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.expiry-label .optional { font-weight: 400; }

/* ── Filter expiry button ────────────────────────────────────────────────────── */
.filter-btn-expiry.active { background: var(--amber); border-color: var(--amber); color: white; }

.sort-toggle-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
  margin-left: auto;
}
.sort-toggle-btn:hover { border-color: var(--primary); color: var(--primary); }
.sort-toggle-btn.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }
.dark-mode .sort-toggle-btn { background: var(--white); border-color: var(--border); color: var(--text-muted); }
.dark-mode .sort-toggle-btn.active { background: var(--primary-dark); border-color: var(--primary); color: #FDBA74; }

/* ── Interaction panel ───────────────────────────────────────────────────────── */
.int-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.int-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.int-input:focus { border-color: var(--primary); }

.int-vs-label {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.int-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.int-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-dark);
}

.int-arrow {
  font-size: 18px;
  color: var(--text-muted);
}

.int-severity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.int-sigurt   { background: var(--primary-light); color: var(--primary-dark); }
.int-kujdes   { background: #fffbeb; color: #92400e; }
.int-evito    { background: #fef2f2; color: #991b1b; }
.int-panjohur { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

.int-summary {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 8px;
}

.int-recs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.int-recs li {
  font-size: 13px;
  padding: 7px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.dark-mode .int-input     { background: var(--white); border-color: var(--border); color: var(--text); }
.dark-mode .int-name      { color: #FDBA74; }
.dark-mode .int-sigurt    { background: var(--primary-dark); color: #FDBA74; }
.dark-mode .int-kujdes    { background: #2d2a1a; color: #fcd34d; }
.dark-mode .int-evito     { background: #2d1a1a; color: #f87171; }
.dark-mode .int-panjohur  { background: var(--white); border-color: var(--border); }
.dark-mode .int-recs li   { background: var(--bg); }

/* ── Persona stepper ─────────────────────────────────────────────────────────── */
.persona-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.persona-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.persona-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
}
#persona-display {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  min-width: 24px;
  text-align: center;
}
.portion-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}
.portion-btn:hover  { background: #fff7ed; border-color: var(--primary); color: var(--primary); }
.portion-btn:active { background: var(--primary-light); border-color: var(--primary); }

.dose-weight-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.dose-main {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}

.dose-box {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}

.dose-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.dose-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
}

.dark-mode .dose-weight-badge { background: var(--primary-dark); color: #FDBA74; }
.dark-mode .dose-box          { background: var(--bg); border-color: var(--border); }
.dark-mode .dose-value        { color: #FDBA74; }

.dark-mode .autocomplete-list  { background: var(--white); border-color: var(--primary); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.dark-mode .autocomplete-item  { border-color: var(--border); }
.dark-mode .autocomplete-item:hover { background: var(--primary-dark); }
.dark-mode .autocomplete-name  { color: var(--text); }
.dark-mode .autocomplete-stock-btn { background: var(--bg); border-color: var(--border); color: var(--text-muted); }
.dark-mode .autocomplete-stock-btn.in-stock { background: var(--primary-dark); border-color: var(--primary); color: #FDBA74; }

/* ── Result action buttons ───────────────────────────────────────────────────── */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.btn-action {
  flex: 1;
  padding: 9px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  transition: all 0.15s;
  text-align: center;
}

.btn-action:hover { border-color: var(--primary); color: var(--primary); }
.btn-action:disabled { opacity: 0.7; cursor: default; border-color: var(--primary); color: var(--primary); }
/* ── Install banner ──────────────────────────────────────────────────────────── */
.install-banner {
  background: var(--primary);
  color: white;
  padding: 10px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
}

.install-banner-btns { display: flex; gap: 6px; flex-shrink: 0; }

.install-banner-btns button {
  background: rgba(255,255,255,0.18);
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  color: white;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.install-banner-btns button:first-child { background: white; color: var(--primary); font-weight: 600; }
.install-banner-btns button:first-child:hover { background: rgba(255,255,255,0.88); }
.install-banner-btns button:last-child:hover { background: rgba(255,255,255,0.3); }

/* ── Dark mode — new components ──────────────────────────────────────────────── */
.dark-mode .btn-action { background: var(--white); border-color: var(--border); color: var(--text); }


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — App Layout
   ═══════════════════════════════════════════════════════════ */

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.app-footer {
  order: 10;
  text-align: center;
  padding: 12px 16px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.app-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

.app-footer a:hover {
  color: var(--primary);
}

.data-source-note {
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
}


/* App layout wrapper — mobile: transparent column wrapper */
.app-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Sidebar — mobile: invisible wrapper so header+tabs render normally */
.app-sidebar {
  display: contents;
}

/* ── Phones < 480px — tabs: emoji + label below ─────────── */
.tab { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tab-icon { font-size: 16px; line-height: 1; }
.tab-label { font-size: 11px; line-height: 1.2; }

@media (min-width: 480px) {
  .tab { flex-direction: row; gap: 4px; }
  .tab-icon { font-size: 14px; }
  .tab-label { font-size: 13px; }
}

@media (max-width: 379px) {
  .tab { padding: 8px 2px; }
  .tab-label { display: none; }
  main { padding: 16px; }
}

/* ── Tablet: 600px–1023px — wider centered ───────────────── */
@media (min-width: 600px) and (max-width: 1023px) {
  body { max-width: 680px; }
  main { padding: 0 0 32px; }
  .panel { max-width: 100%; }
  .panel.active { padding: 24px 32px 0; }
  .result-card { padding: 20px; }
}

/* ── Desktop: 1024px — full sidebar layout ───────────────── */
@media (min-width: 1024px) {
  body {
    max-width: none;
    margin: 0;
    height: 100vh;
    overflow: hidden;
  }

  .app-layout {
    flex-direction: row;
    overflow: hidden;
  }

  /* ── Sidebar ── */
  .app-sidebar {
    display: flex;
    flex-direction: column;
    width: 240px;
    flex-shrink: 0;
    background: var(--primary-dark);
    overflow-y: auto;
    border-right: 1px solid rgba(0,0,0,0.15);
  }

  header {
    position: static;
    background: transparent;
    padding: 24px 20px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  .header-info { width: 100%; }
  .header-sub  { margin-top: 3px; }
  .header-btns { margin-top: 12px; width: 100%; }

  .tabs {
    flex-direction: column;
    background: transparent;
    padding: 12px 10px;
    gap: 2px;
    flex: 1;
  }

  .tab {
    flex: none;
    text-align: left;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border-bottom: none;
    border-left: 3px solid transparent;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    width: 100%;
  }

  .tab.active {
    background: rgba(255,255,255,0.12);
    color: white;
    border-left-color: white;
  }

  .tab:not(.active):hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.85);
  }

  /* ── Content area ── */
  main {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
    height: 100%;
    max-width: none;
  }

  .panel {
    max-width: 680px;
  }

  /* ── Larger spacing for desktop ── */
  .result-card  { padding: 20px; }
  .result-name  { font-size: 20px; }
}

/* ── Dark mode sidebar (desktop) ── */
@media (min-width: 1024px) {
  .dark-mode .app-sidebar {
    background: #0d1f17;
    border-right-color: var(--border);
  }

  .dark-mode header {
    border-bottom-color: var(--border);
  }
}

@media (min-width: 1024px) {
  .app-footer {
    order: 0;
    margin-top: auto;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.35);
  }

  .app-footer a { color: rgba(255,255,255,0.35); }
  .app-footer a:hover { color: rgba(255,255,255,0.7); text-decoration: underline; }

  .dark-mode .app-footer { border-top-color: var(--border); }
}

/* ── Install Guide Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 env(safe-area-inset-bottom,0);
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal-box {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 32px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}

.dark-mode .modal-box {
  background: #1f2937;
  color: #e5e7eb;
}

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

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

.modal-title {
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  line-height: 1;
}

.dark-mode .modal-close {
  background: rgba(255,255,255,0.1);
  color: #e5e7eb;
}


.install-platform {
  margin-bottom: 20px;
}

.install-platform-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary);
}

.install-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: #1a1a1a;
}

.dark-mode .install-steps li { color: #e5e7eb; }

.step-num {
  background: var(--primary);
  color: white;
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.install-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.install-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}
}

/* ── Tab slide animation ─────────────────────────────────────────────────────── */
@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideFromLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.panel.slide-right { animation: slideFromRight 0.22s ease; }
.panel.slide-left  { animation: slideFromLeft  0.22s ease; }

/* ── Skeleton loading ────────────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -300px 0; }
  100% { background-position: calc(300px + 100%) 0; }
}
.skeleton-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
}
.skel {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
}
.skel-title  { height: 18px; width: 60%; margin-bottom: 10px; }
.skel-badge  { height: 22px; width: 30%; border-radius: 20px; margin-bottom: 16px; }
.skel-line   { height: 13px; width: 100%; margin-bottom: 9px; }
.skel-short  { height: 13px; width: 65%; margin-bottom: 0; }

/* ── Quick chips ─────────────────────────────────────────────────────────────── */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.quick-chip {
  padding: 8px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.15s;
}
.quick-chip:hover  { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.quick-chip:active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); transform: scale(0.97); }
.dark-mode .quick-chip { background: var(--white); border-color: var(--border); color: var(--text-muted); }
.dark-mode .quick-chip:hover { background: var(--primary-dark); border-color: var(--primary); color: #FDBA74; }


/* ── Star rating ─────────────────────────────────────────────────────────────── */

/* ── Contribute CTA ──────────────────────────────────────────────────────────── */
.contribute-cta {
  background: var(--primary-light);
  border: 1px solid #FED7AA;
  border-radius: var(--radius-sm);
  padding: 14px 14px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.contribute-cta-icon { font-size: 26px; flex-shrink: 0; }
.contribute-cta-body { flex: 1; min-width: 0; }
.contribute-cta-title { font-size: 13px; font-weight: 600; color: var(--primary-dark); margin-bottom: 2px; }
.contribute-cta-sub { font-size: 11px; color: var(--primary-dark); opacity: 0.8; line-height: 1.4; }
.contribute-cta-btn {
  flex-shrink: 0;
  padding: 7px 13px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
  white-space: nowrap;
}
.contribute-cta-btn:hover { background: var(--primary-dark); }
.dark-mode .contribute-cta { background: #7C2D12; border-color: #7C2D12; }
.dark-mode .contribute-cta-title, .dark-mode .contribute-cta-sub { color: #FDBA74; }

/* ── Toast notification ──────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1f2937;
  color: white;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Recipe-specific styles ──────────────────────────────────────────────────── */
.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.recipe-meta-item {
  font-size: 13px;
  font-weight: 500;
  background: var(--primary-light);
  color: #9A3412;
  border: 1px solid #FED7AA;
  border-radius: 20px;
  padding: 3px 10px;
}
.dark-mode .recipe-meta-item {
  background: #431407;
  border-color: #9A3412;
  color: #FDBA74;
}
.ingredient-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.ingredient-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  line-height: 1.6;
}
.ingredient-list li:last-child { border-bottom: none; }
.ingredient-list li::before {
  content: '• ';
  color: var(--primary);
  font-weight: 700;
}
.tip-row {
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #78350f;
}
.dark-mode .tip-row {
  background: #1c1708;
  border-color: #854d0e;
  color: #fde68a;
}
.kat-section { margin-bottom: 20px; }
.kat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* ── Frigorifer tab ──────────────────────────────────────────────────────────── */
.frigorifer-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 10px;
}
.frigorifer-textarea:focus { border-color: var(--primary); }
.dark-mode .frigorifer-textarea { background: #1f1f1f; border-color: #374151; color: #f3f4f6; }

.frig-match {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.frig-full { background: #dcfce7; color: #15803d; }
.frig-partial { background: #fef9c3; color: #92400e; }
.dark-mode .frig-full { background: #14532d; color: #86efac; }
.dark-mode .frig-partial { background: #451a03; color: #fde68a; }

.frig-missing {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 4px 0;
}

/* ── Dieta tab ───────────────────────────────────────────────────────────────── */
.dieta-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.dieta-btn {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.dieta-btn:hover { border-color: var(--primary); color: var(--primary); }
.dieta-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.dark-mode .dieta-btn {
  background: #1f1f1f;
  border-color: #374151;
  color: #d1d5db;
}
.dark-mode .dieta-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ── Shopping list tab ───────────────────────────────────────────────────────── */
.lista-add {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.lista-add input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.lista-add input:focus { border-color: var(--primary); }
.dark-mode .lista-add input { background: #1f1f1f; border-color: #374151; color: #f3f4f6; }

.lista-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.lista-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  min-height: 52px;
  border-bottom: 1px solid var(--border);
}
.lista-item:last-child { border-bottom: none; }
.lista-item-checked .lista-text {
  text-decoration: line-through;
  color: var(--text-muted);
}
.lista-check {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  color: var(--primary);
}
.lista-check:active { opacity: 0.7; }
.lista-item-checked .lista-check {
  background: var(--primary-light);
  border-color: var(--primary);
}
.dark-mode .lista-check { background: #1f1f1f; border-color: #374151; }
.lista-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}
.lista-del {
  padding: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lista-del:hover  { color: var(--red); }
.lista-del:active { color: var(--red); opacity: 0.7; }
.lista-divider {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.lista-export {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.lista-export-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Cooking Mode ──────────────────────────────────────────────────────────── */
.cooking-overlay {
  position: fixed;
  inset: 0;
  background: #111;
  color: #fff;
  z-index: 600;
  display: flex;
  flex-direction: column;
  font-family: inherit;
}
.cooking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.cooking-recipe-name {
  font-size: 15px;
  font-weight: 600;
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 90px);
}
.cooking-exit {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.cooking-exit:hover { background: rgba(255,255,255,0.2); }
.cooking-progress-bar { height: 3px; background: rgba(255,255,255,0.12); flex-shrink: 0; }
.cooking-progress-fill { height: 100%; background: var(--primary-mid); transition: width 0.3s ease; }
.cooking-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px 28px 16px;
  text-align: center;
  gap: 14px;
  overflow-y: auto;
}
.cooking-step-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-mid);
}
.cooking-step-text {
  font-size: 22px;
  line-height: 1.6;
  font-weight: 400;
  max-width: 540px;
}
@media (max-width: 420px) { .cooking-step-text { font-size: 19px; } }
.cooking-timer-section {
  padding: 14px 20px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cooking-timer-display {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #FDBA74;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cooking-timer-presets { display: flex; gap: 8px; }
.cooking-preset-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.cooking-preset-btn:hover { background: rgba(255,255,255,0.2); }
.cooking-timer-toggle {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 11px 32px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  min-width: 190px;
}
.cooking-timer-toggle:hover { background: var(--primary-mid); }
.cooking-nav {
  display: flex;
  gap: 12px;
  padding: 12px 20px 24px;
  flex-shrink: 0;
}
.cooking-nav-btn {
  flex: 1;
  padding: 16px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.cooking-nav-btn:hover { background: rgba(255,255,255,0.1); }
.cooking-nav-btn:disabled { opacity: 0.3; cursor: default; }
.cooking-nav-next { background: var(--primary); border-color: var(--primary); }
.cooking-nav-next:hover { background: var(--primary-mid); border-color: var(--primary-mid); }

/* ── "Fillo gatimin" button variant ─────────────────────────────────────────── */
.btn-cook {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
}
.btn-cook:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.ingredient-li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ingredient-text { flex: 1; }

/* ── Modi Nona — accessibility mode for 50+ ──────────────────────────────── */

/* Active indicator on button */
.nona-btn.active {
  background: rgba(255,255,255,0.32) !important;
  outline: 2px solid rgba(255,255,255,0.7);
  outline-offset: 1px;
}

/* ── Shopping list — recipe groups ───────────────────────────────────────────── */
.lista-group-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  padding: 12px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.lista-group-header:first-child { border-top: none; padding-top: 4px; margin-top: 0; }

.lista-recipe-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Disable animations */
.nona-mode *,
.nona-mode *::before,
.nona-mode *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* High contrast — force light background regardless of dark mode */
.nona-mode,
body.nona-mode.dark-mode {
  background: #f9fafb !important;
  color: #111111 !important;
}

/* Base font size */
.nona-mode { font-size: 20px; }

/* Undo dark-mode background on cards */
.nona-mode .result-card,
.nona-mode .result-card * {
  background: #ffffff !important;
  color: #111111 !important;
  border-color: #d1d5db !important;
}

.nona-mode .result-name { font-size: 28px !important; color: #9A3412 !important; }
.nona-mode .result-generic { font-size: 17px !important; color: #6b7280 !important; }

.nona-mode .section-label {
  font-size: 15px !important;
  color: #6b7280 !important;
}

.nona-mode .recipe-meta-item {
  font-size: 18px !important;
}

.nona-mode .steps-list li {
  font-size: 20px !important;
  padding: 16px 0 !important;
  line-height: 1.75 !important;
  color: #111111 !important;
}

.nona-mode .ingredient-list li {
  font-size: 20px !important;
  padding: 12px 4px !important;
  color: #111111 !important;
}

/* Larger touch targets */
.nona-mode .btn,
.nona-mode .btn-action {
  font-size: 17px !important;
  padding: 14px 20px !important;
  min-height: 52px !important;
}

.nona-mode .quick-chip {
  font-size: 18px !important;
  padding: 12px 20px !important;
  min-height: 48px !important;
  color: #374151 !important;
  background: #ffffff !important;
}

.nona-mode .tab {
  padding: 14px 0 !important;
}

.nona-mode .tab-label {
  font-size: 11px !important;
}

/* History cards */
.nona-mode .history-card-name { font-size: 19px !important; }
.nona-mode .history-card-sub  { font-size: 15px !important; }

/* Tip row */
.nona-mode .tip-row {
  font-size: 18px !important;
  line-height: 1.7 !important;
}

/* Search input */
.nona-mode .search-box input {
  font-size: 20px !important;
  padding: 14px 16px !important;
}

/* Frigorifer textarea */
.nona-mode .frigorifer-textarea {
  font-size: 18px !important;
}

/* Star rating */

/* Cooking overlay */
.nona-mode .cooking-step-text {
  font-size: 24px !important;
  line-height: 1.7 !important;
}
.nona-mode .cooking-step-label { font-size: 18px !important; }
.nona-mode .cooking-timer-display { font-size: 60px !important; }
.nona-mode .cooking-nav-btn { font-size: 20px !important; padding: 18px 28px !important; }

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