/* أنماط صفحات المصنع (منقولة من موقع المصنع) */
.goal-date { color: var(--dk-muted-2); margin-top: 4px; }
.countdown { text-align: center; line-height: 1.1; }
.countdown b { display: block; font-size: clamp(52px, 8vw, 84px); font-weight: 700; color: var(--amber); letter-spacing: -1px; }
.countdown span { color: var(--side-ink); font-weight: 600; }
.countdown.over b { color: var(--red-soft); }
.time-track { height: 14px; border-radius: 2px; background: repeating-linear-gradient(-45deg, var(--amber) 0 8px, var(--navy) 8px 16px); border: 1px solid var(--glass-28); overflow: hidden; }
.time-track i { display: block; height: 100%; background: var(--dk-fill); }
.verdict { font-weight: 600; padding-top: 4px; border-top: 1px solid var(--glass-16); padding-top: 14px; }
.verdict.ok { color: var(--verdict-ok); }
.verdict.warn { color: var(--verdict-warn); }
.nudge { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--amber-t); border: 1px solid var(--amber-d); border-radius: var(--r); color: var(--ink); font-weight: 600; text-decoration: none; }
.nudge:hover { filter: brightness(.97); }
.tbl.matrix th, .tbl.matrix td { text-align: center; }
.tbl.matrix th:first-child, .tbl.matrix td:first-child { text-align: start; }
.matrix .wk { background: var(--surface-2); }
.mdot { display: inline-block; width: 16px; height: 16px; border-radius: 3px; border: 1.5px solid var(--line); background: var(--surface); vertical-align: middle; }
.mdot.y { background: var(--st-approved); border-color: var(--st-approved); }
.tlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.thead, .trow { display: grid; grid-template-columns: minmax(0, 4fr) 1.4fr 1.3fr 1.4fr 1.3fr; gap: 14px; align-items: center; padding: 10px 16px; }
.thead { font-size: 13px; font-weight: 700; color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--line); padding-block: 8px; }
.trow { width: 100%; background: none; border: 0; border-top: 1px solid var(--line-2); text-align: start; cursor: pointer; }
.thead + .trow { border-top: 0; }
.trow:hover { background: var(--surface-2); }
.trow.late { box-shadow: inset 4px 0 0 var(--red); }
.t-title { display: grid; gap: 2px; min-width: 0; }
.t-title strong { overflow-wrap: anywhere; }
.mini-logs { display: grid; gap: 8px; }
.mini-logs li { display: flex; gap: 8px; font-size: 14px; }
.compose { display: grid; gap: 14px; }
.compose-row { display: grid; grid-template-columns: 170px 120px minmax(0, 1fr); gap: 12px; }
.compose-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.day { display: grid; gap: 8px; }
.day-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.day-head em { font-style: normal; background: var(--amber); color: var(--navy); padding: 0 8px; border-radius: var(--r-sm); font-size: 12.5px; line-height: 22px; font-weight: 700; }
.entry { display: flex; gap: 12px; padding: 14px 18px; }
.e-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.e-actions { margin-inline-start: auto; display: inline-flex; }
.entry .chip { margin-top: 6px; }
.thumb { display: block; margin-top: 8px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface-2); cursor: zoom-in; width: 150px; height: 100px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prev-list summary, .rperson summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-top: 8px; }
.rperson { margin-bottom: 8px; }
.hidden-field[hidden] { display: none; }
@media (max-width: 880px) { .compose-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 880px) { .compose-row .grow { grid-column: 1 / -1; } }
@media (max-width: 880px) { .tbl.matrix th, .tbl.matrix td { padding: 8px 4px; font-size: 12px; } }
@media (max-width: 880px) { .thead { display: none; } }
@media (max-width: 880px) { .trow { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 14px; } }
@media (max-width: 880px) { .trow .t-title { grid-column: 1 / -1; } }
@media (max-width: 880px) { .trow .t-who { order: 3; } }
@media (max-width: 880px) { .trow .t-due { order: 4; justify-self: end; } }
@media (max-width: 880px) { .trow .t-prog { order: 5; } }
@media (max-width: 880px) { .trow .t-status { order: 6; justify-self: end; } }
.modal-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.dash-actions { display: flex; justify-content: flex-end; }
.fc.bad { border-inline-start: 4px solid var(--red); }
.fc-row { display: flex; gap: 20px; margin-top: 10px; flex-wrap: wrap; }
.fc-row a { display: grid; text-decoration: none; color: inherit; }
.fc-row b { font-size: 28px; line-height: 1.2; }
.fc-row span { color: var(--ink-3); }
.tl { padding: 128px 28px 108px; overflow: hidden; }
.tl-track { position: relative; height: 8px; background: var(--line); border-radius: 99px; }
.tl-done { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--accent); border-radius: 99px; }
.tl-now { position: absolute; top: -6px; width: 2px; height: 20px; background: var(--amber); }
.tl-now em { position: absolute; top: -22px; transform: translateX(50%); font-style: normal; font-size: 12px; font-weight: 700; color: var(--amber-d); white-space: nowrap; }
.tl-ms { position: absolute; top: 50%; }
.tl-ms b { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--st-new); transform: translate(50%, -50%); }
.tl-ms.done b { background: var(--green); border-color: var(--green); }
.tl-ms.late b { border-color: var(--red); }
.tl-ms.active b { border-color: var(--st-in_progress); }
.tl-ms.ms-goal b { background: var(--amber); border-color: var(--amber-d); border-radius: 3px; transform: translate(50%, -50%) rotate(45deg); }
.tl-ms em { position: absolute; transform: translateX(50%); font-style: normal; font-size: 12.5px; font-weight: 600; text-align: center; white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.tl-ms.up em { bottom: 38px; }
.tl-ms.up2 em { bottom: 84px; }
.tl-ms.dn em { top: 16px; }
.tl-ms.dn2 em { top: 62px; }
.tl-ms.up2::before, .tl-ms.dn2::before { content: ''; position: absolute; width: 1px; background: var(--line); inset-inline-start: 0; }
.tl-ms.up2::before { bottom: 8px; height: 76px; }
.tl-ms.dn2::before { top: 8px; height: 56px; }
.tl-ms em small { display: block; font-weight: 400; color: var(--ink-3); }
.ms-list, .ready-list, .risk-list, .arch-list, .dec-reg, .rec-list { list-style: none; margin: 0; padding: 0; }
.ms-row, .ready-list li, .risk-list li, .arch-list li, .rec-list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.ms-row:last-child, .ready-list li:last-child, .risk-list li:last-child, .arch-list li:last-child { border-bottom: 0; }
.ready-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.ready-pct { display: grid; text-align: center; }
.ready-pct b { font-size: 40px; line-height: 1.1; }
.ready-pct.ok b { color: var(--green); }
.ready-head .grow { min-width: 220px; }
.ready-list li.done strong { color: var(--ink-3); }
.lvl-high { background: var(--red-t); color: var(--red); }
.lvl-mid { background: var(--amber-t); color: var(--amber-d); }
.lvl-low { background: var(--green-t); color: var(--green); }
.risk-list li.done { opacity: .6; }
.rmx { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 6px; align-self: start; }
.rmx-y { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: 13px; color: var(--ink-3); }
.rmx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.rmx-c { min-height: 54px; border-radius: 4px; display: grid; place-items: center; font-size: 20px; }
.rmx-c.high { background: var(--red-t); color: var(--red); }
.rmx-c.mid { background: var(--amber-t); color: var(--amber-d); }
.rmx-c.low { background: var(--green-t); color: var(--green); }
.rmx-x { grid-column: 2; text-align: center; font-size: 13px; color: var(--ink-3); }
.tpl-row select { max-width: 280px; }
@media (max-width: 700px) { .tl { padding: 128px 14px 108px; } }
@media (max-width: 700px) { .tl-ms em { max-width: 84px; font-size: 11px; white-space: normal; } }
.tl-ms.ms-goal em { transform: none; inset-inline-end: -10px; text-align: end; }
.pbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 16px; background: var(--amber-t); color: var(--ink); border-bottom: 1px solid var(--line); }
.pbar .grow { flex: 1 1 220px; min-width: 0; }
.mc-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.mc-tile { text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; cursor: pointer; display: grid; gap: 0; line-height: 1.4; min-height: 74px; }
.mc-tile b { font-size: 28px; line-height: 1.2; }
.mc-tile span { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.mc-tile:hover { border-color: var(--accent); }
.mc-tile.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-t); }
.mc-tile.ok b { color: var(--green); }
.mc-tile.bad b { color: var(--red); }
.mc-tile.warn b { color: var(--amber-d); }
.mc-pill { display: inline-block; padding: 0 9px; line-height: 24px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; white-space: nowrap; }
.mc-green { background: var(--green-t); color: var(--green); }
.mc-red { background: var(--red-t); color: var(--red); }
.mc-amber { background: var(--amber-t); color: var(--amber-d); }
.mc-blue { background: var(--accent-t); color: var(--accent); }
.mc-grey { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.mc-card { padding: 0; }
.mc-tbl { font-size: 14px; }
.mc-tbl th { white-space: nowrap; padding: 10px 8px; background: var(--surface-2); }
.mc-tbl td { padding: 12px 8px; vertical-align: top; }
.mc-tbl td:nth-child(1), .mc-tbl td:nth-child(2), .mc-tbl td:nth-child(4), .mc-tbl td:nth-child(7), .mc-tbl td:nth-child(8) { white-space: nowrap; }
.mc-tbl td.mc-txt { min-width: 120px; max-width: 220px; color: var(--ink-2); }
.mc-tbl td:nth-child(5) { min-width: 90px; }
.mc-tbl td:nth-child(9) { min-width: 125px; }
.mc-people { display: grid; gap: 6px; justify-items: start; }
.mc-people .person { font-size: 13.5px; white-space: nowrap; }
.mc-chk { display: inline-flex; align-items: center; gap: 6px; }
.mc-row { cursor: pointer; }
.mc-row:hover td { background: var(--surface-2); }
.mc-row.is-down td:first-child { box-shadow: inset -3px 0 0 var(--red); }
.mc-no { color: var(--ink-3); }
.mc-name { font-weight: 700; color: var(--ink); text-decoration: none; }
.mc-name:hover { color: var(--accent); }
.mc-alert { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--r); background: var(--red-t); color: var(--ink); border: 1px solid var(--red); }
.mc-alert svg { color: var(--red); flex: none; }
.mc-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 24px; margin-bottom: 18px; }
.mc-meta dt { color: var(--ink-3); font-size: 13px; }
.mc-meta dd { font-weight: 600; }
.mc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--line-2); padding-top: 16px; }
.mc-two h3 { margin-bottom: 4px; }
.mc-two .btn { margin-top: 8px; }
.mc-bar { margin-bottom: 14px; }
.mc-logs { display: grid; gap: 0; }
.mc-logs > li { padding: 12px 0; border-top: 1px solid var(--line-2); display: grid; gap: 4px; position: relative; }
.mc-logs > li:first-child { border-top: 0; }
.mc-logs .btn.danger { position: absolute; inset-inline-end: 0; top: 8px; }
.mc-logh { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mc-events .table-wrap { margin-top: 4px; }
.mc-sum { display: grid; gap: 4px; padding-inline-start: 18px; list-style: disc; }
@media (max-width: 900px) { .mc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .mc-two { grid-template-columns: 1fr; } }
.wr-filters { grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(220px, 2fr); }
.wr-list { display: grid; gap: 14px; }
.wr-card { display: grid; gap: 10px; padding: 18px 20px; }
.wr-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.wr-head h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.wr-period { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; color: var(--ink-2); font-weight: 600; }
.wr-period .ic { color: var(--accent); }
.wr-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.wr-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; }
.wr-summary { margin: 0; line-height: 1.8; }
.wr-notes summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.wr-notes p { margin: 8px 0 0; white-space: pre-wrap; line-height: 1.8; color: var(--ink-2); }
.wr-files { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wr-files li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--surface-2); border-radius: var(--r-sm); }
.wr-picked { margin: 8px 0 4px; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.wr-pick { width: fit-content; }
@media (max-width: 720px) { .wr-filters { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .wr-card { padding: 14px; } }
