:root {
  --bg: #f4f6fa; --panel: #fff; --ink: #1c2433; --muted: #6b7486; --line: #e3e7ef;
  --brand: #1f4e8c; --brand-2: #2d6cc0; --side: #14233c; --side-ink: #c9d3e3;
  --red: #c62828; --red-bg: #fdecec; --amber: #b26a00; --amber-bg: #fff4de;
  --green: #1b7a3d; --green-bg: #e6f5ec; --grey-bg: #eef0f4;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; font: 14px/1.45 "Segoe UI", system-ui, -apple-system, "Noto Sans", Arial, sans-serif;
  color: var(--ink); background: var(--bg); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 12px; }

/* Sidebar */
.sidebar { width: 248px; flex: none; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; }
.brand { padding: 16px 18px 14px; border-bottom: 1px solid #22375a; text-align: center; }
.brand-logo { height: 84px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.brand-logo img { max-width: 190px; max-height: 84px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.brand-logo .logo-ph { display: none; width: 64px; height: 64px; border-radius: 14px; background: linear-gradient(135deg, #3aa0dc, #1f4e8c);
  color: #fff; place-items: center; font-weight: 700; font-size: 20px; letter-spacing: .06em; font-family: Georgia, "Times New Roman", serif; }
.brand-logo.ph img { display: none; } .brand-logo.ph .logo-ph { display: grid; }
.brand-title { color: #fff; font-weight: 600; font-size: 13.5px; line-height: 1.3; } .brand-sub { font-size: 11px; color: #8fa2c0; margin-top: 3px; }
nav { padding: 8px 10px; flex: 1; overflow: auto; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #6f84a6; padding: 14px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer;
  color: var(--side-ink); text-decoration: none; user-select: none; }
.nav-item .ico { width: 18px; text-align: center; opacity: .85; }
.nav-item:hover:not(.disabled) { background: #1d3152; color: #fff; }
.nav-item.active { background: var(--brand-2); color: #fff; }
.nav-item.disabled { opacity: .38; cursor: not-allowed; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid #22375a; }
.user-chip { display: flex; gap: 10px; align-items: center; color: #fff; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #2d6cc0; display: grid; place-items: center; font-weight: 600; }
.version { margin-top: 8px; color: #6f84a6; }

/* Main */
main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sample-banner { background: #fff8e1; border-bottom: 1px solid #f0d58a; color: #6d4c00; padding: 8px 24px; font-size: 13px; }
.sample-banner strong { color: #8a5a00; margin-right: 6px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px 10px; }
.topbar h1 { margin: 0; font-size: 21px; font-weight: 600; }
.today-chip { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 5px 14px; color: var(--muted); }
.today-chip strong { color: var(--ink); }
.view { flex: 1; overflow: auto; padding: 6px 24px 24px; }

/* Cards */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; border-top: 4px solid var(--brand-2); }
.kpi.red { border-top-color: var(--red); } .kpi.amber { border-top-color: #e59a00; } .kpi.green { border-top-color: var(--green); } .kpi.grey { border-top-color: #8a93a5; }
.kpi .label { color: var(--muted); font-size: 12.5px; } .kpi .value { font-size: 30px; font-weight: 600; margin-top: 2px; }
.kpi.red .value { color: var(--red); } .kpi.amber .value { color: var(--amber); } .kpi.green .value { color: var(--green); }
.kpi.clickable { cursor: pointer; } .kpi.clickable:hover { box-shadow: 0 2px 10px rgba(20,35,60,.08); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.empty { padding: 26px; text-align: center; color: var(--muted); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; font-size: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f8f9fc; font-size: 11px; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; position: sticky; top: 0; z-index: 1; }
tbody tr:hover { background: #f5f8fd; } tbody tr.clickable { cursor: pointer; }
td.mono, .mono { font-family: Consolas, "Cascadia Mono", "DejaVu Sans Mono", monospace; font-size: 12.5px; }
td.nowrap { white-space: nowrap; }
.table-wrap { overflow: auto; }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.overdue { background: var(--red-bg); color: var(--red); }
.badge.due { background: var(--amber-bg); color: var(--amber); }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.na { background: var(--grey-bg); color: var(--muted); }
.status { font-size: 12.5px; white-space: nowrap; }
.status::before { content: "●"; margin-right: 5px; }
.status.in-service::before { color: var(--green); } .status.out-of-service::before { color: var(--red); } .status.under-repair::before { color: #e59a00; }
.action { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 4px; }
.action.CREATE { background: #e3effd; color: #1f4e8c; } .action.UPDATE { background: #fff4de; color: #8a5a00; }

/* Toolbar & forms */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 240px; }
input, select, textarea { font: inherit; color: inherit; border: 1px solid #cfd5e1; border-radius: 7px; padding: 7px 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #bcd3f5; border-color: var(--brand-2); }
input[readonly] { background: #f3f5f9; color: var(--muted); }
.toolbar select { width: auto; min-width: 150px; }
button { font: inherit; border: 1px solid #cfd5e1; background: #fff; border-radius: 7px; padding: 7px 14px; cursor: pointer; color: var(--ink); }
button:hover { background: #f3f6fb; }
button.primary { background: var(--brand-2); color: #fff; border-color: var(--brand-2); font-weight: 600; }
button.primary:hover { background: var(--brand); }
button.link { border: none; background: none; color: var(--brand-2); padding: 2px 6px; }
.count { color: var(--muted); font-size: 13px; margin-left: auto; }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(15,25,45,.45); display: grid; place-items: center; z-index: 50; }
.modal { background: #fff; border-radius: 12px; width: min(920px, 94vw); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 16px 22px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 12px 12px; }
.close { border: none; font-size: 20px; line-height: 1; color: var(--muted); background: none; }
fieldset { border: none; margin: 0 0 8px; padding: 0; }
legend { font-weight: 600; color: var(--brand); font-size: 13px; padding: 6px 0; text-transform: uppercase; letter-spacing: .05em; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
.form-grid .span-2 { grid-column: span 2; } .form-grid .span-3 { grid-column: span 3; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #3f485a; font-weight: 500; }
label.f .req { color: var(--red); }
label.f .err { color: var(--red); font-size: 12px; font-weight: 500; min-height: 0; }
label.f.invalid input, label.f.invalid select { border-color: var(--red); }
.hint { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 22px; }
.tab { padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; }
.tab.active { color: var(--brand-2); border-bottom-color: var(--brand-2); }
.dl { display: grid; grid-template-columns: 200px 1fr; gap: 0; }
.dl div { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.dl .k { color: var(--muted); font-size: 13px; }
.old { color: var(--red); text-decoration: line-through; } .new { color: var(--green); font-weight: 500; }
.toast { position: fixed; bottom: 22px; right: 22px; background: #1c2433; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 60; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.strong { font-weight: 500; }
.table-foot { padding: 8px 10px; }
td .badge { margin-top: 3px; }

.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 10px; font-weight: 600; }
.grid-2 + .section-title { margin-top: 22px; }
.grid-2 { margin-bottom: 4px; }
.modal.wide { width: min(1120px, 96vw); }
.status.approved-effective::before { color: var(--green); } .status.obsolete::before { color: #8a93a5; }
.status.draft::before { color: #7a8aa8; } .status.under-review::before { color: #e59a00; }
.action.REVISE { background: #e9e3fb; color: #5b3cb0; }
tr.superseded td { color: var(--muted); }
.info-box { background: #eef4fd; border: 1px solid #cddcf3; color: #24426e; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 6px; }
textarea { resize: vertical; }

/* v0.3 */
.topbar-right { display: flex; gap: 10px; align-items: center; }
.lab-switch { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 3px 4px 3px 14px; color: var(--muted); font-size: 13px; }
.lab-switch select { width: auto; min-width: 190px; border: none; border-radius: 16px; padding: 4px 10px; background: #eef2f8; font-weight: 600; color: var(--ink); }
.lab-switch.on { border-color: #2d6cc0; box-shadow: 0 0 0 2px #d6e4f7; } .lab-switch.on select { background: var(--brand-2); color: #fff; }
.filter-note { background: #eef4fd; border: 1px solid #cddcf3; color: #24426e; border-radius: 8px; padding: 7px 12px; font-size: 13px; margin-bottom: 12px; }
.lab-tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: #e3effd; color: #1f4e8c; white-space: nowrap; }
.lab-tag.l2 { background: #e7f6ef; color: #17693a; } .lab-tag.common { background: #f1ecfb; color: #5b3cb0; } .lab-tag.none { background: #fdecec; color: var(--red); }
.kpi-note { font-size: 11px; color: var(--muted); }
.kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #5b3cb0; } .kind.authorisation { color: #1f4e8c; }
.status.active::before { color: var(--green); } .status.left::before { color: #8a93a5; }
.overlay.top { z-index: 55; background: rgba(15,25,45,.35); }
.modal.narrow { width: min(640px, 94vw); }

/* v1.17.0 pending-work alert pop-up */
.pending-alert .pa-intro { margin: 0 0 12px; color: var(--text, #1c2433); }
.pending-alert .pa-list { list-style: none; margin: 0 -22px; padding: 0; }
.pending-alert .pa-list li { border-top: 1px solid var(--line); }
.pending-alert .pa-list a { display: block; padding: 12px 22px; color: inherit; text-decoration: none; }
.pending-alert .pa-list a:hover { background: #f4f7fb; }
.pending-alert .pa-text { line-height: 1.45; }
.pending-alert .pa-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
button.danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; } button.danger:hover { background: #a61f1f; }
button.link.danger-link { color: var(--red); }
button:disabled { opacity: .5; cursor: not-allowed; }
.spacer { flex: 1; }
.info-box.warn { background: #fff4de; border-color: #f0d58a; color: #6d4c00; } .info-box.bad { background: #fdecec; border-color: #f3c1c1; color: #8d1f1f; }
/* Attachments */
.att-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.att-form { background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.form-grid.four { grid-template-columns: repeat(4, 1fr); }
.att-form-foot { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.file-err { color: var(--red); font-size: 12.5px; margin-top: 6px; }
tr.removed td { color: var(--muted); } tr.removed .att-name { text-decoration: line-through; }
.removed-note { color: var(--red); }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; } .chk input { width: auto; }
/* Personnel lists */
.list-head { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; } .list-head:first-child { margin-top: 0; }
.list-head h3 { margin: 0; font-size: 14px; color: var(--brand); }
table.compact th, table.compact td { padding: 6px 8px; }
.small-empty { padding: 12px; border: 1px dashed var(--line); border-radius: 8px; }
.tabs { flex-wrap: wrap; }
/* Settings */
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; }
.subtab { padding: 7px 16px; border-radius: 18px; cursor: pointer; background: #fff; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.subtab.active { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.org-lab { margin-bottom: 14px; } .org-lab.inactive { opacity: .7; }
.org-lab h2 .badge { vertical-align: middle; margin-left: 6px; }
.chip { display: inline-flex; align-items: center; gap: 2px; background: #eef2f8; border: 1px solid #dde3ee; border-radius: 12px; padding: 1px 4px 1px 10px; margin: 2px 4px 2px 0; font-size: 12.5px; }
.chip.off { color: var(--muted); text-decoration: line-through; }
.chip-btn { border: none; background: none; padding: 0 5px; font-size: 12px; color: var(--brand-2); }
.panel.pad { padding: 16px 18px; } .h2 { font-size: 15px; margin: 0 0 10px; } .top-gap { margin-top: 16px; }
.logo-previews { display: flex; gap: 12px; margin-bottom: 8px; }
.logo-prev { flex: 1; height: 120px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); }
.logo-prev img { max-width: 85%; max-height: 90px; object-fit: contain; }
.logo-prev.dark { background: var(--side); } .logo-prev.light { background: #fff; }
.about-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; } .about-head img { width: 64px; height: 64px; }
.about-title { font-size: 18px; font-weight: 600; }
.small-dl { grid-template-columns: 150px 1fr; } .small-dl div { padding: 6px 4px; font-size: 13px; }
.path-box { background: #f3f5f9; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; word-break: break-all; }
.action.ATTACH { background: #e6f5ec; color: #1b7a3d; } .action.REMOVE { background: #fdecec; color: #c62828; } .action.BACKUP { background: #eef0f4; color: #3f485a; }
.toolbar select { max-width: 230px; }
td.title-col { min-width: 230px; }
.status.not-in-use::before { color: #8a93a5; } .status.not-calibrated::before { color: var(--red); }

/* ---- web edition ---- */
th.w34 { width: 34%; } th.w120 { width: 120px; } th.w250 { width: 250px; }
.file-in { max-width: 280px; }
.temp-pw { font-size: 18px; text-align: center; user-select: all; }
.scope-note { font-size: 11.5px; color: #8fa2c0; margin-top: 2px; }
.user-chip > div { min-width: 0; } .user-chip .role { font-size: 11.5px; color: #8fa2c0; }
.sidebar-foot .foot-actions { display: flex; gap: 8px; margin-top: 10px; }
.sidebar-foot .foot-actions button { flex: 1; padding: 5px 8px; font-size: 12px; background: #1d3152; border-color: #2c4670; color: #dbe6f7; }
.sidebar-foot .foot-actions button:hover { background: #26406b; }
.lab-switch select:disabled { opacity: 1; cursor: default; }
.scope-note.hidden { display: none; }

/* login / setup pages */
body.auth { display: grid; place-items: center; min-height: 100vh; height: auto; background: linear-gradient(160deg, #14233c 0%, #1f4e8c 100%); }
.auth-card { width: min(420px, 92vw); background: #fff; border-radius: 14px; padding: 28px 30px 24px; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.auth-card.wide { width: min(520px, 94vw); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 8px; }
.auth-logo img { max-height: 84px; max-width: 220px; object-fit: contain; }
.auth-card h1 { font-size: 20px; text-align: center; margin: 4px 0 2px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.auth-card label.f { margin-bottom: 12px; }
.auth-card button.primary { width: 100%; padding: 10px; font-size: 15px; margin-top: 4px; }
.auth-msg { border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; }
.auth-msg.bad { background: var(--red-bg); color: #8d1f1f; border: 1px solid #f3c1c1; }
.auth-msg.info { background: #eef4fd; color: #24426e; border: 1px solid #cddcf3; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }

/* v1.2 – main tabs, summary cards, work orders */
.maintabs { display: flex; flex: none; overflow: visible; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.maintab { padding: 9px 16px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; user-select: none; }
.maintab:hover { color: var(--ink); }
.maintab.active { color: var(--brand); border-bottom-color: var(--brand-2); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; border-left: 5px solid var(--green); }
.card.red { border-left-color: var(--red); } .card.amber { border-left-color: #e59a00; } .card.blue { border-left-color: var(--brand-2); }
.card-head { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14.5px; }
.card-ico { opacity: .7; }
.card-nums { display: flex; gap: 22px; margin: 8px 0 6px; }
.num .v { font-size: 30px; font-weight: 600; line-height: 1.1; } .num .l { font-size: 12px; color: var(--muted); }
.num.red .v { color: var(--red); } .num.amber .v { color: var(--amber); }
.num.clickable { cursor: pointer; border-radius: 6px; padding: 2px 6px; margin: -2px -6px; } .num.clickable:hover { background: var(--grey-bg); }
.alerts { background: #fff7f0; border: 1px solid #f3d3b5; border-radius: 10px; padding: 10px 16px; margin-bottom: 16px; font-size: 13.5px; }
.alerts ul { margin: 4px 0 0; padding-left: 18px; } .alerts a { color: #8a3d00; }
.alerts.ok { background: var(--green-bg); border-color: #bfe3cc; color: var(--green); }
.toolbar.tight { margin: 0; }
.wostatus { font-size: 12.5px; white-space: nowrap; font-weight: 600; padding: 2px 9px; border-radius: 11px; background: var(--grey-bg); }
.wostatus.received { background: #e8f0fc; color: #24426e; } .wostatus.in-progress { background: var(--amber-bg); color: var(--amber); }
.wostatus.completed-reported { background: var(--green-bg); color: var(--green); } .wostatus.dispatched { background: var(--grey-bg); color: var(--muted); }
.wostatus.cancelled { background: var(--red-bg); color: var(--red); }
.line-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fbfcfe; }
.line-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.line-head .link { margin-left: auto; }
.form-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.danger-link { color: var(--red) !important; }
.method-picker { position: relative; border: 1px solid var(--line); border-radius: 7px; padding: 6px; background: #fff; }
.method-picker .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.chip.method { background: #eef4fd; border: 1px solid #cddcf3; }
.method-picker .method-q { width: 100%; }
.method-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 7px; max-height: 260px; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.mres { padding: 6px 10px; cursor: pointer; font-size: 13px; } .mres:hover { background: #eef4fd; }
.pad6 { padding: 6px 10px; }
.mlist { margin: 0; padding-left: 16px; }
.h3 { font-size: 14.5px; margin: 16px 0 8px; }
.wo-dl { grid-template-columns: 170px 1fr 170px 1fr; }
.status-sel { width: auto; padding: 3px 6px; font-size: 12.5px; }
.fmt-table td { vertical-align: top; }
.fmt-src { font-size: 12px; max-width: 420px; }
.form-grid .span-4 { grid-column: span 4; }
.fmt-table input[name=template] { min-width: 230px; }
div.f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #3f485a; font-weight: 500; }
div.f .err { color: var(--red); font-size: 12px; }
.fmt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.fmt-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tok-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 8px; align-items: center; }
.tok { padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.seqw { font-size: 12px; color: var(--muted); margin-left: 6px; } .seqw input { width: 60px; padding: 2px 4px; }
.form-grid.g3 { grid-template-columns: 1.3fr 1fr 1fr; }
.fmt-prev { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 8px 10px; background: #f4f7fc; border-radius: 8px; word-break: break-all; }
.fmt-prev button { margin-left: auto; flex: none; }
.manual-row { background: #fff8e6; }
/* v1.2.2 test lines inside the samples table */
table.tlines { width: 100%; border-collapse: collapse; }
table.tlines td { border: 0; border-bottom: 1px dotted #ddd; padding: 2px 4px; vertical-align: top; }
/* v1.2.3 signatures */
.sigpad { border: 1px dashed #7a8bb0; border-radius: 6px; width: 100%; max-width: 640px; height: auto; touch-action: none; background: #fff; cursor: crosshair; }
.sig-ok { margin-top: 6px; } .sig-bad { color: #c62828; } .sig-thumb { max-height: 54px; max-width: 220px; border-bottom: 1px solid #333; }
.sigpanel { margin-top: 6px; }
/* v1.3.0 jobs / customers / standards */
.jobstatus { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #eef1f5; color: #334; white-space: nowrap; }
.js-received { background: #e8eefc; color: #1d3f91; } .js-in-progress { background: #fff3d6; color: #7a5200; }
.js-results-checked { background: #e6f4ff; color: #0b5c8c; } .js-approved { background: #e3f6e8; color: #1b6b35; }
.js-certificate-report-issued { background: #1b6b35; color: #fff; } .js-on-hold { background: #f3e8ff; color: #5b2a86; } .js-cancelled { background: #eee; color: #888; text-decoration: line-through; }
.jobstrip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.jcount { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid #dde2ea; border-radius: 8px; background: #fff; cursor: pointer; }
.jcount.on { border-color: #1d3f91; box-shadow: 0 0 0 2px #c9d6f5; } .jcount b { font-size: 16px; }
tr.row-overdue td { background: #fff5f5; }
.std { padding: 2px 0; } .std.bad { color: #a11; } .std.ok .mono { color: #1b6b35; }
.std-list { max-height: 320px; overflow: auto; margin-top: 8px; border: 1px solid #e3e7ee; border-radius: 6px; }
.std-row { display: block; padding: 6px 8px; border-bottom: 1px solid #f0f2f5; cursor: pointer; } .std-row.bad { background: #fff6f6; }
.blocked-msg { background: #fdecec; border: 1px solid #f3b5b5; color: #8a1010; padding: 10px 12px; border-radius: 6px; font-weight: 600; margin-bottom: 8px; }
.cust-pick .row-flex { display: flex; gap: 10px; align-items: center; } .cust-pick #cust-search { flex: 1; }
input.autofilled, textarea.autofilled { background: #f1f8ff; }
/* v1.4.0 internal audit + e-mail alerts */
.indep-warn { color: #8a5200; background: #fff6e0; border: 1px solid #f0c36d; border-radius: 6px; padding: 3px 7px; margin-top: 4px; font-size: 12px; }
.indep-box { margin-top: 8px; }
.red-text { color: #c62828; font-weight: 600; }
#cl-form textarea, #cl-form select, #tpl-form input { width: 100%; }
.w60 { width: 60px; }
.rcp-row { display: grid; grid-template-columns: 130px 1.4fr 1fr 1fr 34px; gap: 6px; margin-bottom: 6px; align-items: center; }
.alert-state { padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; font-weight: 600; }
.alert-state.off { background: #f3f3f3; color: #555; } .alert-state.on { background: #e6f4ea; color: #1e6b34; }
.log-status.sent { color: #1e6b34; font-weight: 600; } .log-status.failed { color: #c62828; font-weight: 600; } .log-status.skipped { color: #777; }
.digest-preview { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; max-height: 520px; overflow: auto; }
.digest-text { white-space: pre-wrap; margin: 0; }
/* v1.6.0 testing dashboard: report status mini table */
table.mini { width: 100%; font-size: 13px; margin: 6px 0; } table.mini td { padding: 2px 0; border: 0; } table.mini td.num { text-align: right; }

input.prefilled { background: #fff8e1; border-color: #f0b400; }
.red-text { color: #c62828; }

.check-row label { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; } .check-row input[type=checkbox] { width: auto; margin: 0; }
/* v1.11.0 risk matrix */
table.rm { border-collapse: separate; border-spacing: 3px; width: auto; }
table.rm td.rm-cell { display: table-cell; width: 64px; height: 34px; text-align: center; border-radius: 4px; }
table.rm th { text-align: right; padding: 2px 6px; font-weight: 500; }
.section-boxes { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }

/* v1.18.0 equipment / work-order attachments */
.att-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.att-chip { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.att-chip.on { background: #1f4e8c; color: #fff; border-color: #1f4e8c; }
tr.att-group td { background: #f4f7fb; font-size: 12.5px; padding: 6px 10px; border-top: 1px solid var(--line); }

.att-actions { white-space: nowrap; }
.att-panel .table-wrap { overflow-x: auto; }

/* v1.19.0 list pagination */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 2px; }
.pager-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pager-btn { min-width: 2rem; padding: 4px 9px; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; font: inherit; font-size: 13px; color: inherit; }
.pager-btn:hover:not(:disabled) { background: #f4f7fb; border-color: #1f4e8c; }
.pager-btn.active { background: #1f4e8c; color: #fff; border-color: #1f4e8c; font-weight: 600; }
.pager-btn:disabled { opacity: 0.45; cursor: default; }
.pager-ellipsis { padding: 0 4px; color: #667; }
.pager-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12.5px; color: #445; }
.pager-size select { margin-left: 4px; }
.pager-extra { color: #667; }
.panel > .pager:first-child { padding-top: 0; }
