/* Stage 3.1 queue dates, weekly view and master review. */
.rows { min-width:0; }
.job-row { min-width:0; }
.job-top strong { flex-shrink:0; }
.job-mid .stage { font-size:.88rem; }
.operation-deadline { display:flex;align-items:center;justify-content:space-between;gap:8px;margin:5px 0;font-size:.76rem; }
.deadline-label { font-weight:800;color:#4d6570; }
.deadline-label.overdue { color:#ac2734; }
.deadline-label.today { color:#096d67; }
.job-row.overdue { border-left:3px solid #ba4854; }
.final-due { color:#70828c;font-size:.72rem; }
.waiting { font-size:.72rem;color:#6a7f8a;margin-top:4px; }
.week-controls { display:flex;gap:8px;margin-bottom:12px; }
.week-controls button:nth-child(2) { flex:1; }
.review-form { display:grid;gap:10px; }
.review-form label { font-size:.85rem; }
.review-form .check { display:flex;align-items:center;gap:8px;min-height:44px; }
.review-form select,.review-form textarea { width:100%;min-height:44px;padding:8px;border:1px solid #c5d5dc;border-radius:7px;font:inherit; }
.review-form textarea { min-height:75px; }
.review-form input:not([type=checkbox]),#history-actor { width:100%;min-width:0;min-height:44px;padding:8px;border:1px solid #c5d5dc;border-radius:7px; }
#history-actor { margin:6px 0 12px; }
.dialog-message { color:#a12633;background:#fff0ef;padding:8px;border-radius:6px;margin-bottom:8px; }
nav { display:grid;grid-template-columns:repeat(4,1fr); }
nav.manager { grid-template-columns:repeat(3,1fr); }
nav button { min-width:0;min-height:54px; }
main { padding-bottom:130px; }
@media(min-width:700px) {
  nav,nav.manager { display:flex;flex-wrap:wrap; }
  nav button { flex:1;min-width:120px; }
  main { padding-bottom:28px; }
}

.event-order { font-size:.76rem;color:#637784;margin-bottom:4px; }
.event-actor { font-size:.87rem;display:block; }
.event-action,.event-reason { margin:4px 0;line-height:1.4;overflow-wrap:anywhere; }

/* Shared history is a single list, including on wide screens. */
.history-lines{display:flex;flex-direction:column;background:#fff;border:1px solid #dce5e9;border-radius:9px;overflow:hidden}
.history-lines .event-row{display:grid;grid-template-columns:120px minmax(0,1fr) auto;align-items:start;gap:16px;border:0;border-bottom:1px solid #e7edef;border-radius:0;padding:14px 16px;min-height:0}
.history-lines .event-row:last-child{border-bottom:0}
.history-lines .event-order{font-size:.85rem;font-weight:700;color:#235467;margin:0;overflow-wrap:anywhere}
.history-description{min-width:0;overflow-wrap:anywhere}
.history-description .event-action{margin:5px 0}
.history-description small{display:block;margin-top:5px}
.history-lines .event-row>button{font-size:.78rem}
.history-lines .empty{border:0;border-radius:0}
@media(max-width:700px){.history-lines .event-row{grid-template-columns:minmax(0,1fr);gap:7px;padding:12px}.history-lines .event-row>button{justify-self:start}}

.completed-heading{margin-top:28px}.completed-day{margin:18px 0}.completed-day h3{font-size:.95rem;margin:0 0 9px}.completed-list{background:#fff;border:1px solid #dce5e9;border-radius:9px;overflow:hidden}.completed-row{width:100%;display:grid;grid-template-columns:100px minmax(0,1fr) minmax(0,1fr) 130px;gap:12px;padding:13px;text-align:left;border:0;border-bottom:1px solid #e7edef;background:#fff;color:inherit}.completed-row:last-child{border-bottom:0}.completed-row:hover{background:#eef7f5}.completed-row span{overflow-wrap:anywhere}.completed-row small{color:#6b7c87}@media(max-width:700px){.completed-row{grid-template-columns:1fr;gap:5px}}

.supply-line{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:13px 0;border-bottom:1px solid #dce5e9}.supply-line p{margin:5px 0;overflow-wrap:anywhere}.supply-urgent{background:#fff0ee;border-left:4px solid #bc3434;padding-left:12px}.supply-urgent strong{color:#a12626}.supply-receive{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.supply-receive input[type=number]{max-width:130px;min-height:44px}.supply-line:last-child{border-bottom:0}

#plan-search{width:100%;min-height:44px;border:1px solid #c5d5dc;border-radius:8px;padding:10px;margin:12px 0;}
#plan-list{grid-template-columns:minmax(0,1fr);}
.production-table-wrap{width:100%;overflow:auto;background:#fff;border:1px solid #d8e3ea;border-radius:12px;}
.production-table{width:100%;min-width:900px;border-collapse:collapse;font-size:14px;}
.production-table td,.production-table th{padding:12px;text-align:left;border-bottom:1px solid #e3eaf0;vertical-align:top;}
.production-table thead th{background:#203d50;color:white;}
.production-group th{background:#edf2f6;color:#203d50;font-weight:700;}
.production-table tr.film-ordered{background:#f2e8ff;}
.plan-order-group{margin:16px 0 24px;}
.plan-order-group .rows{display:grid;grid-template-columns:1fr;}
