/* Сборка и логистика. Светлая «бумажная» таблица: синий — действия, красный — то, что требует внимания. */
:root {
  --paper: #ffffff;
  --ink: #1f2430;
  --muted: #5f6675;
  --grid: #d3d8e0;
  --head: #eef1f5;
  --blue: #2b4c9b;
  --blue-soft: #e7edf8;
  --red: #c4302b;
  --red-soft: #fbe3e1;
  --green: #2f7d32;
  --green-soft: #d3eecf;
  --new: #f6c344;
  --radius: 6px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); min-height: 100vh; }
h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 10px; }
a { color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pad { padding: 24px; }
.pad-s { padding: 8px 10px; margin: 0; }
.warn { color: var(--red); font-weight: 600; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
[hidden] { display: none !important; }

/* Кнопки и поля */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 6px 14px; border: 1px solid #b9c1cd; border-radius: var(--radius);
  background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #223e80; color: #fff; }
.btn.danger { color: var(--red); border-color: #e2aaa7; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: 14px; }
.btn.big { min-height: 46px; padding: 10px 22px; font-size: 16px; }
.btn.wide { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.field {
  width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid #b9c1cd; border-radius: var(--radius);
  font: inherit; color: var(--ink); background: #fff;
}
textarea.field { resize: vertical; }
.field:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 2px var(--blue-soft); }
.fld { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.fld > span { font-size: 13px; color: var(--muted); font-weight: 600; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.err { color: var(--red); font-size: 14px; margin: 0 0 10px; }
.row-btns, .popbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { display: inline-block; font-size: 12px; padding: 0 6px; border-radius: 4px; background: var(--head); color: var(--muted); }
.tag.new { background: var(--new); color: var(--ink); }
.tag.ok { background: var(--green-soft); color: var(--green); }

/* Номерная табличка машины — главный опознавательный знак в системе */
.plate {
  display: inline-block; min-width: 54px; padding: 1px 8px; border: 2px solid var(--ink); border-radius: 5px;
  background: #fff; font-weight: 800; font-size: 18px; letter-spacing: 0.06em; text-align: center;
  font-variant-numeric: tabular-nums; line-height: 1.25;
}
.plate.sm { min-width: 0; font-size: 13px; padding: 0 5px; border-width: 1.5px; }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--grid);
}
.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand b { font-size: 16px; }
.brand span { font-size: 13px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.navlink { padding: 6px 10px; border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.navlink:hover { background: var(--head); }
.navlink.on { background: var(--blue); color: #fff; }
.me { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.me form { margin: 0; }

.view { padding: 16px; outline: none; }
.bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.bar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sum { margin: 4px 0 0; color: var(--muted); max-width: 80ch; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 14px; border-bottom: 1px solid var(--grid); }
.tab { padding: 8px 12px; text-decoration: none; color: var(--ink); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab.on { border-bottom-color: var(--blue); color: var(--blue); }
.tab.back { margin-left: auto; color: var(--muted); font-weight: 400; }
.empty { max-width: 560px; margin: 48px auto; text-align: center; }
.empty h1 { margin-bottom: 8px; }
.printhead, .ponly { display: none; }

/* Таблица сборки */
.tablewrap { overflow: auto; border: 1px solid var(--grid); border-radius: var(--radius); max-height: calc(100vh - 190px); }
.grid { border-collapse: collapse; width: 100%; min-width: 1060px; }
.grid th {
  position: sticky; top: 0; z-index: 2; background: var(--head); text-align: left; font-size: 13px; font-weight: 700;
  padding: 8px; border-bottom: 1px solid var(--grid); border-right: 1px solid var(--grid); white-space: nowrap;
}
.grid td { border-bottom: 1px solid var(--grid); border-right: 1px solid var(--grid); padding: 0; vertical-align: middle; height: 46px; }
.grid tr:hover td { box-shadow: inset 0 0 0 9999px rgba(43, 76, 155, 0.035); }
.grid select, .grid input, .firmname, .donebtn {
  width: 100%; min-height: 44px; border: 0; background: transparent; font: inherit; color: inherit; padding: 4px 8px;
  -webkit-appearance: none; appearance: none; border-radius: 0;
}
.grid select { cursor: pointer; }
.grid select:not(:disabled):hover, .grid input:not(:disabled):hover { background-color: rgba(43, 76, 155, 0.06); }
.grid select:focus, .grid input:focus, .firmname:focus, .donebtn:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.grid.ro select, .grid.ro input, .grid.ro button { cursor: default; }
.c-n { width: 44px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.grid th.c-n { text-align: center; }
.c-firm { min-width: 240px; }
.firmcell { display: flex; align-items: stretch; }
.firmname { text-align: left; font-weight: 700; cursor: pointer; flex: 1; }
.firmname.none { font-weight: 400; color: var(--muted); }
.dots {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 18px; line-height: 1;
  padding: 0 10px; cursor: pointer; border-radius: 4px; min-width: 34px;
}
.dots:hover { background: var(--head); color: var(--blue); }
.c-firm .tag { margin: 0 8px 6px; }
.c-car { width: 112px; }
.c-car select.platesel { font-weight: 800; font-size: 17px; letter-spacing: 0.05em; text-align: center; font-variant-numeric: tabular-nums; }
.c-car.miss { background: var(--red-soft); }
.c-car.miss select { color: var(--red); font-size: 14px; letter-spacing: 0; font-weight: 700; }
.c-asm { width: 150px; }
.c-done { width: 130px; }
.donebtn { cursor: pointer; color: var(--muted); text-align: left; }
.c-done.on { background: var(--green-soft); }
.c-done.on .donebtn { color: var(--green); font-weight: 700; }
.c-pl { width: 150px; }
.c-pl input.places { min-height: 26px; padding: 4px 8px 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.c-pl input.places::placeholder { color: #a9b0bc; font-weight: 400; }
.c-pl select.who { min-height: 20px; padding: 0 8px 4px; font-size: 12px; color: var(--muted); }
.c-note { min-width: 200px; }
.notecell { display: flex; }
.notecell select { flex: 1; }
.notetext { padding: 0 8px 6px; font-size: 13px; white-space: pre-wrap; }
.c-time { width: 64px; padding: 0 8px !important; color: var(--muted); font-variant-numeric: tabular-nums; }
.c-x { width: 36px; text-align: center; }
.xbtn { border: 0; background: none; color: #9aa1ad; font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 4px; }
.xbtn:hover { color: var(--red); background: var(--red-soft); }
.newrow td { background: #fafbfc; }
.newcell { padding: 0 !important; }
.addfirm { width: 100%; min-height: 46px; border: 0; background: none; text-align: left; padding: 4px 8px; font: inherit; color: var(--blue); font-weight: 600; cursor: pointer; }
.addfirm:hover { background: var(--blue-soft); }
.cellinput { width: 100%; min-height: 44px; border: 0; padding: 4px 8px; font: inherit; font-weight: 600; outline: 2px solid var(--blue); outline-offset: -2px; }

/* Всплывающие панели */
.pop {
  position: fixed; z-index: 50; min-width: 260px; max-width: min(420px, calc(100vw - 16px)); max-height: 70vh; overflow: auto;
  background: #fff; border: 1px solid #b9c1cd; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(31, 36, 48, 0.18);
}
.popbody { padding: 14px; }
.optlist { display: flex; flex-direction: column; padding: 4px; }
.opt { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 4px; font: inherit; cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.opt.on, .opt:hover { background: var(--blue-soft); }
.opt.add { color: var(--blue); font-weight: 600; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 4px; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(31, 36, 48, 0.42); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 12px 12px; overflow: auto; }
.modalbox { background: #fff; border-radius: 10px; padding: 22px; width: 100%; max-width: 460px; box-shadow: 0 16px 48px rgba(31, 36, 48, 0.25); }
.modalbox.wide { max-width: 620px; }
.modalbox p { margin: 0 0 10px; }
.creds { font-size: 18px; background: var(--head); padding: 10px 14px; border-radius: var(--radius); }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100vw - 24px));
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.toast.bad { background: var(--red); }

/* Логистика */
.board { display: flex; gap: 10px; overflow-x: auto; align-items: flex-start; padding-bottom: 12px; }
.col { flex: 0 0 236px; display: flex; flex-direction: column; border: 1px solid var(--grid); border-radius: var(--radius); background: #f7f8fa; max-height: calc(100vh - 210px); }
.colhead { display: flex; align-items: center; gap: 8px; padding: 10px; border-bottom: 1px solid var(--grid); background: #fff; border-radius: var(--radius) var(--radius) 0 0; }
.colhead .driver { font-size: 13px; line-height: 1.25; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.colhead .dots { flex: none; }
.colhead .was { color: var(--red); font-weight: 600; }
.colhead .dots { margin-left: auto; }
.notechip { display: inline-block; padding: 4px 10px; border-radius: 5px; font-weight: 700; background: var(--head); }
.notechip.nocar { background: var(--red-soft); color: var(--red); }
.cards { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 60px; flex: 1; }
.card { position: relative; background: #fff; border: 1px solid var(--grid); border-radius: 5px; padding: 8px 34px 8px 10px; }
.card[draggable="true"] { cursor: grab; }
.card.dragging { opacity: 0.4; }
.card.new { border-left: 4px solid var(--new); }
.card.notdone { background: #fbfbfc; }
.card .dots { position: absolute; right: 2px; top: 4px; min-width: 28px; padding: 2px 6px; }
.cardtop { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cfirm { font-size: 15px; line-height: 1.25; }
.cpl { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.caddr { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card .tag { margin-top: 4px; }
.nocards { color: #a9b0bc; font-size: 13px; text-align: center; padding: 8px; }
.ph { height: 40px; border: 2px dashed var(--blue); border-radius: 5px; background: var(--blue-soft); }
.colfoot { padding: 8px 10px; border-top: 1px solid var(--grid); background: #fff; font-weight: 700; font-size: 14px; border-radius: 0 0 var(--radius) var(--radius); }
.col-note .colhead, .col-nocar .colhead { min-height: 51px; }

/* Задания водителям */
.card.task { padding-bottom: 6px; }
.card.task.done { background: var(--green-soft); border-color: #9fd29a; }
.ttext { font-size: 13px; margin-top: 4px; white-space: pre-wrap; }
.tfoot { margin-top: 6px; }
.takebtn { border: 1px solid #b9c1cd; background: #fff; border-radius: 4px; padding: 2px 8px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); }
.takebtn:hover { border-color: var(--green); color: var(--green); }
.card.task.done .takebtn { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.addtask { margin: 0 8px 8px; border: 1px dashed #b9c1cd; background: #fff; border-radius: 5px; padding: 6px; font: inherit; color: var(--blue); font-weight: 600; cursor: pointer; }
.addtask:hover { border-color: var(--blue); background: var(--blue-soft); }
.check { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; font-size: 14px; }

/* Задания водителям: список слева, машины справа */
.tasksplit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 38%); gap: 14px; align-items: start; }
.grid.tasks { min-width: 640px; }
.grid.tasks .c-where { width: 34%; }
.firmname + .whereaddr, .whereaddr { padding: 0 8px 6px; font-size: 12px; color: var(--muted); }
.grid.tasks .c-tcar { width: 110px; }
.tnotecell { display: flex; align-items: flex-start; gap: 6px; padding: 4px 6px; }
textarea.tnote { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14px; resize: vertical; min-height: 36px; padding: 4px; border-radius: 4px; }
textarea.tnote:hover:not(:disabled) { background: rgba(43, 76, 155, 0.06); }
textarea.tnote:disabled { resize: none; }
textarea.tnote:focus { outline: 2px solid var(--blue); outline-offset: -2px; background: #fff; }
.c-tnote .takebtn { white-space: nowrap; margin-top: 4px; }
.c-tnote.taken { background: var(--green-soft); }
.c-tnote.taken .takebtn { background: var(--green); border-color: var(--green); color: #fff; font-weight: 800; letter-spacing: 0.03em; }
.takenmark { color: var(--green); font-weight: 800; letter-spacing: 0.03em; }
.carsum { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.carsum .col { flex: none; max-height: none; }
.sumlist { list-style: decimal; margin: 0; padding: 8px 10px 8px 30px; font-size: 14px; }
.sumlist li { margin: 0 0 6px; }
.sumlist li span { display: block; font-size: 12px; color: var(--muted); }
.sumlist li.done b { color: var(--green); }
.sumlist li.done b::after { content: ' ✓'; }
.sumlist .nocards { list-style: none; margin-left: -20px; }

/* Штрафы списком */
.grid.finelist { min-width: 0; width: 100%; }
.finewrap { max-width: 980px; }
.fitwrap { width: fit-content; max-width: 100%; }  /* рамка по ширине таблицы, без пустого места справа */
.grid.finelist .c-person { width: 220px; }
.grid.finelist .c-comment textarea.tnote { width: 100%; }
.grid.finelist td.c-comment { padding: 2px 4px; }
.grid.finelist tfoot input, .grid.finelist tfoot select { width: 100%; min-height: 40px; border: 1px solid #b9c1cd; border-radius: 4px; font: inherit; padding: 4px 8px; background: #fff; }
.grid.finelist tfoot td { padding: 4px; background: #fafbfc; }
.finetot { max-width: 980px; }

/* КПД: клетки для ввода */
.grid.kpd input.kin { min-height: 34px; text-align: center; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; padding: 2px 4px; }
.grid.kpd input.kin.isnote { color: var(--red); font-weight: 600; font-size: 13px; }
.grid.kpd .c-daytot { width: 80px; text-align: center; font-weight: 700; background: #f6f7f9; }

/* Месяцы: штрафы и КПД */
.monthnav { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.monthnav b { min-width: 130px; text-align: center; font-size: 16px; }
.metric { display: flex; gap: 6px; align-items: center; margin-left: 12px; font-size: 14px; color: var(--muted); }
.metric select { font: inherit; padding: 4px 6px; border: 1px solid #b9c1cd; border-radius: var(--radius); }
.grid.fines, .grid.kpd { min-width: 0; width: auto; }
.grid .c-date { width: 140px; white-space: nowrap; }
.grid .c-date input { min-height: 40px; }
.grid td.c-date { padding: 0 8px; }
.grid .c-person { min-width: 150px; max-width: 220px; }
.grid th.c-person .xbtn { font-size: 16px; padding: 0 4px; }
.grid th.c-add select { border: 1px solid #b9c1cd; border-radius: 4px; min-height: 30px; font-size: 13px; padding: 2px 6px; background: #fff; }
.finecell, .kpdcell { width: 100%; min-height: 44px; border: 0; background: transparent; font: inherit; text-align: left; padding: 4px 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.finecell:disabled, .kpdcell:disabled { cursor: default; color: inherit; }
.finecell:not(:disabled):hover, .kpdcell:not(:disabled):hover { background: rgba(43, 76, 155, 0.06); }
.c-fine.has { background: var(--red-soft); }
.amt { font-size: 13px; color: var(--red); }
.grid tfoot .tot td { background: var(--head); padding: 6px 8px; font-size: 13px; vertical-align: top; height: auto; }
.kpdcell { align-items: center; text-align: center; }
.kpdcell b { font-size: 17px; font-variant-numeric: tabular-nums; }
.c-kpd.manual b { text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 3px; }
.knote { font-size: 12px; color: var(--red); }
.grid.kpd td { height: 36px; }
.grid.kpd .kpdcell { min-height: 34px; }
.grid.kpd tr.we td { background: #f6f7f9; }
.grid.kpd tr.today td { box-shadow: inset 0 2px 0 var(--blue), inset 0 -2px 0 var(--blue); }
.grid.kpd tr.today td.c-date { font-weight: 700; color: var(--blue); }
.grid.kpd tfoot td { text-align: center; font-size: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 4px; }
.chip { border: 1px solid #b9c1cd; background: #fff; border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--blue); color: var(--blue); }

/* Помощь */
.help { max-width: 760px; }
.help h2 { margin: 22px 0 8px; }
.help ol { padding-left: 22px; margin: 0; }
.help li { margin: 0 0 6px; }
.help p { margin: 0 0 8px; }

/* Архив и справочники */
.year h2 { margin: 18px 0 8px; }
.month { border: 1px solid var(--grid); border-radius: var(--radius); margin-bottom: 8px; background: #fff; }
.month summary { padding: 10px 14px; cursor: pointer; }
.month .list { margin: 0 14px 14px; width: calc(100% - 28px); }
.list { border-collapse: collapse; width: 100%; max-width: 900px; }
.list th { text-align: left; font-size: 13px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--grid); }
.list td { padding: 6px 8px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.list .num { text-align: right; font-variant-numeric: tabular-nums; width: 100px; }
.list.firms tbody tr { cursor: pointer; }
.list.firms tbody tr:hover { background: var(--blue-soft); }
.refbar { display: flex; gap: 8px; margin-bottom: 6px; max-width: 900px; }
.refbar .search { max-width: 420px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; max-width: 900px; }
.inline .field { width: auto; flex: 1 1 160px; }
.plateinput { font-weight: 800; letter-spacing: 0.05em; max-width: 110px; }
.addrs { margin: 0 0 8px; padding-left: 18px; }
.addrs li { margin-bottom: 2px; }
.addrnew { display: flex; gap: 8px; }
.refh { margin: 22px 0 4px; }
.opts .c-color { white-space: nowrap; width: 1%; }
.opts input[type="color"] {
  width: 46px; height: 34px; padding: 2px; border: 1px solid var(--grid); border-radius: var(--radius);
  background: #fff; vertical-align: middle; margin-right: 8px; cursor: pointer;
}

/* Вход */
.authpage { background: var(--head); }
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.authbox { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--grid); border-radius: 10px; padding: 26px; }
.authbox h1 { margin-bottom: 4px; }
.authbox > p { margin: 0 0 16px; }
.authbox .btn.wide { margin-top: 8px; }

/* Телефон */
@media (max-width: 1100px) {
  .tasksplit { grid-template-columns: 1fr; }
  /* Таблицу листают вбок, а название фирмы остаётся на месте — видно, чья это строка. */
  .grid td.c-firm { position: sticky; left: 0; z-index: 1; background: var(--paper); box-shadow: 1px 0 0 var(--grid); }
  .grid th.c-firm { left: 0; z-index: 3; }
}

@media (max-width: 760px) {
  .top { gap: 8px; padding: 8px 12px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .navlink { white-space: nowrap; }
  .view { padding: 12px; }
  .tablewrap { max-height: none; }
  .two { grid-template-columns: 1fr; }
  .col { flex-basis: 78vw; max-height: none; min-width: 0; }
  /* Длинное значение в списке не растягивает страницу: таблицу листают внутри неё. */
  table.list { display: block; max-width: 100%; overflow-x: auto; }
  table.list td, table.list th { overflow-wrap: anywhere; }
  h1 { font-size: 19px; }
  /* Закреплённый столбец фирмы на телефоне уже, чтобы рядом были видны остальные. */
  .grid .c-firm { min-width: 150px; width: 150px; }
  .grid .firmname { font-size: 14px; padding: 4px 6px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Печать */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  :root { font-size: 11pt; }
  .top, .noprint, .tabs, .bar-btns, .toast, .pop, .modal { display: none !important; }
  .view { padding: 0; }
  .bar { margin-bottom: 3mm; }
  .bar h1 { display: none; }
  .printhead { display: block; font-weight: 700; font-size: 14pt; margin-bottom: 1mm; }
  .printhead + .tablewrap, .printhead + .board { margin-top: 3mm; }
  select.nv { color: transparent !important; }
  .ponly { display: block; }
  .printtotal { font-weight: 700; font-size: 13pt; margin-top: 4mm; padding-top: 2mm; border-top: 2px solid #000; }
  .ponly.small { padding: 0 8px 4px; font-size: 9pt; color: #333; }
  .tablewrap { overflow: visible; max-height: none; border: 0; }
  .grid { min-width: 0; }
  .grid th, .grid td.c-firm { position: static; box-shadow: none; }
  .grid td { height: auto; }
  .grid select, .grid input, .firmname, .donebtn { min-height: 0; padding: 2px 6px; }
  .grid tr { break-inside: avoid; }
  .board { display: block; overflow: visible; columns: 3; column-gap: 6mm; }
  .col { display: block; break-inside: avoid; max-height: none; margin-bottom: 5mm; background: #fff; }
  .cards { overflow: visible; }
  .card { break-inside: avoid; padding-right: 10px; }
  .card .tag { display: none; }
  .cfirm { font-size: 12pt; }
  .tasksplit { display: block; }
  .carsum { display: block; columns: 3; column-gap: 6mm; margin-top: 5mm; }
  .carsum .col { break-inside: avoid; margin-bottom: 5mm; }
  .carsum .emptycol { display: none; }
  input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
  .grid.finelist td.c-comment .ponly { padding: 6px 8px; font-size: 11pt; color: #000; }
  .tnotecell { display: block; padding: 2px 6px; }
  .grid.kpd input.kin { min-height: 0; }
  * { box-shadow: none !important; }
}
