/* MILL Production Control Panel — styles. Base shared with the Field Control
   Panel and MILL Warehouse so the apps look like one family. */
:root {
    --brand: #083030;
    --brand-soft: #19524b;
    --accent: #c9a96e;
    --bg: #f6f7f6;
    --surface: #ffffff;
    --border: #d8ddd9;
    --text: #1c2421;
    --muted: #5b6661;
    --danger: #c0392b;
    --ok: #2e7d4f;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
    --max-w: 760px;
    --st-done: #2e7d4f;   --st-done-bg: #e3f2e8;
    --st-prog: #1f6fb2;   --st-prog-bg: #e3eef9;
    --st-late: #c0392b;   --st-late-bg: #fbe5e2;
    --st-soon: #b7791f;   --st-soon-bg: #fdf1dc;
    --st-na:   #8a948f;   --st-na-bg:   #eef0ef;
    --st-rev:  #6b4fa0;   --st-rev-bg:  #efe9f8;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    padding-bottom: 72px;
}

/* ---- MILL app header — standard (Field Control Panel/standards/app-header, owner 2026-10-01) ---- */
.app-header {
    background: var(--brand);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-logo { height: 48px; width: auto; display: block; }
.brand-sub  { font-weight: 700; letter-spacing: .15em; font-size: 14px; opacity: .95; text-transform: uppercase; }
.header-right { display: flex; align-items: center; gap: 8px; }
.hi-name { color: #fff; font-size: 13px; opacity: .85; margin-right: 0; }
/* H7 (standard, 2026-10-06): #back-nav is one row, 8 px apart. The bell of the
   standard is shown since 2026-10-09 (P17) to those with jobs waiting. */
#back-nav { display: flex; align-items: center; gap: 8px; }
#back-nav a {
    color: #fff;
    background: rgba(255,255,255,.12);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
}
#lang-toggle {
    font: inherit;
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
}
@media (max-width: 560px) {
    .app-header { padding: 10px 12px; }
    .brand { gap: 8px; }
    .brand-logo { height: 34px; }
    .brand-sub { font-size: 11px; letter-spacing: .1em; line-height: 1.2; }
    .hi-name { display: none; }
}

/* ---- Main ---- */
main { max-width: var(--max-w); margin: 0 auto; padding: 16px; }
main.wide { max-width: 1280px; }
a { color: var(--brand); }
h1 { font-size: 20px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 16px 0 8px; color: var(--muted); font-weight: 600; }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.card > h2:first-child { margin-top: 0; }

/* ---- Forms ---- */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=number], input[type=password], input[type=date], input[type=search], select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; margin-bottom: 12px;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
button, .btn {
    display: inline-block; background: var(--brand); color: #fff; border: 0; padding: 12px 16px;
    border-radius: 8px; cursor: pointer; font-weight: 600; text-decoration: none; text-align: center;
}
button.secondary, .btn.secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
button.danger, .btn.danger { background: var(--danger); }
button.ok, .btn.ok { background: var(--ok); }
button.small, .btn.small { padding: 6px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table-wrap { overflow-x: auto; }

/* ---- Footer nav ---- */
.app-footer {
    position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border);
    display: flex; justify-content: space-around; padding: 8px 4px env(safe-area-inset-bottom); z-index: 10;
}
.app-footer a { text-decoration: none; color: var(--muted); font-size: 12px; padding: 6px 10px; border-radius: 8px; }
.app-footer a.active { color: var(--brand); font-weight: 700; }

/* ---- Misc ---- */
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.toast {
    position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--brand); color: #fff;
    padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow); z-index: 60; font-size: 14px; max-width: 92vw;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--ok); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.log-item { font-size: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.log-item b { color: var(--brand); }
.banner { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.banner b { display: block; margin-bottom: 2px; }
.banner.late { background: var(--st-late-bg); color: #7c241b; border: 1px solid #f0c4be; }
.banner.info { background: #f7f5ef; border-left: 3px solid var(--accent); }
.banner.ok { background: var(--st-done-bg); color: #1d5536; border: 1px solid #bfdfca; }
.banner a { color: inherit; font-weight: 700; }

/* ---- Auth pages (login + first-run setup) ---- */
main:has(> .auth-shell) { max-width: none; padding: 0; }
.auth-shell {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 100%);
}
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: var(--radius); padding: 28px 24px; box-shadow: 0 8px 28px rgba(0,0,0,.25); }
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-brand-logo { display: block; width: 70%; max-width: 220px; margin: 0 auto 10px; border-radius: 8px; }
.auth-brand-sub { font-weight: 300; letter-spacing: .2em; font-size: 12px; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.auth-card input { margin-bottom: 18px; }
.auth-card label { margin-top: 8px; }
.auth-card button { margin-top: 28px; width: 100%; }

/* ---- Modal ---- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .modal-back { align-items: center; } }
.modal {
    background: var(--surface); width: 100%; max-width: 460px; border-radius: 16px 16px 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto;
}
@media (min-width: 640px) { .modal { border-radius: 16px; } }
.modal h2 { margin: 0 0 2px; color: var(--text); font-size: 17px; }
.modal .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.modal .actions > * { flex: 1; }

/* ---- KPI strip + filters ---- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
    box-shadow: var(--shadow); cursor: pointer; text-align: left; color: var(--text); font-weight: 400;
}
.kpi .n { font-size: 26px; font-weight: 800; line-height: 1.1; }
.kpi .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi.active { outline: 2px solid var(--brand); }
.kpi.mine { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(201,169,110,.35); }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .kpis { grid-template-columns: 1fr 1fr; } }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.filters input, .filters select { margin: 0; width: auto; flex: 1 1 180px; }
.filters label.check { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--text); white-space: nowrap; }
.link-line { font-size: 12px; color: var(--muted); margin: -4px 0 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.link-line .dot { width: 8px; height: 8px; border-radius: 50%; background: #c3cac6; display: inline-block; }
.link-line .dot.on { background: #2ecc71; }
.link-line .dot.err { background: var(--danger); }

/* ---- Step chips (where a WO is) ---- */
.step { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.step.new        { background: var(--st-soon-bg); color: var(--st-soon); }
.step.received   { background: var(--st-prog-bg); color: var(--st-prog); }
.step.returned   { background: var(--st-late-bg); color: var(--st-late); }
.step.review     { background: var(--st-rev-bg);  color: var(--st-rev); }
.step.production { background: #e0eeec; color: var(--brand); }
.step.finished   { background: var(--st-done-bg); color: var(--st-done); }
.step.closed     { background: var(--st-na-bg); color: var(--st-na); }
.tag { display: inline-block; margin: 2px 4px 0 0; border-radius: 99px; padding: 1px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--st-soon-bg); color: var(--st-soon); }
.tag.late { background: var(--st-late-bg); color: var(--st-late); }
.tag.ok { background: var(--st-done-bg); color: var(--st-done); }
.tag.turn { background: var(--accent); color: #fff; }

/* ---- The "To do" box, left of the board (owner, 2026-10-09) ---- */
.board-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .board-layout { grid-template-columns: minmax(0, 1fr); } }
.board-main { min-width: 0; }
.todo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
@media (min-width: 901px) { .todo { position: sticky; top: 12px; max-height: calc(100vh - 140px); overflow-y: auto; } }
.todo.has { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(201,169,110,.35), var(--shadow); }
.todo-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--brand); color: #fff; font-weight: 700; }
.todo-count { background: var(--danger); color: #fff; border-radius: 99px; min-width: 22px; padding: 1px 7px; text-align: center; font-size: 13px; }
.todo-clear { padding: 14px 12px; color: var(--ok); font-weight: 600; font-size: 14px; }
.todo-sec { padding: 10px 12px; border-top: 1px solid var(--border); }
.todo-head + .todo-sec { border-top: 0; }
.todo-sec.info { background: #fafbfa; }
.todo-title { display: flex; align-items: center; justify-content: space-between; }
.todo-title .step { margin: 0; }
.todo-hint { color: var(--muted); font-size: 11px; margin: 3px 0 6px; }
.todo-item { display: block; padding: 7px 8px; margin-top: 6px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; }
.todo-item:hover { background: #f7f9f8; border-color: var(--brand-soft); }
.todo-sec.info .todo-item { opacity: .85; }
.todo-wo { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.todo-wo .tag { margin: 0; }
.todo-proj { font-size: 12px; }
.todo-meta { color: var(--muted); font-size: 11px; }
.todo-note { color: var(--st-late); font-size: 12px; font-style: italic; margin-top: 2px; }

/* ---- The board ---- */
.board-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table.board { font-size: 13px; min-width: 900px; }
.board thead th { position: sticky; top: 0; background: #f1f4f2; z-index: 1; font-size: 11px; }
.board tbody tr { cursor: pointer; }
.board tbody tr:hover { background: #f7f9f8; }
.board tbody tr.turn { box-shadow: inset 4px 0 0 var(--accent); }
.board td { vertical-align: middle; }
.board .nopen { font-weight: 800; color: var(--brand); font-size: 12px; }
.board .pname { font-weight: 600; }
.board .meta { color: var(--muted); font-size: 11px; }
.board .wo-no { font-weight: 700; white-space: nowrap; }
.stage-cell { min-width: 92px; }
.stage-n { font-weight: 700; font-size: 13px; }
.stage-n small { color: var(--muted); font-weight: 500; }
.bar { height: 6px; background: #e6ebe8; border-radius: 99px; overflow: hidden; margin-top: 3px; }
.bar > div { height: 100%; background: var(--brand-soft); }
.bar.full > div { background: var(--st-done); }

/* ---- WO page ---- */
.stepper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.stepper .s { border-radius: 10px; padding: 8px; background: #fff; border: 1px solid var(--border); font-size: 12px; min-height: 64px; }
.stepper .s .t { font-weight: 700; font-size: 12px; }
.stepper .s .n { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--st-na-bg); color: var(--muted); text-align: center; line-height: 18px; font-size: 11px; margin-right: 4px; }
.stepper .s.done { background: var(--st-done-bg); border-color: #bfdfca; }
.stepper .s.done .n { background: var(--st-done); color: #fff; }
.stepper .s.now { border: 2px solid var(--accent); }
.stepper .s .w { color: var(--muted); font-size: 11px; margin-top: 2px; }
@media (max-width: 700px) { .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.target-card .tc-row { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.target-card .tc .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.target-card .tc .v { font-size: 18px; font-weight: 800; }
.target-card .tc .v .tag { vertical-align: middle; }
.target-card button { margin-left: auto; }
.target-card .muted { margin-top: 6px; }
.stage-bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stage-bars .sb .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stage-bars .sb .v { font-size: 20px; font-weight: 800; }
.stage-bars .sb .v small { font-size: 13px; color: var(--muted); font-weight: 600; }
@media (max-width: 480px) { .stage-bars { grid-template-columns: 1fr 1fr; } }
.check-list { list-style: none; padding: 0; margin: 8px 0 0; font-size: 14px; }
.check-list li { padding: 3px 0; }
.check-list .ok { color: var(--st-done); font-weight: 700; }
.check-list .bad { color: var(--st-late); font-weight: 700; }
.check-list .unk { color: var(--st-na); font-weight: 700; }
.file-item { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfa; margin-bottom: 8px; }
.file-item .main { flex: 1; min-width: 0; }
.file-link { color: var(--brand); font-weight: 600; text-decoration: none; word-break: break-all; }
.file-link:hover { text-decoration: underline; }
.types-table td, .types-table th { font-size: 13px; padding: 6px 5px; }
.types-table .d { white-space: nowrap; font-size: 12px; }
.types-table .d.done { color: var(--st-done); font-weight: 700; }

/* ---- Daily work form ---- */
.daily-head { display: grid; grid-template-columns: 180px 1fr; gap: 10px; align-items: end; }
.daily-head input, .daily-head select { margin: 0; }
@media (max-width: 560px) { .daily-head { grid-template-columns: 1fr; } }
table.daily { font-size: 14px; }
.daily th.st, .daily td.st { text-align: center; width: 84px; padding: 4px; }
.daily th.st button { display: block; margin: 4px auto 0; padding: 2px 8px; font-size: 11px; background: #fff; color: var(--brand); border: 1px solid var(--border); border-radius: 6px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.daily .ty { font-weight: 700; }
.daily .det { color: var(--muted); font-size: 12px; }
.daily td.st label { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; cursor: pointer; padding: 6px 2px; border-radius: 8px; color: var(--text); }
.daily td.st input { width: 24px; height: 24px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.daily td.st .when { font-size: 10px; color: var(--muted); min-height: 13px; }
.daily td.st.earlier label { background: #f1f4f2; }
.daily td.st.today label { background: var(--st-done-bg); }
.daily td.st.today .when { color: var(--st-done); font-weight: 700; }
.daily td.st.added label { background: #fff6dc; outline: 2px solid var(--accent); }
.daily td.st.taken label { background: var(--st-late-bg); }
.daily tr.all-done td { opacity: .75; }
.daily .qty-col { text-align: center; width: 44px; }
.daily .qty-inline { display: none; color: var(--muted); font-weight: 600; }
.daily .short { display: none; }
/* Phones: the four tick columns stay, the type keeps room for its name. */
@media (max-width: 560px) {
    .daily th.st, .daily td.st { width: 46px; padding: 3px 1px; }
    .daily th { font-size: 10px; letter-spacing: 0; }
    .daily th.st button { padding: 2px 5px; font-size: 10px; }
    .daily td.st label { padding: 4px 0; }
    .daily td.st input { width: 22px; height: 22px; }
    .daily .full, .daily .qty-col { display: none; }
    .daily .short, .daily .qty-inline { display: inline; }
    .daily .ty-cell { padding-left: 2px; }
    .daily .det { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; }
}
.save-bar {
    position: sticky; bottom: 64px; z-index: 5; display: flex; align-items: center; gap: 12px; justify-content: space-between;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 18px rgba(0,0,0,.12);
    padding: 10px 12px; margin-top: 12px;
}
.save-bar .what { font-size: 14px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: -2px; margin-right: 4px; border: 1px solid rgba(0,0,0,.08); }

/* ---- Reports ---- */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs a { padding: 8px 14px; border-radius: 99px; text-decoration: none; color: var(--brand); border: 1px solid var(--border); background: #fff; font-weight: 600; font-size: 14px; }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.day-nav { display: flex; gap: 6px; align-items: center; }
.day-nav input { margin: 0; width: auto; }
.rep-wo { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.rep-wo:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.rep-wo .t { font-weight: 700; }
.rep-types { font-size: 13px; }
.proj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.proj-item { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.proj-item:hover { border-color: var(--brand); }
.proj-item .nopen { font-weight: 800; color: var(--brand); font-size: 12px; }
.proj-item .pname { font-weight: 700; }

@media print {
    .app-header, .app-footer, .no-print, .head-actions, .tabs, .toast { display: none !important; }
    body { padding: 0; background: #fff; }
    main, main.wide { max-width: none; padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
}

/* The 🔔 (P17) and PPIC's WO approval (P16), 2026-10-09 */
#back-nav a.bell { position: relative; display: inline-block; line-height: 1; }
.bell-count { position: absolute; top: -7px; right: -7px; display: inline-block; min-width: 18px; height: 18px; padding: 0 5px;
              border-radius: 99px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px;
              text-align: center; box-sizing: border-box; }
.bell-count:empty { display: none; }
.sigpad { display: block; border: 1px dashed var(--border); border-radius: 8px; background: #fff; touch-action: none;
          max-width: 100%; margin: 4px 0 10px; cursor: crosshair; }
.sig-preview { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; margin: 0 0 8px; }
.sig-preview img { display: block; max-width: 260px; max-height: 90px; }
/* A type on hold (P18) and the PRODUKSI signature (P19), 2026-10-12. */
.banner.hold { background: var(--st-soon-bg); color: #6b4510; border: 1px solid #f0d9a8; margin-top: 10px; }
.hold-tag { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; color: #8a5a12; }
.hold-btn { margin-left: 8px; padding: 1px 8px; font-size: 11px; font-weight: 600; border-radius: 99px; background: #fff; color: var(--muted); border: 1px solid var(--border); vertical-align: middle; }
.hold-btn.on { background: var(--st-soon-bg); color: #8a5a12; border-color: #e7c27a; }
.daily tr.held td.ty-cell { box-shadow: inset 3px 0 0 #e0a53a; }
.sign-line { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; }
.sign-line img { max-width: 140px; max-height: 56px; border: 1px solid var(--border); border-radius: 6px; background: #fff; padding: 4px 8px; }
.link-btn { background: none; border: none; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font-size: 13px; }
.addon-table input { margin: 0; padding: 5px 6px; font-size: 13px; width: 100%; box-sizing: border-box; }
.addon-table td { padding: 3px 3px; }
h3 { font-size: 14px; margin: 14px 0 6px; }
/* The project folder (P20), the LBJ (P22) and PPIC's WO editor (P16), 2026-10-12. */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.folder-part { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fbfcfb; }
.folder-part h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.folder-file { font-size: 14px; margin: 4px 0; word-break: break-word; }
.folder-file a { font-weight: 600; }
.folder-none { font-size: 13px; }
.lbj-table input { padding: 6px 8px; font-size: 14px; }
.lbj-table tr.held td:first-child { box-shadow: inset 3px 0 0 #e0a53a; }
.edit-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; margin-bottom: 8px; }
.edit-fields label { font-size: 12px; color: var(--muted); }
.edit-fields input { margin-top: 2px; }
tr.row-gone td input { text-decoration: line-through; opacity: .45; }
/* The QC/PACKING check (2026-10-12): every WO row ticked on the floor. */
.qc-table td { vertical-align: top; }
.qc-table td.qc-tick input { width: 22px; height: 22px; }
.qc-table tr.qc-ok td { background: var(--st-done-bg); }
.qc-table td input[type=text] { min-width: 160px; }
.qc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; bottom: 70px; }
/* Live updates (owner, 2026-10-13): shown instead of redrawing over someone's work. */
.live-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 78px; z-index: 60; margin: 0;
            padding: 10px 18px; border-radius: 99px; border: 0; background: #083030; color: #fff; font-weight: 700;
            box-shadow: 0 4px 16px rgba(0,0,0,.25); cursor: pointer; font-size: 14px; }

/* Add-on rows (owner, 2026-10-20; P26) */
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f7f9f8; }

/* The special request (owner, 2026-10-22; P27): the kind picker and the form as printed. */
.sr-kinds { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.sr-kinds .sr-kind { flex: 1 1 150px; }
.sr-file { margin-top: 4px; }
.sr-paper { border: 1px solid var(--border); }
.sr-paper-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--brand); padding-bottom: 10px; margin-bottom: 12px; }
.sr-logo { height: 38px; width: auto; }
.sr-paper-title { flex: 1; font-size: 20px; font-weight: 800; color: var(--brand); letter-spacing: .5px; }
.sr-paper-title .muted { font-size: 12px; font-weight: 400; letter-spacing: 0; }
.sr-paper-no { text-align: right; font-weight: 800; font-size: 18px; }
.sr-paper-no div { font-size: 13px; font-weight: 600; color: var(--muted); }
.sr-kv { border-collapse: collapse; margin-bottom: 12px; }
.sr-kv th { text-align: left; font-weight: 600; color: var(--muted); padding: 3px 18px 3px 0; white-space: nowrap; font-size: 14px; }
.sr-kv td { padding: 3px 0; font-size: 14px; }
.sr-signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.sr-sign { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; text-align: center; }
.sr-sign-title { background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; padding: 5px; }
.sr-sign-img { height: 76px; display: flex; align-items: center; justify-content: center; padding: 4px; }
.sr-sign-img img { max-width: 100%; max-height: 68px; }
.sr-sign-name { font-weight: 700; font-size: 14px; min-height: 20px; }
.sr-sign-role { font-size: 11px; color: var(--muted); padding: 0 4px 6px; }
@media (max-width: 560px) {
    .sr-signs { grid-template-columns: 1fr; }
    .sr-paper-head { flex-wrap: wrap; }
}
@media print {
    .sr-paper { border: none; padding: 0; }
    .sr-signs { grid-template-columns: repeat(3, 1fr); }
    .sr-sign-title { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
