:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --border: #d0d7de;
  --border-muted: #e6e8eb;
  --text: #1f2328;
  --muted: #626f86;
  --accent: #0c66e4;
  --success: #1f845a;
  --danger: #c9372c;
  --warning: #9a6700;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --radius: 6px;
  --shadow: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.top h1 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.top p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
body.has-tray { background: #f7f7f8; }
.frame { display: flex; align-items: stretch; min-height: 100vh; }
.frame-main { flex: 1; min-width: 0; min-height: 100vh; }
.tray {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 64px;
  height: 100vh;
  flex: 0 0 64px;
  padding: 12px;
  background: #f3f3f4;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: width 0.2s ease, flex-basis 0.2s ease;
}
body.tray-open .tray { width: 248px; flex-basis: 248px; }
.tray.tray-instant { transition: none; }
.tray-head { display: flex; }
.tray-toggle,
.tray-nav a,
.tray-tools button {
  display: flex;
  align-items: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: #3f3f46;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.011em;
  text-decoration: none;
}
body.tray-open .tray-nav a,
body.tray-open .tray-tools button { width: 100%; }
.tray-toggle { justify-content: center; color: #52525b; }
.tray-toggle svg,
.tray-nav svg,
.tray-tools svg { width: 18px; height: 18px; flex: none; margin-left: 11px; }
.tray-toggle svg { margin-left: 0; }
.tray-toggle:hover,
.tray-nav a:hover,
.tray-tools button:hover { background: rgba(0, 0, 0, 0.05); color: #18181b; text-decoration: none; }
.tray-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}
.tray-nav a[aria-current="page"] { background: #e6e6e8; color: #18181b; }
.tray-label {
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  margin-left: 0;
  transition: opacity 0.16s ease, max-width 0.2s ease, margin 0.2s ease;
}
body.tray-open .tray-label { opacity: 1; max-width: 160px; margin-left: 10px; }
.tray-tools {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.tray-kicker {
  display: none;
  margin: 2px 12px 6px;
  color: #8a8a93;
  font-size: 12px;
  font-weight: 500;
}
body.tray-open .tray-kicker { display: block; }
.tray-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-top: 8px;
}
.tray-avatar {
  width: 28px;
  height: 28px;
  margin-left: 6px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e4e4e7;
  color: #3f3f46;
  font-size: 12px;
  font-weight: 600;
}
.tray-who { display: none; min-width: 0; }
.tray-signout { display: none; margin-left: auto; }
body.tray-open .tray-who,
body.tray-open .tray-signout { display: flex; }
.tray-who { flex-direction: column; }
.tray-who .who {
  color: #18181b;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tray-role { color: #8a8a93; font-size: 12px; text-transform: capitalize; }
.tray-foot button.linkish {
  min-height: 32px;
  padding: 0 4px;
  color: #71717a;
  font-size: 13px;
}
@media (prefers-reduced-motion: reduce) {
  .tray, .tray-label { transition: none; }
}
.auth-area { display: flex; align-items: center; gap: 8px; }
.who { color: var(--muted); font-size: 13px; }
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  text-decoration: none;
}
button:hover, .btn:hover { background: #f3f4f6; text-decoration: none; }
button.primary, .btn.primary {
  background: var(--success);
  border-color: rgba(27, 31, 36, 0.15);
  color: #fff;
}
button.primary:hover { background: #2da44e; }
button.danger { color: var(--danger); }
button.linkish {
  border: none;
  background: none;
  box-shadow: none;
  color: var(--accent);
  padding: 5px 8px;
}
button:disabled { opacity: 0.55; cursor: not-allowed; }
.shell { max-width: 1280px; margin: 0 auto; padding: 20px 28px 40px; }
.muted { color: var(--muted); }
.empty {
  color: var(--muted);
  font-style: italic;
  margin: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.card.overdue { border-color: #ff8182; background: #fff5f5; }
.card.due-soon { border-color: #d4a72c; background: #fff8c5; }
.card-header, .card-body { padding: 16px; }
.card-header {
  border-bottom: 1px solid var(--border-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card h2, .card h3 { margin: 0; font-size: 18px; font-weight: 600; }
.card h3 { font-size: 16px; }
.meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.module-card, .order-card {
  display: block;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  box-shadow: var(--shadow);
}
.module-card:hover, .order-card:hover { border-color: var(--accent); text-decoration: none; }
.order-card.overdue { border-color: #ff8182; background: #fff5f5; }
.order-card.due-soon { border-color: #d4a72c; background: #fff8c5; }
.kicker { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 16px;
}
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
  min-width: 0;
}
textarea { min-height: 96px; width: 100%; }
.form-grid { display: grid; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag, .status {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 3px;
  background: #e9f2ff;
  color: #0c66e4;
  line-height: 1.6;
}
.status.queued { background: #eaeef2; color: #57606a; }
.status.in_progress { background: #ddf4ff; color: #0969da; }
.status.blocked { background: #fff1e5; color: #bc4c00; }
.status.done { background: #dafbe1; color: #1a7f37; }
.status.online { background: #dafbe1; color: #1a7f37; }
.status.offline { background: #eaeef2; color: #57606a; }
.fleet-sub { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.fleet-note { margin: 0 0 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat strong { display: block; font-size: 22px; margin-top: 4px; }
.analytics-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 32px; gap: 8px; align-items: center; margin: 6px 0; font-size: 12px; }
.bar-track { height: 8px; background: #eef1f4; border-radius: 99px; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--accent); }
@media (max-width: 720px) { .analytics-split { grid-template-columns: 1fr; } }
.fleet-table .status { white-space: normal; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-muted); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
.pre {
  white-space: pre-wrap;
  margin: 0;
  font-family: inherit;
}
.sign-in {
  max-width: 420px;
  margin: 24px auto;
}
.error {
  color: var(--danger);
  background: #fff5f5;
  border: 1px solid #ff8182;
  border-radius: var(--radius);
  padding: 8px 10px;
  margin: 0 0 12px;
}
.toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #24292f;
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
  max-width: 360px;
}
.toast.bad { background: var(--danger); }
.section-title { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.01em; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 12px;
}
.toolbar .muted { margin: 2px 0 0; }
.toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.toolbar .filters { margin: 0; align-items: flex-end; }
.toolbar .filters label { flex-direction: row; align-items: center; gap: 8px; }
.view-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.view-option {
  position: relative;
  flex-direction: row;
  margin: 0;
  color: var(--text);
}
.view-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.view-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 72px;
  padding: 0 14px;
  font-weight: 650;
  color: var(--muted);
}
.view-option input:checked + span { background: #e9f2ff; color: var(--accent); }
.view-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.board-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.board-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 72px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}
.board-tab.current {
  background: #e9f2ff;
  color: var(--accent);
  border-color: #c6dcff;
}
.board-tab:hover { text-decoration: none; }
.board-edit { margin-bottom: 16px; }
.issue-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.issue-head, .issue-row {
  display: grid;
  grid-template-columns: minmax(160px, 2.2fr) 52px minmax(88px, 1fr) 80px minmax(188px, auto) 112px;
  gap: 12px;
  align-items: center;
  padding: 0 16px 0 13px;
}
.issue-head {
  min-height: 36px;
  background: #f7f8f9;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.issue-row {
  min-height: 52px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border-muted);
  border-left: 3px solid transparent;
}
.issue-list .issue-row:last-child { border-bottom: 0; }
.issue-row:hover { background: #f7f8f9; text-decoration: none; }
.issue-row.overdue { border-left-color: var(--danger); }
.issue-row.due-soon { border-left-color: #d4a72c; }
.issue-main { display: flex; flex-direction: column; min-width: 0; }
.issue-main strong { font-size: 14px; }
.issue-sub, .due-flag {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.issue-row.overdue .due-flag { color: var(--danger); font-weight: 700; }
.issue-row.due-soon .due-flag { color: var(--warning); font-weight: 700; }
.issue-main a, .issue-qty, .issue-site, .issue-priority, .order-card a.card-link {
  color: inherit;
  text-decoration: none;
}
.issue-main a:hover, .order-card a.card-link:hover { text-decoration: underline; }
.order-card a.meta { color: var(--muted); text-decoration: none; }
.issue-priority { text-transform: capitalize; }
.queue-field { min-width: 0; }
.issue-due .cell-edit { flex-wrap: nowrap; white-space: nowrap; }
.issue-due .cell-edit > span { white-space: nowrap; }
.edit-bubble.wide { width: 280px; }
.edit-bubble textarea, .edit-bubble input[type="date"] { width: 100%; }
.edit-bubble .block-reason {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-muted);
}
.edit-bubble .block-reason textarea { min-height: 72px; }
.job-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.issue-empty { padding: 16px; }
.stack-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.manage-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--border-muted);
  border-radius: 0;
  padding: 4px 12px 4px 16px;
  box-shadow: none;
}
.stack-list > :last-child { border-bottom: 0; }
.stack-list > .order-card {
  border: 0;
  border-bottom: 1px solid var(--border-muted);
  border-radius: 0;
  box-shadow: none;
}
.manage-card.is-hidden { border-style: dashed; background: #f6f8fa; }
.manage-main {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 0;
  color: inherit;
}
.manage-main:hover { text-decoration: none; }
.manage-card button { min-width: 76px; }
.site-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 8px 0 16px;
  padding-bottom: 4px;
}
.site-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.site-chip:hover { text-decoration: none; border-color: var(--accent); }
.site-chip a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.site-chip form { margin: 0; }
.site-chip.archived { opacity: 0.72; }
.site-chip.current { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.25); }
.site-chip .count {
  min-width: 1.4em;
  padding: 0 7px;
  border-radius: 2em;
  background: #eaeef2;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.photo-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-grid figure { margin: 0; width: 180px; }
.photo-grid img { width: 100%; height: 120px; object-fit: cover; border: 1px solid var(--border); border-radius: var(--radius); background: #f6f8fa; }
.photo-grid figcaption { font-size: 12px; color: var(--muted); }
.crumb { margin-bottom: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.check { flex-direction: row; align-items: center; color: var(--text); }
code, .mono { font-family: var(--mono); font-size: 12px; }
.job-head { align-items: center; }
.job-actions { display: flex; align-items: center; gap: 12px; }
.job-actions form { margin: 0; }
.job-head h2 { font-size: 28px; line-height: 1.2; }
.job-facts { margin: 8px 0 0; font-size: 18px; }
.job-head .status { font-size: 16px; padding: 6px 12px; }
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 148px;
  width: 100%;
  padding: 20px;
  text-align: left;
  border-radius: 12px;
  font-size: 16px;
}
.tile.open { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.25); }
.tile-label { font-size: 20px; font-weight: 650; color: var(--text); }
.tile-glance { color: var(--muted); font-size: 15px; }
.icon { width: 36px; height: 36px; color: var(--accent); }
.detail-panel { min-height: 120px; }
.detail-panel.htmx-request { opacity: 0.55; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2em;
  background: #fff8c5;
  color: var(--warning);
  font-size: 12px;
  font-weight: 650;
}
.template-block {
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed #d4a72c;
  border-radius: var(--radius);
  background: #fff8c5;
}
.checklist { margin: 8px 0 0; padding-left: 1.2em; font-size: 16px; }
.checklist li { margin: 6px 0; }
.stack { margin-top: 16px; }
.choice { border: 0; padding: 0; margin: 0; display: flex; gap: 16px; }
.choice legend { padding: 0; font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.notes { list-style: none; padding: 0; margin: 0 0 16px; }
.notes > li { padding: 12px 0; border-bottom: 1px solid var(--border-muted); }
.ticket-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.ticket-head, .ticket-row {
  display: grid;
  grid-template-columns: 72px minmax(160px, 2fr) minmax(128px, 1.15fr) minmax(72px, 0.7fr) 88px 148px minmax(96px, 0.9fr) 96px;
  gap: 10px;
  align-items: center;
  padding: 0 16px;
}
.ticket-head {
  min-height: 36px;
  background: #f7f8f9;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ticket-row {
  min-height: 56px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border-muted);
  padding-top: 8px;
  padding-bottom: 8px;
}
.ticket-list .ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: #f7f8f9; text-decoration: none; }
.t-title { display: flex; flex-direction: column; min-width: 0; }
.t-title strong, .t-key, .t-site, .t-module, .t-assignee, .t-assignee-name, .t-reported {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-row a { color: inherit; text-decoration: none; }
.ticket-row a:hover { text-decoration: none; }
.ticket-row .t-site {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.priority { font-weight: 700; text-transform: capitalize; }
.priority.low { color: var(--muted); }
.priority.normal { color: #0c66e4; }
.priority.high { color: #bc4c00; }
.priority.urgent { color: var(--danger); }
.cell-edit {
  max-width: 100%;
  min-height: 28px;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  border-radius: 4px;
  justify-content: flex-start;
}
.cell-edit:hover, .cell-edit[aria-expanded="true"] { background: #e9eef6; }
.edit-bubble {
  position: fixed;
  z-index: 40;
  width: 240px;
  max-height: min(320px, calc(100vh - 16px));
  overflow: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(31, 35, 40, 0.16);
}
.edit-bubble[hidden] { display: none; }
.edit-bubble form { margin: 0; }
.edit-bubble-form { display: flex; flex-direction: column; gap: 8px; }
.bubble-label {
  margin: 4px 8px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.bubble-option {
  width: 100%;
  min-height: 36px;
  height: auto;
  justify-content: flex-start;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 4px;
  font-weight: 500;
  text-align: left;
  white-space: normal;
}
.bubble-option::before {
  content: "";
  display: inline-block;
  width: 1em;
  margin-right: 8px;
}
.bubble-option.current { background: #e9f2ff; }
.bubble-option.current::before { content: "✓"; color: var(--accent); }
.bubble-option:hover { background: #f1f2f4; }
.field-line {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
}
.field-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.site-value { font-size: 16px; font-weight: 700; color: var(--text); }
.ticket-heading { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.3; text-align: left; }
.ticket-prose { white-space: pre-wrap; margin: 0; font-size: 15px; line-height: 1.55; text-align: left; }
.prose-hit {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-align: left;
  border-radius: 6px;
  cursor: text;
}
.prose-hit:hover, .prose-field .prose-view:hover .prose-hit { background: #f7f8f9; }
.prose-editor[hidden] { display: none; }
.edit-actions { display: flex; gap: 8px; margin-top: 8px; }
.prose-field h3 { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.t-key { font-weight: 700; color: var(--accent); }
.group-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.group-bar .view-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 72px;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}
.group-bar .view-option.current { background: #e9f2ff; color: var(--accent); }
.group-bar .view-option:hover { text-decoration: none; }
.site-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}
.site-expand:hover { background: #f7f8f9; text-decoration: none; }
.site-group { border-top: 1px solid var(--border); }
.site-groups .site-group:first-child { border-top: 0; }
.site-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  background: #f7f8f9;
  border-bottom: 1px solid var(--border-muted);
  list-style: none;
  cursor: pointer;
}
.site-summary::-webkit-details-marker { display: none; }
.site-summary::marker { content: ""; }
.site-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-count, .site-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.site-count { min-width: 28px; background: #e9eef6; color: var(--text); font-size: 13px; }
.site-badge.high { background: #fff1e6; color: #bc4c00; }
.site-badge.blocked { background: #fff7d6; color: #7a5b00; }
.site-caret {
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
}
details[open] > .site-summary .site-caret { transform: rotate(45deg); }
.site-group .ticket-head { border-top: 0; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.ticket-title { width: 100%; font-size: 22px; font-weight: 700; margin-top: 4px; }
.ticket-fields form { margin: 0 0 12px; }
.ticket-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ticket-fields select, .ticket-fields input, .ticket-fields textarea { width: 100%; font-weight: 500; color: var(--text); }
.filters .mine { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
.status.investigating { background: #f3e8ff; color: #6e34b2; }
.status.waiting_on_parts { background: #fff7d6; color: #7a5b00; }
.status.visit_scheduled { background: #e7f8ef; color: #1f7a4d; }
.status.resolved { background: #e7f8ef; color: #1f7a4d; }
.status.closed { background: #f1f2f4; color: #626f86; }
.note-photo { max-width: min(100%, 320px); margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius); cursor: zoom-in; }
.field-label { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.prose-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prose-head h3 { margin: 0; }
.md { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 0.8em 0 0.3em; line-height: 1.25; font-size: 1.05rem; }
.md h1 { font-size: 1.25rem; }
.md p, .md ul, .md ol, .md blockquote, .md pre { margin: 0.45em 0; }
.md ul, .md ol { padding-left: 1.3em; }
.md blockquote { margin-left: 0; padding-left: 12px; border-left: 3px solid var(--border); color: var(--muted); }
.md code { font-family: var(--mono); font-size: 0.92em; background: #f1f2f4; padding: 0 4px; border-radius: 4px; }
.md pre { overflow: auto; padding: 10px 12px; background: #f6f8fa; border: 1px solid var(--border-muted); border-radius: var(--radius); }
.md pre code { background: transparent; padding: 0; }
.md img, .attach-thumb { max-width: min(100%, 420px); border: 1px solid var(--border); border-radius: var(--radius); cursor: zoom-in; background: white; }
.md input[type="checkbox"] { width: auto; margin: 0 8px 0 0; vertical-align: -2px; accent-color: var(--accent); }
.md li.task { list-style: none; margin-left: -1.3em; }
.md li + li { margin-top: 2px; }
.md a { text-decoration: underline; }
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
button.ghost, .btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
button.ghost:hover, .btn.ghost:hover { background: #f1f2f4; color: var(--text); }
button:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.md-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.md-icon circle { fill: currentColor; stroke: none; }
.md-editor {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.md-editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(12, 102, 228, 0.14); }
.md-editor [hidden] { display: none !important; }
.md-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-muted);
  background: #f9fafb;
  border-radius: 10px 10px 0 0;
}
.md-tabs { display: flex; gap: 2px; flex: none; }
.md-editor .md-tab {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.md-editor .md-tab:hover { background: #eef0f3; color: var(--text); }
.md-editor .md-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-muted), 0 1px 2px rgba(16, 24, 40, 0.06); }
.md-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.md-toolbar::-webkit-scrollbar { display: none; }
.md-editor.previewing .md-toolbar { visibility: hidden; }
.md-editor .md-tool {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #44546f;
}
.md-editor .md-tool:hover { background: #e9ecf0; color: var(--text); }
.md-editor .md-tool:active { background: #dfe3e8; }
.md-sep { width: 1px; height: 18px; margin: 0 4px; background: var(--border); flex: none; }
.md-editor .md-input {
  display: block;
  width: 100%;
  min-height: 132px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
}
.md-editor .md-input:focus { outline: none; }
.md-preview { min-height: 132px; padding: 12px 14px; }
.md-chosen { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0 14px 10px; }
.md-chosen li {
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.md-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  border-top: 1px dashed var(--border-muted);
}
.md-attach {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  color: #44546f;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.md-attach:hover { background: #eef0f3; color: var(--text); }
.md-attach:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.md-hint { color: var(--muted); font-size: 12px; text-align: right; }
.md-status { margin: 0; padding: 0 14px 10px; color: var(--muted); font-size: 13px; }
.md-status[data-state="error"] { color: var(--danger); }
.md-status:empty { display: none; }
.md-editor.drag { border-color: var(--accent); border-style: dashed; background: #f5f9ff; }
.composer-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.note-composer .field-label { margin-bottom: 8px; }
.prose-head .ghost { min-height: 36px; padding: 0 10px; font-size: 13px; }
@media (pointer: coarse) {
  .md-editor .md-tool { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  .md-editor .md-tab, .md-attach { min-height: 44px; }
  .md-editor .md-input { font-size: 16px; }
}
@media (max-width: 560px) {
  .md-head { flex-wrap: wrap; }
  .md-toolbar { margin-left: 0; width: 100%; order: 2; overflow: visible; }
  .md-sep { display: none; }
  .md-editor .md-tool { flex: 1 1 0; width: auto; min-width: 28px; height: 44px; min-height: 44px; }
  .md-hint { display: none; }
  .composer-actions button { flex: 1; }
}
.attach-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.attach-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.attach-list form { margin: 0; }
.attach-video { width: min(100%, 420px); border-radius: var(--radius); background: black; }
.comment-edit { margin-top: 8px; }
.comment-edit summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}
.comment-edit summary::-webkit-details-marker { display: none; }
.comment-edit summary:hover { background: #f1f2f4; color: var(--text); }
.comment-edit[open] summary { color: var(--text); margin-bottom: 8px; }
.comment-edit .md-icon { width: 16px; height: 16px; }
.lightbox { border: 0; padding: 12px; background: transparent; max-width: calc(100vw - 24px); }
.lightbox::backdrop { background: rgba(15, 23, 42, 0.78); }
.lightbox img { display: block; max-width: min(960px, 100%); max-height: 82vh; margin: 0 auto; background: white; border-radius: var(--radius); }
.lightbox-close { margin: 0 auto 8px; display: block; }
details summary { cursor: pointer; }
details summary h3 { display: inline; }
button, .btn { min-height: 44px; }
@media (max-width: 720px) {
  .tile-grid { grid-template-columns: 1fr; }
  .shell { padding: 16px; }
  .job-head h2 { font-size: 24px; }
  .top { flex-wrap: wrap; padding: 12px 16px; }
  .manage-card { flex-direction: column; align-items: stretch; padding: 12px; }
  .manage-card button { width: 100%; }
  .toolbar-controls, .view-switch, .board-tabs { width: 100%; }
  .board-tab { flex: 1; }
  .view-option { flex: 1; }
  .view-option span { width: 100%; }
  .issue-head { display: none; }
  .issue-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "main status"
      "qty site"
      "priority due";
    gap: 4px 12px;
    padding: 12px 14px;
    align-items: start;
  }
  .issue-main { grid-area: main; }
  .issue-row .status, .issue-status { grid-area: status; justify-self: end; }
  .issue-qty { grid-area: qty; }
  .issue-qty::before { content: "Qty "; color: var(--muted); }
  .issue-site { grid-area: site; }
  .issue-priority { grid-area: priority; }
  .issue-due { grid-area: due; justify-self: end; }
  .ticket-head { display: none; }
  .group-bar { width: 100%; }
  .group-bar .view-switch { flex: 1 1 100%; }
  .group-bar .view-option { flex: 1; white-space: nowrap; }
  .site-expand { flex: 1 1 calc(50% - 8px); }
  .site-summary { padding: 12px 14px; }
  .site-name { flex: 1 1 auto; font-size: 18px; }
  .ticket-layout { grid-template-columns: minmax(0, 1fr); }
  .ticket-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "site status"
      "title title"
      "key priority"
      "module assignee"
      "reported reported";
    gap: 4px 12px;
    padding: 12px 14px;
    align-items: start;
  }
  .t-title { grid-area: title; }
  .t-status { grid-area: status; justify-self: end; }
  .t-priority { grid-area: priority; }
  .t-key { grid-area: key; }
  .t-site { grid-area: site; }
  .t-module { grid-area: module; }
  .t-assignee { grid-area: assignee; }
  .t-reported { grid-area: reported; }
  .t-reported::before { content: "Reported "; color: var(--muted); }
}

.fleet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.fleet-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.fleet-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}
.fleet-switch a[aria-current="page"] { background: var(--accent); color: #fff; }
.fleet-switch .count {
  min-width: 1.5em;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(31, 35, 40, 0.06);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.fleet-switch a[aria-current="page"] .count { background: #fff; color: var(--accent); }
.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.site-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 180px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.site-card:hover {
  border-color: #9ec0f5;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31, 35, 40, 0.06);
}
.site-card h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; line-height: 1.3; }
.site-card h3 a { color: inherit; text-decoration: none; }
.site-card h3 a:hover { color: var(--accent); }
.card-top { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.gen { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.stage {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stage.planned { background: #eef1f4; color: #44546f; }
.stage.building { background: #ddf4ff; color: #0969da; }
.stage.installing { background: #fff1e5; color: #bc4c00; }
.stage.queued { background: #f3e8ff; color: #6e34b2; }
.countdown { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.countdown.soon { color: var(--warning); }
.countdown.later { color: var(--accent); }
.countdown.overdue { color: var(--danger); }
.countdown.open { font-weight: 600; }
.drive-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  border-radius: 12px;
  color: var(--muted);
}
.drive-link svg { width: 20px; height: 20px; }
.drive-link:hover { background: #f3f4f6; color: var(--accent); text-decoration: none; }
.site-loc, .site-segment, .site-move, .site-notes, .site-id { margin: 0; }
.site-loc { font-weight: 600; }
.site-segment, .site-move, .site-notes, .site-id { color: var(--muted); font-size: 13px; }
.work-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.work-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f4f5f7;
  color: var(--text);
  font-weight: 650;
  font-size: 13px;
  text-decoration: none;
}
.work-badge:hover { background: #e9f2ff; color: var(--accent); text-decoration: none; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card-actions form { margin: 0; }
.confirm-bar {
  padding: 8px;
  border-radius: 12px;
  background: #fff5f5;
}
.confirm-bar p { margin: 0; font-weight: 650; }
.add-site, .card-edit { margin: 4px 0 14px; }
.card-edit { margin-bottom: 0; }
.add-site summary, .card-edit summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
}
.pipeline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.pipeline-form .span-2, .pipeline-form .form-actions { grid-column: 1 / -1; }
.pipeline-form textarea { min-height: 72px; }
.empty-sites {
  grid-column: 1 / -1;
  padding: 48px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
}
.empty-sites h3 { margin: 6px 0; font-size: 20px; letter-spacing: -0.02em; }
.empty-sites p { margin: 0; color: var(--muted); }
@media (max-width: 720px) {
  .site-grid { grid-template-columns: 1fr; }
  .fleet-switch { width: 100%; }
  .fleet-switch a { flex: 1; padding: 0 8px; }
  .site-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-card { transition: none; }
  .site-card:hover { transform: none; }
}
.test-filters { align-items: flex-end; }
.test-filters input[name="serial"] { width: 8em; }
.test-list { display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 8px 0 16px; }
.test-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 150px 96px 80px 120px 80px minmax(0, 2fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-muted);
  color: var(--text);
}
.test-row:last-child { border-bottom: 0; }
a.test-row:hover { background: #f6f8fa; text-decoration: none; }
.test-head { min-height: 0; padding-top: 8px; padding-bottom: 8px; background: #f9fafb; color: var(--muted); font-size: 12px; font-weight: 700; }
.test-why { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.status.result-pass { background: #dafbe1; color: #1a7f37; }
.status.result-marginal { background: #fff7d6; color: #7a5b00; }
.status.result-fail { background: #ffebe9; color: #cf222e; }
.status.result-unknown, .status.result-in_progress { background: #eaeef2; color: #57606a; }
.test-title { justify-content: space-between; margin-top: 16px; }
.test-title h3 { margin: 0; }
.test-reasons { margin: 8px 0 16px; padding-left: 1.2em; color: #9a3412; }
.test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
.test-grid h3 { margin: 0 0 8px; font-size: 14px; }
.test-facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.test-facts dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.test-facts dd { margin: 0; }
.readings-table td, .readings-table th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pager { gap: 8px; }
@media (max-width: 720px) {
  .test-head { display: none; }
  .test-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "serial result"
      "time time"
      "v ah"
      "delta delta"
      "why why";
    gap: 4px 12px;
  }
  .test-serial { grid-area: serial; }
  .test-result { grid-area: result; justify-self: end; }
  .test-time { grid-area: time; color: var(--muted); font-size: 13px; }
  .test-v { grid-area: v; }
  .test-ah { grid-area: ah; justify-self: end; }
  .test-delta { grid-area: delta; }
  .test-why { grid-area: why; white-space: normal; }
}
.device-row {
  display: grid;
  grid-template-columns: 32px minmax(140px, 1.2fr) minmax(100px, 1fr) 110px minmax(0, 2fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-muted);
}
.device-row:last-child { border-bottom: 0; }
.device-row input[type="checkbox"] { width: 20px; height: 20px; }
.device-where { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status.device-installed { background: #dafbe1; color: #1a7f37; }
.status.device-in_stock { background: #ddf4ff; color: #0969da; }
.status.device-bench { background: #fff7d6; color: #7a5b00; }
.status.device-removed, .status.device-scrapped { background: #eaeef2; color: #57606a; }
.status.device-rma { background: #ffebe9; color: #cf222e; }
.device-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.device-path { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.device-label-preview img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border-muted); border-radius: 4px; background: #fff; }
.plain-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.scan-page { max-width: 640px; margin: 0 auto; display: grid; gap: 12px; }
.scan-tabs { width: 100%; }
.scan-tabs .board-tab { flex: 1; justify-content: center; }
.scanner { padding: 12px; display: grid; gap: 10px; }
.scan-view { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18% 22%; border: 3px solid rgba(255, 255, 255, 0.85); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25); }
.scan-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.scan-buttons > * { flex: 1 1 160px; }
.scan-buttons label.btn { display: inline-flex; flex-direction: row; justify-content: center; align-items: center; color: var(--text); font-size: 14px; cursor: pointer; }
.scan-manual { display: flex; gap: 8px; }
.scan-manual input { flex: 1; font-size: 16px; min-height: 44px; font-family: var(--mono); text-transform: uppercase; }
.scan-target { margin: 0; font-weight: 600; }
.scan-status { margin: 0; min-height: 1.5em; }
.scan-status[data-state="error"] { color: var(--danger); }
.scan-status[data-state="ok"] { color: var(--success); }
.scan-note { margin: 0; }
.scan-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scan-for { width: 100%; }
.scan-for .view-option { flex: 1; min-height: 44px; }
.scan-for .view-option[aria-pressed="true"] { background: #e9f2ff; border-color: var(--accent); color: var(--accent); }
.scan-card { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); display: grid; gap: 4px; }
.scan-card .meta, .scan-card p { margin: 0; }
.scan-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.scan-serial { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.scan-where { font-weight: 600; }
.scan-confirm { font-size: 16px; font-weight: 700; margin-top: 8px !important; }
.check-line { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-size: 14px; }
.check-line input { width: 20px; height: 20px; }
.scan-log li { font-size: 14px; }
.scan-queue { text-align: center; }
@media (max-width: 720px) {
  .device-row { grid-template-columns: 28px 1fr auto; grid-template-areas: "check serial status" "check kind kind" "check where where"; gap: 2px 10px; }
  .device-row input[type="checkbox"] { grid-area: check; }
  .device-serial { grid-area: serial; }
  .device-kind { grid-area: kind; color: var(--muted); font-size: 13px; }
  .device-status { grid-area: status; }
  .device-where { grid-area: where; white-space: normal; }
}
