/* «Шеф» ДАДАТИ — стиль «F. Небо» */
:root {
  --sky: #D0E1E8;
  --sky2: #E4EEF2;
  --sky3: #F3F8FA;
  --blue: #4FABDA;
  --blue-d: #2771A2;
  --blue-m: #2B85BB;
  --y: #FFBF35;
  --ink: #141414;
  --tomato: #FF6347;
  --tomato-d: #C2341C;
  --tomato-bg: #FFE9E4;
  --muted: #5B6F7D;
  --line: #E3ECF0;
  --white: #fff;
  --r: 22px;
  --r-s: 14px;
  --tab-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --f-body: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, Arial, sans-serif;
  --f-head: 'Barlow Condensed', 'Avenir Next Condensed', 'Roboto Condensed', 'Arial Narrow', 'DejaVu Sans Condensed', -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--sky); }
body {
  font: 16px/1.45 var(--f-body);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-d); }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.H, h1, h2, h3, .num { font-family: var(--f-head); font-weight: 700; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- логотип: вертикальный «да/да/ти» с синей полосой за средним «да» ---------- */
.logo { position: relative; display: inline-block; flex: none; line-height: 0; }
.logo img { position: relative; display: block; height: 100%; width: auto; }
.logo-bar { position: absolute; left: -28%; right: -28%; top: 36.5%; height: 27%; background: var(--blue); }
.logo-s { height: 64px; }
.logo-m { height: 92px; }
.logo-xl { height: 150px; }

/* ---------- заставка ---------- */
.splash { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; }

/* ---------- шапка ---------- */
.top { padding: calc(var(--safe-t) + 6px) 14px 14px 18px; }
.topbar { display: flex; align-items: center; gap: 6px; min-height: 44px; }
.topbar .sp { flex: 1; }
.iconbtn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; display: inline-flex;
  align-items: center; justify-content: center; color: var(--ink); flex: none; padding: 0;
}
.iconbtn:active { background: rgba(255,255,255,.55); }
.iconbtn svg { width: 24px; height: 24px; }
.backbtn { display: inline-flex; align-items: center; gap: 2px; height: 44px; border: 0; background: none; padding: 0 10px 0 2px;
  font-weight: 600; font-size: 16px; color: var(--blue-d); border-radius: 22px; margin-left: -6px; }
.backbtn svg { width: 24px; height: 24px; }
.backbtn:active { background: rgba(255,255,255,.55); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center;
  justify-content: center; font: 700 17px/1 var(--f-head); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 13px;
  font-weight: 600; white-space: nowrap; border: 0; }
.pill.ok { background: rgba(255,255,255,.6); color: var(--muted); }
.pill.off { background: var(--tomato); color: #fff; }
.pill.wait { background: var(--y); color: var(--ink); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.pill.spin i { animation: pulse 1s infinite ease-in-out; }
@keyframes pulse { 50% { opacity: .25; } }

.hero { display: flex; gap: 24px; align-items: center; padding: 6px 0 4px 10px; }
.hero .logo { height: 76px; }
.hero .txt { min-width: 0; flex: 1; }
.kicker { font-size: 13px; color: var(--muted); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero h1 { margin: 0; font-size: 38px; line-height: .98; text-transform: uppercase; letter-spacing: .005em; overflow-wrap: anywhere; hyphens: auto; }
.hero h1.long { font-size: 30px; }
.hero h1.xlong { font-size: 25px; }
.tagline { font: 700 10px/1 var(--f-body); letter-spacing: .34em; margin-top: 6px; opacity: .78; text-transform: lowercase; }

/* компактная шапка при прокрутке */
.mini { position: fixed; top: 0; left: 0; right: 0; z-index: 30; background: rgba(208,225,232,.94);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  padding: var(--safe-t) 8px 0 12px; display: flex; align-items: center; gap: 4px; min-height: calc(var(--safe-t) + 48px);
  transform: translateY(-110%); transition: transform .2s ease; box-shadow: 0 1px 0 rgba(20,20,20,.06); }
.mini.on { transform: none; }
.mini .t { flex: 1; min-width: 0; font: 700 21px/1 var(--f-head); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- белый лист ---------- */
.sheet {
  background: var(--white); border-radius: var(--r) var(--r) 0 0; margin: 0 6px; padding: 18px 16px 24px;
  min-height: calc(100vh - 150px); min-height: calc(100dvh - 150px);
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 28px);
}
.sheet.has-actions { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 112px); }
.sheet > :first-child { margin-top: 0; }
h2 { font-size: 24px; text-transform: uppercase; margin: 22px 0 10px; line-height: 1.05; }
h3 { font-size: 19px; text-transform: uppercase; margin: 26px 0 8px; color: var(--blue-d); letter-spacing: .02em; line-height: 1.1;
  display: flex; align-items: center; gap: 8px; }
h3 .cnt { font-family: var(--f-body); font-size: 13px; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
h3 .sp { flex: 1; }
p { margin: 8px 0; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.txt { white-space: pre-wrap; line-height: 1.55; }

/* ---------- метки ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tag { display: inline-flex; align-items: center; border-radius: 20px; padding: 3px 10px; font-size: 13px; font-weight: 600; background: var(--y);
  color: var(--ink); line-height: 1.3; white-space: nowrap; }
.tag.blue { background: var(--sky2); color: var(--blue-d); }
.tag.warn { background: #E8472C; color: #fff; }
.tag.ghost { background: transparent; border: 1.5px solid var(--blue); color: var(--blue-d); padding: 2px 9px; }
.tag.xs { font-size: 11.5px; padding: 1px 7px; vertical-align: 2px; margin-left: 4px; }

/* ---------- KPI-плитки ---------- */
.kp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 6px; }
.k { background: var(--sky); border-radius: var(--r-s); padding: 11px 13px 10px; min-width: 0; }
.k b { display: block; font: 700 30px/1.02 var(--f-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k b small { font-size: .62em; font-weight: 700; margin-left: 4px; }
.k span { font-size: 13px; color: #3F5563; }
.k.ac { background: linear-gradient(155deg, var(--blue) 0%, var(--blue-m) 100%); color: #fff; }
.k.ac span { color: #fff; opacity: .95; font-weight: 500; }
.k.y { background: var(--y); }
.k.y span { color: var(--ink); }

/* ---------- поиск, фильтры ---------- */
.searchbox { position: relative; margin-bottom: 10px; }
.searchbox svg { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search { width: 100%; height: 48px; padding: 0 44px 0 44px; font-size: 16px; border: 0; border-radius: var(--r-s); background: var(--sky3);
  box-shadow: inset 0 0 0 1.5px var(--line); -webkit-appearance: none; appearance: none; outline: none; }
.search:focus { box-shadow: inset 0 0 0 2px var(--blue); background: #fff; }
.search::-webkit-search-cancel-button { display: none; }
.clearq { position: absolute; right: 2px; top: 2px; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 8px; padding: 2px 16px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 44px; padding: 0 16px; border-radius: 22px; border: 0; background: var(--sky3); box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }

/* ---------- списки ---------- */
.list { margin: 0 -4px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 12px 4px; min-height: 60px; color: inherit; text-decoration: none; border-radius: 0; }
.item:last-child { border-bottom: 0; }
.item:active { background: var(--sky3); }
.item .main { flex: 1; min-width: 0; }
.item .t { font-weight: 600; font-size: 16px; line-height: 1.3; }
.item .m { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.item .v { text-align: right; flex: none; }
.item .v b { display: block; font: 700 21px/1.05 var(--f-head); white-space: nowrap; }
.item .v span { font-size: 12px; color: var(--muted); }
.item .chev { width: 18px; height: 18px; color: #9FB3BF; flex: none; }
.empty { text-align: center; padding: 34px 12px; color: var(--muted); }
.empty b { display: block; font: 700 22px/1.1 var(--f-head); text-transform: uppercase; color: var(--ink); margin-bottom: 6px; }
.more { display: block; text-align: center; padding: 14px; color: var(--muted); font-size: 14px; }

/* дата-плитка мероприятий */
.dt { width: 54px; height: 58px; border-radius: 14px; background: var(--sky); display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: none; }
.dt b { font: 700 27px/.95 var(--f-head); }
.dt span { font-size: 11.5px; font-weight: 600; text-transform: uppercase; color: var(--blue-d); letter-spacing: .04em; }
.dt.past { background: var(--sky3); }
.dt.past b { color: var(--muted); }
.dt.none b { font-size: 20px; color: var(--muted); }

/* ---------- состав ---------- */
.seg { display: flex; background: var(--sky3); box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 14px; padding: 4px; margin: 10px 0 4px; }
.seg button { flex: 1; min-height: 40px; border: 0; background: none; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--muted); padding: 4px 6px; line-height: 1.15; }
.seg button small { display: block; font-weight: 500; font-size: 12px; }
.seg button.on { background: var(--ink); color: #fff; }
.ing { display: flex; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); min-height: 52px; }
.ing .n { flex: 1; min-width: 0; font-size: 15.5px; line-height: 1.3; }
.ing .n .m { font-size: 13px; color: var(--muted); margin-top: 1px; }
.ing .w { text-align: right; flex: none; }
.ing .w b { font: 700 20px/1 var(--f-head); white-space: nowrap; }
.ing .w span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
button.ing { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; padding: 11px 0; color: inherit; }
button.ing:active { background: var(--sky3); }
.ing .lnk { color: var(--blue-d); font-weight: 600; }
.ing-total { display: flex; justify-content: space-between; padding: 12px 0 2px; font-weight: 600; }
.ing-total b { font: 700 20px/1 var(--f-head); }

.nutri { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); border-radius: var(--r-s); overflow: hidden; background: var(--sky3);
  box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; }
.nutri > div { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--line); }
.nutri > div:nth-child(5n+1) { text-align: left; color: var(--muted); }
.nutri > div.h { font: 700 14px/1.2 var(--f-head); text-transform: uppercase; color: var(--blue-d); background: var(--sky2); }
.nutri > div.v { font: 700 19px/1.1 var(--f-head); }
.nutri > div.last { border-bottom: 0; }

.note { border-radius: var(--r-s); padding: 11px 14px; font-size: 14.5px; margin: 10px 0; line-height: 1.4; }
.note.warn { background: var(--tomato-bg); color: var(--tomato-d); }
.note.info { background: var(--sky3); color: #33505F; box-shadow: inset 0 0 0 1.5px var(--line); }
.note.y { background: #FFF3D6; color: #5A4300; }
.note b { font-weight: 700; }
.textcard { background: var(--sky3); border-radius: var(--r-s); padding: 13px 15px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border: 0;
  border-radius: 16px; background: var(--blue-d); color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; }
.btn:active { filter: brightness(.92); transform: scale(.985); }
.btn svg { width: 20px; height: 20px; }
.btn.ink { background: var(--ink); }
.btn.y { background: var(--y); color: var(--ink); }
.btn.ghost { background: var(--sky3); color: var(--blue-d); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { background: var(--tomato-bg); color: var(--tomato-d); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.btns .btn { flex: 1; }
.linkbtn { border: 0; background: none; color: var(--blue-d); font-weight: 600; padding: 0 4px; min-height: 44px; font-size: 15px; }

/* ---------- формы ---------- */
.field { display: block; margin-bottom: 10px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 4px 2px; font-weight: 500; }
.inp { width: 100%; height: 48px; padding: 0 13px; font-size: 16px; border: 0; border-radius: 13px; background: var(--sky3);
  box-shadow: inset 0 0 0 1.5px var(--line); -webkit-appearance: none; appearance: none; outline: none; min-width: 0; }
.inp:focus { box-shadow: inset 0 0 0 2px var(--blue); background: #fff; }
.inp::placeholder { color: #8FA2AE; }
input[type=date].inp { display: flex; align-items: center; }
input[type=date].inp::-webkit-date-and-time-value { text-align: left; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }

.dish { background: var(--sky3); border-radius: 18px; padding: 10px 12px 12px; margin-bottom: 10px; box-shadow: inset 0 0 0 1.5px var(--line); }
.dish .hd { display: flex; align-items: flex-start; gap: 6px; }
.dish .hd .nm { flex: 1; min-width: 0; font-weight: 600; padding-top: 11px; line-height: 1.3; }
.dish .inp { background: #fff; height: 46px; }
.dish .field > span { font-size: 12px; }
.dish .res { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); margin-top: 2px; }
.dish .res b { font: 700 19px/1 var(--f-head); color: var(--ink); }
.del { color: var(--tomato-d); margin: 0 -6px 0 0; }

/* нижняя панель действий (над таб-баром) */
.actions { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 15; padding: 10px 12px 10px;
  background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(20,40,60,.06); }
.actions .sum { display: flex; gap: 14px; align-items: baseline; justify-content: space-between; margin: 0 4px 8px; font-size: 13px; color: var(--muted); }
.actions .sum span { white-space: nowrap; }
.actions .sum b { font: 700 22px/1 var(--f-head); color: var(--ink); margin-right: 1px; }
.actions .sum .st { margin-left: auto; font-weight: 600; }
.actions .sum .st.dirty { color: var(--tomato-d); }
.actions .row { display: flex; gap: 8px; }
.actions .row .btn { flex: 1; min-height: 48px; }

/* ---------- закупка ---------- */
.progress { height: 8px; border-radius: 4px; background: var(--sky2); overflow: hidden; margin: 6px 0 2px; }
.progress i { display: block; height: 100%; background: var(--y); border-radius: 4px; transition: width .25s; }
.sup { display: flex; align-items: center; gap: 8px; margin: 22px 0 4px; }
.sup h3 { margin: 0; flex: 1; min-width: 0; }
.sup .s { font: 700 18px/1 var(--f-head); white-space: nowrap; }
.buy { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 11px 0; min-height: 58px; text-align: left; color: inherit; }
.buy:active { background: var(--sky3); }
.buy .ck { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 2px #B4C7D1; flex: none; display: flex; align-items: center; justify-content: center; }
.buy .ck svg { width: 18px; height: 18px; color: #fff; opacity: 0; }
.buy .n { flex: 1; min-width: 0; }
.buy .n .t { font-size: 15.5px; line-height: 1.3; }
.buy .n .m { font-size: 13px; color: var(--muted); }
.buy .q { text-align: right; flex: none; }
.buy .q b { font: 700 20px/1 var(--f-head); white-space: nowrap; display: block; }
.buy .q span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.buy.done .ck { background: var(--blue); box-shadow: none; }
.buy.done .ck svg { opacity: 1; }
.buy.done .t, .buy.done .q b { text-decoration: line-through; color: var(--muted); }
.hide-done .buy.done { display: none; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; width: 100%; border: 0; background: none; padding: 0;
  font-size: 15px; color: inherit; text-align: left; }
.switch i { width: 50px; height: 30px; border-radius: 15px; background: #C9D6DC; position: relative; flex: none; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch[aria-checked=true] i { background: var(--blue); }
.switch[aria-checked=true] i::after { transform: translateX(20px); }

details.lay { border-radius: 16px; background: var(--sky3); box-shadow: inset 0 0 0 1.5px var(--line); margin-bottom: 8px; overflow: hidden; }
details.lay summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 52px; cursor: pointer; }
details.lay summary::-webkit-details-marker { display: none; }
details.lay summary .t { flex: 1; font-weight: 600; line-height: 1.25; }
details.lay summary .t span { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
details.lay summary svg { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; flex: none; }
details.lay[open] summary svg { transform: rotate(90deg); }
.lt { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.lt th, .lt td { padding: 8px 10px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.lt th { font: 700 13px/1.2 var(--f-head); text-transform: uppercase; color: var(--blue-d); background: var(--sky2); }
.lt .r { text-align: right; white-space: nowrap; }
.lt .d1 td:first-child { padding-left: 24px; color: #3F5563; }
.lt .d2 td:first-child { padding-left: 38px; color: var(--muted); }
.lt .pf td { font-weight: 600; }

/* ---------- поставщик ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.ct { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 84px; padding: 12px 13px; border-radius: 16px; background: var(--sky);
  color: var(--ink); text-decoration: none; min-width: 0; }
.ct:active { filter: brightness(.95); }
.ct svg { width: 24px; height: 24px; }
.ct b { font: 700 19px/1 var(--f-head); text-transform: uppercase; }
.ct span { font-size: 12.5px; color: #3F5563; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; margin-top: 2px; }
.ct.call { background: linear-gradient(155deg, var(--blue) 0%, var(--blue-m) 100%); color: #fff; }
.ct.call span { color: #fff; }
.ct.wa { background: #DDF3E4; } .ct.wa svg { color: #1F9D55; }
.ct.tg { background: #DCEEF8; } .ct.tg svg { color: #2481CC; }
.ct.ml { background: #FFF1D1; } .ct.ml svg { color: #A06A00; }
.ct:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 70px; }
.ct.web { background: var(--sky3); box-shadow: inset 0 0 0 1.5px var(--line); }
.kv { margin: 0; }
.kv .r { display: flex; gap: 12px; justify-content: space-between; align-items: center; width: 100%; border: 0; background: none; text-align: left; color: inherit;
  padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 48px; }
.kv .r:last-child { border-bottom: 0; }
.kv .r .k2 { font-size: 13.5px; color: var(--muted); flex: none; width: 38%; }
.kv .r .v2 { flex: 1; text-align: right; font-size: 15px; word-break: break-word; }
.kv button.r:active { background: var(--sky3); }
.kv button.r .v2::after { content: ''; display: inline-block; width: 14px; height: 14px; margin-left: 6px; vertical-align: -2px; opacity: .45;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E"); }

/* ---------- таб-бар ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b); }
.tabbar button { flex: 1; height: var(--tab-h); border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 2px; position: relative; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button::before { content: ''; position: absolute; top: 0; left: 50%; width: 28px; height: 4px; margin-left: -14px; border-radius: 0 0 3px 3px; background: transparent; }
.tabbar button.on { color: var(--ink); }
.tabbar button.on::before { background: var(--y); }

/* ---------- нижние листы ---------- */
.ov { position: fixed; inset: 0; z-index: 50; background: rgba(20,30,40,.38); display: flex; align-items: flex-end; justify-content: center;
  animation: fade .18s ease; }
.bs { background: #fff; width: 100%; max-width: 620px; max-height: 88vh; max-height: 88dvh; overflow: auto; -webkit-overflow-scrolling: touch;
  border-radius: 24px 24px 0 0; padding: 8px 16px calc(20px + var(--safe-b)); animation: up .22s cubic-bezier(.2,.8,.2,1); overscroll-behavior: contain; }
.bs .grip { width: 40px; height: 5px; border-radius: 3px; background: #D3DEE3; margin: 2px auto 8px; }
.bs .bh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bs .bh h2 { margin: 0; flex: 1; font-size: 26px; }
.bs.tall { height: 88vh; height: 88dvh; }
@keyframes up { from { transform: translateY(40%); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.me { display: flex; gap: 14px; align-items: center; padding: 6px 0 12px; }
.me .avatar { width: 54px; height: 54px; font-size: 26px; }
.me b { display: block; font-size: 18px; }

/* ---------- тосты ---------- */
.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 60; display: flex; flex-direction: column;
  align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 16px; font-size: 15px; max-width: min(520px, 100%); width: fit-content; line-height: 1.35;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); pointer-events: auto; animation: up .2s ease; }
.toast.err { background: var(--tomato-d); }
.toast button { border: 0; background: none; color: var(--y); font-weight: 700; padding: 0 4px; min-height: 36px; min-width: 44px; }
body.with-actions .toasts { bottom: calc(var(--tab-h) + var(--safe-b) + 128px); }

/* ---------- вход ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 40px) 24px calc(var(--safe-b) + 24px); }
.login .brand { display: flex; align-items: center; gap: 30px; margin: auto 0 34px 18px; }
.login .brand h1 { font-size: 56px; line-height: .9; margin: 0; text-transform: uppercase; }
.login .card { background: #fff; border-radius: var(--r); padding: 22px 18px 18px; }
.login .card h2 { margin: 0 0 4px; }
.login .card p { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.code { text-transform: uppercase; letter-spacing: .14em; font-weight: 600; font-size: 20px !important; height: 56px !important; text-align: center; }
.login .err { color: var(--tomato-d); font-size: 14.5px; min-height: 22px; margin: 8px 2px; }
.login .foot { margin-top: auto; padding-top: 24px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- подсказка «На экран Домой» ---------- */
.a2hs { display: flex; gap: 12px; align-items: flex-start; background: var(--y); border-radius: 18px; padding: 12px 8px 12px 14px; margin-bottom: 14px; }
.a2hs .t { flex: 1; font-size: 14.5px; line-height: 1.4; }
.a2hs .t b { display: block; font: 700 19px/1.1 var(--f-head); text-transform: uppercase; margin-bottom: 2px; }
.a2hs svg.sh { width: 18px; height: 18px; vertical-align: -3px; }

/* ---------- скелет ---------- */
.skel { height: 60px; border-radius: 12px; background: linear-gradient(90deg, var(--sky3) 0%, #E9F1F4 50%, var(--sky3) 100%); background-size: 200% 100%;
  animation: sk 1.2s infinite linear; margin-bottom: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; animation: rot .8s linear infinite; }
.spinner.dark { border-color: var(--sky2); border-top-color: var(--blue-d); }
@keyframes rot { to { transform: rotate(360deg); } }
.center { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 30px 0; color: var(--muted); }

@media (min-width: 700px) {
  .ct:last-child:nth-child(odd) { grid-column: auto; }
  .sheet { max-width: 760px; margin: 0 auto; }
  .top { max-width: 780px; margin: 0 auto; }
  .contacts { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 359px) {
  .hero h1 { font-size: 32px; } .hero h1.long { font-size: 26px; } .hero h1.xlong { font-size: 22px; }
  .k b { font-size: 26px; }
  .hero { gap: 18px; } .hero .logo { height: 64px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* увеличенная зона нажатия для небольших кнопок-индикаторов */
button.pill { position: relative; cursor: pointer; }
button.pill::after { content: ''; position: absolute; left: -4px; right: -4px; top: -8px; bottom: -8px; }

/* ================= v1.1: редактирование ================= */
.btn.red { background: var(--tomato-d); color: #fff; }
.btns.col { flex-direction: column; }
.btns.top2 { margin: 0 0 12px; }
.btns.editrow { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.addbtn { margin-bottom: 12px; }
.field .req { color: var(--tomato-d); font-style: normal; }
.field .hint { display: block; font-size: 12.5px; color: var(--muted); margin: 4px 2px 0; line-height: 1.35; }
.inp.ta { height: auto; min-height: 76px; padding: 12px 13px; line-height: 1.45; resize: vertical; display: block; }
select.inp { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232771A2' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; text-overflow: ellipsis; }
.inp.bad, .inp.bad:focus { box-shadow: inset 0 0 0 2px var(--tomato); background: #FFF6F4; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.g4 .inp { padding: 0 10px; }
.note.ok { background: #E3F4EA; color: #1E6B3F; display: flex; align-items: center; gap: 8px; }
.note.ok svg { width: 18px; height: 18px; flex: none; }
.ferr ul { margin: 6px 0 0; padding-left: 20px; }
.ferr li { margin: 2px 0; }
.pricebox { line-height: 1.5; }
.pricebox > b:first-child { display: block; font: 700 15px/1.2 var(--f-head); text-transform: uppercase; letter-spacing: .03em; color: var(--blue-d); margin-bottom: 2px; }
.fgroup { background: var(--sky3); border-radius: 18px; padding: 12px 12px 4px; box-shadow: inset 0 0 0 1.5px var(--line); }
.fgroup .inp { background: #fff; }

/* строки состава в редакторе рецепта */
.ln { background: var(--sky3); border-radius: 18px; padding: 8px 10px 6px 12px; margin-bottom: 10px; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .4s; }

.ln .hd { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.ln .no { width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--blue-d); font: 700 14px/24px var(--f-head); text-align: center; flex: none; }
.ln .pick { flex: 1; min-width: 0; min-height: 48px; border: 0; background: #fff; border-radius: 13px; box-shadow: inset 0 0 0 1.5px var(--line);
  text-align: left; padding: 6px 12px; display: flex; flex-direction: column; justify-content: center; color: inherit; }
.ln .pick:active { background: var(--sky2); }
.ln .pick .nm { font-weight: 600; font-size: 15px; line-height: 1.25; }
.ln .pick .nm .ph { color: var(--blue-d); }
.ln .pick .m { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.ln .inp { background: #fff; height: 46px; }
.ln .field { margin-bottom: 6px; }
.ln .field > span { font-size: 12px; }
.ln .note-in { height: 42px; font-size: 16px; }
.ln .res { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 40px; font-size: 13.5px; color: var(--muted); }
.ln .res b { font: 700 17px/1 var(--f-head); color: var(--ink); }
.ln .res .bad { color: var(--tomato-d); font-weight: 600; }
.ln .ord { display: flex; flex: none; }
.iconbtn.sm { width: 40px; height: 40px; color: var(--blue-d); }
.iconbtn.sm svg { width: 22px; height: 22px; }
.iconbtn[disabled] { opacity: .3; pointer-events: none; }
.pmw { position: relative; display: block; }
.pmw .inp { padding-right: 40px; }
.pm { position: absolute; right: 3px; top: 3px; width: 38px; height: 40px; border: 0; border-radius: 10px; background: var(--sky2); color: var(--blue-d);
  font: 700 19px/1 var(--f-body); padding: 0; }
.pm:active { background: var(--sky); }
.item.dis { opacity: .5; }
.item.dis .m { color: var(--tomato-d); }

/* подтверждение */
.cf h2 { margin: 4px 0 8px; font-size: 26px; }
.cf .cft p { margin: 0 0 8px; font-size: 15.5px; }
.cf .btns { margin-top: 16px; }

/* загрузка прайса */
.filepick { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; margin: 12px 0; border-radius: 18px; border: 2px dashed #A9C6D4;
  background: var(--sky3); cursor: pointer; min-height: 84px; }
.filepick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.filepick .fi { width: 48px; height: 48px; border-radius: 14px; background: var(--y); display: flex; align-items: center; justify-content: center; flex: none; }
.filepick .fi svg { width: 26px; height: 26px; }
.filepick .ft { min-width: 0; }
.filepick .ft b { display: block; font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--blue-d); }
.filepick .ft span { font-size: 13px; color: var(--muted); }
.filepick.has { border-style: solid; border-color: var(--blue); background: #fff; }
.filepick.has b { color: var(--ink); }
.filepick.off { opacity: .55; }
.upprog { margin: 10px 0; font-size: 14.5px; color: var(--muted); }
.progress.ind { position: relative; }
.progress.ind i { width: 35% !important; position: absolute; left: 0; animation: ind 1.1s infinite ease-in-out; }
@keyframes ind { from { left: -35%; } to { left: 100%; } }
.result { border-radius: 16px; padding: 12px 14px; margin: 10px 0; font-size: 14.5px; }
.result .rh { display: flex; align-items: center; gap: 8px; font: 700 19px/1.1 var(--f-head); text-transform: uppercase; }
.result .rh svg { width: 22px; height: 22px; }
.result ul { margin: 8px 0 2px; padding-left: 20px; line-height: 1.45; }
.result.ok { background: #E3F4EA; color: #18522F; }
.result.err { background: var(--tomato-bg); color: var(--tomato-d); }
@media (max-width: 359px) { .g4 { grid-template-columns: 1fr 1fr; } }
.ing .chev { width: 18px; height: 18px; color: #9FB3BF; flex: none; }
.ln.flash { animation: flash 1.6s ease forwards; }
@keyframes flash { 0%, 50% { box-shadow: inset 0 0 0 2px var(--y); } 100% { box-shadow: inset 0 0 0 1.5px var(--line); } }
