/* BSS Service Tracker (Biomed Service Solutions) — mobile-first, no framework, no CDN. */
:root {
  --bg: #f1f5f9; --card: #fff; --text: #0f172a; --muted: #64748b; --border: #e2e8f0;
  /* Brand: gold sampled from the Biomed Service Solutions logo. --primary is the dark bronze so links/text
     on white stay readable (AA); the light gold gradient is used for filled buttons with near-black text. */
  --gold: #c9a45c; --gold-l: #f3e59a; --gold-d: #8c5a24; --gold-tint: #fbf6e9;
  --gold-grad: linear-gradient(180deg, #f3e59a 0%, #d9b96e 45%, #c9a45c 100%);
  --primary: #85561f; --primary-d: #6b4418; --danger: #dc2626; --danger-d: #b91c1c;
  --success: #15803d; --warn: #d97706; --info: #0891b2; --blue: #1d4ed8; --dark: #0d0d0d; --dark-2: #262626;
  --radius: 10px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 6px rgba(15,23,42,.05);
  --tap: 44px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
h3 { font-size: 1rem; margin: 1rem 0 .25rem; }
p { margin: .25rem 0 .75rem; }
code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; } .skip-link:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 8px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.text-danger { color: var(--danger); font-weight: 600; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 16px 12px; }

/* ---------- Header ---------- */
.site-header { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 8px 12px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand toggle" "nav nav"; gap: 8px; align-items: center; }
.brand { grid-area: brand; display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 40px; height: 40px; flex: none; display: block; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 1.05rem; letter-spacing: .01em; }
.brand-text small { color: var(--gold); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle { grid-area: toggle; background: transparent; color: #fff; border: 1px solid #525252; border-radius: 8px; width: var(--tap); height: var(--tap); display: grid; place-items: center; cursor: pointer; }
.site-nav { grid-area: nav; display: flex; flex-direction: column; gap: 2px; }
.js .site-nav { display: none; }
.js .site-nav.open { display: flex; }
.site-nav a { color: #e5e5e5; padding: 12px 12px; border-radius: 8px; font-weight: 500; min-height: var(--tap); }
.site-nav a:hover { background: var(--dark-2); text-decoration: none; }
.site-nav a.active { background: var(--dark-2); color: var(--gold-l); box-shadow: inset 3px 0 0 var(--gold); }
.site-nav a.nav-cta { background: var(--gold-grad); color: #1a1206; text-align: center; font-weight: 700; margin-top: 4px; }
.site-nav a.nav-cta:hover { background: var(--gold); }

.sample-banner { background: #fef3c7; color: #78350f; border-bottom: 1px solid #fcd34d; padding: 8px 12px; font-size: .9rem; text-align: center; }
.show-sm { display: none; }
@media (max-width: 600px) { .hide-sm { display: none; } .show-sm { display: inline; } }
.sample-banner strong { background: #f59e0b; color: #fff; padding: 1px 8px; border-radius: 999px; margin-right: 4px; text-transform: uppercase; font-size: .75rem; letter-spacing: .05em; }

@media (min-width: 960px) {
  .header-inner { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand nav"; gap: 16px; padding: 10px 20px; }
  .brand-text strong, .brand-text small { white-space: nowrap; }
  .nav-toggle { display: none; }
  .site-nav, .js .site-nav { display: flex; flex-direction: row; gap: 2px; align-items: center; justify-content: flex-end; }
  .site-nav a { padding: 8px 10px; min-height: 0; white-space: nowrap; font-size: .95rem; }
  .site-nav .nav-user-name { display: none; }          /* avatar only on desktop; the title has the name */
  .site-nav a.active { box-shadow: inset 0 -3px 0 var(--gold); }
  .site-nav a.nav-cta { margin: 0 0 0 6px; }
  .container { padding: 24px 20px; }
}

/* ---------- Flash ---------- */
.flashes { display: grid; gap: 8px; margin-bottom: 16px; }
.flash { padding: 12px 14px; border-radius: var(--radius); border: 1px solid; transition: opacity .6s; }
.flash.fade { opacity: .55; }
.flash-success { background: #dcfce7; border-color: #86efac; color: #14532d; }
.flash-error { background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }
.flash-info { background: #e0f2fe; border-color: #7dd3fc; color: #0c4a6e; }

/* ---------- Layout bits ---------- */
.page-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.page-head h1 { overflow-wrap: anywhere; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 720px) {
  .page-head { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .page-actions { justify-content: flex-end; }
}
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 10px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head .card-title { margin: 0; }
.count { background: #e2e8f0; color: #334155; font-size: .78rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.grid-2 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
.grid-detail { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
.stack { min-width: 0; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-detail { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}
.empty { color: var(--muted); font-style: italic; margin: .5rem 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot-danger { background: var(--danger); } .dot-warn { background: var(--warn); } .dot-info { background: var(--info); }
.dot-blue { background: var(--blue); } .dot-dark { background: var(--dark); } .dot-ok { background: var(--success); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; background: #e2e8f0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(37,99,235,.45); outline-offset: 1px; }
.btn-primary { background: var(--gold-grad); color: #1a1206; border-color: #b08a45; }
.btn-primary:hover { background: var(--gold); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-secondary { background: #fff; border-color: #cbd5e1; color: var(--text); }
.btn-outline-danger { background: #fff; border-color: #fca5a5; color: var(--danger); }
.btn-link { background: transparent; color: var(--primary); }
.btn-lg { font-size: 1.05rem; padding: 12px 20px; min-height: 50px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.5; white-space: nowrap; background: #e2e8f0; color: #334155; vertical-align: middle; }
.st-open { background: #dbeafe; color: #1e3a8a; } .st-in_progress { background: #ede9fe; color: #5b21b6; }
.st-on_hold { background: #fef3c7; color: #92400e; } .st-completed { background: #dcfce7; color: #166534; }
.st-cancelled { background: #f1f5f9; color: #64748b; text-decoration: line-through; }
.pr-low { background: #f1f5f9; color: #475569; } .pr-medium { background: #e0f2fe; color: #075985; }
.pr-high { background: #ffedd5; color: #9a3412; } .pr-urgent { background: #dc2626; color: #fff; }
.ty-pm { background: #ccfbf1; color: #115e59; } .ty-repair { background: #fce7f3; color: #9d174d; }
.eq-active { background: #dcfce7; color: #166534; } .eq-down { background: #dc2626; color: #fff; } .eq-retired { background: #e2e8f0; color: #64748b; }
.due-over { background: #fee2e2; color: #991b1b; } .due-soon { background: #fef3c7; color: #92400e; } .due-ok { background: #f1f5f9; color: #475569; }
h1 .badge { font-size: .8rem; }

/* ---------- Dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 600px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--border); border-left: 5px solid #94a3b8; border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; color: var(--text); box-shadow: var(--shadow); }
.stat:hover { text-decoration: none; border-color: #cbd5e1; }
.stat-num { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat-danger { border-left-color: var(--danger); } .stat-danger .stat-num { color: var(--danger); }
.stat-warn { border-left-color: var(--warn); } .stat-warn .stat-num { color: #b45309; }
.stat-info { border-left-color: var(--info); } .stat-blue { border-left-color: var(--blue); }
.stat-dark { border-left-color: var(--dark); }
.generate-card { background: linear-gradient(90deg, var(--gold-tint), #fff); border-color: #e7d3a4; }
.generate-form { display: flex; flex-direction: column; gap: 12px; }
.generate-form h2 { margin: 0; }
.generate-form p { margin: 2px 0 0; }
.generate-controls { display: flex; gap: 8px; }
.generate-controls select { flex: 1; }
@media (min-width: 720px) { .generate-form { flex-direction: row; align-items: center; justify-content: space-between; } .generate-controls select { width: 220px; } }

.item-list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.item:first-child { border-top: 0; padding-top: 2px; }
.item-main { min-width: 0; }
.item-title { font-weight: 600; display: block; overflow-wrap: anywhere; }
.item-sub { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.item-side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; max-width: 45%; }
.item-meta { font-size: .8rem; color: var(--muted); }
.mini-link { font-size: .8rem; font-weight: 600; }

/* ---------- Tables (become cards on phones) ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 10px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:hover { background: #f8fafc; }
.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.row-muted { opacity: .6; }
.wo-link { font-weight: 700; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9rem; white-space: nowrap; }
.cell-title { min-width: 180px; }
@media (max-width: 759px) {
  .rtable thead { display: none; }
  .rtable, .rtable tbody { display: block; width: 100%; }
  .rtable tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; background: #fff; }
  .card .rtable tr { border-width: 0 0 1px; border-radius: 0; padding: 12px 0; margin: 0; }
  .card-flush .rtable tr { padding: 12px 14px; }
  .rtable td { display: block; border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
  .rtable td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .rtable td[data-label=""]::before { content: none; }
  .rtable td.cell-title { grid-column: 1 / -1; order: -1; font-size: 1.02rem; font-weight: 600; min-width: 0; }
  .rtable td.cell-title::before { content: none; }
  .row-overdue td:first-child { box-shadow: none; }
  .rtable tr.row-overdue { border-left: 4px solid var(--danger); padding-left: 10px; }
  .nowrap-md { display: none; }
}

/* ---------- Forms ---------- */
label, legend { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 4px; }
input[type=text], input:not([type]), input[type=search], input[type=date], input[type=number], input[type=email], select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; min-height: var(--tap); border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--text); }
textarea { resize: vertical; min-height: 88px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%2364748b' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { min-width: 0; }
.field-check label { display: flex; align-items: center; gap: 10px; font-weight: 500; min-height: var(--tap); }
.field-check input { width: 22px; height: 22px; flex: none; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.form-section { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (min-width: 720px) {
  .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2; } .span-3 { grid-column: 1 / -1; }
}
.segmented { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { flex: 1 1 200px; margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 2px solid #cbd5e1; border-radius: 10px; padding: 8px 12px; cursor: pointer; background: #fff; text-align: center; }
.seg input:checked + span { border-color: var(--gold); background: var(--gold-tint); color: var(--primary-d); }
.seg input:focus-visible + span { outline: 3px solid rgba(37,99,235,.45); }
.inline-form { display: inline-flex; gap: 6px; margin: 0; }
.inline-form select { min-height: 36px; padding: 4px 30px 4px 10px; width: auto; }
.danger-zone { margin-top: 8px; text-align: right; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-bar .field { flex: 1 1 140px; }
.filter-bar .field.grow { flex: 3 1 240px; }
.field-actions { display: flex; gap: 6px; flex: 0 0 auto !important; }
.filter-panel { padding: 0; }
.filter-panel summary { padding: 14px 16px; cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; min-height: var(--tap); }
.filter-grid { display: grid; gap: 12px; padding: 0 16px 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.filter-grid .field-actions { align-self: end; }
.quick-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid #cbd5e1; color: var(--text); font-weight: 600; font-size: .9rem; min-height: 40px; display: inline-flex; align-items: center; }
.chip:hover { text-decoration: none; background: #f8fafc; }
.chip.active { background: var(--dark); border-color: var(--dark); color: #fff; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 16px 0; }

/* ---------- Detail pages ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
@media (min-width: 600px) { .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.info-grid dt, .info-list dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.info-grid dd, .info-list dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.info-list { margin: 0; display: grid; gap: 10px; }
.info-list > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; }
.notes { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 4px; }
.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mini-stats > div { background: #f8fafc; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; }
.mini-stats .stat-num { font-size: 1.5rem; }
.checklist-peek summary { font-size: .82rem; color: var(--primary); cursor: pointer; font-weight: 400; }
.checklist-peek ul { margin: 4px 0; padding-left: 18px; font-size: .85rem; font-weight: 400; color: #334155; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 7px 0 7px 32px; position: relative; border-bottom: 1px dashed var(--border); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 16px; height: 16px; border: 2px solid #94a3b8; border-radius: 4px; }
.parts { margin: 0 0 8px; padding-left: 20px; }
.wo-number { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: #334155; }
.complete-card { border-color: #86efac; background: #f7fef9; }
.quick-status { display: flex; flex-wrap: wrap; gap: 8px; }
.assign-tech { margin-top: 4px; } .assign-tech form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; } .assign-tech form p { flex-basis: 100%; margin: 0; }
.h-sub { font-size: 1rem; font-weight: 400; }

/* ---------- Report a repair (phone-first) ---------- */
.report-wrap { max-width: 560px; margin: 0 auto; }
.report-form { display: grid; gap: 18px; padding: 18px; }
.report-form input, .report-form select, .report-form textarea { font-size: 17px; min-height: 50px; }
.priority-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pp { margin: 0; }
.pp input { position: absolute; opacity: 0; }
.pp span { display: flex; align-items: center; justify-content: center; min-height: 50px; border: 2px solid #cbd5e1; border-radius: 10px; font-weight: 700; font-size: .95rem; cursor: pointer; background: #fff; }
.pp input:focus-visible + span { outline: 3px solid rgba(37,99,235,.45); }
.pp-low input:checked + span { border-color: #64748b; background: #f1f5f9; }
.pp-medium input:checked + span { border-color: #0284c7; background: #e0f2fe; color: #075985; }
.pp-high input:checked + span { border-color: #ea580c; background: #ffedd5; color: #9a3412; }
.pp-urgent input:checked + span { border-color: #dc2626; background: #dc2626; color: #fff; }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid #fecaca; background: #fef2f2; border-radius: 10px; font-weight: 500; margin: 0; cursor: pointer; }
.toggle-row input { width: 24px; height: 24px; flex: none; accent-color: var(--danger); }

/* ---------- Search ---------- */
.results { list-style: none; margin: 0; padding: 0; }
.result { padding: 14px 16px; margin-bottom: 10px; }
.result-head { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.result-date { margin-left: auto; font-size: .85rem; }
.result-title { display: block; font-size: 1.1rem; font-weight: 700; margin: 4px 0 2px; color: var(--text); overflow-wrap: anywhere; }
.result-sub { font-size: .88rem; }
.snippet { margin: 6px 0 0; font-size: .92rem; color: #334155; background: #f8fafc; border-left: 3px solid #cbd5e1; padding: 6px 10px; border-radius: 0 6px 6px 0; overflow-wrap: anywhere; }
.snippet-label { font-weight: 700; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
mark { background: #fde047; color: inherit; padding: 0 1px; border-radius: 2px; }

.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .8rem; padding-top: 0; padding-bottom: 24px; }

@media print {
  .site-header, .sample-banner, .page-actions, .site-footer, .complete-card, .quick-status, .assign-tech { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* =================== Service Tracker additions =================== */
.brand-mark { font-weight: 800; font-size: .8rem; letter-spacing: .02em; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.right { text-align: right; }
.hint { display: block; color: var(--muted); font-size: .82rem; margin-top: 4px; font-weight: 400; }
.notice { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.notice strong:first-child { margin-right: 4px; }
.warn-note { background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; border-radius: 8px; padding: 8px 12px; font-size: .9rem; }
/* badges */
.st-closed { background: #dcfce7; color: #166534; }
.sv-es { background: #fef3c7; color: #92400e; margin-left: .25rem; }
.sv-repair { background: #fce7f3; color: #9d174d; } .sv-pm { background: #ccfbf1; color: #115e59; } .sv-other { background: #e2e8f0; color: #334155; }
.eq-in_service { background: #dcfce7; color: #166534; } .eq-out_of_service { background: #dc2626; color: #fff; } .eq-retired { background: #e2e8f0; color: #64748b; }
.due-long { background: #7f1d1d; color: #fff; }
/* dashboard */
.generate-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.generate-inline select { width: auto; min-width: 160px; flex: 1 1 160px; }
.loc-table td { vertical-align: middle; }
.cell-wide { min-width: 220px; }
.overdue-peek summary { cursor: pointer; color: var(--primary); font-size: .88rem; }
.overdue-peek ul { margin: 6px 0 0; padding-left: 18px; font-size: .85rem; }
.overdue-split { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* equipment detail */
.adjust summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .9rem; }
.adjust-form { display: grid; gap: 6px; margin-top: 6px; min-width: 180px; }
.adjust-form input { min-height: 36px; padding: 6px 8px; }
.chk { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.chk input { width: 18px; height: 18px; }
@media (max-width: 759px) { .card-flush-mobile { padding: 0; } }
/* ticket form */
.form-h { font-size: 1rem; text-transform: none; margin: 0; padding-bottom: 6px; border-bottom: 2px solid #e2e8f0; display: flex; align-items: center; gap: 8px; }
.form-h::before { content: ""; width: 4px; height: 1.1em; background: var(--gold); border-radius: 2px; }
.ticket-form .card { margin-bottom: 14px; }
.yn-field legend { font-weight: 600; font-size: .9rem; margin-bottom: 4px; padding: 0; }
.yn { display: flex; gap: 6px; }
.yn label { flex: 1; margin: 0; font-weight: 600; }
.yn input { position: absolute; opacity: 0; pointer-events: none; }
.yn span { display: flex; align-items: center; justify-content: center; min-height: var(--tap); border: 2px solid #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; }
.yn input:checked + span { border-color: var(--gold); background: var(--gold-tint); color: var(--primary-d); }
.yn input:focus-visible + span { outline: 3px solid rgba(37,99,235,.45); }
.labor-box { background: #f1f5f9; border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.labor-title { font-weight: 700; display: block; margin-bottom: 6px; }
.labor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.labor-grid label { font-size: .85rem; }
.labor-grid input { margin-top: 4px; }
#total_hours { font-weight: 700; background: #fff; }
.parts-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.parts-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px; border-bottom: 2px solid var(--border); }
.parts-table td { padding: 4px; vertical-align: middle; }
.parts-table th:nth-child(1) { width: 18%; } .parts-table th:nth-child(3) { width: 14%; } .parts-table th:nth-child(4) { width: 10%; } .parts-table th:nth-child(5) { width: 13%; } .parts-table th:nth-child(6) { width: 44px; }
.parts-table input { min-height: 40px; padding: 8px; }
.parts-table tfoot td { border-top: 2px solid var(--border); padding-top: 8px; }
.line-total { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 759px) {
  .parts-table thead { display: none; }
  .parts-table, .parts-table tbody, .parts-table tfoot { display: block; }
  .parts-table tr.part-row { display: grid; grid-template-columns: 1fr 1fr 1fr 44px; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .parts-table tr.part-row td:nth-child(1) { grid-column: 1 / 2; } .parts-table tr.part-row td:nth-child(2) { grid-column: 2 / 5; }
  .parts-table tr.part-row td:nth-child(5) { align-self: center; font-weight: 600; }
  .parts-table td { padding: 0; }
  .parts-table tfoot tr { display: flex; justify-content: flex-end; gap: 12px; }
}
.leak-top { margin-bottom: 12px; }
.leak-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .leak-grid { grid-template-columns: 1fr 1fr; } }
.leak-group { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px 12px; background: #f8fafc; }
.leak-group legend { padding: 0 6px; font-weight: 700; }
.leak-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.leak-sub-title { grid-column: 1 / -1; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.leak-sub label { font-size: .85rem; font-weight: 500; }
.leak-sub input { margin-top: 3px; }
.leak-table th { white-space: normal; font-size: .7rem; }
.static { margin: 0; padding: 10px 0; color: var(--muted); }
.auth-text { background: #f8fafc; border-left: 4px solid var(--primary); padding: 10px 12px; border-radius: 0 8px 8px 0; }
.sig-row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .sig-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.sig-pad { display: block; width: 100%; height: 160px; border: 2px dashed #94a3b8; border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.sig-pad.signed { border-style: solid; border-color: var(--primary); }
.sig-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.sig-saved { height: 32px; vertical-align: middle; background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; }
.sig-saved-lg { max-height: 48px; max-width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; display: block; margin-bottom: 4px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 10; background: rgba(241,245,249,.96); backdrop-filter: blur(4px); padding: 10px 0 12px; border-top: 1px solid var(--border); margin-top: 8px; }
@media (max-width: 600px) { .sticky-actions .btn-lg { flex: 1 1 40%; padding: 10px 8px; font-size: 1rem; } }
.hidden-section { display: none !important; }
/* settings */
.settings-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .settings-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } .settings-grid #company { grid-row: span 3; } }
.form-grid-1 { display: grid; gap: 12px; }
.card-flush .card-head { padding: 14px 16px 0; }
.inline-edit summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.inline-edit .inline-form { display: grid; gap: 6px; margin-top: 6px; min-width: 220px; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--border); width: 100%; }
.add-row input { flex: 1 1 140px; width: auto; min-height: 40px; }
.tech-list { list-style: none; margin: 0; padding: 0 16px; }
.tech-list li { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding: 4px 0; }
.tech-list li:last-child { border-bottom: 0; }
.tech-list form { margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; min-height: 36px; margin: 0; }
.checks input { width: 20px; height: 20px; }
@media (min-width: 720px) { .field-full { grid-column: 1 / -1; } }
/* report */
.report-table { font-size: .84rem; }
.report-table th { white-space: normal; font-size: .68rem; }
.report-table td { padding: 7px 8px; }
.export-actions .btn { min-width: 80px; }
@media (max-width: 759px) { .report-table td.cell-wide { grid-column: 1 / -1; min-width: 0; } }
/* search */
.search-form { display: grid; gap: 10px; }
.search-main { display: flex; gap: 8px; }
.search-main input { flex: 1; }
.search-filters { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .search-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.result-badges { margin-left: auto; display: flex; gap: 6px; }
.result-meta { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.snip-label { font-weight: 700; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; margin-right: 4px; }
@media print { .sticky-actions, .filter-panel, .export-actions, .notice { display: none !important; } }
[hidden] { display: none !important; }
@media (max-width: 759px) {
  .loc-table tr { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.25fr) !important; gap: 4px 8px !important; }
  .loc-table td.nowrap { white-space: nowrap; }
  .loc-table td.cell-wide { grid-column: 1 / -1; }
  .loc-table td.cell-wide::before { content: none; }
  .loc-table td::before { font-size: .62rem !important; }
  .loc-table td.cell-title { font-size: .98rem; }
}
@media (min-width: 600px) {
  .leak-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .leak-group .leak-sub { margin-top: 0; }
}
@media (max-width: 600px) {
  .sticky-actions { flex-wrap: nowrap; gap: 8px; padding: 8px 0 10px; }
  .sticky-actions .btn-lg { flex: 1 1 auto; min-height: 48px; }
  .sticky-actions .btn-link { flex: none; padding: 8px 6px; }
  .form-grid .field-pair-sm { grid-column: auto; }
}
.labor-grid { align-items: end; }
.labor-grid label { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
@media (max-width: 759px) {
  .parts-table tr.part-row { grid-template-columns: 1.3fr 1fr 1fr 44px; }
  .parts-table tr.part-row td:nth-child(1) { grid-column: 1 / 2; } .parts-table tr.part-row td:nth-child(2) { grid-column: 2 / 5; }
  .labor-grid label { font-size: .8rem; }
}
.badge-warn { background: #fef3c7; color: #92400e; }
@media (min-width: 760px) {
  .report-table .cell-wide { min-width: 150px; }
  .report-table td, .report-table th { padding: 6px 6px; }
  .report-table td:last-child { white-space: nowrap; }
}
@media (min-width: 760px) { .report-table td:nth-child(2) { white-space: nowrap; } }

/* =================== Alerts dashboard =================== */
.nav-badge { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .75rem; font-weight: 800; line-height: 1.5; text-align: center; vertical-align: 1px; }
.nav-toggle { position: relative; }
.nav-badge-toggle { position: absolute; top: -7px; right: -9px; margin: 0; font-size: .68rem; padding: 0 5px; box-shadow: 0 0 0 2px var(--dark); }
@media (min-width: 960px) { .nav-badge-toggle { display: none; } }
.badge-demo { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; letter-spacing: .04em; }
.notice-demo { background: #f5f3ff; border-color: #ddd6fe; color: #3b0764; }
.st-pending_parts { background: #ffedd5; color: #9a3412; }
.badge.days { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.days.d0 { background: #dcfce7; color: #166534; } .days.d3 { background: #fef3c7; color: #92400e; }
.days.d8 { background: #fed7aa; color: #9a3412; } .days.d15 { background: #dc2626; color: #fff; }
.alert-tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
@media (min-width: 700px) { .alert-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .alert-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.alert-tiles .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 700px) { .alert-tiles .tile:last-child:nth-child(odd) { grid-column: auto; } }
.tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-top: 5px solid #94a3b8; border-radius: var(--radius); padding: 12px 14px; color: var(--text); box-shadow: var(--shadow); min-height: 92px; }
.tile:hover { text-decoration: none; border-color: #cbd5e1; transform: translateY(-1px); }
.tile-num { font-size: 2.1rem; font-weight: 800; line-height: 1.05; }
.tile-label { color: var(--muted); font-size: .88rem; font-weight: 600; }
.tile-danger { border-top-color: var(--danger); } .tile-danger .tile-num { color: var(--danger); }
.tile-warn { border-top-color: #eab308; } .tile-warn .tile-num { color: #a16207; }
.tile-blue { border-top-color: var(--blue); } .tile-blue .tile-num { color: var(--blue); }
.tile-orange { border-top-color: #ea580c; } .tile-orange .tile-num { color: #c2410c; }
.tile-dark { border-top-color: var(--dark); }
.alerts-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .alerts-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.alert-list { list-style: none; margin: 0; padding: 0 16px 8px; }
.alert-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.alert-item:first-child { border-top: 0; }
.alert-item > .badge { flex: none; margin-top: 2px; }
.alert-item.is-oos { background: linear-gradient(90deg, #fef2f2, transparent 70%); box-shadow: inset 3px 0 0 var(--danger); padding-left: 10px; margin: 0 -16px; padding-right: 16px; }
.alert-main { min-width: 0; flex: 1; }
.alert-title { font-weight: 700; display: block; overflow-wrap: anywhere; }
.alert-sub { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; margin-top: 2px; }
.pad { padding: 0 16px 14px; }
.row-oos td { background: #fef2f2; }
.row-oos td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.age-legend { display: flex; gap: 4px; flex-wrap: wrap; }
.pm-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.pm-filters select { width: auto; min-width: 170px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.seg-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 16px 10px; }
.seg-tabs a { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: var(--text); font-weight: 600; font-size: .9rem; }
.seg-tabs a:hover { text-decoration: none; background: #f8fafc; }
.seg-tabs a.active { background: var(--dark); color: #fff; border-color: var(--dark); }
.seg-tabs a.active .count { background: #475569; color: #fff; }
.pm-table .group-row th { background: #f8fafc; text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--text); padding: 8px 10px; border-top: 1px solid var(--border); }
.pm-table .more-row td { text-align: center; background: #f8fafc; }
.data-note { margin: -4px 0 16px; }
@media (max-width: 759px) {
  .pm-table .group-row { display: block !important; padding: 10px 14px !important; background: #f8fafc; }
  .pm-table .group-row th { display: block; border: 0; padding: 0; background: transparent; }
  .pm-table .more-row, .pm-table .more-row td { display: block !important; }
  .row-oos { background: #fef2f2 !important; box-shadow: inset 4px 0 0 var(--danger); }
  .row-oos td { background: transparent; } .row-oos td:first-child { box-shadow: none; }
  .pm-filters { width: 100%; } .pm-filters select { flex: 1 1 140px; min-width: 0; }
  .card-flush .card-head { padding: 14px 14px 0; }
  .tile-num { font-size: 1.8rem; }
  .alerts-head .page-actions .btn { flex: 1 1 auto; }
  .seg-tabs { padding: 4px 14px 10px; }
  .seg-tabs a { padding: 6px 10px; font-size: .85rem; }
  .pm-table tr:not(.group-row):not(.more-row) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
  .pm-table td.cell-title { grid-column: 1 / 3; order: -2; align-self: center; }
  .pm-table td:last-child { order: -1; justify-self: end; align-self: start; }
  .pm-table td:last-child .btn { min-height: 34px; padding: 6px 10px; }
}

/* ---------- Branding ---------- */
.nav-badge { background: var(--gold-grad); color: #1a1206; }
.site-nav a.active .nav-badge { box-shadow: 0 0 0 1px #0d0d0d; }
.seg-tabs a.active .count { background: var(--gold); color: #1a1206; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.logo-preview { background: #fff; border: 1px dashed #d4d4d4; border-radius: 8px; padding: 10px; width: 180px; margin-bottom: 8px; }
.logo-preview img { display: block; width: 100%; height: 90px; object-fit: contain; }
.logo-field input[type=file] { padding: 8px; min-height: var(--tap); }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-top: 8px; cursor: pointer; }
label.check input { width: 20px; height: 20px; accent-color: var(--gold-d); flex: none; }
.logo-field .sub-label { margin-top: 12px; }

/* ---------- Parts catalog ---------- */
.num { text-align: right; }
th.num { text-align: right; }
form.inline { display: inline; margin: 0; }
.row-actions { text-align: right; }
.row-actions .btn { margin-left: 2px; }
.text-danger-btn { color: var(--danger); }
.parts-cat td input:not([type=checkbox]) { min-height: 38px; padding: 6px 8px; }
.parts-cat .in-price { max-width: 110px; text-align: right; }
.row-editing td { background: var(--gold-tint); }
.badge.src-ticket { background: #fbf1d9; color: #6b4418; }
.badge.src-import { background: #e0f2fe; color: #0c4a6e; }
.badge.src-seed { background: #f1f5f9; color: #334155; }
.badge.src-manual { background: #f1f5f9; color: #475569; }
.badge.imp-new { background: #dcfce7; color: #14532d; }
.badge.imp-update { background: #fef3c7; color: #78350f; }
.badge.imp-error { background: #fee2e2; color: #7f1d1d; }
.imp-row-error td { background: #fef2f2; }
.imp-summary { display: flex; gap: 6px; flex-wrap: wrap; }
.imp-confirm { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 14px; }
.parts-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.flush-head { padding: 0; margin-bottom: 6px; }
#add-part .add-row { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; padding: 0; border: 0; }
#add-part .add-row input { flex: 1 1 160px; min-width: 0; }
#add-part .add-row input[name=description] { flex: 3 1 260px; }
@media (max-width: 759px) {
  .row-actions { text-align: left; }
  .parts-cat td.num, .parts-cat th.num { text-align: left; }
}
.row-editing input[name=part_no] { max-width: 150px; }
.row-editing td.cell-wide { min-width: 300px; }

/* ---------- Accounts / sign-in ---------- */
input[type=password] { width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 16px; background: #fff; color: var(--text); }
.auth-page { min-height: 100vh; min-height: 100dvh; background: radial-gradient(120% 80% at 50% 0%, #262626 0%, #0d0d0d 60%); display: flex; }
.auth-wrap { width: 100%; max-width: 420px; margin: auto; padding: 28px 16px calc(24px + env(safe-area-inset-bottom)); }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand img { width: 200px; max-width: 62vw; height: auto; display: inline-block; }
.auth-app { color: var(--gold-l); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .82rem; margin-top: 6px; }
.auth-card { background: #fff; border-radius: 14px; padding: 22px 20px; box-shadow: 0 10px 40px rgba(0,0,0,.45); border-top: 4px solid var(--gold); }
.auth-card h1 { font-size: 1.35rem; margin-bottom: 14px; }
.auth-card .flash { margin-bottom: 12px; }
.auth-form { display: grid; gap: 14px; }
.auth-form input { font-size: 17px; min-height: 50px; }
.auth-form .btn-block { min-height: 52px; font-size: 1.05rem; margin-top: 2px; }
.auth-help { margin: 14px 0 0; text-align: center; }
.auth-foot { color: #8a8a8a; text-align: center; font-size: .8rem; margin-top: 16px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--primary); font: inherit; font-weight: 600; font-size: .9rem; padding: 8px 10px; min-height: 40px; cursor: pointer; border-radius: 6px; }
.pw-toggle:hover { background: var(--gold-tint); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: .95rem; min-height: var(--tap); margin: 0; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--primary); }
.narrow-card { max-width: 560px; }
.narrow-card form { display: grid; gap: 12px; }

/* nav user item */
.site-nav a.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--gold-grad); color: #1a1206; font-weight: 800; font-size: .85rem; display: inline-grid; place-items: center; flex: none; }
@media (min-width: 960px) {
  .site-nav a.nav-user { padding: 4px 6px; }
  .site-nav a.nav-user.active { box-shadow: none; }
  .site-nav a.nav-user.active .nav-avatar { box-shadow: 0 0 0 2px var(--gold-l); }
  .nav-user-name { display: none; }
}
@media (min-width: 960px) {
  .site-nav, .js .site-nav { gap: 2px; }
  .site-nav a { padding: 8px 9px; }
  .header-inner { gap: 14px; }
}
@media (min-width: 960px) and (max-width: 1180px) {
  .brand-text { display: none; }          /* logo only, so the nav fits */
  .brand { min-width: 40px; }
  .header-inner { gap: 10px; padding: 10px 14px; }
}

/* key/value lists, role + audit badges */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; font-size: .9rem; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.badge-ok { background: #dcfce7; color: #166534; } .badge-warn { background: #fef3c7; color: #92400e; }
.role-admin { background: #0d0d0d; color: var(--gold-l); } .role-office { background: #e0f2fe; color: #075985; }
.role-technician { background: var(--gold-tint); color: #6b4418; border: 1px solid #e7d3a3; }
.act-create { background: #dcfce7; color: #166534; } .act-edit { background: #e0f2fe; color: #075985; }
.act-close { background: #ede9fe; color: #5b21b6; } .act-delete { background: #fee2e2; color: #991b1b; }
.act-reopen { background: #fef3c7; color: #92400e; }
.act-import { background: #ccfbf1; color: #115e59; } .act-settings { background: #f1f5f9; color: #334155; }
.act-login, .act-logout { background: #f1f5f9; color: #475569; } .act-lockout, .act-login_failed { background: #fee2e2; color: #991b1b; }
.act-password, .act-password_reset, .act-demo { background: #fef3c7; color: #92400e; } .act-status { background: #ede9fe; color: #5b21b6; }
.temp-pw { background: #fef3c7; border: 1px solid #fcd34d; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; }
.temp-code { display: inline-block; font-size: 1.25rem; font-weight: 700; letter-spacing: .06em; background: #fff; padding: 4px 12px; border-radius: 6px; border: 1px dashed #d97706; user-select: all; }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-yes { color: var(--success); font-weight: 800; } .perm-no { color: #cbd5e1; }
.audit-details summary { cursor: pointer; color: var(--primary); font-size: .85rem; }
.kv-table { font-size: .82rem; border-collapse: collapse; margin-top: 6px; }
.kv-table td, .kv-table th { border: 1px solid var(--border); padding: 3px 6px; vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.history-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.history-list li { border-left: 3px solid var(--border); padding: 2px 0 2px 10px; }
.record-meta { margin-bottom: 4px; }
.danger-zone { margin-top: 14px; border: 1px solid #fca5a5; border-radius: 8px; padding: 8px 12px; background: #fff7f7; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.danger-zone form { display: grid; gap: 8px; margin-top: 8px; }
.admin-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
@media (min-width: 960px) and (max-width: 1060px) {
  .site-nav a { padding: 8px 6px; }
  .site-nav a.nav-cta { padding: 8px 10px; }
}

/* ---------------------------------------------------------------- contracts, pricing, client users */
.flash-warn { background: #fef3c7; border-color: #fcd34d; color: #78350f; }
.badge.is-missing, .is-missing .badge { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.contract-active { background: #dcfce7; color: #14532d; }
.contract-expired, .contract-inactive { background: #fee2e2; color: #7f1d1d; }
.contract-upcoming { background: #e0f2fe; color: #0c4a6e; }
.role-client_tech, .role-client_manager { background: #fce7f3; color: #831843; border: 1px solid #f9a8d4; }
.rep-client { margin: 2px 0 4px; font-size: 1.05rem; }
.pricing-card .card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.price-table { width: 100%; }
.price-table th { font-weight: 600; text-align: left; }
.price-table td.right { text-align: right; }
.price-table tr.is-incl td, .price-table tr.is-incl th { color: var(--muted); }
.price-table tfoot th, .price-table tfoot td { border-top: 2px solid var(--text); font-size: 1.05rem; }
.contracts-table td, .billing-table td { vertical-align: top; }
.contracts-table tfoot td, .billing-table tfoot td { font-weight: 600; background: #f8fafc; }
.billing-table tr.row-incomplete td { background: #fffbeb; }
.billing-table tr.bill-note td { padding-top: 0; border-top: 0; font-size: .8rem; }
.rates-kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.rates-kv dt { font-weight: 600; }
.rates-kv dd { margin: 0; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contract-form fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px 12px; margin: 0; }
.contract-form legend { font-weight: 600; padding: 0 4px; }
.loc-checks { list-style: none; margin: 0 0 12px; padding: 0; columns: 2 260px; column-gap: 20px; }
.loc-checks li { break-inside: avoid; padding: 2px 0; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.chip-list li a { display: inline-block; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: #f8fafc; font-size: .9rem; }
.card-pad { padding: 0 16px; }
.tech-list li { gap: 8px; flex-wrap: wrap; }
.tech-list li > span { flex: 1 1 160px; }
.tech-contract { display: flex; gap: 4px; align-items: center; }
.tech-contract select { max-width: 220px; font-size: .85rem; padding: 4px 6px; }
.scope-field { background: #fdf2f8; border: 1px solid #f9a8d4; border-radius: 8px; padding: 10px 12px; }
.scope-field[hidden] { display: none; }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } .rates-kv { grid-template-columns: 1fr; } }
@media (min-width: 760px) {
  .contracts-table td.num, .contracts-table td.rates-cell, .billing-table td.num, .billing-table td[data-label="Serial"] { white-space: nowrap; }
  .contracts-table th, .billing-table th { white-space: nowrap; }
}

/* ---------- Ticket form configuration (Settings → Ticket form) ---------- */
.cfg-hidden { display: none !important; }
.req { color: var(--danger); font-weight: 700; }
.tf-top-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 24px; }
@media (min-width: 900px) { .tf-top-grid { grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); } }
.tf-top fieldset { border: 0; padding: 0; margin: 0; }
.tf-top legend { font-weight: 600; margin-bottom: 4px; }
.tf-radio { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.tf-locked ul { margin: 4px 0 0; padding-left: 18px; columns: 2 260px; }
.tf-sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tf-sec-label input { font-size: 1.05rem; font-weight: 700; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; min-width: 240px; }
.tf-move { display: inline-flex; gap: 4px; }
.tf-move .btn, .tf-c-move .btn { min-height: 34px; min-width: 34px; padding: 4px 8px; }
.tf-table td { vertical-align: middle; }
.tf-table input[type=text], .tf-table input:not([type]), .tf-table select, .tf-table textarea { width: 100%; min-width: 150px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.tf-table input[type=checkbox] { width: 20px; height: 20px; }
.tf-c-chk { text-align: center; width: 84px; }
.tf-c-move { width: 86px; white-space: nowrap; }
.tf-row.is-hidden td:not(.tf-c-chk):not(.tf-c-move) { opacity: .5; }
.tf-row.is-custom { background: #fbf6e9; }
.tf-row.tf-moved { background: #fef3c7; transition: background .6s; }
.tf-opts { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: end; }
.tf-opts label { display: flex; flex-direction: column; gap: 2px; }
.badge-custom { background: #fbf6e9; color: #6b4418; border: 1px solid #e8d49c; }
.tf-lock { background: #f1f5f9; color: #475569; }
.tf-actions { align-items: center; }
.tf-removed, .tf-st-list { list-style: none; padding: 0; margin: 0; }
.tf-removed li, .tf-st-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--border); }
.tf-st-table select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.tf-st-table tr.tf-changed { background: #fbf6e9; }
.tf-bottom { margin-top: 8px; }
.custom-fields-card dd { white-space: pre-wrap; }

/* Search tab link icon + Reports page + alert list pages */
.site-nav a.nav-search { display: inline-flex; align-items: center; gap: 5px; }
.site-nav a.nav-search svg { flex: none; }
.search-page .sf { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; color: var(--muted); font-weight: 600; min-width: 0; }
.search-page .sf input, .search-page .sf select { width: 100%; min-width: 0; }
.search-actions:empty { display: none; }
.report-cards { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .report-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.report-card { display: flex; flex-direction: column; gap: 8px; color: var(--text); min-height: 150px; margin: 0; border-top: 4px solid var(--gold); }
.report-card:hover { text-decoration: none; border-color: var(--gold); box-shadow: 0 2px 10px rgba(15,23,42,.12); }
.report-icon { font-size: 1.6rem; }
.report-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.report-title { font-size: 1.15rem; }
.report-go { color: var(--primary); font-weight: 700; }
.alert-subnav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 10px; font-size: .9rem; }
.alert-subnav a { padding: 6px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text); }
.alert-subnav a.active { background: var(--dark); color: var(--gold-l); border-color: var(--dark); }
.alert-subnav a:hover { text-decoration: none; border-color: var(--gold); }
.tile-go { font-size: .75rem; font-weight: 600; opacity: .8; margin-top: 2px; }
.dash-repairs .view-all { margin: 0; padding: 10px 16px; border-top: 1px solid var(--border); font-weight: 600; }
.alert-list.compact .alert-item { padding-top: 8px; padding-bottom: 8px; }
.pad-x { padding: 0 16px; margin: 0 0 6px; }

/* locked (closed) tickets + completing */
.notice-lock { background: #f8fafc; border-color: #cbd5e1; color: #334155; }
.reopen-card { padding: .75rem 1rem; margin-bottom: 1rem; border-left: 4px solid #C9A45C; }
.reopen-card > summary { cursor: pointer; list-style: none; }
.reopen-card > summary::-webkit-details-marker { display: none; }
.reopen-card > summary .link { color: #8C5A24; font-weight: 600; text-decoration: underline; margin-left: .25rem; }
.reopen-card[open] > summary { margin-bottom: .75rem; }
.complete-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: .6rem .8rem; }
.complete-box p { margin: 0; }

/* ticket form: machines at the chosen location */
.eq-pick { margin-bottom: 4px; width: 100%; }
.eq-filter { margin-bottom: 6px; width: 100%; font-size: .9rem; padding: 6px 10px; }
.eq-filter[hidden] { display: none; }
.hint-error { color: var(--danger, #b91c1c) !important; font-weight: 600; }
.input-sm { max-width: 110px; }
.pm-edit .table td { vertical-align: middle; }
.filter-bar .field.field-loc { flex: 2 1 240px; }

/* ---------- Monthly QA reports ---------- */
@media (min-width: 1100px) { .alert-tiles.has-qa { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tile-gold { border-top-color: var(--gold); } .tile-gold .tile-num { color: var(--gold-d); }
.qa-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.qa-count { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: .9rem; }
.qa-count:hover { text-decoration: none; background: #f8fafc; }
.qa-count.active { box-shadow: 0 0 0 2px var(--dark); }
.qa-count b { font-size: 1.05rem; margin-right: 2px; }
.qa-count.qa-overdue b { color: var(--danger); } .qa-count.qa-final b { color: #166534; } .qa-count.qa-due b { color: #a16207; }
.qa-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; line-height: 1.5; vertical-align: middle; }
a.qa-badge:hover { text-decoration: none; filter: brightness(.95); box-shadow: 0 0 0 2px rgba(0,0,0,.12); }
.qa-final { background: #dcfce7; color: #166534; }
.qa-overdue { background: #fee2e2; color: #991b1b; }
.qa-due { background: #fef3c7; color: #92400e; }
.qa-open { background: #e0f2fe; color: #075985; }
.qa-none { background: #f1f5f9; color: #64748b; }
.qa-grid th.qa-loc { font-weight: 600; text-align: left; min-width: 200px; }
.qa-grid th.qa-loc .small { display: block; font-weight: 400; }
.qa-grid .qa-mcol { text-align: center; white-space: nowrap; }
.qa-grid .qa-cell { text-align: center; }
.qa-due-hint { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
@media (max-width: 700px) {
  .qa-grid thead { display: none; }
  .qa-grid tr { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .qa-grid th.qa-loc { width: 100%; border: 0; padding: 0; }
  .qa-grid td.qa-cell { border: 0; padding: 0; }
  .qa-grid td.qa-cell::before { content: attr(data-label); display: block; font-size: .68rem; color: var(--muted); }
}
.qa-tag { display: inline-block; font-size: .62rem; font-weight: 800; letter-spacing: .1em; border-radius: 4px; padding: 1px 5px; vertical-align: 1px; margin-left: 4px; }
.qa-tag-auto { background: var(--gold-tint); color: var(--gold-d); border: 1px solid #e9d7a8; }
.qa-tag-calc { color: var(--gold-d); border: 1px solid #e9d7a8; }
.qa-h { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-d); margin: 0 0 10px; }
.qa-two { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .qa-two { grid-template-columns: 1fr 1fr; } }
.qa-field { margin-bottom: 12px; }
.qa-field .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.qa-ro { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-height: 40px; white-space: pre-line; }
.qa-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-choice { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; min-height: 44px; font-weight: 600; cursor: pointer; background: #fff; }
.qa-choice:has(input:checked) { border-color: var(--gold-d); background: var(--gold-tint); }
.qa-choice-clear { font-weight: 400; }
.qa-help { margin: -8px 0 12px; }
.qa-pm td.n, .qa-pm th.n { text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.qa-pm-ok td:nth-child(5) { color: #166534; font-weight: 700; }
.qa-pm-open td:nth-child(5) { color: #92400e; font-weight: 700; }
.qa-auto-lines { margin-top: 12px; }
.qa-grid th.qa-loc { text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--text); }
.qa-grid th.qa-loc .small { text-transform: none; color: var(--muted); }
.opt-in-pms { border: 1px solid var(--border); border-radius: var(--radius); background: var(--gold-tint); padding: 10px 14px; }
.opt-in-pms .check-row { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; cursor: pointer; }
.opt-in-pms .check-row input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.opt-in-pms .check-row strong { white-space: nowrap; }
.opt-in-pms .check-row .muted { font-weight: 400; }
.transfer-fields { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; border: 1px dashed var(--border); border-radius: var(--radius); padding: 10px 14px; }
.transfer-fields[hidden] { display: none; }
.transfer-fields .field.grow { flex: 1 1 260px; }
.qa-transfers { margin: 8px 0 4px; padding: 6px 10px; background: var(--gold-tint); border-radius: var(--radius); }
/* equipment import */
.imp-summary-lg { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.imp-summary-lg .badge { font-size: .85rem; padding: 4px 12px; }
.badge.imp-same, .badge.imp-skip { background: #e2e8f0; color: #334155; }
.imp-row-error td { background: #fff7f7; }
.imp-err { color: #991b1b; }
.imp-match { color: #92400e; font-weight: 600; }
.imp-options { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; }
.imp-options .check-row { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; flex: 1 1 320px; cursor: pointer; }
.imp-options .check-row input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.imp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.imp-locs select { min-width: 260px; max-width: 100%; }
.imp-undo form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tight-list { margin: 0; padding-left: 18px; line-height: 1.6; }
.imp-table td.mono { white-space: nowrap; }
/* ticket form: previous meter reading is read-only; Service type -> Which PM */
input.input-readonly, input[readonly] { background: #f3f4f6; color: #374151; cursor: default; }
#st-sub[hidden] { display: none !important; }
/* ticket form: an existing machine's details are read-only (changed on the Equipment page) */
select[data-eqlock]:disabled { background: #f3f4f6; color: #374151; opacity: 1; cursor: default; }
/* ticket form: browser validation summary (Save never fails silently) */
.form-errors { border: 2px solid #dc2626; background: #fef2f2; color: #7f1d1d; border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; scroll-margin-top: 90px; }
.form-errors ul { margin: 6px 0 0 18px; padding: 0; }
.form-errors[hidden] { display: none; }
/* Current Machine Hours: "Hour meter replaced" checkbox under the reading */
.meter-replaced { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 500; font-size: .9rem; min-height: 32px; }
.meter-replaced input { width: 20px; height: 20px; flex: none; margin: 0; }
.meter-note { color: #92400e; font-weight: 600; }

/* ---------- Culture / LAL log ---------- */
.tile-teal { border-top-color: #0d9488; } .tile-teal .tile-num { color: #0f766e; }
@media (min-width: 1100px) { .alert-tiles.has-val { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .alert-tiles.has-qa.has-val { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .alert-tiles.has-qa.has-val { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.plain-list { list-style: none; margin: 0; padding: 0; } .plain-list li { padding: 3px 0; }
.d-block { display: block; }
.culture-nav { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .92rem; margin-bottom: 10px; }
.culture-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.culture-tabs a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; }
.culture-tabs a.active { background: var(--gold-tint); border-color: var(--gold); color: var(--primary-d); font-weight: 600; }
.culture-hint code { background: #f1f5f9; padding: 0 4px; border-radius: 4px; }
h2.culture-block { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 8px; }
.culture-rows { display: grid; gap: 10px; margin-bottom: 14px; }
.culture-row { border: 1px solid var(--border); border-left: 5px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; background: #fff; }
.culture-row.status-ok { border-left-color: var(--success); }
.culture-row.status-pending { border-left-color: #eab308; }
.culture-row.status-not_drawn { border-left-color: #94a3b8; background: #f8fafc; }
.culture-row.status-flag, .culture-row.is-flagged, .culture-row.lv-max, .culture-row.is-max { border-left-color: #dc2626; background: #fef2f2; border-color: #fca5a5; }
.culture-row.lv-action, .culture-row.is-action { border-left-color: #d97706; background: #fffbeb; border-color: #fcd34d; }
.culture-row.is-max { border-left-color: #dc2626; background: #fef2f2; border-color: #fca5a5; }
.culture-row.not-due { opacity: .92; }
.culture-site { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-bottom: 8px; }
.culture-fields { display: grid; gap: 8px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.culture-fields .field-nd { grid-column: 1 / -1; }
@media (min-width: 900px) { .culture-fields { grid-template-columns: 170px 150px 150px minmax(0, 1fr); } .culture-fields .field-nd { grid-column: auto; } }
input.is-flag, input.is-max { border: 2px solid #dc2626 !important; background: #fff1f2 !important; color: #b91c1c; font-weight: 700; }
input.is-action { border: 2px solid #d97706 !important; background: #fffbeb !important; color: #92400e; font-weight: 700; }
.culture-flag-msg { margin: 8px 0 0; color: #92400e; font-weight: 600; }
.culture-flag-msg.lv-max { color: #b91c1c; }
.culture-flag-msg [hidden] { display: none; }
.culture-flag-msg[hidden] { display: none; }
.culture-status-ok { background: #dcfce7; color: #166534; }
.culture-status-pending { background: #fef3c7; color: #92400e; }
.culture-status-not_drawn { background: #e2e8f0; color: #334155; }
.culture-status-flag, .culture-flag-badge, .culture-status-max { background: #dc2626; color: #fff; }
.culture-status-action { background: #f59e0b; color: #422006; }
.cell-flag, .cell-max { color: #b91c1c; font-weight: 700; background: #fef2f2; }
.cell-action { color: #92400e; font-weight: 700; background: #fffbeb; }
.culture-retest-open { border-left: 5px solid #dc2626; background: #fef2f2; }
.culture-retests { margin: 0 0 12px; }
.culture-val-resolved { border-left: 5px solid var(--success); }
.text-flag { color: #b91c1c; font-weight: 700; }
.culture-others { margin: 4px 0 14px; } .culture-others summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.culture-md { margin-bottom: 12px; }
.culture-repeat-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.culture-preview { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.culture-preview h3 { font-size: 1rem; margin: 0 0 6px; }
.group-select { max-width: 220px; }
.culture-sites td { vertical-align: middle; }
.culture-val-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.culture-val-head h2 { margin: 0; }
.culture-val-validated { border-left: 5px solid var(--success); } .culture-val-active { border-left: 5px solid #0d9488; }
.culture-val-stopped { opacity: .75; }
.val-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 10px 0; }
.val-steps li { flex: 1 1 0; text-align: center; padding: 6px 4px; border-radius: 8px; border: 1px dashed #94a3b8; color: var(--muted); font-size: .85rem; font-weight: 600; }
.val-steps li.done { background: #ccfbf1; border: 1px solid #0d9488; color: #115e59; }
.val-steps li.done::before { content: "✓ "; }
tr.week-fail td { background: #fef2f2; }
.input-sm { min-height: 34px !important; padding: 4px 8px !important; max-width: 120px; }
.val-add { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.qa-culture-pending { color: #92400e; }
h3.qa-sub { font-size: .9rem; margin: 12px 0 4px; }

/* ---- go-live batch: QR requests, e-mail settings, 2FA, locks, client logo ---- */
.badge-qr { background: #fdf6e3; color: #7a5b16; border: 1px solid #e3c87d; }
.badge-danger { background: #fde8e8; color: #9b1c1c; border: 1px solid #f5b5b5; }
.flash-lock { font-weight: 600; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.qr-h1 { margin-bottom: 4px; }
.qr-client { margin: 0 0 6px; font-size: 1.05rem; }
.qr-ref { font-size: 1.05rem; text-align: center; margin: 14px 0; }
.qr-ref b { font-size: 1.6rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.qr-form select, .qr-form textarea, .qr-form input { width: 100%; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.qr-danger { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #ddd; }
.client-logo-preview { display: inline-block; padding: 10px 14px; border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; margin-bottom: 10px; }
.client-logo-preview img { height: 64px; width: auto; max-width: 240px; object-fit: contain; display: block; }
.mail-status dd .muted { margin-top: 2px; }
.test-mail .input-wide { min-width: 260px; flex: 1; max-width: 380px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip { border: 1px solid #d6d6d6; background: #f7f7f7; border-radius: 999px; padding: 4px 10px; font-size: .82rem; cursor: pointer; }
.chip:hover { background: #fff6e0; border-color: #c9a45c; }
.mail-locs { margin: 6px 0 10px; }
.mail-locs summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.mail-log td { vertical-align: top; }
.lock-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tfa-grid { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.tfa-qr img { border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; padding: 6px; display: block; }
.tfa-steps { flex: 1; min-width: 240px; line-height: 1.6; padding-left: 20px; }
.tfa-steps li { margin-bottom: 10px; }
.tfa-key { font-size: 1.05rem; letter-spacing: .06em; background: #f4f4f4; padding: 2px 6px; border-radius: 4px; }
.tfa-confirm { display: flex; gap: 8px; margin-top: 6px; }
.otp-input { font-size: 1.3rem; letter-spacing: .25em; max-width: 180px; text-align: center; font-variant-numeric: tabular-nums; }
.recovery-card { border: 2px solid #c9a45c; }
.recovery-codes { columns: 2; font-size: 1.1rem; line-height: 1.9; }
.recovery-codes code { letter-spacing: .06em; }
@media print { .recovery-card ~ *, .site-header, .site-nav, nav, .crumbs, .page-head .page-actions { display: none !important; } }
.settings-grid > #email { grid-column: 1 / -1; }
.mail-log td:nth-child(5) { min-width: 200px; word-break: break-all; }

/* duplicate open repair warning (New ticket / Report a repair) */
.notice-dup { background: #fffbeb; border-color: #f59e0b; color: #78350f; }
.notice-dup p { margin: 0 0 6px; }
.notice-dup .dup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dup-live { margin-top: 6px; }
