/* ── Nordic Cool Palette ─────────────────────────────────────────────────── */
:root {
  --color-primary:    #0077b6;
  --color-primary-dk: #03045e;
  --color-accent:     #00b4d8;
  --color-warn:       #90e0ef;
  --color-highlight:  #caf0f8;
  --color-bg:         #f0f8ff;
  --color-surface:    #ffffff;
  --color-text:       #03045e;
  --color-text-muted: #555f6d;
  --color-border:     #d0e8f2;
}

/* ── Dark Theme ──────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --color-primary:    #38bdf8;
  --color-primary-dk: #bae6fd;
  --color-accent:     #0ea5e9;
  --color-warn:       #164e63;
  --color-highlight:  #0c4a6e;
  --color-bg:         #0f172a;
  --color-surface:    #1e293b;
  --color-text:       #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-border:     #334155;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography ──────────────────────────────────────────────────────────── */
body {
  font-family: 'Google Sans', 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.2rem;  font-weight: 600; }
h3 { font-size: 1rem;    font-weight: 500; }
p  { color: var(--color-text-muted); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary-dk);
  text-decoration: none;
}

.brand svg { color: var(--color-primary); width: 22px; height: 22px; }
.brand-logo { width: 26px; height: 26px; object-fit: contain; display: inline-block; vertical-align: middle; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--color-bg);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.theme-toggle svg { width: 17px; height: 17px; }

/* Show moon in light mode, sun in dark mode */
.icon-light { display: none; }
[data-theme="dark"] .icon-dark  { display: none; }
[data-theme="dark"] .icon-light { display: block; }
[data-theme="dark"] .agent-saved-text {
  background: linear-gradient(135deg, #1e293b 0%, #162032 100%);
}
[data-theme="dark"] .cal-day.cal-in-range { background: #1e3a5f; }

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--color-primary); }
.nav-links a svg { width: 16px; height: 16px; }
.nav-logout { color: var(--color-text-muted) !important; }
.nav-logout:hover { color: #e63946 !important; }

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover    { opacity: 0.88; }
.btn:active   { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-text); }
.btn-sm      { padding: 6px 12px; font-size: 0.8rem; }
.btn-full    { width: 100%; justify-content: center; }

/* Filter bar */
.btn-filter {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
}
.btn-filter:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-filter.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.auth-card form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
label { font-size: 0.83rem; font-weight: 500; color: var(--color-text); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select, textarea {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 8px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.input-icon-wrap { position: relative; }
.input-icon-wrap input { padding-right: 40px; }
.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0;
  display: flex;
}
.toggle-pw svg { width: 18px; height: 18px; }

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

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  font-weight: 400;
}
.checkbox-label input { width: auto; }

/* ── Table ───────────────────────────────────────────────────────────────── */
table       { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th          { text-align: left; padding: 10px 14px; font-weight: 600;
              border-bottom: 2px solid var(--color-border); color: var(--color-text);
              white-space: nowrap; background: var(--color-bg); }
td          { padding: 10px 14px; border-bottom: 1px solid var(--color-border);
              white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--color-highlight); }

.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 14px !important;
}
.empty-state-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: normal;
}
.empty-state svg { width: 20px; height: 20px; }

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-highlight);
  color: var(--color-primary-dk);
}

/* ── Alert ───────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-error   { background: #f8d7da; color: #721c24; }
.alert-info    { background: var(--color-highlight); color: var(--color-primary-dk); }

/* ── Grid ────────────────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.flex         { display: flex; }
.items-center { align-items: center; }
.gap-2        { gap: 8px; }
.gap-4        { gap: 16px; }
.mt-4         { margin-top: 16px; }
.mb-4         { margin-bottom: 16px; }
.text-muted   { color: var(--color-text-muted); font-size: 0.875rem; }
.link-sm      { font-size: 0.85rem; }

/* ── Spin animation ──────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.7s linear infinite; display: inline-block; }

/* ══ Auth Pages ══════════════════════════════════════════════════════════════ */
.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 40px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-icon {
  display: block;
  margin: 0 auto 12px;
  object-fit: contain;
  color: var(--color-primary);
  width: 36px !important;
  height: 36px !important;
}
.auth-icon svg { width: 36px; height: 36px; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ── Split Auth Layout ───────────────────────────────────────────────────── */
.auth-split {
  display: flex;
  min-height: 100vh;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  margin-top: -32px;
}

.auth-split-left {
  flex: 1;
  background: url('/static/images/background-image.png') center center / cover no-repeat;
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 100%;
}

.auth-split-overlay {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  position: relative;
}
.auth-split-brand {
  padding: 36px 48px;
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.auth-split-bottom {
  padding: 40px 48px 48px;
  position: relative;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
}
.auth-split-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.auth-split-bottom h2 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}
.auth-split-bottom p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  margin: 0;
  line-height: 1.65;
}

.auth-split-right {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
}

.auth-split-form {
  width: 100%;
  max-width: 380px;
  padding: 48px 24px;
}

.auth-split-header {
  margin-bottom: 32px;
}
.auth-split-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.auth-split-header p {
  color: var(--color-muted);
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .auth-split { flex-direction: column; }
  .auth-split-left { min-height: 220px; flex: none; }
  .auth-split-overlay { padding: 32px 28px; }
  .auth-split-hero h2 { font-size: 1.4rem; }
  .auth-split-right { width: 100%; }
  .auth-split-form { padding: 32px 24px; }
}

/* ══ Dashboard ═══════════════════════════════════════════════════════════════ */

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (max-width: 600px) {
  .page-header { flex-direction: column; align-items: flex-start; }
}

/* Log panel */
.log-panel { border-left: 4px solid var(--color-primary); }
.log-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.log-panel-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary-dk);
}
.log-panel-header h2 svg { width: 18px; height: 18px; color: var(--color-primary); }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
}
.filter-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-presets-date { padding-top: 10px; border-top: 1px solid var(--color-border); margin-top: 2px; }
.filter-custom  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-custom input[type="date"] { width: 150px; padding: 6px 10px; font-size: 0.85rem; }
.filter-right   { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Month / Year custom dropdown */
.month-picker-wrapper { position: relative; }
.month-picker-btn { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.month-picker-btn svg { width: 14px; height: 14px; }
.mp-chevron { transition: transform 0.2s; }
.month-picker-btn.open .mp-chevron { transform: rotate(180deg); }
.month-picker-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  z-index: 300;
  min-width: 170px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
}
.month-picker-dropdown.open { display: block; }
.month-picker-item {
  padding: 7px 12px;
  font-size: 0.84rem;
  color: var(--color-text);
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
}
.month-picker-item:hover { background: var(--color-highlight); color: var(--color-primary); }
.month-picker-item.selected { background: var(--color-primary); color: #fff; }

/* Date-range calendar picker */
.date-range-wrapper { position: relative; }
.date-picker-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.13);
  padding: 20px;
  z-index: 500;
  flex-direction: column;
  gap: 16px;
  min-width: 540px;
}
.date-picker-popover.open { display: flex; }
.cal-months { display: flex; gap: 28px; }
.cal-month  { flex: 1; min-width: 220px; }
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-nav-title { font-weight: 600; font-size: 0.9rem; color: var(--color-text); }
.cal-nav-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s;
}
.cal-nav-btn:hover { background: var(--color-bg); color: var(--color-primary); border-color: var(--color-primary); }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.cal-dow {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 4px 2px 6px;
  text-transform: uppercase;
}
.cal-day {
  padding: 6px 2px;
  font-size: 0.83rem;
  cursor: pointer;
  border-radius: 6px;
  color: var(--color-text);
  transition: background 0.1s, color 0.1s;
  user-select: none;
}
.cal-day:hover:not(.cal-empty) { background: var(--color-bg); color: var(--color-primary); }
.cal-day.cal-empty { cursor: default; }
.cal-day.cal-today { font-weight: 700; color: var(--color-primary); }
.cal-day.cal-other { color: var(--color-text-muted); opacity: 0.45; }
.cal-day.cal-start,
.cal-day.cal-end   { background: var(--color-primary); color: #fff !important; border-radius: 6px; font-weight: 600; }
.cal-day.cal-in-range { background: #e0f2fe; border-radius: 0; }
.cal-day.cal-start { border-radius: 6px 0 0 6px; }
.cal-day.cal-end   { border-radius: 0 6px 6px 0; }
.cal-day.cal-start.cal-end { border-radius: 6px; }
.cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}
.cal-range-label { font-size: 0.83rem; color: var(--color-text-muted); font-style: italic; }

/* Stats strip */
.stats-strip { margin-bottom: 4px; }
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-card svg { width: 26px; height: 26px; color: var(--color-primary); flex-shrink: 0; }
.stat-value { font-size: 1.4rem; font-weight: 700; color: var(--color-primary-dk); }
.stat-label { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 2px; }

/* Table card */
.table-card { padding: 0; overflow: hidden; }

/* ── Meal Detail Drawer ──────────────────────────────────────────────────── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 300;
  animation: fadeIn 0.2s ease;
}
.drawer-overlay.open { display: block; }

.meal-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: -6px 0 32px rgba(0,0,0,0.12);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.meal-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--color-border);
  gap: 12px;
}
.drawer-title-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drawer-date { font-size: 0.85rem; color: var(--color-text-muted); font-weight: 500; }
.drawer-close {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.drawer-close:hover { background: var(--color-bg); color: var(--color-text); }
.drawer-close svg { width: 16px; height: 16px; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-section { display: flex; flex-direction: column; gap: 6px; }

.drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.drawer-field { display: flex; flex-direction: column; gap: 5px; }

.drawer-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.drawer-label svg { width: 13px; height: 13px; }

.drawer-value {
  font-size: 0.93rem;
  color: var(--color-text);
  font-weight: 500;
  padding: 8px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 7px;
  min-height: 36px;
  line-height: 1.5;
}

.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
}

/* Clickable table rows */
#meal-table tbody tr.data-row { cursor: pointer; }
#meal-table tbody tr.data-row:hover { background: var(--color-bg); }

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

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pg-btn:hover:not([disabled]) { background: var(--color-bg); border-color: var(--color-primary); color: var(--color-primary); }
.pg-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.pg-btn.pg-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pg-btn svg { width: 14px; height: 14px; }
.pg-info { font-size: 0.8rem; color: var(--color-text-muted); margin-right: 6px; }
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 10px;
}
.table-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* Search box inside table card */
.table-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  padding: 5px 10px;
  transition: border-color 0.15s;
}
.table-search-wrap:focus-within {
  border-color: var(--color-primary);
}
.table-search-wrap svg {
  width: 15px; height: 15px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.table-search-wrap input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.845rem;
  color: var(--color-text);
  width: 180px;
  font-family: inherit;
}
.table-search-wrap input::placeholder { color: var(--color-text-muted); }
.table-search-clear {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--color-text-muted);
}
.table-search-clear svg { width: 13px; height: 13px; }
.table-search-clear:hover { color: var(--color-text); }
/* Sortable column headers */
th.sortable { user-select: none; white-space: nowrap; }
th.sortable:hover { background: var(--color-border); }
th.sort-active { color: var(--color-primary); }
.sort-icon { font-style: normal; font-size: 0.8em; opacity: 0.8; }
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Section labels ──────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-soon {
  background: #fff3cd;
  color: #856404;
  font-size: 0.7rem;
}

/* ── Stat card extras ────────────────────────────────────────────────────── */
.card-padded { padding: 20px 24px; }
.stat-sub    { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 2px; }

/* ── Coming-soon cards ───────────────────────────────────────────────────── */
.coming-soon-card {
  border: 2px dashed var(--color-border);
  background: var(--color-bg);
}
.coming-soon-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 4px;
}
.coming-soon-inner svg {
  width: 28px; height: 28px;
  color: var(--color-primary);
  opacity: 0.5;
}
.coming-soon-inner h3 { color: var(--color-text); }
.coming-soon-inner p  { font-size: 0.875rem; }

/* ── Coming-soon hero (Report page) ─────────────────────────────────────── */
.coming-soon-hero { text-align: center; }
.coming-soon-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 16px;
}
.coming-soon-hero-icon {
  width: 52px !important; height: 52px !important;
  color: var(--color-primary);
  opacity: 0.6;
}
.coming-soon-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 8px 0;
}
.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--color-highlight);
  color: var(--color-primary-dk);
  font-size: 0.83rem;
  font-weight: 500;
}
.feature-pill svg { width: 14px; height: 14px; }
.coming-soon-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── Quick nav links (bottom of dashboard) ───────────────────────────────── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.quick-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.quick-link-card svg { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; }
.quick-link-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0,119,182,0.1);
  text-decoration: none;
}
@media (max-width: 600px) { .quick-links { grid-template-columns: 1fr; } }

/* ── Meal badges ─────────────────────────────────────────────────────────── */
.meal-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.meal-breakfast     { background: #fff3cd; color: #856404; }
.meal-lunch         { background: #d1e7dd; color: #0a3622; }
.meal-evening_snack { background: #cfe2ff; color: #084298; }
.meal-dinner        { background: #e2d9f3; color: #432874; }
.meal-mid_meal      { background: #f8d7da; color: #842029; }

/* ── Meal description column ─────────────────────────────────────────────── */
.meal-desc {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Required field marker ───────────────────────────────────────────────── */
.required { color: #e63946; }

/* ════════════════════════════════════════════════════════════════════════════
   Log View (dedicated /health/log  and /meal/log pages)
   ══════════════════════════════════════════════════════════════════════════ */

.log-view { display: flex; flex-direction: column; gap: 24px; }

/* Header: back button stacked above title */
.log-view-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.log-view-title h1 { font-size: 1.5rem; margin-top: 2px; }
.log-view-title p  { margin-top: 3px; }

/* Back button — icon only */
.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-back svg { width: 18px; height: 18px; }
.btn-back:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-highlight);
  text-decoration: none;
}

/* Form card */
.log-view-card { max-width: 860px; }

/* Section label inside form */
.form-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin: 20px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-label:first-child { margin-top: 0; }

/* Action row */
.log-view-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

/* ── Macro visualisation bar ─────────────────────────────────────────────── */
.macro-bar-wrap {
  margin: 4px 0 8px;
}
.macro-bar {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--color-border);
}
.macro-seg {
  transition: width 0.3s ease;
}
.macro-carbs   { background: #f6c90e; }
.macro-protein { background: #3a86ff; }
.macro-fat     { background: #ff6b6b; }
.macro-fibre   { background: #51cf66; }

.macro-legend {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}
.macro-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* ════════════════════════════════════════════════════════════════════════════
   Profile avatar + dropdown
   ══════════════════════════════════════════════════════════════════════════ */

.profile-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* Avatar circle button */
.profile-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.profile-btn:hover,
.profile-btn.active {
  border-color: var(--color-primary-dk);
  box-shadow: 0 0 0 3px rgba(0,119,182,0.18);
}

/* Dropdown panel */
.profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 260px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(3,4,94,0.12);
  z-index: 300;
  overflow: hidden;
  animation: dropIn 0.15s ease;
}
.profile-dropdown.open { display: block; }

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

/* Profile header (avatar + name + email) */
.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.profile-avatar-lg {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-name  { font-weight: 600; font-size: 0.9rem; color: var(--color-text); }
.profile-email { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 1px; }

.profile-dropdown-divider { height: 1px; background: var(--color-border); }

/* Menu items */
.profile-dropdown-body,
.profile-dropdown-footer { padding: 8px; }

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.12s;
}
.profile-menu-item svg { width: 16px; height: 16px; color: var(--color-text-muted); flex-shrink: 0; }
.profile-menu-item:hover { background: var(--color-bg); text-decoration: none; }

.profile-logout { color: #e63946; }
.profile-logout svg { color: #e63946; }
.profile-logout:hover { background: #fff0f0; }

/* ════════════════════════════════════════════════════════════════════════════
   Saved Meals — picker panel & save-as-template
   ══════════════════════════════════════════════════════════════════════════ */

.saved-meals-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.saved-selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--color-highlight);
  color: var(--color-primary-dk);
  font-size: 0.8rem;
  font-weight: 600;
}

.saved-meals-panel {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: 0 4px 20px rgba(3,4,94,0.08);
  overflow: hidden;
  margin-bottom: 16px;
  animation: dropIn 0.15s ease;
}

.saved-meals-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}
.saved-meals-search-wrap {
  position: relative;
  flex: 1;
}
.saved-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--color-text-muted);
  pointer-events: none;
}
.saved-search-input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s;
}
.saved-search-input:focus { border-color: var(--color-primary); }

.saved-panel-close {
  width: 30px; height: 30px;
  border: none; border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}
.saved-panel-close svg { width: 16px; height: 16px; }
.saved-panel-close:hover { background: var(--color-bg); color: var(--color-text); }

.saved-meals-list { max-height: 280px; overflow-y: auto; }

.saved-meal-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.1s;
}
.saved-meal-row:last-child { border-bottom: none; }
.saved-meal-row:hover { background: var(--color-bg); }

.saved-meal-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.saved-meal-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.saved-meal-desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.saved-meal-cal {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-highlight);
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
.saved-meal-actions { display: flex; gap: 6px; flex-shrink: 0; }

.saved-meals-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-align: center;
}
.saved-meals-empty svg { width: 30px; height: 30px; opacity: 0.4; }

/* Save-as-template inline prompt */
.save-template-prompt {
  margin-top: 16px;
  padding: 16px;
  border: 1.5px dashed var(--color-border);
  border-radius: 10px;
  background: var(--color-bg);
  animation: dropIn 0.15s ease;
}
.save-template-prompt-inner {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.save-template-icon { width: 22px; height: 22px; color: var(--color-primary); opacity: 0.7; flex-shrink: 0; margin-bottom: 6px; }
.save-template-fields { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.save-template-fields label { font-size: 0.78rem; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.save-template-actions { display: flex; gap: 8px; flex-shrink: 0; margin-bottom: 1px; }

/* ════════════════════════════════════════════════════════════════════════════
   Meal Log — Analyze Feature
   ══════════════════════════════════════════════════════════════════════════ */

/* Mode tabs (Describe / Upload Photo) */
.meal-mode-tabs {
  display: flex;
  gap: 4px;
  margin: 8px 0 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
}
.meal-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.meal-mode-tab svg { width: 15px; height: 15px; }
.meal-mode-tab:hover { background: var(--color-highlight); color: var(--color-primary); }
.meal-mode-tab.active {
  background: var(--color-primary);
  color: #fff;
}
.meal-mode-panel { width: 100%; }

/* Action row: AI Prompt + Analyze buttons below the input */
.analyze-action-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.analyze-action-row .btn {
  height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

/* Legacy input row (kept for compat) */
.analyze-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.analyze-input-row input { flex: 1; }

/* Analyze button — gradient sparkle */
.btn-analyze {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 20px;
  height: 42px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,119,182,0.25);
}
.btn-analyze svg { width: 15px; height: 15px; }
.btn-analyze:hover  { opacity: 0.92; box-shadow: 0 4px 12px rgba(0,119,182,0.35); }
.btn-analyze:active { transform: scale(0.97); }
.btn-analyze:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* Helper hint below input */
.analyze-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* Image upload drop zone */
.image-drop-area {
  position: relative;
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: var(--color-bg);
  transition: border-color 0.15s, background 0.15s;
}
.image-drop-area:hover,
.image-drop-area.drag-over {
  border-color: var(--color-primary);
  background: var(--color-highlight);
}
.image-drop-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  color: var(--color-text-muted);
  pointer-events: none;
  text-align: center;
}
.image-drop-placeholder svg  { width: 38px; height: 38px; opacity: 0.45; }
.image-drop-placeholder span { font-size: 0.9rem; font-weight: 500; }
.image-drop-placeholder small{ font-size: 0.76rem; opacity: 0.75; }

.image-preview-img {
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  padding: 10px;
  display: block;
}

/* Clear image button (top-right overlay) */
.image-clear-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.12s;
}
.image-clear-btn svg { width: 14px; height: 14px; }
.image-clear-btn:hover { background: rgba(0,0,0,0.82); }

/* Analysis success status bar */
.analyze-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  font-size: 0.83rem;
  font-weight: 500;
  margin-top: 10px;
}
.analyze-status .status-icon.success { color: #059669; width: 16px; height: 16px; }

/* Field fill highlight animation */
@keyframes fieldFilled {
  0%   { background-color: #caf0f8; box-shadow: 0 0 0 3px rgba(0,180,216,0.25); }
  100% { background-color: transparent; box-shadow: none; }
}
.field-filled { animation: fieldFilled 1.4s ease; }

/* ════════════════════════════════════════════════════════════════════════════
   Premium lock — Analyze button
   ══════════════════════════════════════════════════════════════════════════ */

/* Locked Analyze button — dark premium look */
.btn-analyze-premium {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.07) !important;
  cursor: not-allowed;
  position: relative;
  gap: 8px;
  overflow: hidden;
}
.btn-analyze-premium::before {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.09) 50%, transparent 100%);
  animation: pro-shimmer 3s infinite;
}
@keyframes pro-shimmer {
  0%   { left: -75%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}
.btn-analyze-premium:hover {
  opacity: 1 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.1) !important;
}

/* PRO badge inside the button */
.premium-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f9c74f 0%, #f4a11a 100%);
  color: #1a1a2e;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  box-shadow: 0 1px 4px rgba(249,199,79,0.45);
}

/* Inline callout shown on click */
.premium-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff8e1;
  border: 1px solid #ffd54f;
  color: #6d4c1b;
  font-size: 0.83rem;
  margin-top: 10px;
  animation: dropIn 0.15s ease;
}
.premium-callout svg { width: 16px; height: 16px; color: #e6a817; flex-shrink: 0; margin-top: 1px; }
.premium-callout span { flex: 1; line-height: 1.5; }
.premium-callout-close {
  background: none; border: none; cursor: pointer;
  color: #a07840; padding: 0; display: flex; align-items: center;
  flex-shrink: 0;
}
.premium-callout-close svg { width: 14px; height: 14px; }
.premium-callout-close:hover { color: #6d4c1b; }

/* ════════════════════════════════════════════════════════════════════════════
   AI Prompt Modal
   ══════════════════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 94, 0.35);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

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

.modal-box {
  background: var(--color-surface);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(3,4,94,0.18);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.2s ease;
}

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

/* Modal header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title svg { width: 20px; height: 20px; color: var(--color-primary); }
.modal-title h3 { font-size: 1rem; font-weight: 700; color: var(--color-text); margin: 0; }

.modal-close-btn {
  width: 32px; height: 32px;
  border: none; border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.modal-close-btn svg { width: 16px; height: 16px; }
.modal-close-btn:hover { background: var(--color-bg); color: var(--color-text); }

/* Modal body */
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Step */
.modal-step { display: flex; flex-direction: column; gap: 12px; }

.modal-step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}
.step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Prompt code block */
.prompt-display {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow: auto;
  max-height: 200px;
}
.prompt-display pre {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

/* Copy row */
.prompt-copy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.copy-success {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #059669;
}
.copy-success svg { width: 14px; height: 14px; }
.ai-suggestions {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

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

/* Response paste area */
.ai-response-textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
.ai-response-textarea:focus { border-color: var(--color-primary); }

/* Parse error */
.ai-parse-error {
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff0f0;
  border: 1px solid #ffc9c9;
  color: #c0392b;
  font-size: 0.82rem;
}

/* Modal footer */
.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   Profile Wizard
   ════════════════════════════════════════════════════════════════════════════ */

/* Progress bar */
.wizard-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.wizard-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}
.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.wizard-progress-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}

/* Step panel */
.wizard-step { display: none; animation: stepIn 0.3s ease; }
.wizard-step.active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wizard-step.step-error { animation: stepShake 0.5s ease; }
@keyframes stepShake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px); }
  60%     { transform: translateX(8px); }
  80%     { transform: translateX(-4px); }
}

/* Step header */
.wizard-step-header { text-align: center; margin-bottom: 32px; }
.wizard-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  margin-bottom: 16px;
  color: #fff;
}
.wizard-step-icon svg { width: 26px; height: 26px; }
.wizard-step-header h2 { margin: 0 0 8px; font-size: 1.4rem; }
.wizard-step-header p  { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; }

/* Mode cards */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}
.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 20px;
  border-radius: 14px;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.mode-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 20px rgba(0,119,182,0.15);
  transform: translateY(-2px);
}
.mode-card-detailed:hover {
  border-color: #7b2ff7;
  box-shadow: 0 4px 20px rgba(123,47,247,0.18);
}
.mode-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--color-highlight);
  color: var(--color-primary);
}
.mode-card-icon svg { width: 22px; height: 22px; }
.mode-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.mode-card p  { margin: 0 0 10px; font-size: 0.84rem; color: var(--color-text-muted); }
.mode-card-features {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mode-card-features li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.mode-card-features svg { width: 13px; height: 13px; color: var(--color-primary); }
.mode-card-badge {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--color-highlight);
  color: var(--color-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}
.mode-card-badge-detailed {
  background: #ede9fe;
  color: #7b2ff7;
}

/* Input fields */
.wizard-field-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}
.wizard-double-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 480px;
  margin: 0 auto;
}
.wizard-double-field .wizard-field-wrap { max-width: none; flex-direction: column; align-items: flex-start; }
.wizard-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.wizard-input-lg {
  flex: 1;
  padding: 12px 16px;
  font-size: 1.1rem;
  font-family: inherit;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.wizard-input-lg:focus { border-color: var(--color-primary); }
.wizard-input-unit {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.wizard-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 12px;
}

/* BMI preview */
.bmi-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 480px;
  margin: 16px auto 0;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
}
.bmi-preview svg { width: 16px; height: 16px; flex-shrink: 0; }
.bmi-ok   { background: #d1fae5; color: #065f46; }
.bmi-low  { background: #dbeafe; color: #1e40af; }
.bmi-warn { background: #fef3c7; color: #92400e; }
.bmi-high { background: #fee2e2; color: #991b1b; }

/* Choice cards grid */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
}
.choice-grid-2 { grid-template-columns: repeat(2, 1fr); }
.choice-grid-3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid-5 { grid-template-columns: repeat(5, 1fr); }

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  line-height: 1.3;
}
/* Two-line cards (activity, stress) */
.choice-grid-2 .choice-card {
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  padding: 14px 16px;
  gap: 12px;
}
.choice-grid-2 .choice-card span { display: flex; flex-direction: column; gap: 2px; }
.choice-grid-2 .choice-card small { font-size: 0.76rem; font-weight: 400; color: var(--color-text-muted); }
.choice-card svg { width: 22px; height: 22px; flex-shrink: 0; }
.choice-card:hover { border-color: var(--color-primary); background: var(--color-highlight); }
.choice-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
.choice-card.selected small { color: rgba(255,255,255,0.75); }
.choice-card.selected svg  { color: #fff; }

/* Wizard nav */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Account Page ────────────────────────────────────────────────────────── */
.account-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.account-col { display: flex; flex-direction: column; gap: 20px; }

.account-hero-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 24px;
}
.account-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark, #1a237e) 100%);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: -1px;
}
.account-hero-info { min-width: 0; }
.account-hero-name  { font-size: 1.15rem; font-weight: 700; color: var(--color-text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-hero-email { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-hero-since { font-size: 0.78rem; color: var(--color-text-muted); }

.account-view-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.account-view-row:last-of-type { border-bottom: none; }
.account-view-label { font-size: 0.82rem; color: var(--color-text-muted); font-weight: 500; }
.account-view-value { font-size: 0.9rem; color: var(--color-text); font-weight: 600; }

.account-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 20px;
}
.account-section-title svg { width: 16px; height: 16px; }
.account-section-title-danger { color: #c0392b; }

.form-label-hint {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: 4px;
}

/* Password strength bar */
.pw-strength-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.pw-strength-bar {
  flex: 1;
  height: 5px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}
.pw-strength-label { font-size: 0.78rem; font-weight: 500; white-space: nowrap; min-width: 70px; }

/* Danger zone card */
.account-danger-card { border: 1.5px solid #fca5a5 !important; }
.btn-danger-outline {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}
.btn-danger-outline:hover {
  background: #fef2f2 !important;
}

@media (max-width: 720px) {
  .account-layout { grid-template-columns: 1fr; }
}

/* ── Profile Summary ──────────────────────────────────────────────────────── */
.profile-bio-card {
  padding: 24px;
}
.profile-bio-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.profile-bio-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-bio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.bio-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--color-bg);
}
.bio-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--color-highlight);
  color: var(--color-primary);
  flex-shrink: 0;
}
.bio-item-icon svg { width: 16px; height: 16px; }
.bio-item-label { font-size: 0.73rem; color: var(--color-text-muted); margin-bottom: 2px; }
.bio-item-val   { font-size: 0.9rem; font-weight: 600; color: var(--color-text); }

/* Goals grid */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 20px 24px;
}
.goal-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  animation: goalFadeIn 0.4s ease both;
}
@keyframes goalFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.goal-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff;
  flex-shrink: 0;
}
.goal-card-icon svg { width: 18px; height: 18px; }
.goal-card-body h4 { margin: 0 0 4px; font-size: 0.95rem; color: var(--color-text); }
.goal-card-body p  { margin: 0; font-size: 0.82rem; color: var(--color-text-muted); line-height: 1.5; }

/* ── Precaution cards ────────────────────────────────────────────────────── */
.precautions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 16px 20px 20px;
}
.precaution-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(135deg, #fff8f2 0%, #fff4ec 100%);
  border: 1.5px solid #fddbb4;
  border-radius: 12px;
  padding: 14px 16px;
  animation: goalIn 0.3s ease both;
}
.precaution-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  color: #fff;
  flex-shrink: 0;
}
.precaution-card-icon svg { width: 18px; height: 18px; }
.precaution-card-body h4 { margin: 0 0 4px; font-size: 0.95rem; color: #9a3412; }
.precaution-card-body p  { margin: 0; font-size: 0.82rem; color: #c2410c; line-height: 1.5; }

/* ── Badge variants ──────────────────────────────────────────────────────── */
.badge-warning {
  background: #fff4ec;
  color: #c2410c;
  border: 1px solid #fddbb4;
}

/* ── Agent parsed success badge ──────────────────────────────────────────── */
.agent-parsed-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #86efac;
  border-radius: 10px;
  padding: 12px 16px;
  color: #15803d;
  font-size: 0.88rem;
  line-height: 1.5;
}
.agent-parsed-badge svg { width: 20px; height: 20px; flex-shrink: 0; color: #16a34a; }
.agent-parsed-badge strong { color: #15803d; }

/* ── Profile save confirmation banner ───────────────────────────────────── */
.profile-save-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 13px 18px;
  margin-bottom: 16px;
  color: #15803d;
  font-size: 0.9rem;
  animation: goalIn 0.4s ease both;
}
.profile-save-banner svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Bio card empty state ────────────────────────────────────────────────── */
.bio-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  color: var(--color-text-muted);
  gap: 8px;
}
.bio-empty-state svg { width: 32px; height: 32px; opacity: 0.4; }
.bio-empty-state p { margin: 0; font-size: 0.9rem; line-height: 1.5; }

/* ── Wizard Layout (sidebar + main) ──────────────────────────────────────── */
.wizard-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── Wizard Sidebar ───────────────────────────────────────────────────────── */
.wizard-sidebar {
  position: sticky;
  top: 80px;
}
.wizard-sidebar-inner {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  padding: 16px 12px;
}

/* Section nav items */
.section-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: default;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}
.section-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--color-bg);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.section-nav-icon svg { width: 14px; height: 14px; }

.section-nav-item.active {
  color: var(--color-primary);
  background: var(--color-highlight);
  font-weight: 600;
}
.section-nav-item.active .section-nav-icon {
  background: var(--color-primary);
  color: #fff;
}
.section-nav-item.done {
  color: var(--color-text-muted);
}
.section-nav-item.done .section-nav-icon {
  background: #d4edda;
  color: #198754;
}

/* ── Wizard Main ─────────────────────────────────────────────────────────── */
.wizard-main {
  min-width: 0;
}
.wizard-content-card {
  padding: 32px 36px;
}
.wizard-content {
  max-width: 680px;
  margin: 0 auto;
}

/* ── Step header ─────────────────────────────────────────────────────────── */
.wz-step-header {
  text-align: center;
  margin-bottom: 32px;
}
.wz-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff;
  margin-bottom: 14px;
}
.wz-step-icon svg { width: 24px; height: 24px; }
.wz-step-title { margin: 0 0 6px; font-size: 1.35rem; }
.wz-step-sub   { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; }
.wz-step-body  { }

/* ── Multi-field rows ────────────────────────────────────────────────────── */
.mf-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 22px;
}
.mf-label {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--color-text);
}
.req { color: var(--color-primary); margin-left: 2px; }

/* ── Text / number input ─────────────────────────────────────────────────── */
.wz-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.wz-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,119,182,0.12);
}
.wz-num-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wz-num-wrap .wz-input { flex: 1; }
.wz-unit {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-weight: 500;
}
.wz-time {
  max-width: 160px;
}

/* ── Slider ──────────────────────────────────────────────────────────────── */
.slider-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slider-display-wrap {
  display: flex;
  justify-content: center;
}
.slider-display {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 20px;
  min-width: 70px;
  text-align: center;
}
.wz-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--color-highlight);
  outline: none;
  cursor: pointer;
}
.wz-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  cursor: pointer;
}
.wz-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  cursor: pointer;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

/* ── Segment control ─────────────────────────────────────────────────────── */
.segment-control {
  display: inline-flex;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  flex-wrap: wrap;
}
.segment-btn {
  flex: 1;
  min-width: 60px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: none;
  border-right: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.segment-btn:last-child { border-right: none; }
.segment-btn:hover { background: var(--color-highlight); color: var(--color-primary); }
.segment-btn.active {
  background: var(--color-primary);
  color: #fff;
}

/* ── Toggle (Yes / No) ───────────────────────────────────────────────────── */
.toggle-group {
  display: inline-flex;
  gap: 10px;
}
.toggle-btn {
  padding: 8px 24px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.toggle-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.toggle-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ── Counter (stepper) ───────────────────────────────────────────────────── */
.counter-field {
  display: flex;
  align-items: center;
  gap: 12px;
}
.counter-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: background 0.15s, border-color 0.15s;
  line-height: 1;
}
.counter-btn:hover { background: var(--color-highlight); border-color: var(--color-primary); }
.counter-val {
  font-size: 1.4rem;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
  color: var(--color-text);
}
.counter-unit {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ── Choice inline (compact pill buttons) ────────────────────────────────── */
.choice-inline-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.choice-inline-btn svg { width: 14px; height: 14px; }
.choice-inline-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.choice-inline-btn.selected {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ── Meal intake grid ────────────────────────────────────────────────────── */
.meal-intake-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.meal-intake-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 14px;
}
.meal-intake-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--color-text);
}
.meal-intake-label svg { width: 15px; height: 15px; color: var(--color-primary); }

/* ── Step error shake ────────────────────────────────────────────────────── */
/* @keyframes stepShake already defined above */
.step-error { animation: stepShake 0.5s ease; }

/* ── Bio sections in summary ─────────────────────────────────────────────── */
.bio-section {
  margin-bottom: 24px;
}
.bio-section:last-child { margin-bottom: 0; }
.bio-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}
.bio-section-title svg { width: 14px; height: 14px; }

/* BMI badge inline */
.bmi-inline {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}
.bmi-inline.bmi-ok   { background: #d4edda; color: #198754; }
.bmi-inline.bmi-low  { background: #fff3cd; color: #856404; }
.bmi-inline.bmi-warn { background: #fde8d8; color: #c0531a; }
.bmi-inline.bmi-high { background: #f8d7da; color: #842029; }

/* ── View toggle (Card / List) ───────────────────────────────────────────── */
.view-toggle {
  display: inline-flex;
  border: 1.5px solid var(--color-border);
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: auto;
}
.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-surface);
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s;
  border-right: 1.5px solid var(--color-border);
}
.view-toggle-btn:last-child { border-right: none; }
.view-toggle-btn svg { width: 16px; height: 16px; }
.view-toggle-btn:hover { background: var(--color-highlight); color: var(--color-primary); }
.view-toggle-btn.active { background: var(--color-primary); color: #fff; }

/* ── List View ────────────────────────────────────────────────────────────── */
.bio-list-rows {
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}
.bio-list-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.bio-list-row:last-child { border-bottom: none; }
.bio-list-row-even { background: var(--color-bg); }
.bio-list-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-weight: 500;
  min-width: 160px;
  flex-shrink: 0;
}
.bio-list-label svg { width: 14px; height: 14px; color: var(--color-primary); }
.bio-list-val {
  font-weight: 600;
  color: var(--color-text);
  margin-left: auto;
  text-align: right;
}

/* ── Agent Card ───────────────────────────────────────────────────────────── */
.agent-card {
  padding: 28px 28px 24px;
}
.agent-card-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.agent-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6c63ff 0%, #48cae4 100%);
  color: #fff;
  flex-shrink: 0;
}
.agent-card-icon svg { width: 22px; height: 22px; }
.agent-card-title { margin: 0 0 4px; font-size: 1.1rem; }
.agent-card-sub   { margin: 0; font-size: 0.85rem; color: var(--color-text-muted); }

/* Prompt / response shared label */
.agent-prompt-wrap,
.agent-response-wrap,
.agent-saved-wrap {
  margin-bottom: 20px;
}
.agent-prompt-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.agent-prompt-label svg { width: 14px; height: 14px; }

/* Prompt text box */
.agent-prompt-box {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow-y: auto;
  font-family: 'Google Sans', 'Inter', 'Segoe UI', Arial, sans-serif;
  margin-bottom: 10px;
}

/* Response textarea */
.agent-response-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  font-family: 'Google Sans', 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-surface);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
  margin-bottom: 10px;
}
.agent-response-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,119,182,0.12);
}
.agent-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.agent-save-status { font-size: 0.85rem; }

/* Saved response display */
.agent-saved-text {
  background: linear-gradient(135deg, #f0f8ff 0%, #e8f4fb 100%);
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--color-text);
}
.agent-saved-text p { margin: 0 0 8px; color: var(--color-text); }
.agent-saved-text p:last-child { margin-bottom: 0; }
.agent-saved-text .agent-heading {
  font-weight: 700;
  color: var(--color-primary);
  margin: 14px 0 4px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.agent-saved-text .agent-heading:first-child { margin-top: 0; }

/* Small / xs button variants */
.btn-sm  { padding: 7px 16px;  font-size: 0.85rem; height: auto; }
.btn-xs  { padding: 4px 10px;  font-size: 0.78rem; height: auto; }
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  background: var(--color-highlight);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Choice grid 4 columns */
.choice-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Responsive */
@media (max-width: 900px) {
  .wizard-layout {
    grid-template-columns: 1fr;
  }
  .wizard-sidebar {
    position: static;
  }
  .wizard-sidebar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px;
  }
  .section-nav-item {
    padding: 6px 10px;
    font-size: 0.78rem;
    border: 1.5px solid var(--color-border);
    border-radius: 20px;
  }
  .section-nav-item.active { background: var(--color-primary); color: #fff; }
  .section-nav-item.active .section-nav-icon { display: none; }
  .wizard-content-card { padding: 20px 16px; }
  .meal-intake-row { grid-template-columns: 120px 1fr; }
}

/* Responsive */
@media (max-width: 600px) {
  .mode-cards          { grid-template-columns: 1fr; }
  .choice-grid-5       { grid-template-columns: repeat(2, 1fr); }
  .choice-grid-4       { grid-template-columns: repeat(2, 1fr); }
  .choice-grid-3       { grid-template-columns: repeat(2, 1fr); }
  .wizard-double-field { grid-template-columns: 1fr; }
  .goals-grid          { grid-template-columns: 1fr; }
  .profile-bio-grid    { grid-template-columns: repeat(2, 1fr); }
  .segment-control     { width: 100%; }
  .segment-btn         { padding: 8px 8px; font-size: 0.8rem; }
  .meal-intake-row     { grid-template-columns: 1fr; gap: 6px; }
  .wizard-content-card { padding: 16px 12px; }
  .wz-step-title       { font-size: 1.15rem; }
}

/* ── Bio card header action group ────────────────────────────────────────── */
.bio-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Edit Fields Modal ───────────────────────────────────────────────────── */
.edit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 94, 0.35);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.edit-modal {
  background: var(--color-surface);
  border-radius: 18px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(3,4,94,0.18), 0 4px 16px rgba(0,0,0,0.08);
  animation: modalIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.93) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1.5px solid var(--color-border);
  flex-shrink: 0;
}
.edit-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.edit-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff;
}
.edit-modal-icon svg { width: 18px; height: 18px; }
.edit-modal-header h2 { margin: 0; font-size: 1.05rem; }
.edit-modal-close {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s;
}
.edit-modal-close:hover { background: var(--color-bg); color: var(--color-text); }
.edit-modal-close svg { width: 16px; height: 16px; }

.edit-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

/* Section label inside modal */
.edit-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}
.edit-section-title:first-child { margin-top: 0; }
.edit-section-title svg { width: 13px; height: 13px; }

/* Field grid inside modal */
.edit-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.edit-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.edit-field-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--color-text);
}
.edit-field-unit {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.edit-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1.5px solid var(--color-border);
  flex-shrink: 0;
}

/* ── Table Loader Skeleton ────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.tl-skeleton {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--color-highlight) 25%, var(--color-warn) 50%, var(--color-highlight) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.table-loader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
}
.tl-sk-date  { width: 80px;  flex-shrink: 0; }
.tl-sk-badge { width: 64px;  flex-shrink: 0; height: 22px; border-radius: 11px; }
.tl-sk-desc  { flex: 1;      min-width: 0; }
.tl-sk-num   { width: 50px;  flex-shrink: 0; }

.table-loader-row td {
  padding: 0 !important;
}

/* Mobile tweaks for modal */
@media (max-width: 600px) {
  .edit-modal { border-radius: 14px; max-height: 95vh; }
  .edit-field-grid { grid-template-columns: 1fr 1fr; }
  .bio-header-actions { flex-wrap: wrap; gap: 6px; }
}

/* ── Confirm dialog ──────────────────────────────────────────────────────── */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.confirm-overlay.open { display: flex; }
.confirm-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 28px 28px 24px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}
.confirm-icon svg {
  width: 36px; height: 36px;
  color: #f97316;
  margin-bottom: 12px;
}
.confirm-title   { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--color-text); }
.confirm-message { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn { min-width: 96px; justify-content: center; }
.btn-danger {
  background: #ef4444;
  color: #fff;
  border: none;
}
.btn-danger:hover { background: #dc2626; }

/* ── Report page ─────────────────────────────────────────────────────────── */
/* ── Export dropdown ─────────────────────────────────────────────────────── */
.export-dropdown-wrap {
  position: relative;
}
.export-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  min-width: 220px;
  z-index: 200;
  overflow: hidden;
  padding: 4px;
}
.export-dropdown.open { display: block; }
.export-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  color: var(--color-text);
  transition: background 0.15s;
}
.export-option:hover { background: var(--color-highlight); }
.export-option svg { width: 18px; height: 18px; color: var(--color-primary); flex-shrink: 0; }
.export-option-title { font-size: 0.875rem; font-weight: 600; }
.export-option-sub   { font-size: 0.775rem; color: var(--color-text-muted); margin-top: 1px; }

.report-range-card {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.report-range-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.active-range-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: transparent;
  border: 1.5px solid var(--color-primary);
  border-radius: 20px;
  font-size: 0.8125rem;
  color: var(--color-primary);
  font-weight: 500;
}
.active-range-strip svg { width: 14px; height: 14px; flex-shrink: 0; }

.report-chart-card { padding: 20px; }
.report-chart-wrap { position: relative; height: 300px; margin-top: 16px; }
.report-chart-wrap canvas { width: 100% !important; }

.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}
.legend-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  margin-right: 3px;
  vertical-align: middle;
}
.legend-line {
  border-radius: 50%;
}

.report-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.report-empty svg { width: 36px; height: 36px; opacity: 0.4; }

.report-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 20px;
  text-align: center;
  border: 2px dashed var(--color-border);
  background: transparent;
}
.report-placeholder svg { width: 40px; height: 40px; color: var(--color-primary); opacity: 0.45; }
.report-placeholder p   { font-size: 0.9rem; max-width: 380px; }

/* Macro pills in report table */
.macro-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
}
.macro-carbs   { background: rgba(0,180,216,0.15); color: #0077b6; }
.macro-protein { background: rgba(34,197,94,0.15);  color: #15803d; }
.macro-fibre   { background: rgba(132,204,22,0.15); color: #4d7c0f; }
.macro-fat     { background: rgba(249,115,22,0.15); color: #c2410c; }

[data-theme="dark"] .macro-carbs   { color: #38bdf8; background: rgba(56,189,248,0.15); }
[data-theme="dark"] .macro-protein { color: #4ade80; background: rgba(74,222,128,0.15); }
[data-theme="dark"] .macro-fibre   { color: #a3e635; background: rgba(163,230,53,0.15); }
[data-theme="dark"] .macro-fat     { color: #fb923c; background: rgba(251,146,60,0.15); }

/* ── Monthly Overview ────────────────────────────────────────────────────── */
.monthly-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.monthly-nav {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}
.monthly-nav-btn {
  background: transparent;
  border: none;
  padding: 4px 7px;
  cursor: pointer;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.monthly-nav-btn:hover:not(:disabled) { color: var(--color-text); }
.monthly-nav-btn:disabled { opacity: 0.3; cursor: default; }
.monthly-nav-btn svg { width: 13px; height: 13px; }
.monthly-month-label {
  font-weight: 600;
  font-size: 12px;
  min-width: 120px;
  text-align: center;
  color: var(--color-text);
  padding: 4px 6px;
  border-left: 1.5px solid var(--color-border);
  border-right: 1.5px solid var(--color-border);
}

/* ── Streak Map ──────────────────────────────────────────────────────────── */
.streak-card { padding: 20px 24px 24px; }
.streak-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.streak-year-label {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-text);
}
.streak-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.streak-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--color-muted);
}
.streak-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
/* Primary-colour palette — light mode */
.streak-dot-0 { background: #e2e8f0; }
.streak-dot-1 { background: #90e0ef; }
.streak-dot-2 { background: #0096c7; }
.streak-dot-3 { background: #0077b6; }
/* Primary-colour palette — dark mode */
[data-theme="dark"] .streak-dot-1 { background: #0c4a6e; }
[data-theme="dark"] .streak-dot-2 { background: #0284c7; }
[data-theme="dark"] .streak-dot-3 { background: #38bdf8; }

/* Year grid: 12 month blocks in a scrollable row */
.streak-year-wrap { overflow-x: auto; padding-bottom: 4px; width: 100%; }
.streak-year-wrap::-webkit-scrollbar { height: 6px; }
.streak-year-wrap::-webkit-scrollbar-track { background: var(--color-surface); border-radius: 4px; }
.streak-year-wrap::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
.streak-year-wrap::-webkit-scrollbar-thumb:hover { background: var(--color-muted); }
.streak-year-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  width: max-content;
}
.streak-month-block { display: flex; flex-direction: column; gap: 4px; }
.streak-month-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
  text-align: center;
  margin-bottom: 2px;
}
.streak-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 10px);
  gap: 3px;
  margin-bottom: 2px;
}
.streak-dow-row span {
  text-align: center;
  font-size: 7px;
  color: var(--color-muted);
  font-weight: 500;
}
.streak-grid {
  display: grid;
  grid-template-columns: repeat(7, 10px);
  grid-auto-rows: 10px;
  gap: 3px;
}
.streak-cell {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  cursor: default;
  transition: transform 0.1s;
}
.streak-cell:not(.streak-empty):hover { transform: scale(1.3); z-index: 1; }
.streak-empty { background: #f1f5f9; pointer-events: none; border-radius: 2px; }
[data-theme="dark"] .streak-empty { background: #1e293b; }

/* Score colours — light mode */
.streak-score-0 { background: #e2e8f0; }
.streak-score-1 { background: #90e0ef; }
.streak-score-2 { background: #0096c7; }
.streak-score-3 { background: #0077b6; }
.streak-score-f { background: #e2e8f0; opacity: 0.5; pointer-events: none; }
[data-theme="dark"] .streak-score-f { background: #2d3748; opacity: 0.5; }

/* Score colours — dark mode */
[data-theme="dark"] .streak-score-0 { background: #2d3748; }
[data-theme="dark"] .streak-score-1 { background: #0c4a6e; }
[data-theme="dark"] .streak-score-2 { background: #0284c7; }
[data-theme="dark"] .streak-score-3 { background: #38bdf8; }

.streak-today {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.streak-loading {
  text-align: center;
  color: var(--color-muted);
  font-size: 13px;
  padding: 20px 0;
}
