/* Director's order board: counters, orders needing attention first, load by person. */
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:#f4f4f1;color:#22221d;font:14px/1.5 'Noto Sans Georgian',system-ui,-apple-system,sans-serif}
a{color:inherit}
.board-top{display:flex;align-items:center;gap:16px;padding:10px 20px;background:#fff;border-bottom:1px solid #e3e3de}
.board-top .brand{font-size:20px;font-weight:700;text-decoration:none}
.board-top h1{font-size:18px;margin:0;flex:1}
.board-top span{color:#66665f;font-size:13px}
.board-top button{min-height:34px;padding:0 14px;border:1px solid #cfcfc8;border-radius:10px;background:#fff;font:inherit;cursor:pointer}
main{max-width:1500px;margin:0 auto;padding:16px 20px 40px}
.note{padding:18px;background:#fff;border:1px solid #e3e3de;border-radius:14px;color:#66665f}
.totals{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:14px}
.totals div{background:#fff;border:1px solid #e3e3de;border-radius:14px;padding:12px 14px}
.totals b{display:block;font-size:26px;line-height:1.2}
.totals span{font-size:12px;color:#66665f}
.totals .warn b{color:#b3402a}
.cols{display:grid;grid-template-columns:minmax(0,3fr) minmax(260px,1fr);gap:14px;align-items:start}
section{background:#fff;border:1px solid #e3e3de;border-radius:14px;overflow:hidden}
section h2{font-size:14px;margin:0;padding:12px 14px;border-bottom:1px solid #efefea}
.wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;text-align:left}
th{font-size:11px;font-weight:600;color:#77776f;padding:8px 14px;border-bottom:1px solid #e3e3de;white-space:nowrap;background:#fbfbf9}
td{padding:10px 14px;border-bottom:1px solid #efefea;vertical-align:top}
tr:last-child td{border-bottom:0}
td small{display:block;color:#77776f;font-size:12px}
td strong{font-weight:600}
.code{font:12px/1.5 ui-monospace,monospace;color:#66665f}
.tag{display:inline-block;margin:0 4px 4px 0;padding:2px 8px;border-radius:8px;font-size:12px;background:#fdeee9;color:#8f3320;white-space:nowrap}
.tag.soft{background:#fbf4e6;color:#8a6a1f}
.ok{color:#2f7a5b;font-size:12px}
.late{color:#b3402a;font-weight:600}
.bar{height:6px;width:90px;background:#ecece7;border-radius:6px;overflow:hidden;margin-top:4px}
.bar i{display:block;height:100%;background:#2f7a5b}
.people td:nth-child(n+2){text-align:right;white-space:nowrap}
.people th:nth-child(n+2){text-align:right}
button:focus-visible,a:focus-visible{outline:3px solid #4f83ad;outline-offset:2px}
@media(max-width:1000px){.totals{grid-template-columns:repeat(3,minmax(0,1fr))}.cols{grid-template-columns:1fr}}
@media(max-width:560px){.totals{grid-template-columns:repeat(2,minmax(0,1fr))}main{padding:12px}}
.people{overflow-x:auto}
.people td,.people th{padding:8px 10px}
.cols{grid-template-columns:minmax(0,3fr) minmax(320px,1fr)}
.pipe{display:flex;gap:3px;margin-top:5px}
.pipe span{flex:1;min-width:58px;padding:3px 6px;border-radius:6px;font-size:11px;text-align:center;background:#ecece7;color:#77776f;white-space:nowrap}
.pipe .done{background:#2f7a5b;color:#fff}
.pipe .active{background:#dd5d39;color:#fff}
.pipe .returned{background:#b3402a;color:#fff}
.board-top .nav{color:#b3402a;font-weight:600;font-size:13px;text-decoration:none}
.flow{margin-bottom:14px}
.flow ol{display:flex;list-style:none;margin:0;padding:14px;gap:8px;overflow-x:auto}
.flow li{position:relative;flex:1;min-width:128px;padding:10px 12px;border-radius:12px;background:#f6f6f2;border:1px solid #e6e6e0}
.flow li:not(:last-child)::after{content:'→';position:absolute;right:-9px;top:50%;transform:translateY(-50%);color:#a9a9a0;font-size:13px;z-index:1}
.flow li b{display:block;font-size:26px;line-height:1.15}
.flow li strong{display:block;font-size:13px}
.flow li span{display:block;font-size:11px;color:#77776f}
.flow li.sale{background:#fff;border-style:dashed;color:#77776f}
.flow li.sale b{color:#c9c9c0}
.flow li.hot{background:#fff4ee;border-color:#f3d5c8}
.flow li.hot b{color:#dd5d39}
.flow li.bad{background:#fdeee9;border-color:#e9b9aa}
.flow li.bad b,.flow li em{color:#b3402a;font-style:normal;font-weight:600}
/* factory floor map */
.lanes{display:grid;grid-template-columns:repeat(7,minmax(190px,1fr));gap:10px;overflow-x:auto;align-items:start;padding-bottom:8px}
.lane{background:#fff;border:1px solid #e3e3de;border-radius:14px;min-width:190px}
.lane header{padding:10px 12px;border-bottom:1px solid #efefea}
.lane header strong{display:block;font-size:14px}
.lane header span{font-size:11px;color:#77776f}
.lane header .late{font-size:11px}
.lane.busy header{background:#fff4ee;border-radius:14px 14px 0 0}
.lane .empty{padding:14px 12px;color:#a9a9a0;font-size:12px}
.card{margin:8px;padding:9px 10px;border-radius:10px;border:1px solid #e6e6e0;border-left:5px solid #e0a23a;background:#fdf7ea;font-size:12px}
.card.working{border-left-color:#dd5d39;background:#fff4ee}
.card.overdue{outline:2px solid #b3402a55}
.card strong{display:block;font-size:13px;overflow-wrap:anywhere}
.card small{display:block;color:#66665f}
.card .q{font-weight:700;font-size:14px}
.card select{width:100%;margin-top:6px;min-height:32px;border:1px solid #cfcfc8;border-radius:8px;font:inherit;background:#fff}
.unplaced{margin-bottom:12px}
.unplaced .cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:#66665f;margin:0 0 10px}
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.unplaced{margin:0 0 14px}
.lane header span{display:block}
.top-nav{display:flex;gap:4px;flex:1;flex-wrap:wrap}
.top-nav a{padding:7px 14px;border-radius:999px;font-size:14px;text-decoration:none;color:#44443d;white-space:nowrap}
.top-nav a:hover{background:#f1f1ec}
.top-nav a.active{background:#1c1c18;color:#fff}
.page-title{max-width:1500px;margin:0 auto;padding:14px 20px 0;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.page-title h1{font-size:20px;margin:0}
.page-title p{margin:0;font-size:13px}
.page-title button{margin-left:6px;border:1px solid #cfcfc8;border-radius:999px;background:#fff;padding:3px 10px;font:inherit;font-size:12px;cursor:pointer}
.flow li[data-filter],.totals div[data-filter]{cursor:pointer}
.flow li[data-filter]:hover,.totals div[data-filter]:hover{box-shadow:0 2px 10px #00000014}
.flow li.on,.totals div.on{outline:3px solid #1c1c18}
td a.open{font-weight:600;text-decoration:none;color:#22221d}
td a.open:hover{text-decoration:underline}
.card a{color:inherit;text-decoration:none}
.card a:hover{text-decoration:underline}
main{padding-top:10px}
.cards.sortable .card{cursor:grab}
.cards.sortable .card:active{cursor:grabbing}
.sortable-ghost{opacity:.4}
.chart-box{padding:12px 14px;height:260px}
.lanes{grid-template-columns:repeat(9,minmax(170px,1fr))}
.pipe span{min-width:44px;padding:3px 4px}
table.set input{width:100%;min-height:42px;padding:8px 10px;border:1px solid #cfcfc8;border-radius:10px;font:inherit;font-size:16px;background:#fff}
table.set td{vertical-align:middle;border-bottom:0;padding:6px 14px}
table.set .acts{white-space:nowrap;text-align:right}
table.set .acts button,.add button,.save button{min-height:42px;padding:0 14px;margin-left:4px;border:1px solid #cfcfc8;border-radius:10px;background:#fff;font:inherit;cursor:pointer}
.add{display:flex;gap:8px;padding:10px 14px}
.add input{flex:1;min-height:42px;padding:8px 10px;border:1px solid #cfcfc8;border-radius:10px;font:inherit;font-size:16px}
.ways{padding:12px 14px;display:grid;gap:10px;font-size:16px}
.ways input{width:20px;height:20px;vertical-align:-3px;margin-right:6px}
ol.route{margin:0;padding:12px 14px 12px 38px;font-size:15px;line-height:1.9}
.hint{padding:0 14px;font-size:13px;color:#66665f}
.save{padding:14px}
.save button{background:#dd5d39;border-color:#dd5d39;color:#fff;font-weight:600;font-size:16px;padding:0 26px;min-height:48px}
section>h2:not(:first-child){border-top:1px solid #efefea}
table.pass td,table.pass th{text-align:center;padding:8px 10px}
table.pass td:first-child,table.pass th:first-child{text-align:left}
table.pass input{width:22px;height:22px}
.more{margin:0;padding:12px 14px;border-top:1px solid #efefea}.more button{min-height:38px;padding:0 16px;border:1px solid var(--line,#cfcfc8);border-radius:10px;background:#fff;font:inherit;cursor:pointer;color:var(--accent);font-weight:600}

/* --- orders page, second pass: chips, a slim line of steps, one row per order --- */
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.orders-title{display:flex;align-items:center;gap:16px;flex-wrap:wrap;max-width:1500px;margin:0 auto;padding:24px 20px 0}
.orders-title h1{font-size:26px;font-weight:700;letter-spacing:-.015em;margin:0;flex:1}
.orders-title .search input{width:min(360px,80vw);min-height:42px;padding:0 14px;border:0;border-radius:var(--r-md);background:var(--card);box-shadow:var(--shadow-1);font:inherit;color:var(--ink)}
.orders-title #filter-note{display:none}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 14px}
.chip{min-height:38px;padding:0 14px;border:0;border-radius:999px;background:var(--card);box-shadow:var(--shadow-1);font:inherit;font-weight:500;color:var(--ink);cursor:pointer}
.chip b{margin-left:4px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--muted)}
.chip.warn b{color:var(--warn)}
.chip.on{background:var(--accent);color:#fff}
.chip.on b{color:#fff}
.stages{display:flex;align-items:stretch;gap:4px;background:var(--card);border-radius:var(--r-lg);box-shadow:var(--shadow-1);padding:6px;margin-bottom:16px;overflow-x:auto}
.stages .arrow{align-self:center;color:#b3bcc7;font-size:18px}
.stage{flex:1;min-width:104px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:0;border-radius:var(--r-md);background:none;font:inherit;color:var(--ink);cursor:pointer;text-align:left}
.stage strong{font-size:13.5px;font-weight:600}
.stage b{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums}
.stage b.zero{color:#c3cad3;font-weight:500}
.stage.bad b{color:var(--warn)}
.stage.on{background:var(--accent);color:#fff}
.stage.on b{color:#fff}
.stage:disabled{cursor:default;opacity:.7}
section.orders{background:none;border:0;border-radius:0;overflow:visible}
.order-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.order-row{display:grid;grid-template-columns:minmax(200px,1.3fr) minmax(280px,2fr) minmax(150px,1fr) auto;gap:18px;align-items:center;padding:14px 18px;background:var(--card);border-radius:var(--r-lg);box-shadow:var(--shadow-1);border-left:3px solid transparent}
.order-row.soft{border-left-color:#e2a03f}
.order-row.hard{border-left-color:#d2463c}
.order-row .who a,.order-row .who strong{font-size:16px;font-weight:600;color:var(--ink);text-decoration:none}
.order-row .who small{display:block;color:var(--muted);font-size:12.5px;margin-top:2px}
.order-row .where{display:grid;gap:6px;min-width:0}
.order-row .now{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.order-row .now b{color:var(--ink);font-weight:600}
.order-row .state{display:flex;flex-wrap:wrap;gap:4px}
.order-row .state .ok{color:var(--ok);font-size:13px;font-weight:500}
.order-row .due{text-align:right;white-space:nowrap}
.order-row .due small{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.when{display:inline-block;padding:3px 9px;border-radius:var(--r-sm);background:var(--ground);color:var(--muted);font-size:12.5px;font-weight:500}
.when.near{background:var(--warn-soft);color:var(--warn);font-weight:600}
.when.late{background:#fdecea;color:#b3261e;font-weight:600}
.note.empty{border:0;box-shadow:var(--shadow-1)}
.elsewhere{margin:14px 2px}
.elsewhere a{color:var(--muted);font-weight:500;text-decoration:none}
details.extra{margin-top:8px;background:var(--card);border-radius:var(--r-lg);box-shadow:var(--shadow-1);overflow:hidden}
details.extra summary{padding:14px 18px;cursor:pointer;font-weight:600}
details.extra .cols{padding:0 14px 14px}
details.extra section{border:0;box-shadow:none}
.more{border:0;padding:12px 2px}
@media(hover:hover) and (pointer:fine){.chip:not(.on):hover,.stage:not(.on):not(:disabled):hover{background:var(--accent-soft)}.order-row .who a:hover{text-decoration:underline}.elsewhere a:hover{color:var(--ink)}}
@media(max-width:1000px){.order-row{grid-template-columns:1fr;gap:10px}.order-row .due{text-align:left}}
/* steps of one order: done is quiet green, the step in work carries the accent, only a returned step is red */
.order-row .pipe{margin-top:0;gap:3px}
.order-row .pipe span{background:var(--ground);color:var(--muted);font-weight:500;border-radius:var(--r-sm)}
.order-row .pipe .done{background:var(--ok-soft);color:var(--ok)}
.order-row .pipe .active{background:var(--accent);color:#fff}
.order-row .pipe .returned{background:#fdecea;color:#b3261e}
.order-row .bar{margin-top:0}
.due .moved{display:block;margin-top:4px;color:var(--warn);font-size:12.5px;line-height:17px;font-variant-numeric:tabular-nums}
