:root {
  --bg: #f4f5f7; --card: #fff; --ink: #1d2330; --muted: #5d6675; --line: #dfe3e8;
  --accent: #d9480f; --accent-ink: #fff; --ok: #1e7d3c; --warn: #9a6200; --err: #b3261e;
  --chip: #eef0f3;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink); }
a { color: #1b4f9c; }
header.top { background: #1a2b40; color: #fff; padding: 0 16px; display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; min-height: 52px; }
header.top .brand { display: flex; align-items: center; text-decoration: none; }
header.top .brand img { height: 26px; display: block; }
header.top nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
header.top nav a { color: #d6dae1; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
header.top nav a:hover, header.top nav a.on { background: #2c4363; color: #fff; }
header.top .me { color: #aab1bd; font-size: 13px; }
header.top .me a { color: #d6dae1; }
.badge { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12px; }
main { max-width: 1180px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 14px; }
h2 { font-size: 17px; margin: 22px 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 180px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid #c8ced6; border-radius: 7px;
  font: inherit; background: #fff; }
textarea { min-height: 70px; }
input[type=checkbox] { width: auto; transform: scale(1.25); margin-right: 6px; }
.check { display: flex; align-items: center; gap: 4px; color: var(--ink); font-size: 15px; }
button, .btn { display: inline-block; padding: 8px 14px; border-radius: 7px; border: 1px solid #b9c0ca;
  background: #fff; color: var(--ink); font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.big, .btn.big { padding: 13px 20px; font-size: 17px; width: 100%; }
button.link { border: 0; background: none; color: #1b4f9c; padding: 0; text-decoration: underline; }
form.inline { display: inline; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: #fafbfc; }
td.num, th.num { text-align: right; white-space: nowrap; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; border: 1px solid; }
.flash.ok { background: #e9f6ee; border-color: #b6dfc3; color: var(--ok); }
.flash.error { background: #fbeaea; border-color: #efc1be; color: var(--err); }
.flash.warn { background: #fff5e0; border-color: #f0d394; color: var(--warn); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.chip { display: inline-block; background: var(--chip); border-radius: 12px; padding: 1px 9px; font-size: 12.5px;
  margin: 1px 2px 1px 0; white-space: nowrap; }
.chip.ok { background: #dff2e5; color: var(--ok); }
.chip.warn { background: #fff0cf; color: var(--warn); }
.chip.err { background: #f9dedc; color: var(--err); }
.stages { display: flex; gap: 3px; flex-wrap: wrap; }
.stages span { font-size: 11.5px; padding: 1px 6px; border-radius: 4px; background: #eceff3; color: #7a828f; }
.stages span.done { background: #d5efdc; color: var(--ok); }
.stages span.next { background: #fff0cf; color: var(--warn); font-weight: 600; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 5px 12px; border-radius: 16px; background: #e6e9ee; text-decoration: none; color: var(--ink); }
.tabs a.on { background: #1a2b40; color: #fff; }
.task { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.task h3 { margin: 0 0 6px; font-size: 16px; }
.task .specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 14px; font-size: 14px; }
.task .units { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.task .units label { display: flex; align-items: center; gap: 6px; background: #f1f3f6; border-radius: 8px;
  padding: 8px 12px; color: var(--ink); font-size: 15px; margin: 0; }
.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; }
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 4px 12px; }
.kv div:nth-child(odd) { color: var(--muted); }
.right { text-align: right; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.photo-pick { display: grid; gap: 8px; max-width: 460px; }
.photo-btn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 12px; border: 2px dashed #9aa3af; border-radius: 10px; background: #f7f8fa;
  color: var(--ink); font-size: 16px; text-align: center; margin: 0; cursor: pointer; }
.photo-btn input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  font-size: 100px; padding: 0; border: 0; }
.photo-name { color: var(--ok); min-height: 1em; }
button:disabled { opacity: .45; cursor: default; }
@media (max-width: 720px) {
  main { padding: 10px; }
  .grid2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv div:nth-child(odd) { margin-top: 6px; }
  header.top { padding: 6px 10px; }
}
@media print {
  header.top, .noprint { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
}
