:root { --navy: #1f3a4d; --ink: #1d2730; --line: #c9d1d8; --soft: #f3f6f8; --yellow: #fff7cc; --red: #c62828; --amber: #b26a00; --green: #2e7d32; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.4 Arial, Helvetica, sans-serif; color: var(--ink); background: #fff; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 10px 16px; background: var(--navy); color: #fff; }
header a { color: #fff; text-decoration: none; }
.brand { font-weight: bold; font-size: 18px; } .brand span { font-weight: normal; opacity: .8; }
nav { display: flex; flex-wrap: wrap; gap: 4px 16px; } nav a:hover { text-decoration: underline; }
main { padding: 16px; max-width: 1500px; margin: 0 auto; }
h1 { margin: 4px 0 12px; font-size: 22px; } h2 { margin: 24px 0 8px; font-size: 17px; }
a { color: #1565c0; }
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.stats { display: flex; gap: 16px; } .stats span { background: var(--soft); padding: 4px 10px; border-radius: 4px; }
.stats .late { background: #fde4e4; color: var(--red); }
.actions, .filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
input, select, textarea, button, .button { font: inherit; }
input, select, textarea { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; width: 100%; }
.filters input { width: 260px; max-width: 100%; } .filters select, .status-select { width: auto; }
button, .button { display: inline-block; padding: 7px 14px; border: 0; border-radius: 4px; background: var(--navy); color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap; }
button:hover, .button:hover { filter: brightness(1.2); }
button.danger { background: var(--red); margin-top: 24px; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
table.grid { border-collapse: collapse; width: 100%; }
.grid th { background: var(--navy); color: #fff; text-align: left; padding: 6px 8px; font-size: 12px; white-space: nowrap; }
.grid td { border-top: 1px solid var(--line); padding: 5px 8px; vertical-align: middle; white-space: nowrap; }
.grid tbody tr:nth-child(even) td { background: #fafbfc; }
.grid td.num { text-align: right; } .grid td.empty { text-align: center; color: #777; padding: 24px; }
.lines td { padding: 2px; } .lines input { border: 0; border-radius: 0; background: var(--yellow); padding: 5px 6px; min-width: 60px; }
.lines .c_line_no input, .lines .c_qty input { min-width: 44px; width: 44px; }
.lines .c_width input, .lines .c_height input { width: 76px; }
.lines .c_fabric input, .lines .c_custom_fabric input, .lines .c_notes input { min-width: 180px; }
.lines .c_room input { min-width: 110px; }
.lines .c_mount input, .lines .c_bracket_type input, .lines .c_bracket_color input, .lines .c_fascia_color input,
.lines .c_control_side input, .lines .c_chain_color input { min-width: 115px; }
.lines .c_fascia input, .lines .c_fascia_size input { min-width: 70px; }
.flag { font-weight: bold; padding: 2px 6px; border-radius: 3px; font-size: 12px; }
.flag.late { background: #fde4e4; color: var(--red); } .flag.soon { background: #fff1d6; color: var(--amber); }
.status { padding: 2px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; background: var(--soft); }
.status.s2 { background: #e3f2fd; color: #0d47a1; font-weight: bold; } .status.s3, .status.s4 { background: #e8f5e9; color: var(--green); }
.status.s5 { background: #eee; color: #555; } .status.s6 { background: #fff1d6; color: var(--amber); } .status.s7 { background: #eee; color: #999; text-decoration: line-through; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
fieldset { border: 1px solid var(--line); border-radius: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; }
legend { font-weight: bold; padding: 0 6px; }
label { display: block; font-size: 12px; font-weight: bold; color: #445; } label input, label textarea, label select { margin-top: 3px; font-weight: normal; }
label.wide { grid-column: 1 / -1; } label.check { display: flex; gap: 6px; align-items: center; } label.check input { width: auto; margin: 0; }
form.narrow { max-width: 420px; display: grid; gap: 12px; }
form.inline { display: flex; gap: 6px; } form.inline input { width: 150px; }
.listgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 12px; }
.flash { background: #e8f5e9; color: var(--green); padding: 8px 12px; border-radius: 4px; }
.error { background: #fde4e4; color: var(--red); padding: 8px 12px; border-radius: 4px; }
.hint, .meta { color: #667; font-size: 13px; } .log { color: #556; font-size: 13px; padding-left: 18px; }
code { background: var(--soft); padding: 4px 8px; border-radius: 4px; word-break: break-all; }
.progress { display: flex; list-style: none; padding: 0; margin: 4px 0 14px; counter-reset: step; }
.progress li { flex: 1; position: relative; padding: 30px 6px 0; text-align: center; font-size: 12px; color: #889; }
.progress li::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 24px; line-height: 24px; border-radius: 50%; background: #dfe5ea; color: #667; font-weight: bold; z-index: 1; }
.progress li::after { content: ''; position: absolute; top: 11px; left: -50%; width: 100%; height: 3px; background: #dfe5ea; }
.progress li:first-child::after { display: none; }
.progress li.done, .progress li.now { color: var(--ink); }
.progress li.done::before { content: '\2713'; background: var(--green); color: #fff; } .progress li.done::after, .progress li.now::after { background: var(--green); }
.progress li.now::before { background: var(--navy); color: #fff; box-shadow: 0 0 0 4px #c7d6e2; }
.progress li b { display: block; } .progress li span { display: block; color: #667; font-size: 11px; }
.answer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 14px 18px; border-radius: 6px; margin: 4px 0 8px; }
.answer b { font-size: 20px; } .answer.yes { background: #e8f5e9; color: var(--green); } .answer.no { background: #fde4e4; color: var(--red); }
.answer span { color: var(--ink); }
.ok { color: var(--green); font-weight: bold; font-size: 16px; }
input.count { width: 90px; background: var(--yellow); text-align: right; }
.grid th.num { text-align: right; }
.grid td .hint { font-size: 11px; white-space: normal; }
details.rules { margin-top: 24px; } details.rules summary, details.hint summary { cursor: pointer; font-weight: bold; color: #445; }
tr.newrow input { background: #eef6ff; }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; } .stats { flex-wrap: wrap; gap: 8px; } }
@media print { header, .filters, .actions, button, .button { display: none; } }
