/* Учёт стада — стили.
   Ночь (тёмно-синий) — каркас и спокойствие; заря (оранжевый) — действия и Зорька;
   жёлтая бирка — номер коровы, как на ухе. Бирка — главная примета интерфейса. */
:root {
  --night: #1E2A55; --night-2: #2A3870; --night-3: #3A4A85;
  --dawn: #F26B3A; --dawn-ink: #B2451C; --dawn-soft: #FFEDE4;
  --tag: #F5C53A; --tag-ink: #2B2100;
  --ground: #F1F2F6; --paper: #FFFFFF;
  --ink: #18204A; --ink-2: #3A4066; --muted: #5D6383;
  --line: #E2E5EE; --line-2: #EDEFF5;
  --bad: #C93A35; --bad-soft: #FBE5E3; --bad-ink: #8E2420;
  --good: #2E8A5C; --good-soft: #E3F3EA; --good-ink: #1C5A3B;
  --warn-soft: #FFF3D6; --warn-ink: #6A4800;
  --display: 'Unbounded', sans-serif; --text: 'Golos Text', sans-serif; --mono: 'JetBrains Mono', monospace;
  --top-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.45 var(--text); -webkit-text-size-adjust: 100%; }
a { color: var(--night); }
a:hover { color: var(--dawn-ink); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--dawn); outline-offset: 2px; border-radius: 6px; }
h1, h2 { font-family: var(--display); letter-spacing: -0.01em; margin: 0; line-height: 1.15; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
.muted { color: var(--muted); }
.note { font-size: 14px; color: var(--muted); margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Бирка с номером коровы */
.tag { position: relative; display: inline-flex; align-items: center; min-height: 26px; padding: 3px 11px 3px 21px; border-radius: 6px 14px 14px 6px; background: var(--tag); color: var(--tag-ink); font: 700 15px/1 var(--mono); letter-spacing: .02em; white-space: nowrap; text-decoration: none; }
.tag::before { content: ''; position: absolute; left: 7px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: rgba(43,33,0,.28); }
a:hover .tag, a .tag:hover { background: #F9D45E; color: var(--tag-ink); }
.tag.lg { min-height: 56px; padding: 8px 22px 8px 42px; border-radius: 10px 28px 28px 10px; font-size: 34px; }
.tag.lg::before { left: 14px; width: 13px; height: 13px; margin-top: -6.5px; }

/* Шапка */
.top { display: flex; align-items: center; gap: 14px; height: var(--top-h); padding: 0 20px; background: var(--night); color: #fff; position: sticky; top: 0; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex-shrink: 0; }
.brand img { width: 34px; height: 34px; background: #fff; border-radius: 10px; }
.brand span { font: 800 18px var(--display); }
.brand:hover { color: #fff; }
.ask { flex: 1 1 auto; min-width: 0; max-width: 680px; position: relative; }
.ask label { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--night-2); color: #B9BFDA; }
.ask input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font-size: 16px; outline: none; }
.ask input::placeholder { color: #A9B0CF; }
.ask kbd { font: 500 12px var(--mono); padding: 3px 7px; border-radius: 6px; background: var(--night-3); color: #DDE1F0; }
.suggest { position: absolute; left: 0; right: 0; top: 50px; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 16px 40px rgba(30,42,85,.22); overflow: hidden; }
.suggest[hidden] { display: none; }
.suggest a { display: flex; gap: 12px; align-items: center; padding: 11px 14px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line-2); }
.suggest a:first-child { border-top: 0; }
.suggest a:hover, .suggest a.on { background: var(--ground); }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--night-2); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.zorka-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 8px; border-radius: 14px; background: var(--night-2); color: #fff; text-decoration: none; font-weight: 600; flex-shrink: 0; }
.zorka-btn:hover { color: #fff; background: var(--night-3); }
.menu-btn { display: none; }

/* Каркас: боковая панель и содержимое */
.shell { display: flex; min-height: calc(100vh - var(--top-h)); }
.side { width: 256px; flex-shrink: 0; background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; }
.side > * { flex-shrink: 0; }
.farmbox { padding: 2px 6px 4px; display: flex; flex-direction: column; gap: 2px; }
.farmname { font: 700 15px var(--display); }
.sitesel select { width: 100%; height: 40px; margin-top: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); }
.add-event { justify-content: center; height: 46px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 500; }
.nav a svg { flex-shrink: 0; color: var(--muted); }
.nav a:hover { background: var(--ground); color: var(--ink); }
.nav a.on { background: var(--night); color: #fff; font-weight: 600; }
.nav a.on svg { color: #fff; }
.nav a.later span { color: #6E7491; }
.nav .badge { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-ink); font-size: 12px; font-weight: 700; }
.nav-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.nav-bottom a { min-height: 38px; font-size: 15px; }
.userbox { position: relative; border-top: 1px solid var(--line); padding-top: 10px; }
.user { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.user:hover { background: var(--ground); }
.ava { width: 38px; height: 38px; border-radius: 50%; background: var(--night); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.user .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user .who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user .who small { color: var(--muted); font-size: 13px; }
.usermenu { position: absolute; left: 0; right: 0; bottom: 60px; background: #fff; border-radius: 16px; box-shadow: 0 16px 40px rgba(30,42,85,.22); padding: 6px; display: flex; flex-direction: column; }
.usermenu[hidden] { display: none; }
.usermenu a, .usermenu button { display: block; text-align: left; padding: 11px 12px; border-radius: 10px; border: 0; background: none; color: var(--ink); text-decoration: none; font-size: 15px; cursor: pointer; }
.usermenu a:hover, .usermenu button:hover { background: var(--ground); }
.usermenu button { color: var(--bad-ink); }
.main { flex: 1; min-width: 0; padding: 26px 32px 64px; display: flex; flex-direction: column; gap: 22px; }
/* Содержимое растягивается на всю ширину экрана */
.main > * { width: 100%; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 500; z-index: 70; max-width: calc(100% - 32px); }
.toast[hidden] { display: none; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

/* Кнопки */
.btn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid #C9CEE0; background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: var(--night); color: var(--ink); }
.btn.primary { background: var(--night); border-color: var(--night); color: #fff; }
.btn.dawn { background: var(--dawn); border-color: var(--dawn); color: #fff; }
.btn.dawn:hover { background: #E05A2A; color: #fff; }
.pill { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--line-2); font-weight: 600; font-size: 14px; }
.pill.bad { background: var(--bad-soft); color: var(--bad-ink); }
.pill.ok { background: var(--good-soft); color: var(--good-ink); }
.pill.warn { background: var(--warn-soft); color: var(--warn-ink); }
.card { background: var(--paper); border-radius: 22px; padding: 20px 22px; }

/* «Сегодня»: полоса рассвета продолжает шапку */
.sunrise { position: relative; overflow: hidden; padding: 26px 32px 28px; background: radial-gradient(120% 140% at 100% 120%, #F26B3A 0%, rgba(242,107,58,.55) 22%, rgba(242,107,58,0) 48%), linear-gradient(160deg, #2E3D7A 0%, #34458A 100%); color: #fff; border-radius: 24px; box-shadow: 0 1px 0 rgba(30,42,85,.06); display: flex; flex-direction: column; gap: 10px; }
.sunrise-date { color: #A9B0CF; font-size: 15px; }
.sunrise-title { font-size: 34px; color: #fff; }
.sunrise-text { margin: 0; max-width: 62ch; font-size: 18px; line-height: 1.5; color: #E4E7F3; }
.sunrise-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pill-btn { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; background: var(--night-2); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
.pill-btn:hover { background: var(--night-3); color: #fff; }
.pill-btn.primary { background: var(--dawn); }
.pill-btn.primary:hover { background: #E05A2A; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.today-side { display: flex; flex-direction: column; gap: 18px; }
.block { background: var(--paper); border-radius: 22px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tasks { display: flex; flex-direction: column; margin: 4px -8px -6px; }
.task { display: grid; grid-template-columns: 88px minmax(0, 1fr) 18px; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line-2); }
.task:first-child { border-top: 0; }
.task:hover { background: var(--ground); color: var(--ink); }
.task > b { font: 700 24px var(--display); text-align: right; }
.task span { display: flex; flex-direction: column; min-width: 0; }
.task em { font-style: normal; font-weight: 600; }
.task small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task.zero > b { color: #B3B8CC; }
.task.warn { background: var(--warn-soft); border-top-color: transparent; margin-top: 4px; }
.task.warn small { color: var(--warn-ink); }
.chev { color: #9AA0BA; }
.figure { display: flex; align-items: baseline; gap: 6px; }
.figure b { font: 700 30px var(--display); }
.figure span { color: var(--muted); }
.figure i { font-style: normal; font-weight: 700; font-size: 14px; padding: 2px 8px; border-radius: 999px; margin-left: 4px; }
.figure i.down { background: var(--bad-soft); color: var(--bad-ink); }
.figure i.up { background: var(--good-soft); color: var(--good-ink); }
.attn { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; min-height: 50px; border-top: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.attn:first-of-type { border-top: 0; }
.attn-text { font-size: 15px; font-weight: 600; }
.attn-text .muted { font-weight: 400; }
.attn .tag { justify-self: start; }
.attn-delta { font-weight: 700; color: var(--bad-ink); }
.herdline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--paper); border-radius: 22px; padding: 16px 4px; }
.herdline div { display: flex; flex-direction: column; gap: 2px; padding: 0 18px; border-left: 1px solid var(--line); }
.herdline div:first-child { border-left: 0; }
.herdline span { color: var(--muted); font-size: 14px; }
.herdline b { font: 700 22px var(--display); }

/* График */
.chart { position: relative; margin: 6px 0 22px 0; padding-left: 0; touch-action: pan-y; cursor: crosshair; }
.chart svg { display: block; width: 100%; height: 180px; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .area { fill: var(--night); opacity: .07; }
.chart .line { fill: none; stroke: var(--night); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.prev { stroke: #B9BFD6; stroke-width: 2; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-left: 6px; }
.legend .k-cur { background: var(--night); }
.legend .k-prev { background: #B9BFD6; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .ticks span { position: absolute; left: 0; transform: translateY(-50%); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--paper); padding-right: 4px; }
.chart .xlabels span { position: absolute; bottom: -22px; transform: translateX(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; }
.chart .xlabels span:last-child { transform: translateX(-100%); }
.chart .enddot, .chart .dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--dawn); box-shadow: 0 0 0 2px var(--paper); pointer-events: none; }
.chart .dot { background: var(--night); }
.chart .dot[hidden], .chart .tip[hidden] { display: none; }
.chart .tip { position: absolute; top: -6px; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; display: flex; flex-direction: column; pointer-events: none; white-space: nowrap; z-index: 2; }
.chart .tip b { font-size: 16px; }
.chart .tip span { color: #C9CEE3; }

/* Рабочие списки */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.chip i { font-style: normal; padding: 1px 8px; border-radius: 999px; background: var(--line-2); font-size: 13px; }
.chip.on { background: var(--night); border-color: var(--night); color: #fff; }
.chip.on i { background: var(--dawn); color: #fff; }
.tablebox { background: var(--paper); border-radius: 22px; overflow-x: auto; }
table.grid { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 15px; }
table.grid th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 14px 10px; white-space: nowrap; }
table.grid td { padding: 10px; border-top: 1px solid var(--line-2); vertical-align: middle; }
table.grid th:first-child, table.grid td:first-child { padding-left: 18px; width: 44px; }
table.grid .sub { display: block; font-size: 13px; color: var(--muted); }
table.grid .nm { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
table.grid .c-inv a { text-decoration: none; }
table.grid tr.sel td { background: #F3F5FB; }
table.grid input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--night); }
table.grid .c-meta { display: none; }
.selbar { position: sticky; bottom: 16px; background: var(--night); color: #fff; border-radius: 20px; padding: 12px 14px 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; box-shadow: 0 14px 34px rgba(30,42,85,.3); }
.selbar[hidden] { display: none; }
.selbar b { font: 700 16px var(--display); flex-grow: 1; }
.selbar .btn:not(.dawn) { background: transparent; color: #fff; border-color: var(--night-3); }

/* Карточка коровы */
.cowhead { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cow-tag { margin: 0; font-size: inherit; }
.ids { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: var(--ink-2); }
.ids b { font-family: var(--mono); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cow-tip { background: var(--dawn-soft); display: flex; gap: 14px; align-items: center; }
.cow-tip svg { flex-shrink: 0; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row > * { flex: 1 1 380px; min-width: 0; }
.ped { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ped > div { border-radius: 14px; background: var(--ground); padding: 12px; }
.ped > div.miss { background: var(--warn-soft); }
.ev { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line-2); align-items: baseline; flex-wrap: wrap; }
.ev .d { font: 500 14px var(--mono); color: var(--muted); min-width: 92px; }
.ev .k { font-weight: 700; min-width: 150px; }
.ev .t { flex: 1; color: var(--ink-2); }
.bars2 { display: flex; align-items: flex-end; gap: 4px; height: 150px; border-bottom: 1px solid var(--line); }
.bars2 .w { flex: 1; display: flex; gap: 2px; align-items: flex-end; height: 100%; }
.bars2 .w div { flex: 1; border-radius: 4px 4px 0 0; }

/* Зорька — отдельный экран */
.zscreen { display: flex; flex-direction: column; gap: 16px; max-width: 760px; width: 100%; min-height: calc(100vh - var(--top-h) - 90px); }
.zintro { display: flex; gap: 14px; align-items: flex-start; }
.zintro .avatar { width: 52px; height: 52px; flex-shrink: 0; }
.zintro h1 { font-size: 26px; }
.zintro p { margin: 6px 0 0; color: var(--ink-2); max-width: 56ch; }
.avatar { width: 46px; height: 46px; flex-shrink: 0; }
.zquick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.zq { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); font-weight: 600; cursor: pointer; text-align: left; }
.zq:hover { border-color: var(--night); }
.zq b { font: 700 16px var(--display); color: var(--dawn-ink); }
.zlog { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.zmsg { max-width: 86%; padding: 11px 15px; border-radius: 18px; line-height: 1.45; }
.zmsg.z { align-self: flex-start; background: var(--paper); border-bottom-left-radius: 6px; }
.zmsg.u { align-self: flex-end; background: var(--night); color: #fff; border-bottom-right-radius: 6px; }
.zlinks { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.zlink { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; }
.zbar { position: sticky; bottom: 16px; display: flex; gap: 8px; padding: 8px; background: var(--paper); border-radius: 20px; box-shadow: 0 10px 30px rgba(30,42,85,.14); }
.zbar input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--ground); font-size: 16px; outline: none; }
.zsend { width: 52px; height: 48px; border: 0; border-radius: 14px; background: var(--dawn); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* Вход */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--night); }
.login form { background: #fff; border-radius: 24px; padding: 32px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.login input { height: 48px; padding: 0 14px; border: 1px solid #C9CEE0; border-radius: 12px; font-size: 16px; }
.err { color: var(--bad-ink); font-weight: 600; }

/* Нижняя панель телефона */
.tabbar { display: none; }

/* ——— Адаптив ——— */
@media (max-width: 1100px) {
  .today-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .side { position: fixed; left: 0; top: var(--top-h); bottom: 0; height: auto; z-index: 30; transform: translateX(-102%); transition: transform .2s; box-shadow: 10px 0 30px rgba(30,42,85,.15); }
  .side.open { transform: none; }
  .main { padding: 18px 16px 64px; }
  .sunrise { padding: 20px 18px 24px; }
  .brand span, .zorka-btn span { display: none; }
  .zorka-btn { padding: 0 8px; }
}
@media (max-width: 700px) {
  :root { --top-h: 58px; }
  .top { gap: 10px; padding: 0 12px; }
  .brand img { width: 32px; height: 32px; }
  .menu-btn, .zorka-btn, .ask kbd { display: none !important; }
  .ask label { height: 42px; }
  .main { padding: 14px 12px 112px; gap: 14px; }
  .sunrise { padding: 16px 16px 18px; border-radius: 20px; gap: 6px; }
  .sunrise-title { font-size: 26px; }
  .sunrise-text { font-size: 16px; }
  .sunrise-actions { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .pill-btn { flex-shrink: 0; min-height: 40px; font-size: 14px; }
  h1 { font-size: 24px; }
  .block { padding: 14px 14px; border-radius: 20px; }
  .task { grid-template-columns: 70px minmax(0, 1fr) 16px; gap: 10px; padding: 9px 6px; }
  .task > b { font-size: 19px; }
  .attn { grid-template-columns: 96px minmax(0, 1fr) auto 14px; gap: 8px; }
  .task small { display: none; }
  .chart svg { height: 150px; }
  .herdline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .herdline div:nth-child(3) { border-left: 0; }
  .side { top: var(--top-h); bottom: 74px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: #fff; border-top: 1px solid var(--line); padding: 4px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border: 0; background: none; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600; cursor: pointer; }
  .tabbar .on { color: var(--night); }
  .tabbar .find { width: 62px; height: 62px; margin: -24px auto 0; border-radius: 22px; background: var(--dawn); color: #fff; box-shadow: 0 8px 20px rgba(242,107,58,.38); font-size: 11px; gap: 0; }
  .tabbar .find.on { color: #fff; box-shadow: 0 0 0 3px var(--night), 0 8px 20px rgba(242,107,58,.38); }
  .selbar { bottom: 84px; }
  .toast { bottom: 92px; }
  /* Список — карточки: бирка и главная цифра крупно, остальное строкой */
  .tablebox { background: none; overflow: visible; }
  table.grid { min-width: 0; display: block; }
  table.grid thead { display: none; }
  table.grid tbody { display: flex; flex-direction: column; gap: 8px; }
  table.grid tr { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "chk inv key" "chk meta meta"; gap: 6px 10px; align-items: center; background: #fff; border-radius: 16px; padding: 11px 14px 11px 10px; }
  table.grid td { border: 0; padding: 0 !important; width: auto !important; font-size: 14px; }
  table.grid .c-site, table.grid .c-lact, table.grid .c-ins, table.grid .c-milk { display: none; }
  table.grid .c-chk { grid-area: chk; }
  table.grid .c-inv { grid-area: inv; display: flex; align-items: center; gap: 8px; min-width: 0; }
  table.grid .c-inv .nm { margin: 0; }
  table.grid .c-key { grid-area: key; text-align: right; line-height: 1.1; }
  table.grid .c-key b { font: 700 20px var(--display); }
  table.grid .c-key .sub { font-size: 11px; }
  table.grid .c-meta { display: block; grid-area: meta; color: var(--ink-2); font-size: 13.5px; }
  table.grid .c-meta .sub { display: block; font-size: 13px; margin-top: 2px; }
  .print-btn { display: none; }
  .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions .btn { justify-content: center; }
  .cow-tip { align-items: flex-start; padding: 14px; }
  .cow-tip p { font-size: 15px !important; }
  .tag.lg { min-height: 46px; font-size: 28px; padding: 6px 18px 6px 36px; }
  .tag.lg::before { left: 12px; width: 11px; height: 11px; margin-top: -5.5px; }
  /* Зорька */
  .zscreen { min-height: calc(100vh - var(--top-h) - 140px); }
  .zintro .avatar { width: 44px; height: 44px; }
  .zintro h1 { font-size: 22px; }
  .zintro p { font-size: 15px; }
  .zquick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zbar { bottom: 84px; }
}
