/* Mankent Shipa — учётная система. Mobile-first. */
:root {
  --bg: #f3f6f2; --card: #fff; --ink: #14241b; --ink2: #4d5f55; --muted: #8a978f; --line: #e3e9e4; --line2: #eef2ee;
  --brand: #0f6b3a; --brand2: #188a4c; --brand-soft: #e4f3ea; --gold: #b8963f;
  --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7; --bad: #b91c1c; --bad-bg: #fee2e2; --info: #1d4ed8; --info-bg: #dbeafe;
  --r: 14px; --r-sm: 10px; --shadow: 0 1px 2px rgba(16,40,26,.06), 0 4px 16px rgba(16,40,26,.06);
  --side: 248px; --top: 56px; --tab: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
/* цвета разделов */
.c-green { --c: #15803d; --cb: #dcfce7; } .c-blue { --c: #1d4ed8; --cb: #dbeafe; } .c-amber { --c: #b45309; --cb: #fef3c7; }
.c-violet { --c: #6d28d9; --cb: #ede9fe; } .c-teal { --c: #0f766e; --cb: #ccfbf1; } .c-lime { --c: #4d7c0f; --cb: #ecfccb; }
.c-pink { --c: #be185d; --cb: #fce7f3; } .c-orange { --c: #c2410c; --cb: #ffedd5; } .c-red { --c: #b91c1c; --cb: #fee2e2; }
.c-cyan { --c: #0e7490; --cb: #cffafe; } .c-rose { --c: #be123c; --cb: #ffe4e6; } .c-indigo { --c: #4338ca; --cb: #e0e7ff; }
.c-sky { --c: #0369a1; --cb: #e0f2fe; } .c-slate { --c: #334155; --cb: #e2e8f0; } .c-gray { --c: #57534e; --cb: #e7e5e4; }
.c-purple { --c: #7e22ce; --cb: #f3e8ff; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg); overscroll-behavior-y: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
[hidden] { display: none !important; }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Вход ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 600px at 80% -10%, #cfead8 0, transparent 60%), radial-gradient(900px 500px at -10% 110%, #efe6c8 0, transparent 55%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 22px; padding: 30px 26px 24px; box-shadow: 0 10px 50px rgba(16,60,34,.14); }
.login-card img { display: block; width: 190px; margin: 0 auto 6px; }
.login-card h1 { font-size: 19px; text-align: center; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.login-foot { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; justify-content: center; align-items: center; }
.login-foot .ico { width: 15px; height: 15px; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-q { font-weight: 700; font-size: 18px; white-space: nowrap; background: var(--brand-soft); color: var(--brand); padding: 9px 14px; border-radius: var(--r-sm); }

/* ---------- Каркас ---------- */
.shell { min-height: 100vh; }
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .logo { height: 30px; }
.topbar h1 { font-size: 17px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .who { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px; border-radius: 99px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.who-name { display: none; text-align: left; font-size: 13px; line-height: 1.2; }
.who-name small { color: var(--muted); display: block; }
.main { padding: 14px 14px calc(var(--tab) + 26px + env(safe-area-inset-bottom)); max-width: 1280px; margin: 0 auto; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; height: var(--tab); border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; color: var(--muted); font-weight: 600; position: relative; }
.tabbar button .ico { width: 23px; height: 23px; }
.tabbar button.on { color: var(--brand); }
.tabbar button.on::before { content: ""; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand); }
.dot { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }

/* меню-плитки (мобильное «Ещё» и главная) */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { border: 0; background: var(--card); border-radius: var(--r); padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.2; box-shadow: var(--shadow); color: var(--ink); position: relative; }
.tile .tico { width: 46px; height: 46px; border-radius: 14px; background: var(--cb); color: var(--c); display: grid; place-items: center; }
.tile .tico .ico { width: 24px; height: 24px; }
.tile:active { transform: scale(.97); }
.tile .dot { top: 8px; left: auto; right: 10px; }

/* ---------- Компоненты ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.card + .card, .stack > * + * { margin-top: 12px; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-h h3 { font-size: 15.5px; flex: 1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .b { font-weight: 700; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.sep { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.head h2 { font-size: 20px; flex: 1; min-width: 150px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.pri:hover { background: var(--brand2); }
.btn.danger { color: var(--bad); border-color: #f3c7c7; background: #fff7f7; }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink2); }
.btn.ghost:hover, .btn:not(.pri):not(.solid):hover { background: var(--line2); }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.lg { min-height: 50px; font-size: 15.5px; padding: 0 22px; border-radius: 13px; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 42px; }
.btn.sm.icon { width: 34px; }
.btn .ico { width: 18px; height: 18px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--tab) + 16px + env(safe-area-inset-bottom)); z-index: 35; height: 54px; padding: 0 20px; border-radius: 27px;
  box-shadow: 0 8px 24px rgba(15,107,58,.4); }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink2); margin-bottom: 5px; }
.field > span i { color: var(--bad); font-style: normal; }
.inp, select.inp, textarea.inp { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 11px; border: 1.5px solid var(--line); background: #fbfcfb; outline: none;
  font-size: 16px; transition: border-color .15s, box-shadow .15s; }
textarea.inp { min-height: 76px; resize: vertical; }
.inp:focus { border-color: var(--brand2); box-shadow: 0 0 0 3px rgba(24,138,76,.15); background: #fff; }
.inp.big { font-size: 20px; font-weight: 600; letter-spacing: .04em; min-height: 52px; }
.inp.err { border-color: var(--bad); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.search { position: relative; flex: 1; min-width: 180px; }
.search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.search .inp { padding-left: 38px; }

.seg { display: flex; background: #e9eee9; border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; min-height: 40px; padding: 4px 10px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink2); line-height: 1.15; }
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 0 13px; min-height: 36px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--ink2);
  display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip b { background: rgba(0,0,0,.08); border-radius: 9px; padding: 0 6px; font-size: 11.5px; }
.chip.on b { background: rgba(255,255,255,.25); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--line2); color: var(--ink2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.c { background: var(--cb); color: var(--c); }

/* таблицы: на телефоне превращаются в карточки */
.card .tbl-wrap { box-shadow: none; border: 1px solid var(--line); }
.tbl-wrap { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 11px 12px; background: #f8faf8; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f8fbf8; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; background: #f8faf8; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ico { width: 40px; height: 40px; stroke-width: 1.4; margin-bottom: 8px; opacity: .6; }
@media (max-width: 760px) {
  .tbl.resp thead { display: none; }
  .tbl.resp, .tbl.resp tbody, .tbl.resp tr, .tbl.resp td { display: block; width: 100%; }
  .tbl.resp tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .tbl.resp tr:last-child { border-bottom: 0; }
  .tbl.resp td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl.resp td::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; text-align: left; flex: none; }
  .tbl.resp td.main { display: block; text-align: left; font-weight: 700; font-size: 15px; padding-bottom: 4px; }
  .tbl.resp td.main::before, .tbl.resp td:empty { display: none; }
  .tbl.resp td[data-l=""]::before { display: none; }
  .tbl.resp td.acts { justify-content: flex-end; padding-top: 6px; }
  .tbl.resp tfoot tr { background: #f8faf8; }
}

/* персона */
.person { display: flex; align-items: center; gap: 11px; min-width: 0; text-align: left; }
.person .ph { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; object-fit: cover; overflow: hidden; }
.person img.ph { display: block; }
.person .ph.lg { width: 76px; height: 76px; border-radius: 18px; font-size: 24px; }
.person .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.person .sb { font-size: 12.5px; color: var(--muted); }
.list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line2); width: 100%; border-left: 0; border-right: 0; border-top: 0; background: none; text-align: left; }
.li:last-child { border-bottom: 0; }
button.li:hover { background: #f8fbf8; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; text-align: right; }

/* показатели */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--card); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; text-align: left; border: 0; display: block; width: 100%; }
.stat::after { content: ""; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: var(--cb); opacity: .7; }
.stat .sico { position: absolute; right: 10px; top: 10px; color: var(--c); z-index: 1; }
.stat .v { font-size: 27px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat .l { font-size: 12.5px; color: var(--ink2); margin-top: 3px; font-weight: 600; }
.stat .x { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* модальные окна: на телефоне — шторка снизу */
.ovl { position: fixed; inset: 0; z-index: 100; background: rgba(12,28,18,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
.modal { background: var(--bg); width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: up .24s cubic-bezier(.2,.9,.3,1); }
.modal.full { height: 94vh; height: 94dvh; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--card); border-radius: 20px 20px 0 0; }
.modal-h h3 { flex: 1; font-size: 17px; }
.modal-b { padding: 16px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.modal-f { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-f .btn { flex: 1; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(40px); opacity: 0; } }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); top: 12px; z-index: 300; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: #14241b; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: up .2s; display: flex; gap: 10px; align-items: center; }
.toast.ok { background: #116b39; } .toast.err { background: #b3261e; }
.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: sp .7s linear infinite; margin: 30px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.note { padding: 11px 13px; border-radius: 11px; font-size: 13.5px; background: var(--info-bg); color: #1e3a8a; display: flex; gap: 9px; align-items: flex-start; }
.note.ok { background: var(--ok-bg); color: #14532d; } .note.warn { background: var(--warn-bg); color: #78350f; } .note.bad { background: var(--bad-bg); color: #7f1d1d; }
.note .ico { width: 18px; height: 18px; margin-top: 1px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 10px 13px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs button.on { color: var(--brand); border-color: var(--brand); }
.steps-h { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.steps-h:first-child { margin-top: 0; }
.steps-h .n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.steps-h h4 { font-size: 15.5px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; }

/* ---------- Карта этажа ---------- */
.floor { background: linear-gradient(#fbfcfa, #f4f7f3); border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px; overflow-x: auto; }
.floor-in { min-width: max-content; }
.frow { display: flex; gap: 8px; }
.corridor { margin: 8px 0; height: 30px; border-radius: 8px; background: repeating-linear-gradient(90deg, #e6ebe5 0 18px, #edf1ec 18px 36px); display: flex; align-items: center; justify-content: center;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: #9aa69d; font-weight: 700; }
.room { width: 92px; flex: none; border-radius: 12px; border: 2px solid; padding: 7px 7px 8px; text-align: left; background: #fff; position: relative; transition: transform .12s, box-shadow .12s; }
.room:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.room .rn { font-weight: 800; font-size: 17px; line-height: 1; }
.room .rk { margin-top: 3px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .75; }
.room .beds { display: flex; flex-wrap: wrap; gap: 3px; margin: 7px 0 5px; min-height: 17px; }
.bed { width: 20px; height: 15px; border-radius: 4px; border: 1.5px solid currentColor; position: relative; opacity: .9; }
.bed::before { content: ""; position: absolute; left: 1.5px; top: 1.5px; width: 5px; height: 9px; border-radius: 2px; background: currentColor; opacity: .35; }
.bed.busy { background: currentColor; }
.bed.busy::before { background: #fff; opacity: .9; }
.room .rf { font-size: 11px; font-weight: 700; }
.room.free { border-color: #86d4a3; background: #f2fbf5; color: #136c39; }
.room.part { border-color: #f1c66b; background: #fffaeb; color: #96590a; }
.room.full { border-color: #f0a3a3; background: #fff4f4; color: #b02424; }
.room.off { border-color: #d5d9d5; background: #f1f2f1; color: #8b938c; }
.room.sel { box-shadow: 0 0 0 3px var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.room:disabled { cursor: not-allowed; opacity: .75; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink2); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; border: 2px solid; }

/* ---------- Графики ---------- */
.bars { display: flex; align-items: flex-end; gap: 2px; height: 130px; padding-top: 18px; }
.bars .bcol { flex: 1; min-width: 4px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.bars .bar { width: 100%; max-width: 30px; background: var(--brand2); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .bcol.zero .bar { background: var(--line); }
.bars .bcol:hover .bar { background: var(--brand); }
.bars .bv { position: absolute; top: -16px; font-size: 11px; font-weight: 700; color: var(--ink2); display: none; white-space: nowrap; background: var(--card); padding: 0 3px; border-radius: 4px; z-index: 2; }
.bars .bcol:hover .bv, .bars .bcol.peak .bv { display: block; }
.bars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 5px; border-top: 1px solid var(--line); padding-top: 4px; }
.hbar { margin-bottom: 10px; }
.hbar .hl { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 4px; }
.hbar .hl b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar .ht { height: 8px; background: var(--line2); border-radius: 4px; overflow: hidden; }
.hbar .hf { height: 100%; background: var(--brand2); border-radius: 4px; min-width: 2px; }
.meter { height: 10px; background: var(--line2); border-radius: 5px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand2); border-radius: 5px; }

/* контроль дня */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; text-align: center; }
.versus .vn { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.versus .vl { font-size: 12.5px; color: var(--ink2); font-weight: 600; margin-top: 6px; }
.versus .eq { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 800; }
.verdict { margin-top: 14px; padding: 12px; border-radius: 12px; text-align: center; font-weight: 700; display: flex; gap: 8px; align-items: center; justify-content: center; }
.verdict.ok { background: var(--ok-bg); color: var(--ok); } .verdict.bad { background: var(--bad-bg); color: var(--bad); }

/* табель */
.ts-wrap { overflow: auto; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); max-height: 70vh; }
table.ts { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.ts th, .ts td { border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); text-align: center; padding: 0; height: 38px; min-width: 34px; }
.ts thead th { position: sticky; top: 0; background: #f8faf8; z-index: 2; font-size: 11.5px; color: var(--ink2); padding: 4px 2px; line-height: 1.15; }
.ts th.nm, .ts td.nm { position: sticky; left: 0; background: var(--card); z-index: 1; text-align: left; padding: 4px 10px; min-width: 150px; max-width: 190px; font-weight: 600; box-shadow: 2px 0 4px rgba(0,0,0,.04); }
.ts thead th.nm { z-index: 3; background: #f8faf8; }
.ts td.nm small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.ts th.we { color: #c2410c; background: #fff7ed; } .ts th.td { background: var(--brand); color: #fff; }
.ts td.cell { cursor: pointer; font-weight: 800; }
.ts td.cell:hover { outline: 2px solid var(--brand2); outline-offset: -2px; }
.ts td.future { background: #fafbfa; cursor: default; }
.ts .cЯ { background: #dcfce7; color: #15803d; } .ts .cВ { background: #f1f5f9; color: #64748b; } .ts .cБ { background: #dbeafe; color: #1d4ed8; }
.ts .cО { background: #fef3c7; color: #b45309; } .ts .cН { background: #fee2e2; color: #b91c1c; }
.ts td.sum { font-weight: 700; min-width: 46px; background: #f8faf8; }

/* ИИ-чат */
.chat { display: flex; flex-direction: column; height: calc(100dvh - var(--top) - var(--tab) - 60px); min-height: 380px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; }
.msg.u { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.msg.a { align-self: flex-start; background: #f1f4f1; border-bottom-left-radius: 5px; }
.chat-in { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }

/* камера */
.cam { background: #0c1a12; border-radius: var(--r); overflow: hidden; aspect-ratio: 4/3; display: grid; place-items: center; position: relative; }
.cam video, .cam img { width: 100%; height: 100%; object-fit: cover; }
.cam .camhint { color: #b9c7bd; text-align: center; padding: 20px; font-size: 14px; }
.photo-pick { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1.5px dashed #b9d8c5; border-radius: var(--r); background: #f6fbf8; }
.photo-pick .ph { width: 78px; height: 78px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; overflow: hidden; flex: none; }
.photo-pick .ph img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick .ph .ico { width: 30px; height: 30px; }

.perm-grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.perm-grid th { font-size: 11px; color: var(--muted); text-transform: uppercase; padding: 4px; text-align: center; }
.perm-grid td { padding: 7px 4px; border-top: 1px solid var(--line2); text-align: center; }
.perm-grid td:first-child, .perm-grid th:first-child { text-align: left; }
.perm-grid input { width: 20px; height: 20px; accent-color: var(--brand); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.rx-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.rx-item:last-child { border-bottom: 0; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 34px; height: 36px; border: 0; background: #f4f7f4; font-size: 18px; font-weight: 700; }
.qty input { width: 44px; height: 36px; border: 0; text-align: center; font-weight: 700; font-size: 15px; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.done-btn { min-width: 118px; }
.done-btn.on { background: var(--ok-bg); border-color: #9ad9b1; color: var(--ok); }
.line-card { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 12px 2px; margin-bottom: 10px; position: relative; }
.line-card .rm { position: absolute; right: 6px; top: 6px; }
.total-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--brand-soft); border-radius: 12px; font-weight: 700; }
.total-bar b { font-size: 20px; color: var(--brand); }

@media print {
  .side, .topbar, .tabbar, .fab, .no-print, .toasts { display: none !important; }
  body { background: #fff; } .main { padding: 0; max-width: none; margin: 0; }
  .card, .tbl-wrap, .stat, .list { box-shadow: none; border: 1px solid #ccc; }
}

/* ---------- Планшет / компьютер ---------- */
@media (min-width: 761px) {
  .ovl { align-items: center; padding: 20px; }
  .modal { max-width: 560px; border-radius: 20px; max-height: 90vh; }
  .modal.wide { max-width: 860px; } .modal.full { max-width: 980px; height: auto; }
  .modal-h { border-radius: 20px 20px 0 0; } .modal-f { border-radius: 0 0 20px 20px; }
  .modal-f .btn { flex: none; min-width: 120px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .toasts { top: 20px; }
  .cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .cols2 > .card + .card, .cols2 > * + * { margin-top: 0; }
}
@media (min-width: 1000px) {
  body { font-size: 14.5px; }
  .shell { padding-left: var(--side); }
  .side { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); background: #0d2a1a; color: #cfe1d5; z-index: 50; }
  .side .brand { padding: 18px 18px 14px; display: flex; align-items: center; gap: 10px; }
  .side .brand img { height: 30px; filter: brightness(0) invert(1); opacity: .95; }
  .side .brand b { color: #fff; font-size: 15px; line-height: 1.15; }
  .side .brand small { display: block; color: #8fb29c; font-weight: 400; font-size: 11.5px; }
  .side nav { flex: 1; overflow-y: auto; padding: 4px 10px 14px; }
  .side nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #6f9580; padding: 14px 10px 6px; font-weight: 700; }
  .side nav button { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; background: none; color: #cfe1d5; padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 500; text-align: left; position: relative; }
  .side nav button .nico { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.07); display: grid; place-items: center; flex: none; }
  .side nav button .nico .ico { width: 17px; height: 17px; }
  .side nav button:hover { background: rgba(255,255,255,.06); }
  .side nav button.on { background: rgba(255,255,255,.1); color: #fff; font-weight: 700; }
  .side nav button.on .nico { background: var(--cb); color: var(--c); }
  .side nav button .dot { position: static; margin-left: auto; }
  .tabbar { display: none; }
  .topbar .logo { display: none; }
  .who-name { display: block; }
  .main { padding: 22px 26px 40px; }
  .fab { bottom: 26px; right: 26px; }
  .chat { height: calc(100vh - var(--top) - 110px); }
  .room { width: 104px; }
}
