:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#19232e;background:#f2f4f6;font-synthesis:none;--gold:#e8bc66;--dark:#151a20}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer;border:1px solid #d4dbe2;border-radius:10px;padding:12px 18px;font-weight:650;min-height:46px;background:#fff;color:#253441}button:hover{background:#f2f4f6}button:disabled{opacity:.5;cursor:wait}button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #b88320;outline-offset:3px}[hidden]{display:none!important}header{background:var(--dark);color:#fff;padding:20px max(20px,calc((100vw - 1050px)/2));display:flex;justify-content:space-between;align-items:center;gap:20px}a.brand{color:var(--gold);text-decoration:none;font-size:21px;font-weight:850;letter-spacing:2px}.brand span{display:block;color:#b4bec9;font-size:11px;font-weight:500;letter-spacing:1.4px;margin-top:4px}#userbar{display:flex;align-items:center;gap:18px;font-size:14px}header button{background:transparent;color:#fff;border-color:#414850}main{max-width:1050px;margin:0 auto;padding:38px 20px 20px}h1{font-size:clamp(26px,4vw,36px);line-height:1.15;margin:10px 0 12px;letter-spacing:-1px}h2{margin:0;font-size:21px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:1.6px;color:#78633b}p{line-height:1.55;color:#596673}.auth{max-width:440px;margin:24px auto;background:#fff;padding:32px;border-radius:18px;border:1px solid #e1e6eb}label{display:block;margin:20px 0 0;font-weight:650;font-size:14px}input,textarea{display:block;width:100%;border:1px solid #c7d0d8;border-radius:9px;background:#fff;padding:13px;margin-top:8px;font-weight:400;font-size:16px}textarea{resize:vertical;min-height:65px}.primary{background:var(--dark);color:#fff;border-color:var(--dark)}.primary:hover{background:#2a3540}.auth .primary{width:100%;margin-top:25px}.help{color:#71808d;font-size:13px;line-height:1.6}.work-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.work-heading p{margin:0}.filters{display:flex;gap:8px;margin:25px 0;flex-wrap:wrap}.filters button{font-size:13px;min-height:40px;padding:9px 14px}.filters .selected{background:#e9dfca;border-color:#cab989;color:#524221}#tasks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.task{background:#fff;border:1px solid #dde3e9;border-radius:15px;padding:22px;display:flex;flex-direction:column;gap:15px}.task-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.order{font-weight:800;font-size:16px}.badge{font-size:11px;padding:6px 9px;border-radius:6px;background:#edf0f3;white-space:nowrap}.badge.active{background:#dcefe6;color:#1b6647}.badge.paused{background:#fbefd7;color:#7a5b1c}.car{font-weight:650;line-height:1.45;font-size:15px}.item{font-size:13px;line-height:1.5;color:#6e7c88;margin-top:5px}.operation{font-size:21px;line-height:1.3;font-weight:750;letter-spacing:-.3px;border-top:1px solid #e9edf1;padding-top:14px}.instruction{font-size:13px;line-height:1.6;color:#485764;margin:0;white-space:pre-wrap}.instruction-toggle{cursor:pointer;font-size:13px;font-weight:650;color:#526271}.task label{margin:0;font-size:12px}.task textarea{font-size:14px;min-height:60px}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}.actions button{flex:1;font-size:14px;padding:11px 12px}.finish{background:#e9f2ed;border-color:#bed6c8;color:#1c6446}.empty{grid-column:1/-1;padding:48px 22px;text-align:center;border:1px dashed #c7d0d8;border-radius:15px;color:#697985;background:#fff}.empty strong{display:block;font-size:18px;color:#263646;margin-bottom:8px}#notice{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);width:min(600px,calc(100% - 32px));background:#17232e;color:white;padding:16px 20px;border-radius:12px;box-shadow:0 8px 30px #0003;font-size:14px;z-index:5}#notice.error{background:#7d2b32}footer{text-align:center;margin:32px 16px;color:#87929d;font-size:11px}dialog{max-width:440px;border:0;border-radius:16px;padding:26px;box-shadow:0 16px 50px #0003}dialog::backdrop{background:#17232e88}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}@media(max-width:680px){header{padding:16px 20px}#userbar{gap:8px;align-items:flex-end;flex-direction:column}header button{min-height:32px;padding:5px 10px;font-size:12px}main{padding-top:26px}#tasks{grid-template-columns:1fr}.auth{margin:10px auto;padding:25px}.task{padding:20px}.filters{gap:6px}.filters button{padding:9px 10px}.work-heading{align-items:flex-start}.work-heading>.quiet{font-size:12px;padding:9px 12px;min-height:40px}#notice{bottom:12px}}

.personal-work{background:#fff5dc;border:2px solid #d9a84c;border-radius:14px;padding:16px;margin:20px 0 26px}
.personal-work h2{margin:0 0 6px;font-size:20px}
.personal-work .task{background:#fff;margin:12px 0}
.personal-detail{font-weight:750;margin:10px 0 5px;color:#23374a}
.old-pause{border-left:5px solid #bb6926}
.overdue{color:#92400e;font-weight:650;padding:8px 0}


/* Employee plan & personal unfinished work: separate queues by Core operation. */
#tasks{display:block}
.employee-operation-section{border:1px solid #d5dfe6;border-radius:12px;
  background:#e9eff3;padding:10px;margin-bottom:12px;min-width:0}
.employee-operation-heading{display:flex;justify-content:space-between;align-items:center;
  gap:8px;padding:6px 6px 10px;border-bottom:1px solid #c9d4de;margin-bottom:9px}
.employee-operation-heading strong{font-size:15px;line-height:1.35;color:#223342;
  overflow-wrap:anywhere}
.employee-operation-count{display:inline-flex;align-items:center;justify-content:center;
  background:#d3dfe7;color:#263f52;min-width:24px;height:24px;
  border-radius:20px;font-size:12px;font-weight:700;padding:0 5px}
.employee-operation-entries{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.employee-operation-entries .task{margin:0;min-width:0}
@media(max-width:680px){
 .employee-operation-entries{grid-template-columns:1fr}
}


/* Published plan is an explicitly released READ-ONLY view for workshops. */
.published-shop-plans{margin:14px 0;padding:13px;background:#eef3f8;
 border:1px solid #c9d7e3;border-radius:12px}
.published-shop-header{display:flex;align-items:center;justify-content:space-between;
 gap:10px;flex-wrap:wrap}
.published-shop-header h2{font-size:19px;margin:0}
.published-shop-day-buttons{display:flex;gap:8px}
.published-shop-day-buttons button{font-size:12px;padding:7px 10px;min-height:33px}
#published-shop-content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.published-workshop{background:#fff;border:1px solid #d2dfe8;border-radius:10px;
 padding:10px;min-width:0}
.published-workshop-heading{display:flex;gap:7px;justify-content:space-between;
 align-items:center;border-bottom:1px solid #d1dbe3;padding:3px 0 9px;margin-bottom:9px}
.published-workshop-heading strong{font-size:14px}
.published-worker-group{padding:5px;margin-bottom:8px}
.published-worker-group h4{font-size:12px;margin:4px 0 7px;color:#345369}
.published-worker-group h4.is-me{color:#176c48}
.published-operation{border:1px solid #e0e8ed;border-radius:8px;
 padding:8px;margin:5px 0;font-size:12px}
.published-operation strong{font-size:12px}
.published-operation>div{margin-top:4px;overflow-wrap:anywhere}
.published-operation.assigned-to-me{border-left:3px solid #178458;background:#f0faf4}
.published-pending{color:#915d1d;font-size:11px;font-weight:700}
@media(max-width:790px){#published-shop-content{grid-template-columns:1fr}}


/* Published grouped work cards; actual operation status lives in Core. */
.published-job-details{margin-top:6px;padding:5px 7px;background:#f1f5f7;
 border-radius:7px;font-size:11px}
.published-job-details summary{font-weight:700;cursor:pointer;color:#426079}
.published-job-details ul{padding-left:18px;margin:6px 0}
.published-job-details li{margin:3px 0}
.date-plan-job-ops{margin:7px 0;background:#eff4f7;padding:6px 8px;
 border-radius:7px;font-size:11px}
.date-plan-job-ops summary{font-weight:700;cursor:pointer}
.date-plan-job-ops ul{margin:5px 0;padding-left:20px}


.shared-operation-staff{padding:8px;border-radius:8px;font-size:12px;
 background:#e9f4f8;color:#285671;font-weight:700;margin:10px 0 5px}

/* Clear optional work-part context before starting a Core operation. */
.work-part-label{font-weight:700!important;color:#253441}
.task .work-part-input{min-height:65px;margin-top:9px}
.work-part-help{margin:-8px 0 0;font-size:12px}

/* Explicit opt-in: two Core assignments, one real employee clock. */
.parallel-work-panel{margin:18px 0 24px;padding:18px 20px;background:#fff;
 border:1px solid #b9cddd;border-left:4px solid #2786a5;border-radius:14px}
.parallel-heading{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.parallel-heading strong{font-size:16px}
.parallel-work-panel p{margin:10px 0}
.parallel-work-panel #parallel-start{min-width:215px}
.task .parallel-choice{display:flex;align-items:center;gap:10px;padding:10px;
 border:1px solid #dee7ed;border-radius:8px;background:#f7fafc;font-size:13px;
 color:#344552;margin:0}
.parallel-checkbox{width:19px;height:19px;min-width:19px;margin:0;accent-color:#187c65}
@media(max-width:680px){.parallel-work-panel #parallel-start{width:100%}}

.join-common-work{display:block;width:100%;font-size:13px;padding:10px 12px;
  min-height:44px;background:#e1f3ec;color:#155e42;border:1px solid #a3d1ba}
.common-work-groups{display:grid;gap:10px;margin:15px 0}
.common-work-card{padding:15px;border:1px solid #90bea8;background:#f0faf5;
  border-radius:12px;line-height:1.5}
.common-work-card strong{font-size:15px}
.common-work-card p{margin:5px 0}
.common-work-duration{font-size:19px;font-weight:800;color:#155e42;margin:7px 0}

.partial-drawing-release,.released-cutting-parts{margin:12px 0;padding:12px;
 background:#f4faf7;border:1px solid #b8d8c5;border-radius:10px;display:grid;gap:9px}
.partial-drawing-release strong,.released-cutting-parts strong{font-size:13px}
.partial-drawing-release input{min-height:42px;width:100%;box-sizing:border-box;
 border:1px solid #bccbd2;border-radius:8px;padding:9px;font:inherit}
.partial-drawing-release button{background:#e2f3e9;color:#195f3a}
.released-cutting-parts button{justify-self:start;white-space:normal;text-align:left}

/* Workers see only their own workshop plus free executable work. */
.unassigned-work{margin:20px 0;border:1px solid #a8c8dc;border-radius:14px;
 background:#f8fcff;padding:16px}
.unassigned-heading{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.unassigned-heading h2{font-size:17px;margin:0}
.unassigned-heading p{margin:0}
.unassigned-tasks{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin-top:12px}
.unassigned-card{border:1px solid #cddfe9;border-radius:10px;padding:12px;
 background:#fff;display:flex;flex-direction:column;gap:6px}
.unassigned-card strong{font-size:14px}
.unassigned-card p{margin:0}
.unassigned-card button{margin-top:auto;min-height:43px}
@media(max-width:600px){.unassigned-tasks{grid-template-columns:1fr}}

.add-operation-helper{border:1px solid #aed1b8;background:#f2faf5;
  border-radius:10px;margin:11px 0;padding:12px;display:grid;gap:9px}
.add-operation-helper strong{font-size:14px}
.add-operation-helper select{min-height:44px;font:inherit;padding:10px;
 border:1px solid #b7cbbb;border-radius:8px;width:100%;background:#fff}
.add-operation-helper button{min-height:44px}
.add-operation-helper p{margin:0}
.helper-mode-info{padding:9px 11px;border-radius:9px;
 border:1px solid #87be9c;background:#f0faf2;color:#24573a;
 font-size:13px;line-height:1.45}

.employee-order-search{display:grid;gap:6px;margin:14px 0 10px;max-width:480px}
.employee-order-search label{font-size:13px;font-weight:700;color:#32495a}
.employee-order-search>div{display:flex;gap:8px}
.employee-order-search input{flex:1;min-width:0;min-height:44px;font:inherit;
 background:#fff;border:1px solid #b3c6d0;border-radius:9px;padding:10px}
.employee-order-search button{min-height:44px;white-space:nowrap}
.published-operation-category{padding:8px 10px 10px;border:1px solid #d8e7ef;
 background:#f7fbfd;border-radius:10px;margin:9px 0}
.published-operation-category h5{font-size:14px;color:#1b587d;
 margin:1px 0 8px;font-weight:750}
.published-operation-category .published-operation{background:#fff}

/* Operations and published plan have independent tabs; never mix their cards. */
.employee-section-tabs{display:flex;gap:9px;margin:16px 0 12px;flex-wrap:wrap}
.employee-section-tabs button{flex:1 1 170px;background:#fff;
 border-color:#cad6df;font-size:14px;min-height:47px}
.employee-section-tabs button.selected{background:#233d52;color:#fff;
 border-color:#233d52}
#employee-daily-plan-view{margin-top:18px}
#employee-daily-plan-view .published-shop-plans{margin:0}
#unassigned-tasks{display:block}
.unassigned-operation-section{padding:10px;margin:10px 0 15px;
 background:#eaf1f6;border:1px solid #ccdce7;border-radius:12px}
.unassigned-operation-heading{display:flex;align-items:center;justify-content:space-between;
 gap:10px;padding:5px 6px 10px;border-bottom:1px solid #c8d7e2;margin-bottom:9px}
.unassigned-operation-heading strong{font-size:15px;color:#1f425b}
.unassigned-operation-cards{display:grid;
 grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:9px}
@media(max-width:600px){.unassigned-operation-cards{grid-template-columns:1fr}}


/* Three independent employee views: own work, free queue, published plan. */
#employee-free-view{margin-top:14px}
#employee-free-view .unassigned-work{margin:0}
@media(max-width:680px){
  .employee-section-tabs{display:grid;grid-template-columns:1fr;gap:8px}
  .employee-section-tabs button{width:100%;min-height:46px}
}


/* Unfinished employee sessions are a fourth independent view, never
   repeated in the main assigned-operation list. */
#employee-unfinished-view{margin-top:14px}
#employee-unfinished-view .personal-work{margin:0 0 14px}
#employee-unfinished-view .employee-operation-entries{grid-template-columns:repeat(2,minmax(0,1fr))}
#personal-empty{background:#fff;padding:14px;border:1px dashed #d9b66c;
 border-radius:9px}
@media(max-width:680px){
 #employee-unfinished-view .employee-operation-entries{grid-template-columns:1fr}
}
