/* Простая вёрстка без новомодных функций: работает в старом Safari (iMac) и на телефоне. */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; font-size: 15px; color: #1d2330; background: #f2f4f7; }
a { color: #1f5fbf; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 6px 0 12px; }
h2 { font-size: 18px; margin: 18px 0 8px; }
h3 { font-size: 16px; margin: 12px 0 6px; }
.top { background: #1d2330; color: #fff; padding: 0 12px; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-flex-wrap: wrap; flex-wrap: wrap; }
.top a { color: #cfd8e6; padding: 12px 10px; display: inline-block; }
.top a.on, .top a:hover { color: #fff; background: #2e3850; text-decoration: none; }
.top .brand { font-weight: bold; color: #fff; margin-right: 10px; }
.top .who { margin-left: auto; color: #9aa6b8; font-size: 13px; }
.wrap { padding: 14px; max-width: 1400px; margin: 0 auto; }
.flash { padding: 10px 12px; border-radius: 6px; margin-bottom: 10px; }
.flash.error { background: #fde3e1; color: #8b1a10; border: 1px solid #f3b3ab; }
.flash.ok { background: #e2f5e6; color: #145c25; border: 1px solid #aedcb8; }
.flash.warn { background: #fff4d6; color: #6b4d00; border: 1px solid #f0d48a; }
.box { background: #fff; border: 1px solid #dde2ea; border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.row { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: 0 -6px; }
.col { -webkit-flex: 1 1 300px; flex: 1 1 300px; padding: 0 6px; min-width: 0; }
.col-left { -webkit-flex: 1 1 420px; flex: 1 1 420px; padding: 0 6px; min-width: 0; }
.col-right { -webkit-flex: 1 1 520px; flex: 1 1 520px; padding: 0 6px; min-width: 0; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border-bottom: 1px solid #e6e9ef; padding: 6px 8px; text-align: left; vertical-align: middle; }
th { background: #f6f7fa; font-weight: 600; font-size: 13px; color: #4a5568; }
td.n, th.n { text-align: right; white-space: nowrap; }
tr.sum td { font-weight: bold; border-top: 2px solid #c7cdd8; }
input, select, textarea, button { font-size: 15px; font-family: inherit; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  padding: 6px 8px; border: 1px solid #c3cad6; border-radius: 5px; background: #fff; max-width: 100%; }
input.money { width: 110px; text-align: right; }
input.qty { width: 60px; text-align: right; }
.btn { display: inline-block; padding: 7px 12px; border: 1px solid #b9c2d0; border-radius: 6px; background: #fff; color: #1d2330; cursor: pointer; line-height: 1.2; }
.btn:hover { background: #eef2f8; text-decoration: none; }
.btn.primary { background: #1f5fbf; color: #fff; border-color: #1f5fbf; }
.btn.green { background: #1e8a3c; color: #fff; border-color: #1e8a3c; }
.btn.red { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn.small { padding: 3px 8px; font-size: 13px; }
.btn.on { background: #1f5fbf; color: #fff; border-color: #1f5fbf; }
.inline { display: inline; margin: 0; }
.muted { color: #6b7686; font-size: 13px; }
.tag { display: inline-block; padding: 1px 6px; border-radius: 10px; font-size: 12px; background: #e8ecf3; color: #3d4a5c; }
.tag.example { background: #fff0c2; color: #7a5600; }
.tag.from { background: #e3edff; color: #234a8f; }
.warn-text { color: #b03a00; }
.red-text { color: #c0392b; font-weight: bold; }
/* доска */
.cards { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: 0 -5px; }
.card { width: 230px; margin: 5px; padding: 10px; border-radius: 8px; border: 1px solid #d0d6e0; border-left-width: 8px; background: #fff; color: #1d2330; display: block; }
.card:hover { text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.card.yellow { border-left-color: #f0b400; background: #fffbea; }
.card.green { border-left-color: #1e8a3c; background: #f0faf2; }
.card.red { border-left-color: #c0392b; background: #fdeeed; }
.card.grey { border-left-color: #9aa3ad; background: #f4f5f6; color: #777; }
.card .plate { font-size: 18px; font-weight: bold; letter-spacing: 1px; }
.card .sum { font-size: 17px; font-weight: bold; float: right; }
.legend span { margin-right: 12px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 4px; }
/* заказ */
.price-list { max-height: 640px; overflow-y: auto; }
.price-list .cat { background: #eef1f6; font-weight: 600; padding: 6px 8px; margin-top: 6px; }
.price-list .svc { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; border-bottom: 1px solid #edf0f4; }
.price-list .svc form { -webkit-flex: 1; flex: 1; margin: 0; }
.price-list .svc button { width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; cursor: pointer; }
.price-list .svc button:hover { background: #e9f1ff; }
.price-list .sub button { padding-left: 26px; }
.price-list .grp { padding: 7px 8px; font-weight: 600; background: #f7f9fc; }
.pp { float: right; color: #34495e; white-space: nowrap; }
.pp.none { color: #b03a00; }
.totalbar { position: -webkit-sticky; position: sticky; bottom: 0; background: #1d2330; color: #fff; padding: 10px 14px; border-radius: 8px; margin-top: 10px; font-size: 18px; }
.totalbar b { font-size: 24px; }
.tabs a { display: inline-block; padding: 6px 12px; border: 1px solid #c3cad6; border-radius: 6px 6px 0 0; background: #f6f7fa; margin-right: 4px; }
.tabs a.on { background: #fff; font-weight: 600; border-bottom-color: #fff; }
/* директор */
.kpis { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: 0 -5px; }
.kpi { -webkit-flex: 1 1 140px; flex: 1 1 140px; margin: 5px; background: #fff; border: 1px solid #dde2ea; border-radius: 8px; padding: 10px; }
.kpi .v { font-size: 20px; font-weight: bold; }
.kpi .l { color: #6b7686; font-size: 12px; }
.chart { width: 100%; height: 180px; }
.locked { background: #fde3e1; border: 1px solid #f3b3ab; padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; }
@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap { padding: 8px; }
  .top a { padding: 10px 7px; font-size: 14px; }
  .top .who { width: 100%; margin: 0 0 6px; }
  .card { width: 100%; }
  table.resp th.hide-m, table.resp td.hide-m { display: none; }
  .price-list { max-height: none; }
}
@media print {
  .top, .noprint, .flash { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .box { border: 0; padding: 0; }
}

/* v0.2: боксы на доске */
.boxes{display:flex;flex-wrap:wrap;gap:10px}
.bx{flex:1 1 170px;min-width:160px;border-radius:8px;padding:8px;background:#fff;border:2px solid #d5dbe5}
.bx.free{border-style:dashed;background:#f7f9fb}
.bx.busy{border-color:#f0b400}
.bx.nobox{border-color:#c0392b}
.bx-h{font-weight:700;margin-bottom:6px}
.bx-car{display:block;padding:6px;border-radius:6px;margin-bottom:6px;text-decoration:none;color:#1a202c;background:#fff8e1}
.bx-car.green{background:#e2f5e6}.bx-car.red{background:#fde3e1}
/* v0.2: запись и график */
table.grid{border-collapse:collapse;width:100%}
table.grid td,table.grid th{border:1px solid #e1e6ee;padding:3px 5px;font-size:13px;vertical-align:top}
table.grid td.bk{background:#e8f0fe}
table.grid td.bk.arrived{background:#e2f5e6}
table.grid td.bk.done{background:#eceff3}
table.grid td.conflict{background:#fde3e1}
table.grid th.today{background:#fff3c4}
.sch-work{background:#e2f5e6}.sch-half{background:#fff3c4}.sch-off{background:#eceff3}
.sch select{font-size:12px;padding:1px;width:100%}
.daytabs a{margin-right:4px}
table.grid.fixed{table-layout:fixed}
table.grid.fixed th:first-child{width:56px}
/* v0.3 */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll table { min-width: 560px; }
details.box summary { cursor: pointer; font-weight: 600; }
