/* Фудтрекер — Octomatica tokens (subset) */
:root {
  --paper: #FAFBFA; --paper-2: #F1F4F2; --surface: #FFFFFF; --surface-2: #F7F9F8;
  --ink: #0F1613; --ink-2: #424D47; --ink-3: #5E6A63;
  --line: #E7ECE9; --line-2: #D6DBD8; --line-strong: #0F1613;
  --accent: #0E9F6E; --accent-bright: #14B981; --accent-deep: #0A7351;
  --accent-on-ink: #3FE0A6; --accent-soft: #DEF3E8; --accent-softer: #EDF8F1; --accent-on: #FFFFFF;
  --glow: rgba(20,185,129,.22);
  --c-coral: #F0714F; --c-blue: #4F84E6; --c-amber: #EBA033; --c-purple: #9B7BF0; --c-teal: #1FA8A0; --c-pink: #E867A6;
  --r-xs: 8px; --r-sm: 12px; --r-md: 18px; --r-lg: 26px; --r-pill: 999px;
  --sh-sm: 0 1px 2px rgba(16,24,15,.05), 0 2px 8px rgba(16,24,15,.04);
  --sh-md: 0 4px 14px rgba(16,24,15,.06), 0 14px 36px -10px rgba(16,24,15,.10);
  --ease: cubic-bezier(.22,1,.36,1);
  --font-display: 'Golos Text', system-ui, sans-serif;
  --font-head: 'Golos Text', system-ui, sans-serif;
  --font-sans: 'Onest', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1100px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { font-size: 93.75%; }
body { margin: 0; font-family: var(--font-sans); color: var(--ink); background: var(--paper); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1,h2,h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 85%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; }
.brand-mark { font-size: 1.3rem; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 6px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-family: var(--font-mono); }
.pill-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; box-shadow: 0 0 0 3px var(--accent-softer); }

.hero-head { padding: 40px 0 24px; }
.eyebrow { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 10px; }
.display { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; margin-bottom: 8px; }
.lead { color: var(--ink-2); max-width: 620px; margin: 0; font-size: 1rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 22px; margin-bottom: 20px; }
.h-sec-sm { font-size: 1.05rem; margin-bottom: 14px; }

.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); padding: 1px; overflow: hidden; }
.kpi-cell { background: var(--surface); padding: 18px 16px; }
.kpi-label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.kpi-value { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; color: var(--ink); }
.kpi-value .unit { font-size: .85rem; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.kpi-sub { font-size: .76rem; color: var(--accent-deep); margin-top: 4px; font-weight: 600; }
@media (max-width: 860px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.tabs { display: flex; gap: 6px; margin: 18px 0 22px; overflow-x: auto; padding-bottom: 2px; }
.tab { font-family: var(--font-sans); font-weight: 600; font-size: .88rem; padding: 10px 18px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: all .18s var(--ease); }
.tab:hover { border-color: var(--line-2); }
.tab.active { background: var(--accent); color: var(--accent-on); border-color: var(--accent); box-shadow: 0 6px 18px -6px var(--glow); }

.panel { display: none; }
.panel.active { display: block; }
.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

.chart-wrap { position: relative; height: 240px; }
.chart-wrap.tall { height: 300px; }

.meals-list { display: flex; flex-direction: column; gap: 12px; }
.meal-row { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.meal-row-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.meal-row-head .mt { font-weight: 700; }
.meal-row-head .mk { font-family: var(--font-mono); color: var(--accent-deep); font-weight: 700; }
.meal-items { font-size: .84rem; color: var(--ink-2); }
.meal-items div { display: flex; justify-content: space-between; padding: 2px 0; }
.meal-macros { display: flex; gap: 14px; margin-top: 8px; font-size: .76rem; color: var(--ink-3); font-family: var(--font-mono); }

.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; justify-content: center; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-2); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }

.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tbl thead th { font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); text-align: left; padding-bottom: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

.log-filters { display: flex; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.log-filters label { font-size: .8rem; color: var(--ink-3); display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.log-filters select { border-radius: var(--r-xs); border: 1px solid var(--line-2); padding: 8px 10px; font-family: var(--font-sans); background: var(--surface); color: var(--ink); }
.log-filters select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.empty-state { text-align: center; color: var(--ink-3); padding: 30px; font-size: .9rem; }
.muted { color: var(--ink-3); }
.foot { text-align: center; padding: 30px 0 50px; font-size: .8rem; font-family: var(--font-mono); }
