/* Карта материалов — светлые панели (читаются на солнце), сигнальный жёлтый акцент */
:root {
  --bg: #f4f5f7; --card: #fff; --ink: #14171c; --mut: #687180; --line: #e2e5ea;
  --acc: #ffc400; --acc-ink: #14171c; --blue: #2f80ff;
  --ok: #16a34a; --empty: #8d96a3; --found: #8b5cf6; --stale: #f59e0b; --bad: #dc2626;
  --r: 14px; --sh: 0 6px 24px rgba(15, 20, 30, .16), 0 1px 3px rgba(15, 20, 30, .1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --panel-w: 400px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b1e24; color: var(--ink); font: 15px/1.4 var(--font); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
small { font-size: 12.5px; }
.mut { color: var(--mut); }
.tiny { font-size: 12.5px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

#map { position: fixed; inset: 0; background: #2a2e35; }
.leaflet-container { font: inherit; background: #2a2e35; }
.leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.65) !important; }

/* ---------- верхняя полоса ---------- */
#top { position: fixed; z-index: 1000; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 8px; align-items: center; pointer-events: none; }
#top > * { pointer-events: auto; }
.tb-btn { width: 46px; height: 46px; border-radius: 12px; border: 0; background: var(--card); box-shadow: var(--sh); display: grid; place-items: center; flex: none; }
.tb-btn svg { width: 22px; height: 22px; }
.tb-btn.pending { background: var(--stale); color: #fff; font-weight: 700; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 12px; box-shadow: var(--sh); height: 46px; padding: 0 12px; max-width: 520px; }
.search svg { width: 20px; height: 20px; color: var(--mut); flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: none; min-width: 0; font-size: 16px; }
.search.in { box-shadow: none; border: 1.5px solid var(--line); height: 44px; max-width: none; margin: 4px 0 10px; }

/* ---------- кнопки на карте ---------- */
#mapctl { position: fixed; z-index: 900; right: 10px; top: calc(66px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 8px; }
.mc { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--card); box-shadow: var(--sh); display: grid; place-items: center; }
.mc svg { width: 22px; height: 22px; }
.pop { position: fixed; z-index: 1001; right: 62px; top: calc(66px + env(safe-area-inset-top)); background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 10px 14px; min-width: 230px; }
.pop .opt { display: flex; gap: 10px; align-items: center; padding: 7px 0; }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.pop input[type=range] { width: 100%; }

#fab { position: fixed; z-index: 950; right: 14px; bottom: calc(190px + 14px + env(safe-area-inset-bottom)); height: 54px; padding: 0 20px 0 16px; border: 0; border-radius: 27px; background: var(--acc); color: var(--acc-ink); font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.3); transition: bottom .25s; }
#fab svg { width: 24px; height: 24px; stroke-width: 2.2; }
body[data-sheet=half] #fab { bottom: calc(52vh + 14px); }
body[data-sheet=full] #fab, body[data-view=add] #fab { display: none; }

/* ---------- панель: на телефоне — шторка снизу ---------- */
#panel { position: fixed; z-index: 980; left: 0; right: 0; bottom: 0; height: 92vh; height: 92dvh; background: var(--bg); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 30px rgba(0,0,0,.28); display: flex; flex-direction: column; transition: transform .28s cubic-bezier(.2,.8,.2,1); transform: translateY(calc(100% - 190px)); }
body[data-sheet=half] #panel { transform: translateY(48%); }
body[data-sheet=full] #panel { transform: translateY(0); }
body[data-view=add][data-sheet=peek] #panel { transform: translateY(calc(100% - 370px)); }
#panel.drag { transition: none; }
.grip { height: 26px; flex: none; display: grid; place-items: center; touch-action: none; cursor: grab; }
.grip i { width: 44px; height: 5px; border-radius: 3px; background: #c4c9d1; }
#pbody { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
body[data-sheet=peek] #pbody { overflow: hidden; }
/* шторка не на весь экран: вертикальный жест двигает её саму (см. Sheet.init), вбок — прокрутка чипов и снимков */
@media (max-width: 759px) {
  body[data-sheet=peek] #panel, body[data-sheet=half] #panel,
  body[data-sheet=peek] #pbody, body[data-sheet=half] #pbody { touch-action: pan-x; }
}
@media (max-width: 759px) and (pointer: coarse) { body[data-sheet=half] #pbody { overflow: hidden; } }

#movebar { position: fixed; z-index: 1100; left: 10px; right: 10px; bottom: calc(14px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; border-radius: var(--r); padding: 10px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; box-shadow: var(--sh); }
#movebar span { flex: 1 1 200px; font-size: 14px; }
#movebar input[type=range] { width: 120px; }
body:has(#movebar:not([hidden])) #fab, body:has(#movebar:not([hidden])) #panel { display: none; }

@media (min-width: 760px) {
  #panel { left: 12px; top: 68px; bottom: 12px; right: auto; width: var(--panel-w); height: auto; border-radius: var(--r); transform: none !important; box-shadow: var(--sh); }
  .grip { display: none; }
  #pbody { padding-top: 6px; overflow-y: auto !important; }
  #top { left: 12px; right: 12px; }
  #top .search { max-width: calc(var(--panel-w) - 54px); }
  #fab, body[data-sheet] #fab { bottom: 28px; right: 24px; }
  body[data-sheet=full] #fab { display: flex; }
  body[data-view=add] #fab { display: none; }
  #movebar { left: calc(var(--panel-w) + 24px); right: 24px; bottom: 24px; }
  body:has(#movebar:not([hidden])) #panel { display: flex; }
}

/* ---------- элементы панели ---------- */
.ph { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; position: sticky; top: 0; background: var(--bg); z-index: 2; }
.ph .ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph .ttl b { font-size: 18px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.ph .ttl small { color: var(--mut); }
.back { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--card); font-size: 28px; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.1); flex: none; padding-bottom: 4px; }
.ib { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--card); display: grid; place-items: center; font-size: 24px; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ib svg { width: 20px; height: 20px; }
h4 { margin: 18px 0 8px; font-size: 15px; }
h5 { margin: 12px 4px 4px; font-size: 12px; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.lead { margin: 4px 0 12px; }
.note-box { background: #fff7d6; border: 1px solid #f2dc84; border-radius: 12px; padding: 10px 12px; margin: 4px 0 12px; font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.stat { border: 0; background: var(--card); border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.06); border-bottom: 3px solid transparent; }
.stat b { font-size: 20px; line-height: 1.1; }
.stat span { font-size: 11px; color: var(--mut); text-align: center; line-height: 1.15; }
.stat.ok { border-color: var(--ok); } .stat.found { border-color: var(--found); } .stat.stale { border-color: var(--stale); } .stat.empty { border-color: var(--empty); }
.stat.on { outline: 2px solid var(--ink); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; flex-wrap: nowrap; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 18px; padding: 6px 12px; font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.list { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: var(--card); border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.06); position: relative; }
.row .gl { width: 40px; height: 40px; border-radius: 10px; background: #eef0f3; display: grid; place-items: center; flex: none; }
.row .gl svg { width: 24px; height: 24px; }
.row .rt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .rt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row .rt small { color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .rq { text-align: right; display: flex; flex-direction: column; flex: none; }
.row .rq b { white-space: nowrap; }
.row .rq small { color: var(--mut); white-space: nowrap; }
.row .th { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex: none; background: #e5e8ec; }
.row .th.none { display: grid; place-items: center; color: var(--mut); }
.row .th.none svg { width: 26px; height: 26px; }
.row.chosen { border: 2px solid var(--acc); margin-bottom: 12px; }
.row .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; }
.dot.found { background: var(--found); }
.row.u { flex-wrap: wrap; }
.row.u.off { opacity: .55; }
.row.u select { border: 1.5px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.empty-list { text-align: center; color: var(--mut); padding: 24px 10px; }
.tog { display: flex; gap: 10px; align-items: flex-start; margin: 14px 2px; font-size: 14px; }
.tog input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--ink); }

.badge { display: inline-block; align-self: flex-start; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; color: #fff; background: var(--ok); margin-top: 3px; }
.badge.empty { background: var(--empty); } .badge.found { background: var(--found); } .badge.stale { background: var(--stale); }

.totalbox { background: var(--card); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; }
.big { font-size: 22px; }
.big b { font-size: 34px; letter-spacing: -.02em; }
.big.empty { color: var(--empty); font-weight: 700; font-size: 26px; }
.qtyline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }

.strip { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 8px; padding: 0 16px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip img { height: 132px; border-radius: 12px; object-fit: cover; flex: none; cursor: zoom-in; background: #dfe3e8; min-width: 100px; }
.strip.mini img { height: 64px; min-width: 64px; }
.strip.none { height: 70px; border-radius: 12px; background: #e9ecf0; color: var(--mut); align-items: center; justify-content: center; margin: 0 0 8px; font-size: 14px; }

.nav { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r); padding: 10px 12px; margin: 10px 0; min-height: 56px; flex-wrap: wrap; }
.nav .arrow { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; transition: transform .3s; flex: none; }
.nav .arrow svg { width: 24px; height: 24px; fill: #fff; stroke: none; }
.nav-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; }
.nav-t b { font-size: 22px; line-height: 1.1; }
.nav-b { flex-basis: 100%; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.nav .here + .nav-b { flex-basis: auto; }
.nav .here { font-weight: 700; color: var(--ok); flex: 1; }
.link { color: var(--blue); background: none; border: 0; padding: 0; text-decoration: underline; font-size: 14px; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 12px; font-size: 14px; }
.facts dt { color: var(--mut); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.act { border: 0; background: var(--card); border-radius: 12px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.act svg { width: 24px; height: 24px; }
.act.good { color: var(--ok); } .act.bad { color: var(--bad); }
.act:disabled { opacity: .35; }
.acts.small .act { padding: 9px 4px; font-weight: 500; }
.act.arm, .btn.arm { background: var(--bad) !important; color: #fff !important; }

.tabs { display: flex; gap: 4px; background: #e6e9ee; border-radius: 12px; padding: 4px; margin: 14px 0 10px; }
.tabs button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 8px 4px; font-weight: 600; color: var(--mut); }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.tabbody { min-height: 120px; }
.ref { width: 100%; border-radius: 12px; cursor: zoom-in; }

/* схемы */
.sch { background: var(--card); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.sch > b { font-size: 12px; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
svg.scheme { width: 100%; height: 190px; display: block; stroke: none; }
svg.scheme.long { height: 70px; }
svg.scheme .sec { fill: #cfd6df; stroke: #1d2430; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
svg.scheme .sec.wood { fill: #e8cfa3; }
svg.scheme .core { fill: #f1d777; stroke: #1d2430; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
svg.scheme .face { stroke: #1d2430; stroke-width: 3; vector-effect: non-scaling-stroke; }
svg.scheme .bars { stroke: #4b5563; stroke-linecap: round; fill: none; }
svg.scheme .thread { stroke: #1d2430; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
svg.scheme .dim path, svg.scheme .ext { stroke: #2f80ff; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
svg.scheme .ext { stroke-dasharray: 3 3; }
svg.scheme text { fill: #1d4ed8; font-family: var(--font); font-weight: 600; stroke: none; }
svg.scheme text.note { fill: #4b5563; }
.v3d { height: 280px; border-radius: 12px; background: radial-gradient(ellipse at 50% 30%, #ffffff, #dfe4ea); position: relative; overflow: hidden; touch-action: none; }
.v3d.small { height: 220px; margin-top: 8px; }
.v3d canvas { width: 100% !important; height: 100% !important; display: block; }
.v3d .loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mut); }
.seg { display: flex; gap: 4px; background: #e6e9ee; border-radius: 12px; padding: 4px; margin: 8px 0 4px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 8px 6px; font-weight: 600; color: var(--mut); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg.small button { font-size: 13px; padding: 6px 4px; }

.hist { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.ev { position: relative; padding: 0 0 14px 10px; }
.ev::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); }
.ev.take::before { background: var(--blue); } .ev.empty::before, .ev.delete::before { background: var(--bad); } .ev.found::before { background: var(--found); } .ev.move::before, .ev.edit::before { background: var(--empty); }
.ev small { color: var(--mut); }
.ev p { margin: 4px 0; font-size: 14px; }
.neg { color: var(--bad); font-weight: 600; } .pos { color: var(--ok); font-weight: 600; }

/* мастер */
.steps { display: flex; gap: 4px; margin: -4px 0 12px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--acc); }
.fix { background: var(--card); border-radius: var(--r); padding: 12px 14px; border-left: 6px solid var(--empty); margin-bottom: 10px; }
.fix b { font-size: 28px; display: block; line-height: 1.1; }
.fix small { color: var(--mut); }
.fix.ex { border-color: var(--ok); } .fix.good { border-color: #65a30d; } .fix.mid { border-color: var(--stale); } .fix.bad { border-color: var(--bad); } .fix.map { border-color: var(--blue); }
.fix.map b, .fix.wait b, .fix.bad b { font-size: 18px; }
.meter { height: 6px; background: #e6e9ee; border-radius: 3px; margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: currentColor; border-radius: 3px; transition: width .4s; }
.fix.ex .meter i { background: var(--ok); } .fix.good .meter i { background: #65a30d; } .fix.mid .meter i { background: var(--stale); } .fix.bad .meter i { background: var(--bad); }

.fld { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; font-size: 14px; font-weight: 600; }
.fld input, .fld select, .fld textarea, .two input { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; font-weight: 400; font-size: 16px; width: 100%; outline: 0; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--ink); }
.fld small { font-weight: 400; }
.fld input:disabled, .fld select:disabled, .fld textarea:disabled { background: #f1f3f5; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qty { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; height: 56px; }
.qty button { width: 56px; border: 0; background: #eef0f3; font-size: 26px; font-weight: 500; flex: none; }
.qty input { flex: 1; min-width: 0; border: 0 !important; text-align: center; font-size: 24px !important; font-weight: 700 !important; outline: 0; }
.qty span { align-self: center; padding: 0 10px; color: var(--mut); font-weight: 600; }

.shots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.shot { position: relative; width: 84px; height: 84px; }
.shot img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.shot button { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: var(--ink); color: #fff; font-size: 16px; line-height: 1; padding: 0; }
.shotbtn { width: 84px; height: 84px; border-radius: 10px; border: 2px dashed #b9c0ca; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12.5px; font-weight: 600; color: var(--mut); cursor: pointer; background: #fff; }
.shotbtn.cam { border-color: var(--ink); color: var(--ink); background: #fff8d6; }
.shotbtn svg { width: 26px; height: 26px; }
.busy { opacity: .5; pointer-events: none; }

.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 600; background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.1), inset 0 0 0 1.5px var(--line); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.primary { background: var(--acc); color: var(--acc-ink); box-shadow: none; }
.btn.primary:disabled { opacity: .45; }
.btn.danger { background: var(--bad); color: #fff; box-shadow: none; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost.danger { color: var(--bad); background: transparent; }
.btn.big { width: 100%; height: 54px; font-size: 17px; margin-top: 8px; }
.btn.tiny { padding: 7px 11px; font-size: 13.5px; border-radius: 10px; }
#pbody > .btn.ghost { width: 100%; margin-top: 12px; }
.err { color: var(--bad); font-size: 14px; min-height: 1em; margin: 6px 0; }
.hint { color: var(--ok); font-size: 14px; }

/* ---------- окна ---------- */
#modal { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 12, 16, .5); display: flex; align-items: flex-end; justify-content: center; }
.mbox { background: var(--bg); width: 100%; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
.mbox h3 { margin: 0 0 8px; font-size: 19px; }
.mh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; position: sticky; top: -16px; background: var(--bg); padding: 4px 0; z-index: 3; }
.mh h3 { flex: 1; margin: 0; }
.mrow { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.mrow.left { justify-content: flex-start; margin-top: 6px; }
.mrow .btn { flex: 1 1 auto; }
.mrow.left .btn { flex: none; }
.who { padding: 4px 4px 12px; display: flex; flex-direction: column; }
.who small { color: var(--mut); }
.menu { display: flex; flex-direction: column; gap: 6px; }
.menu > * { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; background: var(--card); border-radius: 12px; text-align: left; font-weight: 600; color: var(--ink); text-decoration: none; font-size: 15px; }
.menu svg { width: 22px; height: 22px; flex: none; }
.menu .bad { color: var(--bad); }
.invite { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: var(--r); padding: 12px 14px; flex-wrap: wrap; }
.invite > div { flex: 1; display: flex; flex-direction: column; }
.invite b { font-size: 26px; letter-spacing: .08em; font-family: ui-monospace, Consolas, monospace; }
.form2 { display: grid; gap: 14px; }
.preview { background: var(--card); border-radius: var(--r); padding: 8px; align-self: start; }
.preview .sch { padding: 4px; }
.params { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0 10px; }
.params .fld { margin: 6px 0; font-weight: 500; font-size: 13px; }
@media (min-width: 760px) {
  #modal { align-items: center; }
  .mbox { width: 460px; border-radius: 18px; max-height: 88vh; }
  .mbox.wide { width: 860px; }
  .mbox.side { width: 380px; }
  .form2 { grid-template-columns: 1fr 340px; }
  .preview { position: sticky; top: 50px; }
}

#lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.92); display: grid; place-items: center; }
#lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
#lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; }
.lb-x { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb-p { left: 10px; top: 50%; } .lb-n { right: 10px; top: 50%; }
.lb-c { position: absolute; bottom: 20px; color: #fff; font-size: 14px; }

#toasts { position: fixed; z-index: 4000; top: calc(66px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--sh); font-size: 14.5px; transition: opacity .4s, transform .4s; text-align: center; }
.toast.good { background: #14532d; } .toast.bad { background: #7f1d1d; }
.toast.out { opacity: 0; transform: translateY(-8px); }

/* ---------- вход ---------- */
#auth { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at 30% 0%, rgba(255,196,0,.25), transparent 60%), rgba(18, 20, 25, .82); backdrop-filter: blur(4px); overflow-y: auto; }
.auth-card { background: var(--bg); width: min(100%, 400px); border-radius: 20px; padding: 22px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.brand > div { display: flex; flex-direction: column; }
.brand b { font-size: 20px; }
.brand small { color: var(--mut); }
.logo { width: 52px; height: 52px; border-radius: 14px; background: var(--acc) url(icons/icon-192.png) center/cover; flex: none; }
#aform label { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; font-weight: 600; font-size: 14px; }
#aform input { border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 16px; font-weight: 400; background: #fff; outline: 0; }
#aform input:focus { border-color: var(--ink); }

/* ---------- метки на карте ---------- */
.pinwrap { background: none; border: 0; }
.pin { position: relative; width: 36px; height: 46px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.45)); --c: var(--ok); }
.pin::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 14px; height: 14px; background: var(--c); transform: translateX(-50%) rotate(45deg); border-right: 2.5px solid #fff; border-bottom: 2.5px solid #fff; border-radius: 0 0 3px 0; margin-bottom: 2px; }
.pin-h { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--c); border: 2.5px solid #fff; display: grid; place-items: center; z-index: 1; color: #fff; }
.pin-h svg { width: 20px; height: 20px; stroke-width: 2.4; }
.pin-q { position: absolute; z-index: 2; left: 24px; top: -8px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.pin-l { display: none; position: absolute; z-index: 2; left: 40px; top: 12px; background: rgba(20, 23, 28, .82); color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 6px; white-space: nowrap; font-weight: 600; }
#map.z-hi .pin-l { display: block; }
.pin.empty { --c: var(--empty); opacity: .8; }
.pin.found { --c: var(--found); }
.pin.stale { --c: var(--stale); }
.pin.new { --c: var(--ink); }
.pin.new .pin-h { color: var(--acc); }
.pin.pend .pin-h { border-style: dashed; }
.pin.sel { transform: scale(1.25); transform-origin: 50% 100%; z-index: 10; }
.pin.sel .pin-h { box-shadow: 0 0 0 4px var(--acc); }
.clwrap { background: none; border: 0; }
.cl { width: 42px; height: 42px; border-radius: 50%; background: rgba(22, 163, 74, .92); border: 3px solid #fff; color: #fff; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0,0,0,.4); font-size: 15px; }
.cl.has-found { background: rgba(139, 92, 246, .95); }
.me { background: none; border: 0; }
.me-dot { position: absolute; inset: 3px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(47,128,255,.4), 0 2px 6px rgba(0,0,0,.4); }
.hdl { background: none; border: 0; }
.hdl b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--acc); border: 3px solid #fff; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.5); cursor: grab; }
.hdl.move b { width: 34px; height: 34px; background: var(--ink); color: #fff; font-size: 18px; }
.plan-img { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; max-width: none !important; image-rendering: auto; }

/* ---------- своя карта территории ---------- */
#map, .leaflet-container { background: #eef0e6; }
.map-lbl { background: none; border: 0; white-space: nowrap; transform: translate(-50%, -50%); pointer-events: none; font-weight: 700; color: #2c3440;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff; }
.map-lbl.village { font-size: 15px; letter-spacing: .02em; color: #4a4036; }
#map.z-hi .map-lbl.village { opacity: .5; }
#movebar .pad { display: flex; gap: 4px; }
#movebar .pad button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #fff; color: var(--ink); font-size: 20px; font-weight: 700; }
#movebar .seg { margin: 0; background: rgba(255,255,255,.15); }
#movebar .seg button { color: #cfd5de; }
#movebar .seg button.on { color: var(--ink); }

body.sat-on .map-lbl.village, body.ortho-on .map-lbl.village { color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }

/* ---------- СВХ ---------- */
.svhwrap { background: none; border: 0; }
.svh { transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; background: rgba(20, 23, 28, .88); color: #ffd400; border: 1.5px solid #ffd400; border-radius: 9px; padding: 3px 8px 3px 6px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.4); cursor: pointer; }
.svh svg { width: 16px; height: 16px; stroke-width: 2; }
.svh b { font-size: 13px; font-weight: 800; }
.svh i { font-style: normal; background: #ffd400; color: #14171c; border-radius: 8px; padding: 0 6px; font-size: 12px; font-weight: 800; line-height: 18px; }
.svh.empty { color: #d6dbe1; border-color: #9aa3ad; }
.svh.sel { box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(0,0,0,.4); }
.zdv { background: none; border: 0; }
.zdv { display: grid; place-items: center; cursor: grab; }          /* большая зона касания, маленькая точка */
.zdv i { display: block; width: 20px; height: 20px; border-radius: 50%; background: #ffd400; border: 3px solid #14171c; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.zdv.sel i { width: 26px; height: 26px; border: 4px solid #fff; box-shadow: 0 0 0 3px #14171c, 0 2px 8px rgba(0,0,0,.6); }
#map.zd-drag .zdm:not(.cur) { visibility: hidden; }
/* подложка схемы склада: снимок под зонами */
.se-map { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.se-main.mapon .se-cv { background: transparent; position: relative; }
.se-main.mapon .se-cv .ol { fill: rgba(255, 212, 0, .10); stroke: #ffd400; }
.se-main.mapon .se-cv .grid { opacity: .35; }
.se-main.mapon .se-cv text { paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: .18em; }
.se-north { position: absolute; left: 12px; top: 12px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); display: grid; place-items: center; font: 700 11px/1 var(--font); color: #14171c; padding-top: 7px; box-sizing: border-box; pointer-events: none; }
.se-north i { position: absolute; top: 3px; left: 50%; margin-left: -4px; border: 4px solid transparent; border-bottom: 7px solid #dc2626; border-top: 0; }
.zdm { background: none; border: 0; display: grid; place-items: center; cursor: copy; }
.zdm i { display: block; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.85); border: 2px solid #14171c; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.zdm i::after { content: "+"; display: block; text-align: center; font: 700 12px/12px var(--font); font-style: normal; color: #14171c; }
#locBtn[data-q] { position: relative; }
#locBtn[data-q]::after { content: ""; position: absolute; right: 5px; top: 5px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #fff; }
#locBtn[data-q=ex]::after { background: var(--ok); } #locBtn[data-q=good]::after { background: #84cc16; }
#locBtn[data-q=mid]::after { background: var(--stale); } #locBtn[data-q=bad]::after { background: var(--bad); }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 2px 6px; }
.sec-h b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); }
.row .gl.svhgl { background: #14171c; color: #ffd400; }
.svhnote { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff8d6; border: 1.5px solid #ffd400; border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.svhnote svg { width: 22px; height: 22px; }
.svhnote b { font-size: 16px; }
.svhnote small { flex: 1 1 140px; color: var(--mut); }
.svhpick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.svhpick small { width: 100%; color: var(--mut); }
#svhAddMat { margin: 10px 0 4px; }
.svhnote.compact { padding: 6px 8px 6px 12px; margin: 6px 0; }
.svhnote.compact b { font-size: 15px; flex: 1; }
#movebar .btn:not(.ghost):not(.primary) { color: var(--ink); }

/* ---------- схема СВХ ---------- */
.mbox.full { width: 100vw !important; max-width: none; height: 100vh; height: 100dvh; max-height: none !important; border-radius: 0 !important; padding: 0; overflow: hidden; }
.mbox.full #mbody, .se-host, .se { height: 100%; }
.se { display: flex; flex-direction: column; background: var(--bg); }
.se-top { display: flex; gap: 6px; align-items: center; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; background: var(--card); box-shadow: 0 1px 0 var(--line); flex-wrap: wrap; }
.se-t { font-size: 15px; margin-right: 6px; }
.se-sp { flex: 1; }
.se-snap { display: flex; gap: 5px; align-items: center; font-size: 13px; color: var(--mut); }
.se-body { flex: 1; display: flex; min-height: 0; }
.se-main { flex: 1; position: relative; min-width: 0; min-height: 0; background: #eef0f3; }
.se-cv { width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.se-cv .g1 { stroke: #dfe3e8; } .se-cv .g5 { stroke: #cdd3da; }
.se-cv .ol, .scheme-pv .ol { fill: #fff; stroke: #c9a400; stroke-dasharray: none; }
.se-cv .zz rect, .scheme-pv .zz rect { fill-opacity: .22; stroke-opacity: 1; }
.se-cv .zz.sel rect { fill-opacity: .38; }
.se-cv .zz, .se-cv .zl { cursor: move; }
.se-cv text, .scheme-pv text { fill: #14171c; font-weight: 700; font-family: var(--font); pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: .12em; stroke-linejoin: round; }
.se-cv text .cnt, .scheme-pv text .cnt { fill: #4b5563; font-weight: 600; }
.se-cv .zl .hit { fill: transparent; stroke: none; }
.se-cv .zl.sel .hit { fill: rgba(255,196,0,.15); stroke: #ffc400; }
.se-cv .hd { fill: #fff; stroke: #14171c; cursor: nwse-resize; }
.se-cv .hd.rot { fill: #ffc400; cursor: grab; }
.se-cv .rl { stroke: #14171c; }
.se-zoom { position: absolute; right: 10px; bottom: 34px; display: flex; flex-direction: column; gap: 6px; }
.se-zoom button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--card); box-shadow: var(--sh); font-size: 20px; font-weight: 700; }
.se-scale { position: absolute; left: 10px; bottom: 10px; font-size: 12px; color: var(--mut); display: flex; flex-direction: column; gap: 2px; }
.se-scale i { display: block; height: 5px; border: 2px solid #14171c; border-top: 0; }
.se-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 14px; border-radius: 12px; font-size: 14px; max-width: 90%; text-align: center; pointer-events: none; }
.se-side { width: 320px; flex: none; overflow-y: auto; padding: 12px; border-left: 1px solid var(--line); background: var(--bg); }
.se-side h5 { margin: 12px 0 6px; font-size: 13px; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.se-cols { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.se-cols button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); }
.se-cols button.on { box-shadow: 0 0 0 2.5px #14171c; }
.se-list .row.on { box-shadow: inset 0 0 0 2px var(--acc); }
.se-list .sw { width: 14px; height: 28px; border-radius: 4px; flex: none; }
@media (max-width: 759px) {
  .se-body { flex-direction: column; }
  .se-side { width: auto; flex: 0 0 auto; max-height: 40%; border-left: 0; border-top: 1px solid var(--line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .se-top { gap: 5px; }
  .se-t { width: 100%; }
}
.svhpv { background: #fff; border-radius: var(--r); padding: 6px; margin: 8px 0; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.scheme-pv { width: 100%; height: auto; max-height: 260px; display: block; }
.scheme-pv .ol { stroke-width: .6; }
.scheme-pv .zz { cursor: pointer; }
.scheme-pv .zz rect { stroke-width: .35; }
.scheme-pv .zz.sel rect { fill-opacity: .45; stroke-width: .8; }
.scheme-pv .zz.dim { opacity: .45; }
.zlbl { background: none; border: 0; }
.zlbl span { display: none; transform: translate(-50%, -50%); white-space: nowrap; font: 700 11px/1 var(--font); color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
#map.z-zl .zlbl span { display: inline-block; }

/* ---------- движение материала ---------- */
.mvbtn { flex: none; }
.mvbtn .cnt, .cnt { font-style: normal; background: var(--bad); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 12px; font-weight: 800; }
.mvdays { margin: 0 0 8px; }
.mvtabs { margin-bottom: 8px; }
#reqNew { width: 100%; margin: 0 0 10px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 4px 0 10px; }
.kpis > div { background: var(--card); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.kpis b { font-size: 22px; line-height: 1.1; }
.kpis small { color: var(--mut); }
.bars { width: 100%; height: 70px; display: block; background: var(--card); border-radius: 10px; }
.bars rect { fill: #ffc400; } .bars rect.z { fill: #e5e7eb; } .bars rect.mk { fill: #64748b; }
.bars-x .lg { display: flex; gap: 4px; align-items: center; }
.bars-x .lg i { width: 9px; height: 9px; border-radius: 2px; background: #ffc400; display: inline-block; margin-left: 6px; } .bars-x .lg i.mk { background: #64748b; }
.mvexp { margin: 14px 0 4px; flex-wrap: wrap; }
.bars-x { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--mut); margin: 2px 2px 6px; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.reqgl { font-weight: 800; font-size: 12.5px; background: #14171c; color: #ffd400; border-radius: 10px; min-width: 42px; padding: 0 4px; }
.badge.st-new { background: #2563eb; } .badge.st-accepted, .badge.st-prep { background: #f59e0b; } .badge.st-ready { background: #8b5cf6; }
.badge.st-shipped { background: #0ea5e9; } .badge.st-delivered { background: #14b8a6; } .badge.st-done { background: var(--ok); } .badge.st-rejected, .badge.st-cancelled { background: var(--empty); }
.rfrow { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.rfrow select, .rfrow input { min-width: 0; flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px; background: var(--card); }
.rfrow input[type=number] { flex: 0 0 90px; }
.users .row.u .chips { padding: 4px 0 0; flex-wrap: wrap; }
.users .row.u .chip { padding: 3px 10px; font-size: 13px; }
.plist { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.plrow, .pladd { display: flex; gap: 6px; align-items: center; }
.plrow select, .pladd select { flex: none; max-width: 42%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 6px; background: var(--card); }
.drvadd { margin: 8px 0; padding: 10px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.objf { max-width: 48%; border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 8px; background: var(--card); font: inherit; font-size: 13px; }
.sec-h .objf { margin-left: auto; }
.catf { display: flex; gap: 6px; align-items: center; }
.catf .search { flex: 1; min-width: 0; margin: 0; }
h5.objh { margin: 12px 0 4px; font-size: 13px; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
#kmText { width: 100%; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; font: 13px/1.4 ui-monospace, Consolas, monospace; background: var(--card); margin-bottom: 6px; }
.inkg { margin: 4px 0 8px; font-size: 14px; font-weight: 600; color: var(--ok); }
.place .badge + .badge, .rt .badge + .badge { margin-left: 4px; }
.sec-h { align-items: center; gap: 6px; }
/* машины на карте */
.vehwrap { background: none; border: 0; }
.veh { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 4px; border-radius: 12px; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.4); white-space: nowrap; transform: translate(-50%, -50%); font-size: 12px; }
.veh b { font-weight: 700; }
.veh.old { opacity: .55; filter: grayscale(1); }
/* список сборки: нажал — собрано */
.row.asm { text-align: left; width: 100%; cursor: pointer; }
.row.asm .ck { flex: none; width: 24px; height: 24px; margin-right: 10px; border-radius: 7px; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; }
.row.asm.on .ck { background: var(--ok); border-color: var(--ok); }
.row.asm.on .ck::after { content: "✓"; color: #fff; font-weight: 800; font-size: 15px; line-height: 1; }
.row.asm.on b { color: var(--mut); text-decoration: line-through; }
/* календарь смен в аналитике */
.shcal { margin: 4px 0 12px; }
.shcal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.shcal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.shcal-g > span { text-align: center; font-size: 11px; color: var(--mut); padding-bottom: 2px; }
.shd { display: flex; flex-direction: column; gap: 2px; padding: 2px; border-radius: 8px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.shd.today { box-shadow: inset 0 0 0 2px var(--acc); }
.shd.on { background: #fff4c2; }
.shn { border: 0; background: none; padding: 1px 0; font: 600 12px/1.2 var(--font); color: var(--ink); cursor: pointer; }
.shs { border: 0; border-radius: 4px; height: 15px; padding: 0; font: 700 11px/15px var(--font); background: var(--bg); color: var(--ink); cursor: pointer; }
.shs.has { background: #bfdbfe; }
.shs.has + .shs.has, .shs + .shs.has { background: #c7d2fe; }
.shs.on { background: var(--acc) !important; box-shadow: 0 0 0 1.5px #14171c; }
.shcal-l small { display: block; font-size: 11px; color: var(--mut); margin: 6px 0; }
.shcal-p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
/* выбор с поиском: ФИО крупно, под ним мелко — модуль, смена, телефон */
.combo { position: relative; flex: 1; min-width: 0; }
.combo input { width: 100%; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; background: var(--card); }
.combo-l { margin-top: 4px; max-height: 240px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); }
.combo-i { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 9px 10px; cursor: pointer; font: inherit; }
.combo-i:last-child { border-bottom: 0; }
.combo-i:hover { background: var(--bg); }
.combo-i b { display: block; font-size: 15px; font-weight: 600; }
.combo-i small { display: block; font-size: 12px; color: var(--mut); margin-top: 2px; }
.combo-e { padding: 10px; font-size: 13px; color: var(--mut); }
.rfrow .rfel { flex: 1; min-width: 0; }
.rfrow { align-items: flex-start !important; }
.rfrow input[data-rq] { width: 84px; flex: none; }
.grp { display: inline-block; padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; margin: 2px 0 8px; background: var(--bg); }
.grp.green { background: #dcfce7; color: #166534; } .grp.yellow { background: #fef9c3; color: #854d0e; } .grp.red { background: #fee2e2; color: #991b1b; }
.plrow input, .pladd input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; background: var(--card); }

/* ---------- вход через MAX ---------- */
.maxgo { width: 100%; margin-top: 6px; }
.maxgo svg { width: 22px; height: 22px; }
.hint2 { color: var(--mut); font-size: 14px; margin: 10px 2px 6px; }
.maxwait { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; background: #fff8d6; border: 1.5px solid var(--acc); border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: 14.5px; }
.maxwait a { flex-basis: 100%; color: var(--ink); font-weight: 600; }
.maxwait.pend { background: #eef6ff; border-color: #93c5fd; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #e5d48a; border-top-color: #14171c; animation: spin 0.9s linear infinite; flex: none; }
.maxwait.pend .spin { border-color: #bfdbfe; border-top-color: #2563eb; }
@keyframes spin { to { transform: rotate(360deg); } }
#pwdShow { margin: 6px 0 2px; color: var(--mut); }
