:root{--bg:#edf0f2;--surface:#fff;--surface-2:#f6f7f8;--ink:#18232d;--muted:#66737d;--line:#d7dde1;--nav:#17232d;--nav2:#22313d;--accent:#2776a1;--accent2:#155a80;--amber:#b76b08;--red:#b83a3a;--green:#277a53;--shadow:0 8px 28px #12202d1c;--r:8px;--font:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
[data-theme=dark]{--bg:#10171d;--surface:#18222a;--surface-2:#202c35;--ink:#e8edf0;--muted:#a5b1ba;--line:#34434e;--nav:#0c1217;--nav2:#17222a;--accent:#4fa3cf;--accent2:#83c3e3;--shadow:0 8px 28px #0006}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:var(--font);color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #4aa8d8;outline-offset:2px}.skip{position:fixed;top:-60px;left:12px;z-index:99;background:var(--surface);padding:12px}.skip:focus{top:12px}.app{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:242px;background:var(--nav);color:#dfe7ec;display:flex;flex-direction:column;z-index:20;transition:.2s}.brand{height:70px;display:flex;align-items:center;padding:12px 16px;border-bottom:1px solid #ffffff18;gap:10px}.brand-icon{width:38px;height:38px;display:grid;place-items:center;border:2px solid #5ea4c8;color:#83c5e7;font-weight:900;clip-path:polygon(15% 0,85% 0,100% 50%,85% 100%,15% 100%,0 50%)}.brand-copy{display:flex;flex-direction:column;letter-spacing:.05em}.brand-copy small{font-size:9px;color:#9fb1bc}.sidebar nav{padding:12px 8px;overflow:auto;flex:1}.nav-link{border:0;background:transparent;color:inherit;width:100%;display:flex;gap:12px;align-items:center;padding:10px 12px;border-radius:6px;text-align:left;min-height:42px}.nav-link:hover,.nav-link.active{background:var(--nav2);color:#fff}.nav-link.active{box-shadow:inset 3px 0 var(--accent)}.nav-icon{width:20px;text-align:center}.side-foot{padding:10px;border-top:1px solid #ffffff18}.side-foot small{display:block;padding:8px 12px;color:#82939e}.close-nav{display:none;margin-left:auto}.workspace{margin-left:242px;min-width:0}.topbar{height:70px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 24px;position:sticky;top:0;z-index:15;gap:14px}.global-search{position:relative;max-width:580px;flex:1}.global-search>span{position:absolute;left:13px;top:10px;color:var(--muted)}.global-search input{width:100%;height:42px;border:1px solid var(--line);background:var(--surface-2);border-radius:6px;padding:0 14px 0 38px}.top-actions{margin-left:auto;display:flex;align-items:center;gap:8px}.icon-btn{width:44px;height:44px;border:0;background:transparent;border-radius:6px;font-size:20px}.icon-btn:hover{background:var(--surface-2)}.notify-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--red);position:relative;top:-9px;left:-4px}.user-btn{border:0;background:transparent;display:flex;align-items:center;gap:12px;padding:4px 8px;border-radius:6px}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#d6e7ef;color:#174f6b;font-weight:800}.user-copy{display:flex;flex-direction:column;text-align:left}.user-copy small{color:var(--muted);font-size:11px}.popover{position:absolute;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:var(--r);z-index:50}.top-pop{right:22px;top:61px;width:290px;padding:10px}.top-pop>strong{display:block;padding:8px}.top-pop button,.search-results button{display:block;width:100%;border:0;background:transparent;text-align:left;padding:10px;border-radius:5px}.top-pop button:hover,.search-results button:hover{background:var(--surface-2)}.user-pop{width:190px}.search-results{top:47px;left:0;width:100%;max-height:360px;overflow:auto;padding:6px}.search-results small{display:block;color:var(--muted)}main{padding:24px 28px 50px}.page-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:20px;gap:16px}.breadcrumbs{font-size:12px;color:var(--muted);margin-bottom:5px}.page-head h1{margin:0;font-size:27px;letter-spacing:-.025em}.page-head p{margin:5px 0 0;color:var(--muted);font-size:13px}.primary,.secondary,.danger{border:0;border-radius:6px;padding:10px 15px;min-height:42px;font-weight:700}.primary{background:var(--accent);color:#fff}.primary:hover{background:var(--accent2)}.secondary{background:var(--surface);border:1px solid var(--line)}.danger{background:#fff0f0;color:var(--red);border:1px solid #e9b7b7}.kpis{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);background:var(--surface);margin-bottom:18px}.kpi{padding:16px 18px;border-right:1px solid var(--line);min-width:0}.kpi:last-child{border-right:0}.kpi small{color:var(--muted);display:block}.kpi strong{font-size:25px;display:block;margin-top:5px}.kpi span{font-size:11px;color:var(--muted)}.grid-2{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr);gap:18px;margin-bottom:18px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);min-width:0}.panel-head{padding:13px 16px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:10px}.panel-head h2,.panel-head h3{font-size:15px;margin:0}.panel-body{padding:15px}.attention-list,.activity-list{list-style:none;padding:0;margin:0}.attention-list li,.activity-list li{display:flex;gap:12px;padding:12px 2px;border-bottom:1px solid var(--line);align-items:flex-start}.attention-list li:last-child,.activity-list li:last-child{border:0}.attention-list button{margin-left:auto}.signal{width:9px;height:9px;border-radius:50%;background:var(--amber);margin-top:6px;flex:none}.signal.red{background:var(--red)}.signal.green{background:var(--green)}.tag{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border-radius:999px;font-size:11px;font-weight:700;background:var(--surface-2);border:1px solid var(--line);white-space:nowrap}.tag.red{color:var(--red);background:#fff2f2;border-color:#f1c8c8}.tag.amber{color:#8a4d00;background:#fff7e8;border-color:#eed5a8}.tag.green{color:var(--green);background:#edfaf4;border-color:#bae3cf}[data-theme=dark] .tag.red,[data-theme=dark] .tag.amber,[data-theme=dark] .tag.green{background:var(--surface-2)}.schedule-row{display:grid;grid-template-columns:130px 1fr 48px;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid var(--line)}.bar{height:9px;background:var(--surface-2);border-radius:5px;overflow:hidden}.bar i{display:block;height:100%;background:var(--accent)}.chart{height:180px;display:flex;align-items:end;gap:12px;border-bottom:1px solid var(--line);padding:12px 4px 0}.chart-col{height:100%;flex:1;display:flex;flex-direction:column;justify-content:end;align-items:center;gap:6px}.chart-col i{display:block;width:70%;background:var(--accent);min-height:3px;border-radius:3px 3px 0 0}.chart-col small{font-size:10px}.toolbar,.filter-panel{display:flex;gap:10px;flex-wrap:wrap;align-items:end;background:var(--surface);border:1px solid var(--line);padding:12px;margin-bottom:12px;border-radius:var(--r)}.toolbar{align-items:center}.toolbar .grow{flex:1}.field{display:flex;flex-direction:column;gap:5px;min-width:145px}.field label{font-size:11px;font-weight:700;color:var(--muted)}.field input,.field select,.field textarea{height:40px;border:1px solid var(--line);background:var(--surface);border-radius:5px;padding:7px 9px}.field textarea{height:90px;resize:vertical}.active-chips{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px}.active-chips button{border:1px solid var(--line);background:var(--surface);padding:5px 8px;border-radius:999px}.board-wrap{overflow-x:auto;overscroll-behavior-inline:contain;padding-bottom:10px}.board{display:flex;gap:12px;min-width:max-content;align-items:flex-start}.board-col{width:292px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r);max-height:calc(100vh - 250px);display:flex;flex-direction:column}.board-col.collapsed{width:54px}.board-col.collapsed .col-body,.board-col.collapsed .col-meta{display:none}.board-col.collapsed .col-head{writing-mode:vertical-rl;height:220px}.col-head{padding:11px 12px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px}.col-title{font-weight:800;font-size:13px}.col-meta{font-size:10px;color:var(--muted)}.col-body{padding:8px;overflow-y:auto;min-height:120px}.job-card{background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:6px;padding:11px;margin-bottom:8px;box-shadow:0 2px 4px #12202d0b}.job-card.blocked{border-left-color:var(--red)}.job-card.overdue{outline:1px dashed var(--red)}.job-card:focus-visible{outline:3px solid var(--accent)}.card-top,.card-foot{display:flex;justify-content:space-between;gap:8px;align-items:center}.job-ref{font-size:12px;font-weight:900;color:var(--accent2)}.job-card h3{font-size:13px;margin:8px 0 4px}.job-card p{font-size:11px;color:var(--muted);margin:0 0 8px}.card-facts{display:grid;grid-template-columns:1fr 1fr;gap:5px;font-size:10px;margin:8px 0}.progress{height:5px;background:var(--surface-2);border-radius:3px;overflow:hidden;margin:7px 0}.progress i{display:block;height:100%;background:var(--green)}.blocker{font-size:10px;color:var(--red);font-weight:800;margin:7px 0}.move-select{max-width:130px;height:32px;font-size:10px;border:1px solid var(--line);background:var(--surface);border-radius:4px}.table-shell{background:var(--surface);border:1px solid var(--line);border-radius:var(--r)}.table-scroll{overflow:auto;max-height:610px}table{border-collapse:collapse;width:100%;font-size:12px;white-space:nowrap}th,td{padding:11px 12px;border-bottom:1px solid var(--line);text-align:left}th{position:sticky;top:0;background:var(--surface-2);z-index:2;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.04em}th:first-child,td:first-child{position:sticky;left:0;background:var(--surface);z-index:1}th:first-child{background:var(--surface-2);z-index:3}tbody tr:hover td{background:var(--surface-2)}tbody tr:hover td:first-child{background:var(--surface-2)}.sort-btn{border:0;background:transparent;padding:0;font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit}.sort-icons{letter-spacing:-3px;margin-left:4px;color:#9aa5ad}.sort-icons .on{color:var(--accent);font-weight:900}.pagination{display:flex;align-items:center;gap:8px;justify-content:flex-end;padding:12px;flex-wrap:wrap}.pagination span{margin-right:auto;color:var(--muted)}.pagination button,.pagination select{min-height:36px;border:1px solid var(--line);background:var(--surface);border-radius:5px}.pagination button{min-width:36px}.pagination button.active{background:var(--accent);color:#fff}.empty{text-align:center;padding:50px 20px;color:var(--muted)}.pipeline{display:flex;gap:2px;margin:12px 0 18px;overflow:auto}.pipe-step{flex:1;min-width:130px;background:var(--surface);border:1px solid var(--line);padding:12px}.pipe-step strong{display:block;font-size:20px}.week-head,.week-row{display:grid;grid-template-columns:160px repeat(5,minmax(130px,1fr));min-width:850px}.week-head>*,.week-row>*{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:8px}.week-head{background:var(--surface-2);font-size:11px;font-weight:800}.centre{font-weight:800;background:var(--surface)}.slot{min-height:76px}.schedule-block{border-left:3px solid var(--accent);background:#e8f4fa;color:#153f55;padding:6px;border-radius:4px;font-size:10px;margin-bottom:4px;width:100%;text-align:left}.capacity{font-size:9px;color:var(--muted);display:block}.over{background:#fff0f0}.drawer{position:fixed;z-index:60;right:0;top:0;bottom:0;width:min(760px,94vw);background:var(--surface);box-shadow:-12px 0 40px #0004;overflow:auto}.drawer-head{position:sticky;top:0;background:var(--nav);color:#fff;padding:18px 22px;z-index:2;display:flex;justify-content:space-between;align-items:flex-start}.drawer-head h2{margin:3px 0}.drawer-content{padding:18px 22px}.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);overflow:auto;margin-bottom:16px}.tabs button{border:0;background:transparent;padding:11px 12px;border-bottom:3px solid transparent;white-space:nowrap}.tabs button.active{border-color:var(--accent);color:var(--accent2);font-weight:800}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.detail-card{border:1px solid var(--line);border-radius:6px;padding:13px}.detail-card h3{font-size:12px;text-transform:uppercase;color:var(--muted);margin:0 0 10px}.detail-card dl{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;font-size:12px}.detail-card dd{text-align:right;margin:0;font-weight:700}.stepper{display:flex;gap:0;overflow:auto;margin:15px 0}.step{min-width:90px;text-align:center;font-size:9px;color:var(--muted)}.step i{display:block;width:16px;height:16px;border-radius:50%;background:var(--line);margin:0 auto 5px;position:relative}.step.done i{background:var(--green)}.step.current i{background:var(--accent);box-shadow:0 0 0 4px #5ba9d033}.modal-back{position:fixed;inset:0;background:#06121bbb;z-index:70;display:grid;place-items:center;padding:16px}.modal{width:min(620px,100%);max-height:92vh;overflow:auto;background:var(--surface);border-radius:var(--r);box-shadow:var(--shadow)}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid var(--line)}.modal-head h2{font-size:18px;margin:0}.modal-body{padding:18px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-grid .full{grid-column:1/-1}.modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--line)}.error{font-size:11px;color:var(--red)}.toasts{position:fixed;right:20px;bottom:20px;z-index:90;display:grid;gap:8px}.toast{background:var(--nav);color:#fff;padding:12px 16px;border-radius:6px;box-shadow:var(--shadow);min-width:260px;border-left:4px solid #58bd8b}.backdrop{display:none}.mobile-agenda{display:none}.stat-list{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.stat-box{border:1px solid var(--line);padding:14px;background:var(--surface)}.stat-box strong{font-size:22px;display:block}.nc{border-left:4px solid var(--red)}
@media(max-width:1200px){.sidebar{width:210px}.workspace{margin-left:210px}main{padding:20px 18px}.kpis{grid-template-columns:repeat(2,1fr)}.kpi:nth-child(2){border-right:0}.kpi:nth-child(-n+2){border-bottom:1px solid var(--line)}.grid-2{grid-template-columns:1fr}.user-copy{display:none}}
@media(max-width:1023px){.sidebar{transform:translateX(-100%);width:270px}.sidebar.open{transform:none}.workspace{margin-left:0}.close-nav{display:block}.backdrop{display:block;position:fixed;inset:0;background:#07121a99;z-index:19;opacity:0;pointer-events:none;transition:.2s}.sidebar.open+.backdrop{opacity:1;pointer-events:auto}.topbar{padding:0 14px}.menu-btn{display:block}.detail-grid{grid-template-columns:1fr}.stat-list{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.menu-btn{display:none}.app.compact .sidebar{width:72px}.app.compact .workspace{margin-left:72px}.app.compact .brand-copy,.app.compact .nav-link span:last-child,.app.compact .side-foot small{display:none}.app.compact .brand{padding:12px}.app.compact .nav-link{justify-content:center}.app.compact .brand-icon{width:44px}}
@media(max-width:767px){main{padding:16px 10px 40px}.page-head{align-items:flex-start}.page-head h1{font-size:23px}.page-head p{display:none}.page-head .primary{padding:8px 10px}.global-search{position:relative;min-width:0}.global-search input{max-width:none}.search-results{top:47px;left:0;width:100%}.top-actions .user-btn{display:none}.kpis{grid-template-columns:1fr 1fr}.kpi{padding:12px}.kpi strong{font-size:21px}.grid-2{gap:12px}.board-col{width:calc(100vw - 42px);scroll-snap-align:start}.board{scroll-snap-type:x mandatory}.filter-panel .field{min-width:calc(50% - 6px);flex:1}.toolbar .field{min-width:120px}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.pagination{justify-content:center}.pagination span{width:100%;text-align:center;margin:0}.user-copy{display:none}.week-grid{display:none}.mobile-agenda{display:block}.stat-list{grid-template-columns:1fr 1fr}.drawer{width:100vw}.drawer-content{padding:14px}.top-pop{right:10px}.page-head{margin-bottom:14px}.panel-body{padding:11px}}
@media(max-width:420px){.top-actions{gap:0}.top-actions .icon-btn:first-child{display:none}.kpis{grid-template-columns:1fr}.kpi{border-right:0;border-bottom:1px solid var(--line)}.filter-panel .field{min-width:100%}.stat-list{grid-template-columns:1fr}}

/* Give mobile page titles and their primary actions the full row. */
@media(max-width:767px){
  .page-head{flex-direction:column;align-items:stretch;gap:12px}
  .page-head>div{min-width:0}
  .page-head .primary{width:100%;white-space:nowrap}
}

@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{.sidebar,.topbar,.page-head button,.toolbar,.filter-panel,.pagination,.toasts{display:none!important}.workspace{margin:0}main{padding:0}.panel,.table-shell{border:0}body{background:#fff;color:#000}.table-scroll{max-height:none;overflow:visible}th{position:static}}

/* Refined controls and operational surfaces */
.brand{padding:8px 10px;gap:6px}.brand-home{display:flex;align-items:center;gap:10px;min-width:0;flex:1;border:0;background:transparent;color:inherit;text-align:left;padding:4px 6px;border-radius:6px}.brand-home:hover{background:#ffffff0d}.brand-icon{flex:none}.chevron{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;transition:transform .15s}.user-btn[aria-expanded=true] .chevron{transform:rotate(180deg)}.theme-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.moon-icon{display:none}[data-theme=dark] .sun-icon{display:none}[data-theme=dark] .moon-icon{display:block}
.toolbar:has(+.filter-panel){margin-bottom:0;border-radius:var(--r) var(--r) 0 0;border-bottom-color:transparent;background:var(--surface-2);padding:11px 14px}.toolbar+.filter-panel{border-radius:0 0 var(--r) var(--r);padding:12px 14px 14px;position:relative;gap:14px}.toolbar+.filter-panel:before{content:"";position:absolute;top:0;left:14px;right:14px;border-top:1px solid var(--line)}
.field select,.move-select{appearance:none;padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%2366737d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center}
.board-wrap{overflow:auto;padding:4px 4px 16px;cursor:grab;scrollbar-color:var(--accent) var(--surface-2);scrollbar-width:auto;border:1px solid var(--line);border-radius:var(--r);background:linear-gradient(90deg,var(--surface-2),var(--bg));user-select:none}.board-wrap.drag-scrolling{cursor:grabbing;scroll-behavior:auto}.board-wrap::-webkit-scrollbar{height:14px}.board-wrap::-webkit-scrollbar-track{background:var(--surface-2);border-radius:8px}.board-wrap::-webkit-scrollbar-thumb{background:var(--accent);border:3px solid var(--surface-2);border-radius:8px}.job-card,.job-card *{user-select:text}.job-card{cursor:pointer}.job-card[draggable=true]{cursor:grab}.job-card:active{cursor:grabbing}.move-select{max-width:142px;height:34px;cursor:pointer}
th{padding-top:8px;padding-bottom:8px}.sort-btn{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;padding:3px 0}.sort-icons{display:inline-flex;flex-direction:column;justify-content:center;gap:0;line-height:.55;font-size:11px;letter-spacing:0;margin-left:auto;min-width:12px;text-align:center}.sort-icons span{opacity:.5}.sort-icons .on{opacity:1;font-size:13px;color:var(--accent)}.sort-icons .off{opacity:.14}
@media(max-width:767px){.chart{gap:4px;overflow:hidden}.chart-col{min-width:0}.chart-col small{font-size:8px;max-width:100%;overflow:hidden}.panel-body{min-width:0}}

/* Mobile interactive controls stay readable and comfortably tappable */
@media(max-width:767px){.sort-btn{min-height:40px;font-size:12px}.mobile-agenda .schedule-block{min-height:44px;padding:9px;font-size:12px;line-height:1.4}}

/* Teal production accent and corrected header icon geometry */
:root{--accent:#167f78;--accent2:#0d665f}[data-theme=dark]{--accent:#35ad9f;--accent2:#72d0c5}
.global-search>.search-icon{position:absolute;left:12px;top:10px;width:22px;height:22px;fill:none;stroke:var(--muted);stroke-width:1.9;stroke-linecap:round;pointer-events:none}.global-search input{padding-left:43px}
.notification-btn,.theme-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:0}.notification-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.notification-btn .notify-dot{position:absolute;top:9px;right:8px;left:auto;width:7px;height:7px;border:2px solid var(--surface);box-sizing:content-box}
.theme-btn svg{display:block;margin:0;flex:none}.theme-btn .moon-icon{display:none}[data-theme=dark] .theme-btn .sun-icon{display:none}[data-theme=dark] .theme-btn .moon-icon{display:block}
.user-btn .chevron{width:22px;height:22px;flex:none;stroke-width:2}

/* Clearer schedule capacity treatment */
.slot.over{position:relative;background:repeating-linear-gradient(135deg,#fff8e9,#fff8e9 8px,#f8edcf 8px,#f8edcf 16px)}.slot.over:before{content:"Over capacity";display:block;color:#85520a;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.035em;margin:0 0 5px}.slot.over .schedule-block{border-left-color:var(--amber)}

/* Dark theme: muted industrial surfaces with readable status accents */
[data-theme=dark]{--bg:#0f171d;--surface:#18232b;--surface-2:#202d36;--ink:#edf2f4;--muted:#aab7bf;--line:#354651;--nav:#0a1116;--nav2:#172630;--accent:#4294bd;--accent2:#62afd4}
[data-theme=dark] .primary{background:#287ca6;color:#f7fbfd;box-shadow:inset 0 0 0 1px #69b6db33}[data-theme=dark] .primary:hover{background:#3694bf}[data-theme=dark] .secondary{background:#22313b;border-color:#455965;color:#e8eef1}[data-theme=dark] .secondary:hover{background:#2b3d48;border-color:#58707e}[data-theme=dark] .danger{background:#402327;border-color:#714047;color:#ffb8bd}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{background-color:#141f26;border-color:#40525e;color:#edf2f4}[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#80909a}
[data-theme=dark] .tag{background:#26343d;border-color:#41535e;color:#dce5e9}[data-theme=dark] .tag.red{background:#41262b;border-color:#71434a;color:#ffb8bf}[data-theme=dark] .tag.amber{background:#44351f;border-color:#735a2d;color:#ffd28a}[data-theme=dark] .tag.green{background:#203c32;border-color:#346c57;color:#9be0bf}
[data-theme=dark] .schedule-block{background:#1d3a49;color:#d9f1fc;border:1px solid #31586b;border-left:3px solid #55a9d2}[data-theme=dark] .schedule-block:hover{background:#24495a;border-color:#4a7890}[data-theme=dark] .slot.over{background:repeating-linear-gradient(135deg,#30291e,#30291e 8px,#392f20 8px,#392f20 16px)}[data-theme=dark] .slot.over:before{color:#f1bd67}[data-theme=dark] .slot.over .schedule-block{background:#423522;border-color:#71572d;color:#ffe1a7;border-left-color:#d9942f}
[data-theme=dark] .toolbar:has(+.filter-panel){background:#1d2932}[data-theme=dark] .board-wrap{background:linear-gradient(90deg,#19242c,#111a20)}[data-theme=dark] .job-card{box-shadow:0 3px 10px #0003}

/* Final accent application */
:root{--accent:#167f78;--accent2:#0d665f}[data-theme=dark]{--accent:#35ad9f;--accent2:#72d0c5}.brand-icon{border-color:#43a69d;color:#78cfc6}.primary{background:var(--accent)}.primary:hover{background:var(--accent2)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline-color:var(--accent)}.step.current i{box-shadow:0 0 0 4px #35ad9f33}
.schedule-block{background:#e5f5f2;color:#164c48;border:1px solid #b8ddd7;border-left:3px solid var(--accent)}.schedule-block:hover{background:#d6eee9;border-color:#8ac7be}
[data-theme=dark] .primary{background:#258f84;color:#f6fffd;box-shadow:inset 0 0 0 1px #8ce2d733}[data-theme=dark] .primary:hover{background:#31a799}[data-theme=dark] .schedule-block{background:#193c3a;color:#d6f6f1;border-color:#2e615d;border-left-color:#45b8aa}[data-theme=dark] .schedule-block:hover{background:#214b48;border-color:#468079}

/* Unified table filter panel */
.toolbar:has(+.filter-panel){background:var(--surface);padding-bottom:7px}.toolbar+.filter-panel{padding-top:7px;border-top:0;background:var(--surface)}.toolbar+.filter-panel:before{display:none}[data-theme=dark] .toolbar:has(+.filter-panel){background:var(--surface)}

/* Table sorting: paired arrows when idle, one directional arrow when active */
.sort-btn{justify-content:flex-start;gap:10px;white-space:nowrap}.sort-icons{display:inline-flex;flex-direction:row;align-items:center;gap:0;line-height:1;font-size:17px;letter-spacing:-3px;min-width:auto;margin-left:0;color:var(--muted)}.sort-icons span{display:inline-block;opacity:.72;font-weight:500}.sort-icons .on{font-size:19px;line-height:1;color:var(--accent);opacity:1;font-weight:700}.sort-icons:has(.on) span:not(.on){display:none}

/* Deeper, restrained accent for dark mode */
[data-theme=dark]{--accent:#287a72;--accent2:#3f948a}[data-theme=dark] .primary{background:#256f69;color:#f3faf9;box-shadow:inset 0 0 0 1px #67aaa333}[data-theme=dark] .primary:hover{background:#2f8279}[data-theme=dark] .schedule-block{background:#193532;color:#d3e9e6;border-color:#31544f;border-left-color:#327f76}[data-theme=dark] .schedule-block:hover{background:#20403c;border-color:#416963}[data-theme=dark] .step.current i{box-shadow:0 0 0 4px #287a723d}

/* Roomier table pagination with clearer directional controls */
.pagination{gap:12px;padding:14px 16px;min-height:64px}.pagination-meta{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.pagination-meta>span{margin-right:auto;color:var(--muted)}.pagination-meta>label{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;white-space:nowrap}.pagination select{min-width:62px;padding:0 28px 0 10px}.page-buttons{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex:none}.pagination button{min-width:38px;height:38px;padding:0 9px}.page-buttons>button:first-child,.page-buttons>button:last-child{width:44px;height:40px;font-size:25px;line-height:1;font-weight:400;padding:0 0 3px}
@media(max-width:767px){.pagination{display:block;padding:12px 10px 14px}.pagination-meta{width:100%;gap:8px}.pagination-meta>span{width:auto;text-align:left;padding:0;white-space:nowrap}.pagination-meta>label{margin:0}.page-buttons{width:max-content;max-width:100%;justify-content:flex-start;gap:7px;margin:10px auto 0;overflow-x:auto}.pagination button{min-width:44px;height:44px}.page-buttons>button:first-child,.page-buttons>button:last-child{width:44px;height:44px}}

/* Dark theme accent: subdued indigo rather than bright teal */
[data-theme=dark]{--accent:#5968a3;--accent2:#7b88bd}[data-theme=dark] .primary{background:#4b588e;color:#f5f6fc;box-shadow:inset 0 0 0 1px #9fa9d326}[data-theme=dark] .primary:hover{background:#5967a0}[data-theme=dark] .schedule-block{background:#252c46;color:#e0e4f5;border-color:#414b71;border-left-color:#6675ad}[data-theme=dark] .schedule-block:hover{background:#2d3553;border-color:#55618b}[data-theme=dark] .step.current i{box-shadow:0 0 0 4px #5968a33d}[data-theme=dark] .tabs button.active{color:#aeb8e1}[data-theme=dark] .job-ref{color:#a9b4df}

/* Preserve the teal identity in dark mode at a lower luminance */
[data-theme=dark]{--accent:#2d6963;--accent2:#57928c}[data-theme=dark] .primary{background:#285d58;color:#f2f8f7;box-shadow:inset 0 0 0 1px #78aaa51f}[data-theme=dark] .primary:hover{background:#326d67}[data-theme=dark] .schedule-block{background:#1c3230;color:#d6e8e6;border-color:#36514e;border-left-color:#3d7771}[data-theme=dark] .schedule-block:hover{background:#233c39;border-color:#49645f}[data-theme=dark] .step.current i{box-shadow:0 0 0 4px #2d69633d}[data-theme=dark] .tabs button.active{color:#78aaa5}[data-theme=dark] .job-ref{color:#76aaa5}

/* Rich violet accent for dark mode */
[data-theme=dark]{--accent:#7456c4;--accent2:#a18be0}[data-theme=dark] .primary{background:#6649b3;color:#faf8ff;box-shadow:inset 0 0 0 1px #c4b6ed2b}[data-theme=dark] .primary:hover{background:#785ac7}[data-theme=dark] .schedule-block{background:#2d2645;color:#ebe5fb;border-color:#4f4371;border-left-color:#8166ca}[data-theme=dark] .schedule-block:hover{background:#383053;border-color:#665888}[data-theme=dark] .step.current i{box-shadow:0 0 0 4px #7456c440}[data-theme=dark] .tabs button.active{color:#b8a8e7}[data-theme=dark] .job-ref{color:#b3a2e4}

/* Unified mineral-violet brand scale across light and dark themes */
:root{--accent:#59478f;--accent2:#44356f}.primary{background:#59478f}.primary:hover{background:#4b3b7b}.brand-icon{border-color:#7664aa;color:#aa9dce}.schedule-block{background:#f0edf8;color:#403462;border-color:#d8d0e9;border-left-color:#65529a}.schedule-block:hover{background:#e7e1f2;border-color:#bdb1d8}.step.current i{box-shadow:0 0 0 4px #59478f2e}
[data-theme=dark]{--accent:#806fb8;--accent2:#a89bd0}[data-theme=dark] .primary{background:#62529b;color:#faf9fd;box-shadow:inset 0 0 0 1px #c9c1e31f}[data-theme=dark] .primary:hover{background:#7160aa}[data-theme=dark] .schedule-block{background:#2b283b;color:#e7e3f1;border-color:#48425f;border-left-color:#7564aa}[data-theme=dark] .schedule-block:hover{background:#343047;border-color:#5a526f}[data-theme=dark] .step.current i{box-shadow:0 0 0 4px #806fb83b}[data-theme=dark] .tabs button.active{color:#b8acd8}[data-theme=dark] .job-ref{color:#b3a7d3}

/* Font Awesome Free SVG icon sizing */
.fa-icon{display:block;width:18px;height:18px;fill:currentColor}.nav-icon{display:grid;place-items:center;height:20px}.nav-icon .fa-icon{width:17px;height:17px}.global-search>.search-icon{fill:var(--muted);stroke:none}.notification-btn svg,.theme-btn svg,.user-btn .chevron{fill:currentColor;stroke:none}.notification-btn svg{width:20px;height:22px}.theme-btn svg{width:19px;height:19px}.user-btn .chevron{width:18px;height:18px}

/* Compact header search and dropdown icons */
.global-search>.search-icon{width:18px;height:18px;left:14px;top:12px}.global-search input{padding-left:42px}.user-btn .chevron{width:14px;height:14px;margin-left:2px}

/* Font Awesome functional-action icons */
button:has(>.fa-action-icon){display:inline-flex;align-items:center;justify-content:center;gap:8px}.fa-action-icon{display:inline-grid;place-items:center;width:15px;height:15px;flex:none}.fa-action-icon .fa-icon{width:14px;height:14px}.sort-icons .fa-icon{width:10px;height:14px}.sort-icons span.on .fa-icon{width:11px;height:15px}.page-buttons>button:first-child .fa-icon,.page-buttons>button:last-child .fa-icon{width:10px;height:16px;margin:auto}.page-buttons>button:first-child,.page-buttons>button:last-child{display:grid;place-items:center;padding:0}

/* Lighter outline treatment for notification and theme controls */
.notification-btn svg,.theme-btn svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}.notification-btn svg{width:21px;height:21px;stroke-width:1.8}.theme-btn svg{width:19px;height:19px;stroke-width:1.7}

/* Theme switching belongs with persistent navigation settings, not primary header actions */
.side-theme svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.side-theme .moon-icon{display:none}[data-theme=dark] .side-theme .sun-icon{display:none}[data-theme=dark] .side-theme .moon-icon{display:block}

/* Compact Font Awesome sorting indicators */
.sort-btn{gap:7px}.sort-icons{gap:2px;letter-spacing:0}.sort-icons .fa-icon{width:7px;height:11px}.sort-icons span.on .fa-icon{width:8px;height:12px}

/* Reports date range and actions */
.toolbar:has([data-action="print"]){align-items:flex-end;gap:12px;padding:14px}.toolbar:has([data-action="print"]) .field input,.toolbar:has([data-action="print"])>button{height:42px;min-height:42px}.toolbar:has([data-action="print"])>button{align-self:flex-end}
@media(min-width:768px){.toolbar:has([data-action="print"]) [data-action="print"]{margin-left:auto}}
@media(max-width:767px){.toolbar:has([data-action="print"]){align-items:flex-end}.toolbar:has([data-action="print"]) .field{flex:1 1 calc(50% - 6px);min-width:140px}.toolbar:has([data-action="print"])>button{flex:1 1 140px}}

/* Job drawer header controls remain legible in the light theme */
.drawer-head .icon-btn{color:#fff}.drawer-head .icon-btn:hover{background:#ffffff1a;color:#fff}.drawer-head .icon-btn:active{background:#ffffff29}

/* Kanban: vertical wheel scrolling belongs to each stage, not the board */
.board-wrap{max-width:100%;overflow-x:auto;overflow-y:hidden}.board-col{height:clamp(360px,calc(100dvh - 270px),620px);max-height:none}.col-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent}.col-body::-webkit-scrollbar{width:8px}.col-body::-webkit-scrollbar-track{background:transparent}.col-body::-webkit-scrollbar-thumb{background:var(--line);border:2px solid transparent;border-radius:8px;background-clip:padding-box}.col-body::-webkit-scrollbar-thumb:hover{background:var(--muted);background-clip:padding-box}

/* Kanban headers are full-width collapse controls */
.col-head{cursor:pointer}.col-head:hover{background:color-mix(in srgb,var(--accent) 7%,transparent)}.col-head .icon-btn{display:grid;place-items:center;width:38px;height:38px;flex:none}.col-head .icon-btn .fa-icon{width:11px;height:18px}.col-head:focus-visible{outline:3px solid var(--accent);outline-offset:-3px;border-radius:6px}

/* Collapsed stages shrink to the header instead of retaining an empty body */
.board-col.collapsed{height:220px;min-height:0;max-height:220px}.board-col.collapsed .col-head{height:100%;min-height:0;border-bottom:0}

/* Collapsed count badges remain circular in vertical headers */
.board-col.collapsed .col-title .tag{display:inline-grid;place-items:center;width:24px;height:24px;min-width:24px;padding:0;border-radius:50%;writing-mode:horizontal-tb;line-height:1}

/* Production-board filters share one control baseline */
.toolbar:has([data-board-filter]){align-items:flex-end;gap:12px}.toolbar:has([data-board-filter])>label.tag{align-self:flex-end;height:40px;min-height:40px;padding:0 12px;border-radius:5px;background:var(--surface);font-size:12px;font-weight:700}.toolbar:has([data-board-filter])>label.tag input{width:16px;height:16px;margin:0 3px 0 0;accent-color:var(--accent)}.toolbar:has([data-board-filter]) [data-action="reset-board"]{align-self:flex-end;height:40px;min-height:40px}
@media(max-width:767px){.toolbar:has([data-board-filter])>label.tag,.toolbar:has([data-board-filter]) [data-action="reset-board"]{flex:1 1 140px;justify-content:center}}

/* Tables keep filters visible and place result totals outside the panel */
.filter-panel:has([data-table-search]){align-items:flex-end;padding:14px}.filter-panel:has([data-table-search]) [data-table-reset]{align-self:flex-end;height:40px;min-height:40px;margin-left:auto}.table-result-summary{display:block;margin:14px 2px 8px;color:var(--muted);font-size:12px;font-weight:500}
@media(max-width:767px){.filter-panel:has([data-table-search]) [data-table-reset]{margin-left:0;flex:1 1 140px;justify-content:center}.table-result-summary{margin-top:12px}}

/* Dispatch modal form spacing */
.modal[data-modal-form="dispatch"] .modal-body{display:grid;grid-template-columns:1fr 1fr;gap:16px 14px}.modal[data-modal-form="dispatch"] .modal-body>.tag{grid-column:1/-1;justify-self:start;min-height:40px;padding:8px 12px;border-radius:5px}.modal[data-modal-form="dispatch"] .field{min-width:0}
@media(max-width:560px){.modal[data-modal-form="dispatch"] .modal-body{grid-template-columns:1fr;gap:14px}.modal[data-modal-form="dispatch"] .modal-body>.tag{grid-column:auto}}

/* Quality inspection modal spacing */
.modal[data-modal-form="quality"] .modal-body{display:grid;grid-template-columns:1fr;gap:16px}.modal[data-modal-form="quality"] .field{min-width:0}.modal[data-modal-form="quality"] textarea{min-height:110px}

/* MHDev portfolio credit */
.mhdev-credit{display:block;margin:8px 2px 2px;padding:12px;border:1px solid #ffffff1f;border-radius:7px;background:#ffffff08;color:#dfe7ec;text-decoration:none;transition:background-color .18s,border-color .18s,transform .18s}
.mhdev-credit:hover{background:#ffffff0f;border-color:#5ea4c866;transform:translateY(-1px)}
.mhdev-credit:focus-visible{outline:3px solid #4aa8d8;outline-offset:2px}
.mhdev-credit span,.mhdev-credit em,.mhdev-credit small{display:block}
.mhdev-credit span{color:#91a4b0;font-size:9px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.mhdev-credit strong{display:block;margin:2px 0 3px;color:#83c5e7;font-size:15px;letter-spacing:.02em}
.mhdev-credit em{color:#dfe7ec;font-size:10px;font-style:normal;line-height:1.35}
.mhdev-credit small{padding:3px 0 0;color:#91a4b0;font-size:9px;line-height:1.35}
.side-foot .version{padding:7px 12px 2px;font-size:9px}
@media(min-width:1024px){.app.compact .mhdev-credit{display:none}}

/* Optional guided tour */
body.tour-active{overflow:hidden}.tour-intro-back[hidden],.tour-layer[hidden]{display:none!important}
.tour-restart{position:fixed;right:20px;bottom:18px;z-index:45;display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:7px 12px 7px 8px;border:1px solid color-mix(in srgb,var(--accent) 38%,var(--line));border-radius:999px;background:var(--surface);color:var(--accent2);box-shadow:0 8px 26px #10182024;font-size:11px;transition:transform .18s,box-shadow .18s,border-color .18s}.tour-restart:hover{transform:translateY(-2px);border-color:var(--accent);box-shadow:0 10px 30px #10182033}.tour-restart>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--accent);color:#fff;font-size:16px}.tour-restart strong{font-size:11px;letter-spacing:.01em}.toasts{bottom:72px}
.tour-intro-back{position:fixed;inset:0;z-index:110;display:grid;place-items:center;padding:18px;background:#0b1019b8;backdrop-filter:blur(3px)}.tour-intro{width:min(460px,100%);padding:32px;border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));border-radius:12px;background:var(--surface);box-shadow:0 24px 80px #0007;text-align:center}.tour-intro-mark{display:grid;place-items:center;width:56px;height:56px;margin:0 auto 16px;border-radius:16px;background:color-mix(in srgb,var(--accent) 14%,var(--surface));color:var(--accent);font-size:20px;font-weight:900}.tour-intro-mark:after{content:"sec";margin-left:2px;font-size:9px;text-transform:uppercase}.tour-eyebrow{margin:0 0 8px;color:var(--accent);font-size:10px;font-weight:900;letter-spacing:.09em;text-transform:uppercase}.tour-intro h2{margin:0;color:var(--ink);font-size:25px;letter-spacing:-.025em}.tour-intro>p:not(.tour-eyebrow){margin:12px 0 24px;color:var(--muted);line-height:1.55}.tour-intro-actions{display:flex;justify-content:center;gap:10px}.tour-intro-actions button{min-width:138px}
.tour-layer{position:fixed;inset:0;z-index:100}.tour-shield{position:absolute;inset:0;background:transparent}.tour-spotlight{position:fixed;border:3px solid #fff;border-radius:10px;box-shadow:0 0 0 9999px #0b1019b8,0 0 0 6px color-mix(in srgb,var(--accent) 56%,transparent);transition:left .18s ease,top .18s ease,width .18s ease,height .18s ease;pointer-events:none}.tour-card{position:fixed;width:360px;padding:20px;border:1px solid color-mix(in srgb,var(--accent) 34%,var(--line));border-radius:10px;background:var(--surface);box-shadow:0 18px 55px #0007;color:var(--ink)}.tour-close{position:absolute;right:8px;top:8px;display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:24px;line-height:1}.tour-close:hover{background:var(--surface-2);color:var(--ink)}.tour-card .tour-eyebrow{padding-right:30px}.tour-progress{height:3px;margin:10px 0 17px;overflow:hidden;border-radius:3px;background:var(--surface-2)}.tour-progress i{display:block;height:100%;border-radius:inherit;background:var(--accent);transition:width .2s}.tour-card h2{margin:0 0 9px;font-size:19px;letter-spacing:-.02em}.tour-card>p:not(.tour-eyebrow){margin:0;color:var(--muted);font-size:13px;line-height:1.55}.tour-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:20px}.tour-actions>div{display:flex;gap:8px}.tour-actions button{min-height:38px;padding:8px 12px}.tour-skip{border:0;background:transparent;color:var(--muted);font-size:11px;font-weight:700}.tour-skip:hover{color:var(--ink);text-decoration:underline}
[data-theme=dark] .tour-restart{color:#d9d1ef;box-shadow:0 8px 26px #0006}[data-theme=dark] .tour-intro-back,[data-theme=dark] .tour-spotlight{--tour-dim:#05060bcc}
@media(max-width:600px){.tour-restart{right:12px;bottom:12px;min-height:42px;font-size:12px}.tour-restart strong{font-size:12px}.toasts{right:12px;bottom:66px}.tour-intro{padding:26px 20px}.tour-intro-actions{flex-direction:column}.tour-intro-actions button{width:100%}.tour-card{padding:18px}.tour-actions{align-items:flex-end}.tour-actions>div{display:grid;grid-template-columns:1fr 1fr}.tour-actions .secondary,.tour-actions .primary{min-width:76px}}
@media print{.tour-restart,.tour-intro-back,.tour-layer{display:none!important}}

.mobile-production{display:none}

@media(max-width:767px){
  .board-wrap{display:none}
  .mobile-production{display:block}
  .mobile-queue-head{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:15px;margin-bottom:10px}
  .mobile-queue-head h2{font-size:19px;margin:2px 0 3px}
  .mobile-queue-head p{color:var(--muted);font-size:12px;margin:0}
  .mobile-queue-head .field{margin-top:14px;min-width:0}
  .mobile-queue-head select{width:100%;height:44px}
  .mobile-eyebrow{font-size:10px!important;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--accent2)!important}
  .mobile-queue{display:grid;gap:10px}
  .mobile-job-card{margin:0;padding:14px;box-shadow:none}
  .mobile-job-card h3{font-size:15px;margin-top:7px}
  .mobile-card-stage{display:inline-flex;margin-top:9px;padding:4px 8px;border-radius:4px;background:#e7f2f8;color:var(--accent2);font-size:10px;font-weight:800}
  .mobile-job-card .card-facts{font-size:11px;gap:7px 12px}
  .mobile-job-card .card-foot{margin-top:10px}
  .mobile-job-card .move-select{height:40px;max-width:155px;font-size:11px}
}

[data-theme=dark] .mobile-card-stage{background:#203746}
