/* Maintenance Master. No external fonts or assets (air-gapped). */
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #1d2733;
  --muted: #5d6b79;
  --line: #d8dee5;
  --brand: #168dcb;
  --brand-dark: #052049;
  --overdue: #c62828;
  --overdue-bg: #fdecea;
  --due: #b26a00;
  --due-fill: #f5a623;
  --due-bg: #fff4e0;
  --ok: #2e7d32;
  --ok-bg: #e8f5e9;
  --upcoming: #1565c0;
  --upcoming-bg: #e3f0fd;
  --none: #8a96a3;
  --radius: 10px;
  --tap: 44px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); }
a { color: var(--upcoming); }
main { padding: clamp(10px, 2vw, 24px); max-width: 1500px; margin: 0 auto; }
h1 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); margin: 0 0 .4rem; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
code { background: #eef1f4; padding: 0 .3em; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--brand-dark); color: #fff; padding: .6rem clamp(10px, 2vw, 24px); }
.topbar a { color: #fff; text-decoration: none; }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand-site { font-weight: 700; }
.brand-app { font-size: .85rem; opacity: .85; }
.topbar nav { display: flex; gap: .4rem; }
.topbar nav a { padding: .5rem .9rem; border-radius: 8px; min-height: var(--tap); display: inline-flex; align-items: center; }
.topbar nav a:hover, .topbar nav a:focus-visible { background: rgba(255,255,255,.15); }

.footer { color: var(--muted); font-size: .8rem; text-align: center; padding: 1.2rem; }
.footer-note { display: block; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(12px, 1.6vw, 20px); margin: 0 0 1rem; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.crumbs { margin: 0 0 .4rem; font-size: .9rem; color: var(--muted); }
.flash { background: var(--ok-bg); border: 1px solid #b7dfb9; color: var(--ok); padding: .6rem .9rem; border-radius: 8px; }
.error { background: var(--overdue-bg); border: 1px solid #f3b8b2; color: var(--overdue); padding: .6rem .9rem; border-radius: 8px; }
.count { background: var(--bg); border-radius: 999px; padding: 0 .55em; font-size: .9rem; color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: .45rem 1rem;
  border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: inherit;
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-do { background: var(--ok); border-color: var(--ok); }
.btn-quiet { background: #fff; color: var(--brand-dark); border-color: var(--line); }
.btn-sm { min-height: 34px; padding: .2rem .7rem; font-size: .9rem; }
.btn-lg { min-height: 54px; font-size: 1.1rem; padding: .6rem 1.6rem; }

/* status pills */
.pill { display: inline-block; border-radius: 999px; padding: .1rem .65rem; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.pill-lg { font-size: 1rem; padding: .3rem .9rem; }
.pill-overdue { background: var(--overdue-bg); color: var(--overdue); }
.pill-due_today { background: var(--due-bg); color: var(--due); }
.pill-upcoming { background: var(--upcoming-bg); color: var(--upcoming); }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-suspended, .pill-unscheduled, .pill-none { background: #eef1f4; color: var(--muted); }
.crit { background: var(--overdue); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .04em;
  padding: .05rem .4rem; border-radius: 4px; vertical-align: middle; }
.missed { color: var(--overdue); font-weight: 600; }

/* task lists */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  padding: .65rem .2rem; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task-overdue { border-left: 5px solid var(--overdue); padding-left: .6rem; }
.task-due_today { border-left: 5px solid var(--due-fill); padding-left: .6rem; }
.task-title { font-weight: 600; }
.task-meta { color: var(--muted); font-size: .9rem; }
.task-side { display: flex; align-items: center; gap: .6rem; }
.task-detail { list-style: none; padding: 0 .2rem .6rem; font-size: .92rem; }
.task-detail p { margin: .2rem 0; }

/* floor plan */
.plan-wrap { margin-bottom: 1rem; }
.plan-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.dot { display: inline-flex; width: 1.3em; height: 1.3em; border-radius: 50%; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .85rem; vertical-align: -.25em; }
.dot-overdue { background: var(--overdue); }
.dot-due_today { background: var(--due-fill); color: #4a2c00; }
.dot-ok { background: var(--ok); }
.dot-none { background: #fff; border: 2px solid var(--none); }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem; overflow: hidden; }
.plan.stale { outline: 3px dashed var(--due-fill); }
.plan-loading { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.plan svg.mm-plan { display: block; width: 100%; height: auto; }

.mm-zone { cursor: pointer; fill: var(--brand); fill-opacity: 0; stroke: var(--brand); stroke-opacity: 0;
  stroke-width: .8; transition: fill-opacity .15s; outline: none; }
.mm-zone:hover, .mm-zone:focus-visible { fill-opacity: .14; stroke-opacity: .9; }
.mm-zone-overdue { fill: var(--overdue); fill-opacity: .12; stroke: var(--overdue); stroke-opacity: .55; }
.mm-zone-due_today { fill: var(--due-fill); fill-opacity: .14; stroke: var(--due-fill); stroke-opacity: .6; }
.mm-zone-overdue:hover, .mm-zone-overdue:focus-visible { fill-opacity: .24; }
.mm-zone-due_today:hover, .mm-zone-due_today:focus-visible { fill-opacity: .26; }
#status-icon-anchors, #mm-room-chips { pointer-events: none; }
.mm-icon .mm-disc { stroke: #fff; stroke-width: 1.1; }
.mm-overdue .mm-disc { fill: var(--overdue); }
.mm-due_today .mm-disc { fill: var(--due-fill); }
.mm-ok .mm-disc { fill: var(--ok); fill-opacity: .85; }
.mm-glyph { fill: #fff; font: 800 10px var(--font); text-anchor: middle; }
.mm-glyph-stroke { fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.mm-due_today .mm-glyph-stroke { stroke: #4a2c00; }
.mm-glyph-ring { fill: none; stroke: #4a2c00; stroke-width: 1; }
.mm-ring { fill: none; stroke: var(--overdue); stroke-width: 1.4; animation: mm-pulse 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.mm-count circle { fill: var(--brand-dark); stroke: #fff; stroke-width: .7; }
.mm-count text { fill: #fff; font: 700 4.4px var(--font); text-anchor: middle; }
.mm-chip rect { fill: var(--brand-dark); fill-opacity: .85; }
.mm-chip text { fill: #fff; font: 700 4.6px var(--font); text-anchor: middle; }
@keyframes mm-pulse { 0% { opacity: .9; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .mm-ring { animation: none; } }

.room-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; padding: .2rem .7rem; border-radius: 999px;
  text-decoration: none; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.chip b { background: var(--chip, var(--muted)); color: #fff; border-radius: 999px; padding: 0 .45em; font-size: .8rem; }
.chip-overdue { --chip: var(--overdue); color: var(--overdue); border-color: var(--overdue); }
.chip-due_today { --chip: var(--due); color: var(--due); border-color: var(--due-fill); }
.chip-ok { color: var(--ok); }
.chip-none { color: var(--muted); }

.lists { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 1100px) { .lists { grid-template-columns: 3fr 2fr; } .lists > .card:last-child:nth-child(3) { grid-column: 1 / -1; } }

/* equipment / tables */
.eq-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; }
.eq-head h2 { margin: 0; }
.eq-head .eq-actions { margin-left: auto; display: flex; gap: .4rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem 1rem; margin: 0; }
.facts dt { font-size: .8rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .45rem .5rem; border-top: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .82rem; color: var(--muted); border-top: 0; }
.card:has(> .table) { overflow-x: auto; }
tr.voided td { color: var(--muted); text-decoration: line-through; }
tr.voided td em { text-decoration: none; display: inline-block; }
tr.row-error td { background: #fff8f7; }
.problems li { color: var(--due); }

/* forms */
.form { display: grid; gap: .8rem; }
.form label { display: grid; gap: .25rem; font-weight: 600; font-size: .95rem; }
.form input:not([type=radio]):not([type=checkbox]), .form select, .form textarea, .inline-form input, .inline-form select {
  font: inherit; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; min-height: 40px; background: #fff; width: 100%; }
.inline-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 10rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem .8rem; margin-bottom: .8rem; }
.checks { display: grid; gap: .5rem; }
.checks label { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; }
legend { font-weight: 700; padding: 0 .3rem; }
.people, .results { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .45rem; }
.person, .result { display: flex !important; align-items: center; gap: .55rem; min-height: var(--tap); padding: .4rem .7rem;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 600; }
.person:has(input:checked) { border-color: var(--brand); background: var(--upcoming-bg); }
.result-pass:has(input:checked) { border-color: var(--ok); background: var(--ok-bg); }
.result-fail:has(input:checked) { border-color: var(--overdue); background: var(--overdue-bg); }
.person input, .result input { width: 1.2rem; height: 1.2rem; }
.summary { display: flex; flex-wrap: wrap; gap: .4rem; }
.commit { margin: .8rem 0; }

/* documents */
.docs { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .25rem; }
.docs a { display: inline-flex; gap: .45rem; align-items: baseline; text-decoration: none; padding: .25rem 0; }
.docs a:hover { text-decoration: underline; }
.doc-type { display: inline-block; min-width: 3.4em; text-align: center; font-size: .72rem; font-weight: 800; letter-spacing: .03em;
  padding: .05rem .35rem; border-radius: 4px; background: #eef1f4; color: var(--brand-dark); }
.doc-sop { background: #e8f5e9; color: var(--ok); }
.doc-ifu { background: var(--upcoming-bg); color: var(--upcoming); }
.doc-form, .doc-certificate { background: var(--due-bg); color: var(--due); }
.doc-details { margin-top: .5rem; }
.doc-details summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.procedure-docs { background: #f7f9fb; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem; margin: .6rem 0; }
.doc-body { max-width: 900px; }
.doc-body h1, .doc-body h2, .doc-body h3, .doc-body h4 { margin: 1rem 0 .4rem; }
.doc-body p { margin: .35rem 0; }
.doc-table td { vertical-align: top; }
.doc-table td:first-child { width: 22%; }

/* waterline */
.scroll-x { overflow-x: auto; }
.wl-grid td, .wl-grid th { white-space: nowrap; text-align: center; }
.wl-grid th:first-child { text-align: left; }
.band-pass { background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.band-caution { background: var(--due-bg); color: var(--due); font-weight: 700; }
.band-fail { background: var(--overdue-bg); color: var(--overdue); font-weight: 800; }
.band-pass a, .band-caution a, .band-fail a { color: inherit; }
.wl-entry input, .wl-entry select { width: auto !important; min-height: 36px; padding: .3rem .4rem !important; }
.chair-input { flex: 0 0 4.5rem !important; }

/* support panel */
.support h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1.5rem; }
.support-col { min-width: 0; }
.checklist { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.ready { display: grid; gap: .15rem; margin: 0 0 .5rem; }
.ready div { display: grid; grid-template-columns: 9.5rem 1fr; gap: .5rem; border-bottom: 1px dashed var(--line); padding: .15rem 0; }
.ready dt { color: var(--muted); font-size: .88rem; }
.ready dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.tier { display: grid; grid-template-columns: 11rem 1fr; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.tier-label { font-weight: 700; color: var(--brand-dark); }
.tier-0 .tier-label { color: var(--overdue); }
.tier-orgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .6rem; min-width: 0; }
@media (max-width: 640px) { .tier { grid-template-columns: 1fr; } .ready div { grid-template-columns: 1fr; } }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.org-card { border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; background: var(--card); min-width: 0; }
.org-internal { border-color: var(--overdue); background: var(--overdue-bg); }
.org-head { margin-bottom: .2rem; }
.org-card p { margin: .25rem 0; }
.org-lines { display: grid; gap: .1rem; margin: .3rem 0; }
.org-lines div { display: grid; grid-template-columns: 5.5rem 1fr; gap: .4rem; }
.org-lines dt { color: var(--muted); font-size: .85rem; }
.org-lines dd { margin: 0; overflow-wrap: anywhere; }
.phone { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.org-contacts { margin: .3rem 0; padding-left: 1rem; }
.verified { color: var(--muted); }
.contact-row { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: end; padding: .6rem 0; border-top: 1px solid var(--line); }
.contact-edit { display: grid; grid-template-columns: 1.6rem repeat(4, minmax(130px, 1fr)) auto; gap: .4rem; align-items: end; flex: 1 1 640px; min-width: 0; }
.contact-edit label { display: grid; gap: .15rem; font-size: .8rem; color: var(--muted); }
.contact-edit input { font: inherit; font-size: .9rem; padding: .35rem .45rem; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.contact-edit .wide { grid-column: 2 / 6; }
.contact-no { font-weight: 800; color: var(--brand-dark); align-self: center; }
.contact-actions { display: flex; gap: .3rem; }
@media (max-width: 760px) { .contact-edit { grid-template-columns: 1fr 1fr; } .contact-edit .wide { grid-column: 1 / -1; } .contact-no { grid-column: 1 / -1; } }
.mono { font-family: Consolas, ui-monospace, monospace; }
.align-start { align-items: start; }
.sheet td { height: 2.1rem; }
.sheet-room { break-inside: avoid; margin-bottom: 1rem; }

/* pop-up status pill (static/js/alerts.js) */
.mm-pill { position: fixed; right: 12px; bottom: 12px; z-index: 1000; padding: .4rem .8rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font: 600 .82rem var(--font); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.mm-pill-on { color: var(--ok); border-color: #b7dfb9; }
.mm-pill-off { color: #fff; background: var(--brand); border-color: var(--brand); }
.mm-pill-warn { color: var(--due); border-color: var(--due-fill); background: var(--due-bg); }
.status-line { font-weight: 600; }
.diag-box { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .6rem; }
.diag-box h2 { font-size: 1rem; }
.diag { padding: .5rem .7rem; border-radius: 8px; background: #f4f6f8; }
.diag-ok { background: var(--ok-bg); color: var(--ok); }
.diag-bad { background: var(--overdue-bg); color: var(--overdue); }
#popupEnv { white-space: pre-wrap; background: #f7f9fb; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.lead { font-size: 1.1rem; }

@media print {
  .mm-pill, .no-print { display: none !important; }
  .print-sheet .topbar, .print-sheet .footer { display: none !important; }
  .topbar nav, .btn, .room-chips, form, .footer-note { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
}

/* Out-of-service marker (static/js/oos_marker.js) */
.mm-oos { pointer-events: none; }
.mm-oos-disc { fill: #2f2f2f; stroke: var(--overdue); stroke-width: 1.3; }
.mm-oos-wrench { fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; }
.mm-oos-jaw { fill: #fff; }
.mm-oos-slash { stroke: var(--overdue); stroke-width: 1.4; stroke-linecap: round; }
.mm-oos-pending .mm-oos-disc { fill: var(--brand); stroke: #fff; }
.mm-oos-placed .mm-oos-disc { fill: #7a7a7a; stroke: #fff; }
.mm-oos-placed .mm-oos-slash { display: none; }
.dot-oos { background: transparent; }
.oos-list li { margin: .25rem 0; }
.place-plan { border: 1px solid #ddd; border-radius: 6px; background: #fff; cursor: crosshair; }
.place-plan svg { display: block; width: 100%; height: auto; }
.place-plan .mm-zone { cursor: crosshair; }

/* Notes on machines and rooms (v0.5.0) */
.notes { list-style: none; margin: 0 0 .6rem; padding: 0; }
.note { border-left: 3px solid var(--line); padding: .35rem 0 .35rem .7rem; margin: 0 0 .5rem; }
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .88rem; color: var(--muted); }
.note-body { margin: .15rem 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.note-voided .note-body { text-decoration: line-through; color: var(--muted); }
.notes-cleared .note { opacity: .8; }
abbr.initials { display: inline-block; min-width: 2.1em; text-align: center; font-weight: 700; font-size: .8rem;
  text-decoration: none; color: var(--brand-dark); background: #e6ecf5; border-radius: 6px; padding: .05rem .35rem; cursor: help; }
.pill-note-out_of_service { background: var(--overdue-bg); color: var(--overdue); }
.pill-note-back_in_service { background: var(--ok-bg); color: var(--ok); }
.pill-note-retired { background: #eef1f4; color: var(--muted); }
.notes-more, .notes-clear, .note-admin { margin: .3rem 0 .6rem; }
.notes-more summary, .notes-clear summary, .note-admin summary { cursor: pointer; min-height: 30px; color: var(--brand-dark); }
.note-admin summary { min-height: 0; display: inline-block; }
.note-form { margin-top: .6rem; gap: .5rem; }
.note-form-row { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; }
.note-form-row label { flex: 1 1 14rem; }
.note-counter { flex: 0 0 auto; padding-bottom: .7rem; }
.note-counter-low { color: var(--overdue); font-weight: 700; }
.oos-banner { background: var(--overdue-bg); border-left: 3px solid var(--overdue); border-radius: 0; padding: .5rem .8rem; margin: .6rem 0 0; }
.oos-reason { color: var(--muted); }
.about { margin-top: .8rem; border-top: 1px solid var(--line); padding-top: .4rem; }
.about h2 { font-size: 1rem; margin: .2rem 0; }
.about p { margin: 0; white-space: pre-line; }
.status-note { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; display: grid; gap: .5rem; }
.status-note legend { font-weight: 700; padding: 0 .3rem; }
h2 .note-icon { vertical-align: -3px; }
.note-icon-faint { opacity: .35; }
.dot-note { background: transparent; }

/* Note icon on the floor plan (static/js/note_icon.js) */
.mm-note { cursor: pointer; pointer-events: all; outline: none; }
.mm-note-hit { fill: transparent; }
.mm-note-board { fill: #052049; }
.mm-note-clip { fill: var(--brand); }
.mm-note-lines { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.mm-note-pencil { fill: #f5c542; stroke: #fff; stroke-width: 1; }
.mm-note-wood { fill: #f3d9b1; stroke: #fff; stroke-width: 1; stroke-linejoin: round; }
.mm-note-lead { fill: #052049; }
.mm-note-eraser { fill: #e57373; stroke: #fff; stroke-width: 1; }
.mm-note-empty { opacity: .35; }
.mm-note:hover, .mm-note:focus-visible { opacity: 1; }
.mm-note:focus-visible .mm-note-hit { fill: rgba(22, 141, 203, .25); }
.mm-note-pending { opacity: 1; }
.mm-note-placed { opacity: .45; pointer-events: none; }
.mm-note-default { opacity: .6; }
.plan { position: relative; }
.note-tip { position: absolute; z-index: 5; width: 260px; background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 4px 14px rgba(5, 32, 73, .18); padding: .5rem .65rem; font-size: .88rem; pointer-events: none;
  white-space: pre-line; overflow-wrap: anywhere; }
.note-tip-above { transform: translateY(-100%); }
.note-tip-head { font-weight: 700; color: var(--brand-dark); margin-bottom: .2rem; }
.note-tip-meta { color: var(--muted); font-size: .8rem; }
.note-tip-more, .note-tip-empty { color: var(--muted); }
.note-tip-more { margin-top: .2rem; font-size: .8rem; }
.note-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius); }
.note-dialog::backdrop { background: rgba(5, 32, 73, .35); }
.note-dialog-close { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: .5rem .5rem 0; background: var(--card); }
.note-dialog-body { padding: 0 1rem 1rem; }
.note-popup-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem; }
.note-popup-head h2 { margin: 0 0 .5rem; }
.initials-input { max-width: 6.5rem; flex: 0 0 6.5rem !important; text-transform: uppercase; }

/* Daily checklists (v0.6.0) */
.checklist-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.checklist-head h2 { margin: 0; }
.checklist-ok { border-left: 4px solid var(--ok); }
.checklist-due_today { border-left: 4px solid var(--due-fill); }
.checklist-overdue { border-left: 4px solid var(--overdue); }
.checklist-list { list-style: none; margin: .5rem 0; padding: 0; }
.checklist-list li { border-top: 1px solid var(--line); padding: .45rem 0; }
.checklist-list li:last-child { border-bottom: 1px solid var(--line); }
.checklist-list label { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; min-height: var(--tap); }
.checklist-list input[type=checkbox] { width: 1.4rem; height: 1.4rem; margin-top: .1rem; flex: 0 0 auto; }
.checklist-how { display: block; }
.checklist-done { color: var(--muted); }
.checklist-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }
.checklist-actions select { flex: 1 1 12rem; }
.checklist-actions input { flex: 2 1 14rem; }
.checklist-actions select, .checklist-actions input { min-height: var(--tap); padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.checklist-signed { margin: .4rem 0 0; }
.checklist-items summary, .checklists-open summary { cursor: pointer; min-height: 32px; }
.checklists-open summary { font-weight: 600; margin-top: .4rem; }

/* Launch sign-off (v0.7.0) */
.signoff-bar { display: grid; gap: .6rem; position: sticky; top: 0; z-index: 3; }
.signoff-bar-label { font-weight: 700; }
.signoff-progress { display: grid; gap: .3rem; }
.signoff-progress .bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.signoff-progress .bar span { display: block; height: 100%; background: var(--ok); }
.ok-text { color: var(--ok); } .warn-text { color: var(--due); }
.signoff-section { margin: 1.4rem 0 .6rem; }
.signoff-item { border-left: 4px solid var(--line); }
.signoff-ok { border-left-color: var(--ok); } .signoff-change { border-left-color: var(--due-fill); } .signoff-unsure { border-left-color: var(--upcoming); }
.signoff-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; }
.signoff-item-head h3 { margin: 0; }
.pill-signoff-ok { background: var(--ok-bg); color: var(--ok); }
.pill-signoff-change { background: var(--due-bg); color: var(--due); }
.pill-signoff-unsure { background: var(--upcoming-bg); color: var(--upcoming); }
.signoff-tasks summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.signoff-tasks h4 { margin: .8rem 0 .3rem; }
.table-scroll { overflow-x: auto; }
.signoff-table td { vertical-align: top; }
.signoff-example td { background: var(--due-bg); }
.nowrap { white-space: nowrap; }
.signoff-answer { background: var(--bg); border-radius: 8px; padding: .5rem .7rem; white-space: pre-line; }
.signoff-form { display: grid; gap: .5rem; margin-top: .5rem; }
.signoff-form textarea { width: 100%; min-height: 40px; font: inherit; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 8px; }
.signoff-buttons { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.signoff-signature { border-top: 1px solid var(--line); padding: .6rem 0; }
.signoff-signature.voided p { text-decoration: line-through; color: var(--muted); }
.signoff-signature.voided p.small.muted { text-decoration: none; }
.signoff-attest { display: flex !important; gap: .6rem; align-items: flex-start; font-weight: 400 !important; }
.signoff-attest input { width: 1.3rem; height: 1.3rem; flex: 0 0 auto; }
.signoff-requests { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .8rem; }
.signoff-requests li { border-top: 1px solid var(--line); padding-top: .6rem; display: grid; gap: .3rem; }
.signoff-requests li.voided strong { text-decoration: line-through; color: var(--muted); }
.signoff-new { background: var(--upcoming-bg); border-radius: 8px; padding: .6rem; }

/* Folded sections (v0.8.0): <details class="fold"> with a title and a one-line summary */
.fold { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 .7rem; }
.fold > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem;
  padding: .75rem clamp(12px, 1.6vw, 20px); min-height: var(--tap); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; width: .55rem; height: .55rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s; flex: 0 0 auto; margin-right: .1rem; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold > summary:hover, .fold > summary:focus-visible { background: var(--bg); outline: none; }
.fold > summary:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); }
.fold-title { font-weight: 700; font-size: 1.08rem; }
.fold-summary { color: var(--muted); font-size: .92rem; margin-left: auto; text-align: right; }
.fold-body { padding: 0 clamp(12px, 1.6vw, 20px) clamp(10px, 1.4vw, 16px); }
.fold .fold { margin: .4rem 0; border-color: var(--line); }
.fold .fold > summary { min-height: 40px; padding: .5rem .8rem; }
.fold .fold-title { font-size: 1rem; }
.fold-ok > summary .fold-summary { color: var(--ok); }
.fold-alert > summary .fold-summary { color: var(--overdue); font-weight: 700; }
.fold-due > summary .fold-summary { color: var(--due); font-weight: 600; }
.section-machine { margin: .7rem 0 0; }
.section-machine h3 { font-size: .98rem; margin: 0 0 .15rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; }
.section-add { font-weight: 400; }
.task-manage { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .8rem; margin-top: .15rem; }
.task-remove > summary { cursor: pointer; color: var(--muted); }
.task-remove[open] { flex-basis: 100%; }
.machine-list { list-style: none; margin: 0; padding: 0; }
.machine-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .9rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.machine-list li:first-child { border-top: 0; }
.machine-name { font-weight: 600; }
.machine-links { margin-left: auto; }
.removed-list { margin: .3rem 0 0; padding-left: 1.1rem; }
.removed-list form { display: inline; margin-left: .5rem; }
/* Date fields: the whole field opens the calendar (static/js/dates.js); the calendar icon is easy to hit. */
input[type=date] { cursor: pointer; }
input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; width: 1.3em; height: 1.3em; opacity: 1; }
.oos-strip { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; background: var(--overdue-bg); border: 1px solid #f3b8b2;
  border-radius: var(--radius); padding: .5rem .8rem; margin: 0 0 .7rem; }
.doc-group { margin: .4rem 0 .8rem; }
.doc-group h3 { font-size: .95rem; margin: .6rem 0 .2rem; }
@media print { details.fold > summary::before { display: none; } .fold { border: 0; } }

/* v0.10.0: all tasks, room not in use */
.task-filter { margin-bottom: .8rem; }
.task-table .task-manage { font-weight: 400; }
.existing-tasks { margin: 0 0 1rem; }
.existing-tasks > summary { cursor: pointer; font-weight: 600; }
.existing-list { margin: .4rem 0; padding-left: 1.1rem; }
.room-use { margin: 0 0 .7rem; }
.room-use > summary { cursor: pointer; color: var(--muted); }
.idle-strip { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: var(--radius); padding: .6rem .9rem; margin: 0 0 .7rem; }
.idle-strip p { margin: .1rem 0; }
.idle-strip form { margin-top: .4rem; }
.mm-zone-idle { fill: var(--muted); fill-opacity: .22; }
.dot-idle { background: var(--muted); opacity: .4; }

/* v0.11.0: G4 status table; each status also reads as words */
.g4-table th, .g4-table td { vertical-align: top; }
.g4-done { background: var(--ok-bg); color: var(--ok); }
.g4-in_progress { background: #fff9c4; color: #5f5000; }
.g4-back_on_bottle { background: #ffe0b2; color: #7a4100; }
.g4-action { background: var(--overdue-bg); color: var(--overdue); }
.g4-not_on_g4 { background: var(--bg); color: var(--muted); }
