:root {
  --bri-navy: #0b1e3d;
  --bri-navy-dark: #071428;
  --bri-orange: #f4762a;
  --bri-orange-dark: #c45a1a;
  --bri-orange-hover: #ff8533;
  --bg: #eef2f7;
  --bg-accent: #e4eaf2;
  --surface: #ffffff;
  --ink: #0b1e3d;
  --muted: #5a6b82;
  --line: #cbd5e1;
  --accent: var(--bri-orange);
  --accent-dark: var(--bri-orange-dark);
  --accent-text: var(--bri-navy);
  --header-bg: var(--bri-navy);
  --ok: #15803d;
  --warn: #c45a1a;
  --bad: #b91c1c;
  --info: #0b1e3d;
  --moved: #f4762a;
  --status-pending-bg: #eef2f7;
  --status-pending-fg: #475569;
  --status-progress-bg: rgba(244, 118, 42, 0.16);
  --status-progress-fg: #c45a1a;
  --status-done-bg: rgba(22, 163, 74, 0.14);
  --status-done-fg: #15803d;
  --shadow: 0 10px 30px rgba(11, 30, 61, 0.08);
  --radius: 14px;
  --font: "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(244, 118, 42, 0.07), transparent 34%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 48%, var(--bg-accent) 100%);
}

a { color: var(--bri-navy); text-decoration: none; }
a:hover { color: var(--bri-orange-dark); }
.sidebar a:hover { text-decoration: none; }
.nav a { color: #fff; }
button, input, select, textarea { font: inherit; }
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--bri-orange);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.app-shell {
  display: flex;
  align-items: stretch;
  max-width: none;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  box-sizing: border-box;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 248px;
  flex: 0 0 248px;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  padding: 0 14px 24px;
  background: var(--bri-navy);
  color: #fff;
  box-shadow: 8px 0 28px rgba(11, 30, 61, 0.18);
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -14px 14px;
  padding: 18px 14px 16px;
  border-radius: 0;
  background: #fff;
  border: none;
  border-bottom: 2px solid var(--bri-orange);
  box-shadow: none;
}

.brand-logo {
  display: block;
  height: 48px;
  width: 48px;
  object-fit: contain;
  flex: 0 0 auto;
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
}
.brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.sidebar-brand h1,
.brand h1 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: #1d4ed8;
  line-height: 1.25;
}
.sidebar-brand p,
.brand p {
  margin: 0;
  color: var(--bri-navy, #0b1e3d);
  font-size: 0.78rem;
  font-weight: 600;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nav-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  opacity: 0.95;
}
.nav-icon svg {
  width: 100%;
  height: 100%;
}
.nav a:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.nav a.active {
  background: var(--bri-orange);
  border-color: var(--bri-orange);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(244, 118, 42, 0.35);
}
.nav a.active:hover {
  background: var(--bri-orange-hover);
  border-color: var(--bri-orange-hover);
  color: #fff;
}
.nav a.nav-sub {
  margin-left: 10px;
  font-size: 0.92rem;
  padding-left: 12px;
}

.app-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 18px clamp(10px, 1vw, 18px) 36px;
}

/* Legacy class hooks kept so older selectors don't break */
.topbar { display: none; }
.brand { display: flex; align-items: center; gap: 12px; }

.button,
button.button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  background: #fff;
  color: var(--bri-navy);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(11, 30, 61, 0.06);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.button.primary,
button.button.primary,
a.button.primary {
  background: var(--bri-orange);
  border-color: var(--bri-orange);
  color: var(--bri-navy);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(244, 118, 42, 0.32);
}
.button.primary:hover:not(:disabled),
button.button.primary:hover:not(:disabled),
a.button.primary:hover:not(:disabled) {
  background: var(--bri-orange-hover);
  border-color: var(--bri-orange-hover);
  color: var(--bri-navy);
  box-shadow: 0 3px 14px rgba(244, 118, 42, 0.38);
}
.button:hover:not(.primary):not(.danger):not(:disabled),
button.button:hover:not(.primary):not(.danger):not(:disabled),
a.button:hover:not(.primary):not(.danger):not(:disabled) {
  border-color: rgba(244, 118, 42, 0.55);
  color: var(--bri-navy);
  background: rgba(244, 118, 42, 0.06);
}
.button:focus-visible,
button.button:focus-visible,
a.button:focus-visible,
.nav a:focus-visible {
  outline: 2px solid var(--bri-orange);
  outline-offset: 2px;
}
.button.danger,
button.button.danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
  box-shadow: none;
}
.button.danger:hover:not(:disabled) {
  background: #991b1b;
  border-color: #991b1b;
}
.button:disabled,
button.button:disabled,
a.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
  border: 1px solid rgba(11, 30, 61, 0.06);
}
.panel h2 {
  margin: 0 0 12px;
  color: var(--bri-navy);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.panel h3 { margin: 0 0 12px; color: var(--bri-navy); }
.muted { color: var(--muted); }
.grid {
  display: grid;
  gap: 14px;
}
.grid.metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.grid.status-metrics {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 14px;
}
.metric {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  padding: 14px;
}
.metric span { display: block; color: var(--muted); font-size: 0.82rem; }
.metric strong { font-size: 1.35rem; }
.metric.status-card {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.metric.status-card strong { font-size: 2rem; }
.metric.status-pass strong { color: var(--ok); }
.metric.status-review strong { color: var(--warn); }
.metric.status-failed strong { color: var(--bad); }

.dropzone {
  border: 2px dashed #b8c4d4;
  border-radius: 16px;
  padding: 36px 18px;
  text-align: center;
  background: #f8fafc;
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.dropzone strong {
  color: var(--bri-navy);
  font-size: 1.05rem;
}
.dropzone:hover {
  border-color: rgba(244, 118, 42, 0.45);
  background: rgba(244, 118, 42, 0.04);
}
.dropzone.active {
  border-color: var(--bri-orange);
  background: rgba(244, 118, 42, 0.08);
}
.file-list { display: grid; gap: 8px; margin-top: 14px; }
.file-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.file-row button {
  border: 0;
  background: transparent;
  color: var(--bad);
  cursor: pointer;
}

.form-row {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.form-row input, .form-row select, .toolbar input, .toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.toolbar > * { flex: 1 1 160px; }
.toolbar.boundary-toolbar > * {
  flex: 0 1 auto;
}
.toolbar.boundary-toolbar {
  max-width: 100%;
}

.table-wrap { overflow: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
table.data th, table.data td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.92rem;
}
table.data th {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
table.data tr:hover td { background: #f8fafc; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}
.badge.pass, .badge.unchanged { background: rgba(11, 30, 61, 0.1); color: var(--bri-navy); }
.badge.review, .badge.duplicate { background: rgba(244, 118, 42, 0.16); color: var(--bri-orange-dark); }
.badge.failed, .badge.removed, .badge.unsupported_dwg { background: rgba(185, 28, 28, 0.12); color: var(--bad); }
.badge.added { background: rgba(244, 118, 42, 0.2); color: var(--bri-navy); }
.badge.moved, .badge.modified_code { background: rgba(11, 30, 61, 0.12); color: var(--bri-navy); }
.badge.queued, .badge.processing { background: rgba(11, 30, 61, 0.08); color: var(--muted); }

.progress {
  height: 12px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--bri-navy), var(--bri-orange));
  width: 0%;
  transition: width 0.2s ease;
}

.state {
  padding: 18px;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}
.state.info {
  background: rgba(11, 30, 61, 0.08);
  color: var(--bri-navy);
}
.state.error {
  background: rgba(185, 28, 28, 0.08);
  color: var(--bad);
}
.state.ok {
  background: rgba(244, 118, 42, 0.12);
  color: var(--bri-orange-dark);
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.auth-banner {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(185, 28, 28, 0.1);
  color: var(--bad);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.actions .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 4px;
  color: var(--muted);
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
}
.view-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 4px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--line);
}
.view-tabs .button {
  min-height: 36px;
  padding: 7px 14px;
  box-shadow: none;
}
.view-tabs .button.primary {
  box-shadow: 0 1px 6px rgba(244, 118, 42, 0.28);
}
.filters { margin-top: 4px; }
.control-cluster {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.run-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.run-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-weight: 600;
}
.run-step.active {
  border-color: var(--bri-orange);
  color: var(--bri-navy);
  background: rgba(244, 118, 42, 0.14);
  box-shadow: 0 0 0 1px rgba(244, 118, 42, 0.25);
}
.run-step.done {
  color: var(--bri-navy);
  background: rgba(11, 30, 61, 0.06);
  border-color: rgba(11, 30, 61, 0.12);
}

.export-menu {
  position: relative;
  display: inline-flex;
}
.export-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 140px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 30, 61, 0.12);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.export-menu-panel[hidden] {
  display: none !important;
}
.export-menu-panel button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  color: var(--bri-navy, #0b2c4a);
  cursor: pointer;
}
.export-menu-panel button:hover {
  background: rgba(11, 30, 61, 0.06);
}
.address-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(11, 30, 61, 0.05);
  font-size: 0.9rem;
  color: var(--text, #0f172a);
}
.address-bar-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  color: var(--muted, #64748b);
  flex: 0 0 auto;
}
.address-bar-icon svg {
  width: 100%;
  height: 100%;
}
.address-bar-sep {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--muted, #64748b);
  opacity: 0.7;
  flex: 0 0 auto;
}
.address-bar-sep svg {
  width: 100%;
  height: 100%;
}
.address-bar-crumb {
  display: inline-flex;
  align-items: center;
  max-width: min(52vw, 420px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--bri-navy, #0b2c4a);
  text-decoration: none;
  font-weight: 600;
}
a.address-bar-crumb:hover {
  background: rgba(11, 30, 61, 0.06);
  color: var(--bri-orange);
}
.address-bar-crumb.is-current {
  color: var(--text, #0f172a);
  font-weight: 700;
}
.address-bar-crumb.is-done {
  color: var(--bri-navy, #0b2c4a);
}
.address-bar-crumb.is-active {
  background: rgba(244, 118, 42, 0.14);
  color: var(--bri-navy, #0b2c4a);
  box-shadow: inset 0 0 0 1px rgba(244, 118, 42, 0.28);
}
.address-bar-host {
  margin: 0 0 20px;
}
[data-page="page-revisions"] #page-revisions-body,
[data-page="completed"] #completed-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
table.data.clickable tbody tr.clickable-row { cursor: pointer; }
table.data.clickable tbody tr.clickable-row:hover td { background: rgba(244, 118, 42, 0.08); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 40;
  overflow: auto;
}
.modal-panel {
  width: min(1100px, 100%);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.modal-header h3 { margin: 0 0 4px; }
.modal-panel h4 { margin: 18px 0 8px; }

.pattern-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
  background: #f8fafc;
}
.pattern-card h4 { margin: 0 0 8px; }
.pattern-card .muted { margin-top: 0; }
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.9rem;
}
.chip button {
  border: 0;
  background: transparent;
  color: var(--bad);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.catalog-table textarea {
  width: 100%;
  min-height: 42px;
  resize: vertical;
}
.pattern-breakdown {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
  margin: 12px 0 16px;
}
.pattern-breakdown h3,
.pattern-breakdown h4 { margin: 0 0 8px; }
.pattern-summary {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(244, 118, 42, 0.14);
  color: var(--bri-navy);
  font-weight: 600;
  font-size: 0.88rem;
}
.pattern-mismatch {
  border-left: 4px solid var(--bri-orange);
  background: rgba(244, 118, 42, 0.1);
  padding: 8px 10px;
  margin: 10px 0;
  color: var(--bri-orange-dark);
}
.project-config-header {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  padding: 14px;
  margin: 12px 0 16px;
}
.section-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  margin: 14px 0;
}
.section-card h3 { margin-top: 0; }
.details-disclosure {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0;
  background: #f8fafc;
}
.details-disclosure summary {
  cursor: pointer;
  font-weight: 700;
}
.match-row td:first-child { color: var(--bri-navy); font-weight: 700; }
.unmatched-note {
  color: var(--muted);
  font-style: italic;
}
.boundary-drawer {
  margin: 12px 0;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.boundary-canvas-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0;
  grid-template-rows: minmax(0, 1fr) 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  /* Fallback when not inside a flex fill parent */
  height: min(85vh, 1100px);
  min-height: 420px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.boundary-canvas-wrap.is-fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 1200;
  width: auto;
  max-width: none;
  height: auto !important;
  min-height: 0;
  /* Beat Process-page max-height (58vh/64vh) so maximize truly fills the viewport */
  max-height: none !important;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.45);
}
.batch-boundary-fill .boundary-canvas-wrap.is-fullscreen {
  max-height: none !important;
  height: auto !important;
  min-height: 0;
}
.boundary-fullscreen-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(15, 23, 42, 0.55);
  display: none;
}
.boundary-fullscreen-backdrop.is-active {
  display: block;
}
body.boundary-fs-open {
  overflow: hidden;
}
.boundary-canvas-wrap.has-scroll-x {
  grid-template-rows: minmax(0, 1fr) 14px;
}
.boundary-canvas-wrap.has-scroll-y {
  grid-template-columns: minmax(0, 1fr) 14px;
}
.boundary-stage {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #0f172a;
}
.boundary-stage canvas,
.boundary-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}
.boundary-scroll {
  background: #e2e8f0;
  scrollbar-width: thin;
  scrollbar-color: #64748b #e2e8f0;
}
.boundary-scroll-x {
  grid-column: 1;
  grid-row: 2;
  overflow-x: auto;
  overflow-y: hidden;
  display: none;
}
.boundary-scroll-y {
  grid-column: 2;
  grid-row: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
}
.boundary-canvas-wrap.has-scroll-x .boundary-scroll-x,
.boundary-canvas-wrap.has-scroll-y .boundary-scroll-y {
  display: block;
}
.boundary-scroll-corner {
  grid-column: 2;
  grid-row: 2;
  background: #e2e8f0;
  display: none;
}
.boundary-canvas-wrap.has-scroll-x.has-scroll-y .boundary-scroll-corner {
  display: block;
}
.boundary-scroll-sizer {
  pointer-events: none;
}
.boundary-zoom-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.boundary-page-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.boundary-page-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #fff;
  background: rgba(11, 30, 61, 0.82);
  border-radius: 6px;
  padding: 3px 6px;
  white-space: nowrap;
  line-height: 1.2;
  max-width: 72px;
  text-align: center;
}
.boundary-zoom-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.boundary-canvas-wrap.has-scroll-x .boundary-zoom-controls {
  bottom: 28px;
}
.boundary-canvas-wrap.has-scroll-y .boundary-zoom-controls {
  right: 28px;
}
.boundary-zoom-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}
.boundary-zoom-btn:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(125, 211, 252, 0.55);
}
.boundary-zoom-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}
.boundary-tool-btn.is-active {
  background: rgba(244, 118, 42, 0.92);
  border-color: rgba(255, 200, 150, 0.85);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244, 118, 42, 0.35);
}
.boundary-tool-btn.is-active:hover:not(:disabled) {
  background: rgba(244, 118, 42, 1);
  border-color: #ffd7b0;
}
.boundary-finish-btn:not(:disabled) {
  background: rgba(22, 163, 74, 0.92);
  border-color: rgba(187, 247, 208, 0.85);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}
.boundary-finish-btn:not(:disabled):hover {
  background: rgba(22, 163, 74, 1);
  border-color: #bbf7d0;
}
.boundary-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 10px;
  padding: 8px 4px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.boundary-status-bar .boundary-point-count {
  font-weight: 600;
  color: var(--ink);
}
.boundary-status-bar .boundary-keys-hint {
  opacity: 0.9;
  font-size: 0.8rem;
}
.boundary-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0 12px;
}

.batch-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  max-width: 100%;
  min-width: 0;
  min-height: calc(100vh - 200px);
}
.batch-layout h3,
.batch-sidebar-file {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  font-size: 0.95rem;
  margin: 0 0 8px;
}
.batch-layout > div,
.batch-workspace {
  min-width: 0;
  max-width: 100%;
}
.batch-sidebar {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  max-height: calc(100vh - 160px);
  overflow: auto;
  min-width: 0;
  position: sticky;
  top: 12px;
  align-self: start;
}
.batch-sidebar-pages {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.batch-workspace {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 200px);
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  gap: 10px;
}
.batch-workspace-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 28px 18px;
  background: rgba(255, 255, 255, 0.65);
}
#batch-boundary-host {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#batch-approval-host {
  flex: 0 0 auto;
  min-height: 0;
}
.batch-boundary-fill {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0 !important;
  height: 100%;
  box-sizing: border-box;
}
.batch-boundary-fill > h3,
.batch-boundary-fill > .boundary-hint,
.batch-boundary-fill > .batch-copy-suggest,
.batch-boundary-fill > #batch-boundary-status,
.batch-boundary-fill > .toolbar {
  flex: 0 0 auto;
}
.batch-boundary-fill > .boundary-hint {
  margin: 4px 0 8px;
  font-size: 0.84rem;
}
.batch-boundary-fill #batch-boundary-canvas-host,
.batch-boundary-fill .boundary-drawer {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 4px 0 0;
  width: 100%;
}
.batch-boundary-fill .boundary-drawer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-content: stretch;
}
.batch-boundary-fill .boundary-canvas-wrap {
  grid-column: 1;
  grid-row: 1;
  flex: 1 1 auto;
  width: 100%;
  height: auto !important;
  min-height: 280px;
  /* Leave room so Confirm sign codes stays on-screen without endless scroll */
  max-height: min(58vh, 720px);
}
.batch-boundary-fill .boundary-status-bar {
  grid-column: 1;
  grid-row: 2;
  flex: 0 0 auto;
  margin: 0;
}
.batch-boundary-fill .boundary-live-preview {
  grid-column: 1;
  grid-row: 3;
  margin-top: 0;
  min-height: 220px;
  overflow: hidden;
}
@media (min-width: 1180px) {
  .batch-boundary-fill .boundary-drawer {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .batch-boundary-fill .boundary-canvas-wrap {
    grid-column: 1;
    grid-row: 1;
    max-height: min(64vh, 780px);
  }
  .batch-boundary-fill .boundary-status-bar {
    grid-column: 1;
    grid-row: 2;
  }
  .batch-boundary-fill .boundary-live-preview {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    align-self: stretch;
    overflow: hidden;
  }
  .batch-boundary-fill .boundary-live-preview-canvas {
    flex: 1 1 auto;
    width: 100%;
    min-height: 180px;
    height: 100%;
    max-height: none;
  }
}

.boundary-compare-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.62);
}
.boundary-compare-backdrop.is-active {
  display: flex;
}
.boundary-compare-dialog {
  width: min(1200px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
  padding: 18px 20px 16px;
}
.boundary-compare-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.boundary-compare-header h3 {
  margin: 0 0 4px;
}
.boundary-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.boundary-compare-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.boundary-compare-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.boundary-compare-pane canvas {
  width: 100%;
  height: min(52vh, 520px);
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f172a;
  display: block;
}
.boundary-compare-foot {
  margin: 12px 0 0;
  font-size: 0.88rem;
}
@media (max-width: 860px) {
  .boundary-compare-grid {
    grid-template-columns: 1fr;
  }
  .boundary-compare-pane canvas {
    height: min(38vh, 360px);
  }
}
.batch-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.batch-sidebar .batch-page-list li {
  flex-direction: column;
  align-items: stretch;
}
.batch-sidebar .batch-thumb {
  width: 84px;
}
.batch-sidebar .batch-thumb img {
  height: 64px;
}
#app {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}
.batch-file-item {
  overflow-wrap: anywhere;
  word-break: break-word;
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  color: inherit;
}
.batch-file-item:hover { background: rgba(244, 118, 42, 0.08); }
.batch-file-item.active {
  border-color: rgba(244, 118, 42, 0.45);
  background: rgba(244, 118, 42, 0.12);
}
.batch-file-item .meta { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.batch-dash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
  width: 100%;
}
.batch-dash .stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  min-width: 0;
}
.batch-dash .stat strong { display: block; font-size: 1.2rem; }
.batch-dash .stat span { color: var(--muted); font-size: 0.8rem; }
.batch-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 12px;
}
.batch-thumb {
  flex: 0 0 auto;
  width: 96px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #fff;
  cursor: pointer;
}
.batch-thumb.active { border-color: var(--bri-orange); }
.batch-thumb img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  background: #e2e8f0;
}
.batch-thumb .cap {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.2;
}
.batch-page-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.batch-page-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
}
.batch-page-list li.selected { border-color: rgba(244, 118, 42, 0.45); }
.batch-status {
  display: inline-block;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e2e8f0;
}
.batch-status.needs_boundary { background: rgba(244, 118, 42, 0.18); color: var(--bri-orange-dark); }
.batch-status.boundary_set { background: rgba(11, 30, 61, 0.1); color: var(--bri-navy); }
.batch-status.no_drawing { background: #f1f5f9; color: #475569; }
.batch-status.processed { background: rgba(244, 118, 42, 0.22); color: var(--bri-navy); }
.batch-warn { color: var(--warn); font-size: 0.82rem; margin-top: 4px; }
.page-bstatus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-right: 6px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  flex: 0 0 auto;
}
.page-bstatus.saved {
  background: rgba(11, 30, 61, 0.12);
  color: var(--bri-navy);
}
.page-bstatus.draft {
  background: rgba(244, 118, 42, 0.18);
  color: var(--bri-orange-dark);
}
.page-bstatus.empty {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #cbd5e1;
}
.page-bstatus.blank {
  background: transparent;
  color: #94a3b8;
}
.batch-copy-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 118, 42, 0.28);
  border-radius: 10px;
  background: rgba(244, 118, 42, 0.08);
  font-size: 0.9rem;
}
.batch-copy-suggest .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.batch-pending {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.batch-pending ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.batch-pending li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .batch-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar {
    width: 210px;
    flex: 0 0 210px;
    padding: 0 10px 20px;
  }
  .sidebar-brand h1 {
    font-size: 0.92rem;
  }
  .nav a {
    font-size: 0.86rem;
    padding: 10px 10px;
  }
  .app-main {
    padding: 14px 12px 32px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 72px;
    flex: 0 0 72px;
    padding: 0 8px 12px;
  }
  .sidebar-brand {
    flex-direction: column;
    align-items: center;
    margin: 0 -8px 12px;
    padding: 12px 8px;
    gap: 8px;
  }
  .brand-text {
    display: none;
  }
  .nav a {
    justify-content: center;
    padding: 12px 8px;
    font-size: 0;
    gap: 0;
  }
  .nav-icon {
    width: 24px;
    height: 24px;
  }
}

@media (min-width: 1600px) {
  .app-main {
    padding-left: clamp(16px, 1.2vw, 28px);
    padding-right: clamp(16px, 1.2vw, 28px);
  }
  .batch-layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 16px;
  }
}

.start-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.start-choice {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px;
  cursor: pointer;
  color: var(--bri-navy);
  box-shadow: 0 1px 0 rgba(11, 30, 61, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.start-choice:hover,
.start-choice:focus-visible {
  border-color: var(--bri-orange);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(11, 30, 61, 0.08);
}
.start-choice strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.start-choice span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.upload-start-panel .extract-header h2 {
  margin-bottom: 4px;
}
.upload-start-drop {
  margin-top: 22px;
}
.upload-start-or {
  text-align: center;
  margin: 0 0 10px;
  font-size: 0.9rem;
}
.upload-start-continue {
  margin-top: 18px;
  text-align: center;
}

.batch-approval-panel {
  box-shadow: none;
  border: 1px solid var(--line);
  margin-top: 12px;
  padding: 18px 18px 16px;
}
.batch-approval-head h3 {
  margin: 0 0 8px;
}
.batch-approval-head .muted {
  margin: 0 0 6px;
}
.batch-approval-note {
  margin-bottom: 0 !important;
}
.batch-approval-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.batch-approval-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}
.batch-approval-project-field {
  min-width: min(360px, 100%);
  max-width: min(560px, 100%);
  flex: 1 1 320px;
}
.batch-approval-project-field input {
  width: 100%;
  min-width: 0;
}
.batch-approval-actions-row {
  justify-content: space-between;
  gap: 14px 20px;
  width: 100%;
}
.batch-approval-add-group,
.batch-approval-run-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.batch-approval-add-group {
  flex: 1 1 420px;
}
.batch-approval-add-group > .button,
.batch-approval-run-group > .button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.batch-approval-add-group .manual-code-field {
  min-width: 0;
}
.batch-approval-add-group .manual-code-field:not(.batch-approval-count-field) {
  flex: 1 1 200px;
  max-width: none;
}
.batch-approval-add-group .manual-code-field input {
  width: 100%;
  min-width: 0;
}
.batch-approval-count-field {
  flex: 0 0 96px;
  width: 96px;
}
.batch-approval-count-field input {
  width: 100%;
  min-width: 0;
}
.batch-approval-run-group {
  margin-left: auto;
  flex: 0 0 auto;
}
.batch-approval-toolbar input[type="text"],
.batch-approval-toolbar input[type="number"],
.batch-approval-toolbar input:not([type]) {
  appearance: none;
  -webkit-appearance: none;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.batch-approval-toolbar input[type="number"] {
  -moz-appearance: textfield;
}
.batch-approval-toolbar input[type="number"]::-webkit-outer-spin-button,
.batch-approval-toolbar input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.batch-approval-toolbar input:hover {
  border-color: #94a3b8;
}
.batch-approval-toolbar input:focus {
  outline: none;
  border-color: var(--bri-orange);
  box-shadow: 0 0 0 3px rgba(244, 118, 42, 0.18);
}
.batch-approval-toolbar input::placeholder {
  color: #94a3b8;
}
.batch-approval-table-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.batch-approval-selected {
  font-size: 0.95rem;
}
.batch-approval-status:empty {
  display: none;
}
.batch-boundary-codes-wrap {
  margin-top: 12px;
}
.boundary-codes-legend {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  color: var(--text, #0f172a);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.boundary-codes-legend-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.boundary-codes-legend-head strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 2px;
}
.boundary-codes-legend-head .muted,
.boundary-codes-legend-head p.muted {
  color: var(--muted);
  margin: 0;
  max-width: 42rem;
  line-height: 1.4;
}
.boundary-codes-filter {
  display: grid;
  gap: 4px;
  min-width: 180px;
}
.boundary-codes-filter input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  min-width: 180px;
}
.boundary-codes-legend-table {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.boundary-codes-table {
  width: 100%;
  min-width: 520px;
  table-layout: fixed;
  margin: 0;
}
.boundary-codes-table th,
.boundary-codes-table td {
  vertical-align: middle;
  padding: 10px 12px;
}
.boundary-codes-table th:nth-child(1),
.boundary-codes-table td:nth-child(1) {
  width: 34%;
}
.boundary-codes-table th:nth-child(2),
.boundary-codes-table td:nth-child(2) {
  width: 88px;
}
.boundary-codes-table th:nth-child(3),
.boundary-codes-table td:nth-child(3) {
  width: 150px;
}
.boundary-code-name code {
  font-weight: 700;
}
.boundary-codes-legend-foot {
  font-size: 0.82rem;
}
.boundary-codes-legend .sign-decision-label.is-pending {
  color: #94a3b8;
}
.boundary-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
#batch-code-locations-host:empty {
  display: none;
}
#batch-code-locations-host:not(:empty) {
  margin-top: 10px;
}
.approval-count-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  vertical-align: middle;
}
.approval-count-edit-btn {
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  display: inline-block;
}
.approval-locations-cell {
  white-space: nowrap;
  vertical-align: middle;
  padding-right: 12px;
}
.approval-signish-cell {
  white-space: nowrap;
  vertical-align: middle;
  color: var(--muted);
  padding-left: 8px;
  padding-right: 8px;
}
.sign-decision {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.sign-decision-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: lowercase;
}
.sign-decision-label.is-yes {
  color: #15803d;
}
.sign-decision-label.is-no {
  color: #b91c1c;
}
.sign-decision-label.is-pending {
  color: #94a3b8;
}
.sign-decision-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sign-decision-btn {
  width: 28px !important;
  min-width: 28px;
  height: 28px;
  padding: 0 !important;
  flex: 0 0 auto !important;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}
.sign-decision-approve {
  color: #15803d;
  border-color: #86efac;
}
.sign-decision-approve:hover:not(:disabled) {
  background: #f0fdf4;
  border-color: #22c55e;
}
.sign-decision-reject {
  color: #b91c1c;
  border-color: #fca5a5;
}
.sign-decision-reject:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #ef4444;
}
.code-locations-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  padding: 5px 10px;
  white-space: nowrap;
  width: auto !important;
  max-width: none;
  flex: 0 0 auto !important;
  box-sizing: border-box;
}
.code-locations-panel {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1220;
  color: #e2e8f0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
}
.code-locations-panel[hidden] {
  display: none !important;
}
.code-locations-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.code-locations-head .muted {
  color: #94a3b8;
  margin: 4px 0 0;
}
.code-locations-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.code-locations-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  max-height: 220px;
  padding-right: 4px;
}
.code-location-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  text-align: left;
  border: 1px solid #1e293b;
  background: #111827;
  color: inherit;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.code-location-item:hover {
  border-color: #38bdf8;
}
.code-location-item.is-active {
  border-color: #f97316;
  background: #1f2937;
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.35);
}
.code-location-index {
  font-weight: 700;
  color: #f97316;
  grid-row: 1 / span 2;
  align-self: center;
}
.code-location-coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}
.code-location-context {
  grid-column: 2;
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-location-outside {
  grid-column: 2;
  display: inline-block;
  width: fit-content;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.55);
  border: 1px solid #f87171;
}
.code-locations-warn {
  margin: 6px 0 0;
  color: #fbbf24;
}
.manual-code-field {
  display: grid;
  gap: 6px;
}
.manual-code-field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.manual-code-badge-wrap {
  margin-top: 4px;
}
.manual-code-note,
.manual-code-badge-wrap .manual-code-note,
.manual-code-badge-wrap .manual-code-badge {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 400;
  color: var(--muted);
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.manual-code-unverified,
.manual-code-override,
.manual-code-verified {
  background: transparent !important;
  color: var(--muted) !important;
  border: none !important;
}
tr.manual-code-row td {
  background: rgba(244, 118, 42, 0.03);
}
tr.manual-code-row-highlight td {
  background: rgba(244, 118, 42, 0.14);
  transition: background 0.4s ease;
}
.code-ref-cell {
  min-width: 0;
  width: auto;
  vertical-align: middle;
}
.batch-approval-panel .table-wrap {
  width: 100%;
  overflow-x: auto;
}
.batch-approval-panel table.data {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
}
.batch-approval-panel table.data th,
.batch-approval-panel table.data td {
  vertical-align: middle;
  overflow: hidden;
}
.batch-approval-panel table.data th:nth-child(1),
.batch-approval-panel table.data td:nth-child(1) {
  width: 40px;
  overflow: visible;
}
.batch-approval-panel table.data th:nth-child(2),
.batch-approval-panel table.data td:nth-child(2) {
  width: 120px;
}
.batch-approval-panel table.data th:nth-child(3),
.batch-approval-panel table.data td:nth-child(3) {
  width: 110px;
  overflow: visible;
}
.batch-approval-panel table.data th:nth-child(4),
.batch-approval-panel table.data td:nth-child(4) {
  width: 148px;
  overflow: visible;
}
.batch-approval-panel table.data th:nth-child(5),
.batch-approval-panel table.data td:nth-child(5) {
  width: 148px;
}
.batch-approval-panel table.data th:nth-child(6),
.batch-approval-panel table.data td:nth-child(6) {
  width: auto;
}
.batch-approval-panel .code-ref-actions-solo .code-ref-upload-btn {
  width: auto;
  max-width: 150px;
  flex: 0 0 auto;
}
.code-ref-upload {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
.code-ref-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.code-ref-media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 0 0 auto;
  max-width: 96px;
}
.code-ref-thumb-btn {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  border-radius: 6px;
}
.code-ref-thumb-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.code-ref-thumb {
  display: block;
  max-width: 88px;
  max-height: 56px;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: contain;
  background: #fff;
}
.code-ref-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  align-self: stretch;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.code-ref-actions-solo {
  flex-direction: row;
  width: 100%;
  min-width: 0;
}
.code-ref-name {
  font-size: 0.72rem;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}
.code-ref-upload-btn,
.code-ref-remove-btn,
.code-ref-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  font-size: 0.82rem;
  padding: 8px 12px;
  width: auto;
  white-space: nowrap;
  text-align: center;
}
.code-ref-actions-solo .code-ref-upload-btn {
  width: 100%;
  flex: 1 1 auto;
  justify-content: center;
}
.code-ref-upload-btn input {
  display: none;
}
.code-ref-image-panel {
  width: min(960px, 100%);
}
.code-ref-image-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
  padding: 8px 0 4px;
  background: #0f172a;
  border-radius: 12px;
}
.code-ref-image-full {
  display: block;
  max-width: 100%;
  max-height: min(82vh, 900px);
  object-fit: contain;
}
.extract-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.extract-header h2 {
  margin-bottom: 6px;
}
.extract-header .muted {
  margin: 0;
  max-width: 52rem;
}
@media (max-width: 720px) {
  .extract-header {
    flex-direction: column;
  }
}

.file-summary tfoot td {
  border-top: 2px solid var(--line);
  padding-top: 10px;
}
.file-summary-skipped td {
  background: rgba(90, 107, 130, 0.06);
}
[data-testid="batch-results"] h4 {
  margin: 0 0 8px;
  color: var(--bri-navy);
  font-size: 0.95rem;
}

.summary-report {
  border: 1px solid var(--line);
  box-shadow: none;
  width: 100%;
  box-sizing: border-box;
}
.summary-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.summary-report-title {
  min-width: 0;
  flex: 1 1 240px;
}
.summary-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 auto;
}
.summary-report-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.summary-report-footer .summary-report-actions {
  width: 100%;
  margin: 0;
}
.summary-report-head h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.35;
  word-break: break-word;
}
.summary-report-head .muted {
  margin: 0;
}
.summary-kicker {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bri-orange-dark);
}
.summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.summary-metric {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
a.summary-metric {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.summary-metric:hover {
  border-color: var(--bri-orange);
  box-shadow: 0 0 0 1px var(--bri-orange);
}
.summary-metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.summary-metric-value {
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--bri-navy);
  word-break: break-word;
}
.summary-metric-config {
  font-size: 1.15rem;
}
.summary-metric-sub {
  font-size: 0.78rem;
  color: var(--muted);
}
.summary-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.summary-section-codes .code-chip-row {
  margin-top: 2px;
}
.summary-section-matrix .summary-table-wrap {
  margin-top: 2px;
}
.summary-section > h4 {
  margin: 0 0 10px;
  color: var(--bri-navy);
  font-size: 0.95rem;
}
.summary-metric-accent {
  border-color: rgba(244, 118, 42, 0.35);
  background: linear-gradient(180deg, #fff8f3 0%, #ffefe4 100%);
}
.summary-metric-accent .summary-metric-value {
  color: var(--bri-orange-dark);
}
.code-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #c5d0de;
  background: #fff;
  font-size: 0.86rem;
  line-height: 1.2;
}
.code-chip-code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-weight: 700;
  color: var(--bri-navy);
}
.code-chip-count {
  min-width: 1.4rem;
  text-align: center;
  font-weight: 700;
  color: var(--bri-orange-dark);
}
.code-chip.is-zero {
  opacity: 0.55;
}
.summary-table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
}
.summary-table {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
}
.summary-table th {
  white-space: nowrap;
  background: #f4f7fb;
}
.summary-table td,
.summary-table th {
  vertical-align: middle;
  padding: 10px 12px;
}
.summary-matrix {
  min-width: 100%;
  font-variant-numeric: tabular-nums;
}
.summary-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.summary-matrix .matrix-code {
  text-align: center;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bri-navy);
  padding: 10px 8px;
  min-width: 3.4rem;
}
.summary-matrix .matrix-count {
  text-align: center;
  font-weight: 600;
  color: var(--bri-navy);
  padding: 8px;
}
.summary-matrix .matrix-count.is-empty {
  color: #9aa8bb;
  font-weight: 500;
}
.summary-matrix .matrix-foot {
  background: #f8fafc;
  font-weight: 700;
}
.summary-matrix tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.7);
}
.summary-matrix tbody tr:hover td {
  background: #fff4ec;
}
.summary-matrix tfoot td {
  border-top: 2px solid var(--line);
  background: #f4f7fb;
}
.matrix-legend {
  margin: 8px 0 0;
  font-size: 0.82rem;
}
.matrix-skip {
  text-align: left;
  padding-left: 12px;
}
.file-summary-page {
  white-space: nowrap;
  width: 4.2rem;
  text-align: left;
}
.file-summary-totalnum {
  text-align: right;
  white-space: nowrap;
  width: 4.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--bri-navy);
  background: #f8fafc;
}
.summary-matrix th.file-summary-totalnum,
.summary-matrix td.file-summary-totalnum {
  position: sticky;
  right: 0;
  box-shadow: -6px 0 8px -6px rgba(11, 30, 61, 0.12);
}
.skip-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e8edf4;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.skip-reason {
  margin-left: 8px;
  font-size: 0.82rem;
}
.summary-file-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fff;
}
.summary-file-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.summary-file-card-head h4 {
  margin: 0 0 4px;
}
.summary-file-card-total {
  text-align: right;
}
.summary-file-card-total strong {
  display: block;
  font-size: 1.35rem;
  color: var(--bri-navy);
}
.summary-file-card-total span {
  font-size: 0.78rem;
  color: var(--muted);
}
.summary-actions {
  margin-top: 16px;
}
.summary-note {
  margin-top: 12px;
}
.summary-export-strip .summary-report-head {
  margin-bottom: 0;
}
.summary-section-matrix .table-wrap,
.summary-section-matrix .summary-table-wrap {
  width: 100%;
  overflow-x: auto;
}
@media (max-width: 720px) {
  .results-layout .review-trail-tab {
    padding: 8px 6px;
    font-size: 0.8rem;
  }
  .summary-report-actions {
    width: 100%;
    justify-content: stretch;
  }
  .summary-report-actions .button {
    flex: 1 1 auto;
  }
}
@media (max-width: 900px) {
  .summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .summary-report-head {
    flex-direction: column;
  }
}
@media (max-width: 560px) {
  .summary-metrics {
    grid-template-columns: 1fr;
  }
}

.extract-wizard-page .extract-header {
  margin-bottom: 8px;
  width: 100%;
  max-width: none;
}
.extract-wizard-page .wizard-stepper,
.extract-wizard-page .wizard-batch-progress,
.extract-wizard-page #batch-job-progress-host,
.extract-wizard-page #batch-status,
.extract-wizard-page .wizard-stage,
.extract-wizard-page .batch-dash {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}
.extract-wizard-page #batch-status:empty {
  display: none;
  margin: 0;
}
.extract-wizard-page #batch-status .state {
  text-align: left;
  margin-bottom: 0;
}
.extract-wizard-page .batch-layout {
  width: 100%;
  max-width: none;
}
.extract-wizard-page .batch-workspace,
.extract-wizard-page #batch-boundary-host,
.extract-wizard-page #batch-approval-host,
.extract-wizard-page .batch-approval-panel {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 18px 12px 8px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
}
.wizard-step {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 72px;
  padding: 6px 10px;
  cursor: default;
  color: var(--muted);
}
.wizard-step.is-clickable {
  cursor: pointer;
}
.wizard-step.is-clickable:hover .wizard-step-marker {
  border-color: var(--bri-orange);
  color: var(--bri-orange-dark);
}
.wizard-step.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
}
.wizard-step-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #c5d0de;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #fff;
  color: var(--bri-navy);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.wizard-step.is-active .wizard-step-marker {
  border-color: var(--bri-orange);
  background: var(--bri-orange);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(244, 118, 42, 0.18);
}
.wizard-step.is-done .wizard-step-marker {
  border-color: var(--bri-navy);
  background: var(--bri-navy);
  color: #fff;
}
.wizard-step-label {
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.wizard-step.is-active .wizard-step-label {
  color: var(--bri-orange-dark);
}
.wizard-step.is-done .wizard-step-label {
  color: var(--bri-navy);
}
.wizard-connector {
  width: 42px;
  height: 2px;
  margin: 0 2px 22px;
  background: #d5dde8;
  border-radius: 2px;
}
.wizard-connector.is-complete {
  background: var(--bri-navy);
}
.wizard-batch-progress {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: #fff;
}
.wizard-batch-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.wizard-batch-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wizard-batch-file {
  appearance: none;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 6px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  max-width: 100%;
}
.wizard-batch-file.active {
  border-color: var(--bri-orange);
  background: #fff4ec;
}
.wizard-batch-file.is-done {
  border-color: #b8c4d4;
}
.wizard-batch-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
  font-size: 0.85rem;
}
.wizard-stage {
  min-height: 320px;
}
.wizard-pane {
  animation: wizardFade 0.22s ease;
}
@keyframes wizardFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.wizard-pane-intro {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.wizard-pane-intro h3 {
  margin: 0 0 6px;
}
.wizard-pane-intro .muted {
  margin: 0;
  max-width: 40rem;
}
.wizard-pane-actions {
  margin-top: 16px;
}
.wizard-edit-banner {
  margin-bottom: 14px;
}
.wizard-dropzone {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.wizard-upload-done-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.wizard-upload-done-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  background: #f8fafc;
}
.wizard-extract-card {
  max-width: 480px;
  margin: 48px auto;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px;
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
}
.wizard-extract-card h3 {
  margin: 16px 0 8px;
}
.wizard-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid #e2e8f0;
  border-top-color: var(--bri-orange);
  animation: wizardSpin 0.8s linear infinite;
}
@keyframes wizardSpin {
  to { transform: rotate(360deg); }
}
.wizard-progress-track {
  height: 6px;
  border-radius: 999px;
  background: #e8edf4;
  overflow: hidden;
  margin-top: 20px;
}
.wizard-progress-bar {
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bri-orange), #ffb07a);
  animation: wizardProgress 1.4s ease-in-out infinite;
}
@keyframes wizardProgress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
@media (max-width: 720px) {
  .wizard-connector {
    width: 18px;
  }
  .wizard-pane-intro {
    flex-direction: column;
  }
  .wizard-step {
    min-width: 58px;
  }
}

.boundary-live-preview {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}
.boundary-live-preview-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 10px;
}
.boundary-live-preview-canvas {
  width: 100%;
  height: min(280px, 36vh);
  min-height: 180px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f172a;
}
.boundary-live-preview-empty {
  margin: 8px 0 0;
  font-size: 0.84rem;
}
.dashboard-resume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.unfinished-workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.unfinished-toolbar {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.unfinished-toolbar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.unfinished-toolbar-head .muted {
  margin: 0;
  font-size: 0.85rem;
}
.unfinished-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr);
  gap: 12px 14px;
  align-items: end;
}
.unfinished-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  min-width: 0;
}
.unfinished-toolbar input,
.unfinished-toolbar select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 400;
  color: var(--bri-navy);
  box-sizing: border-box;
}
.unfinished-results-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.unfinished-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.unfinished-results-head .muted {
  margin: 2px 0 0;
}
.unfinished-count {
  margin: 0;
}
.unfinished-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.unfinished-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.unfinished-stat-chip strong {
  font-size: 0.9rem;
}
.unfinished-stat-chip.is-boundary {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.26);
  color: #1d4ed8;
}
.unfinished-stat-chip.is-approval {
  background: rgba(244, 118, 42, 0.14);
  border-color: rgba(244, 118, 42, 0.3);
  color: #c2410c;
}
.unfinished-stat-chip.is-extract {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.28);
  color: #15803d;
}
.unfinished-stat-chip.is-active {
  border-color: currentColor;
  box-shadow: 0 0 0 1px currentColor inset;
}
.unfinished-table-wrap {
  margin-top: 4px;
}
.unfinished-table .unfinished-table-filename strong {
  font-weight: 600;
  word-break: break-word;
}
.unfinished-table-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.unfinished-table-status.is-boundary {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}
.unfinished-table-status.is-approval {
  background: rgba(244, 118, 42, 0.14);
  color: #c2410c;
}
.unfinished-table-status.is-extract,
.unfinished-table-status.is-done {
  background: var(--status-done-bg);
  color: var(--status-done-fg);
}
.unfinished-table-status.is-pending {
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
  border: 1px solid #dbe3ee;
}
.unfinished-table-status.is-progress {
  background: var(--status-progress-bg);
  color: var(--status-progress-fg);
}
.unfinished-table-status.is-other {
  background: #f1f5f9;
  color: #475569;
}
.unfinished-table-action {
  text-align: right;
  white-space: nowrap;
}
.unfinished-table-resume {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 16px;
  border: 1px solid rgba(244, 118, 42, 0.35);
  border-radius: 6px;
  background: rgba(244, 118, 42, 0.08);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--bri-orange-dark, #c2410c);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.unfinished-table-resume:hover {
  background: rgba(244, 118, 42, 0.16);
  border-color: rgba(244, 118, 42, 0.55);
  box-shadow: 0 1px 4px rgba(244, 118, 42, 0.18);
}
.unfinished-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.unfinished-card {
  gap: 8px;
  min-height: 132px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.unfinished-card:hover,
.unfinished-card:focus-visible {
  border-color: var(--bri-orange);
  box-shadow: 0 0 0 1px rgba(244, 118, 42, 0.35);
  outline: none;
}
.unfinished-card-status {
  align-self: flex-start;
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
}
.unfinished-card-status.is-boundary {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}
.unfinished-card-status.is-approval {
  background: rgba(244, 118, 42, 0.14);
  color: #c2410c;
}
.unfinished-card-status.is-extract {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}
.unfinished-card-status.is-other {
  background: rgba(11, 30, 61, 0.08);
  color: var(--bri-navy);
}
.unfinished-card strong {
  font-size: 0.9rem;
  line-height: 1.35;
  word-break: break-word;
  color: var(--bri-navy, #0b1e3d);
}
.unfinished-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
}
.unfinished-card-cta {
  font-size: 0.8rem;
  font-weight: 700;
  color: #c2410c;
}
.unfinished-empty {
  padding: 28px 12px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
@media (max-width: 700px) {
  .unfinished-toolbar-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-completed {
  margin-top: 0;
}
.dashboard-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dashboard-toolbar {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dashboard-toolbar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.dashboard-toolbar-head .muted {
  margin: 0;
  font-size: 0.85rem;
}
.dashboard-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 14px;
  align-items: end;
}
.dashboard-toolbar-head {
  margin-bottom: 0;
}
.dashboard-search-wide {
  width: 100%;
}
.dashboard-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  min-width: 0;
}
.dashboard-toolbar input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 400;
  color: var(--bri-navy);
  box-sizing: border-box;
}
.dashboard-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.dashboard-metrics-card,
.dashboard-completed-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px 18px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.dashboard-metrics-head,
.dashboard-completed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard-metrics-head .muted,
.dashboard-completed-head .muted {
  margin: 2px 0 0;
}
.dashboard-metrics-card .summary-metrics {
  margin-bottom: 0;
  gap: 12px;
}
.summary-metric-navy {
  border-color: rgba(11, 44, 74, 0.22);
  background: linear-gradient(180deg, #f4f8fc 0%, #e8eef5 100%);
}
.summary-metric-warn {
  border-color: rgba(244, 118, 42, 0.4);
  background: linear-gradient(180deg, #fff8f3 0%, #ffefe4 100%);
}
.summary-metric-warn .summary-metric-value {
  color: var(--bri-orange-dark, #c2410c);
}
.dashboard-name-bifurcation {
  margin-top: 0;
}
.dashboard-name-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.dashboard-name-pane {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px 16px 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Dashboard tables get full width - avoid the dual-pane squeeze + forced scroll. */
[data-page="dashboard"] .dashboard-table-host .completed-table-wrap {
  overflow-x: auto;
}
[data-page="dashboard"] .dashboard-table-host table.completed-jobs-table,
[data-page="dashboard"] .dashboard-table-host table.completed-pdfs-table {
  min-width: 0;
  table-layout: auto;
}
[data-page="dashboard"] .dashboard-table-host .completed-cell-filename {
  min-width: 12rem;
  max-width: 28rem;
}
[data-page="dashboard"] .dashboard-table-host .completed-cell-opp {
  min-width: 9rem;
  max-width: 16rem;
  white-space: normal;
  word-break: break-word;
}
[data-page="dashboard"] .dashboard-name-list {
  max-height: min(48vh, 520px);
}
.dashboard-pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.dashboard-name-pane h4 {
  margin: 0;
  color: var(--bri-navy, #0b2c4a);
}
.dashboard-name-hint {
  margin: 0;
  font-size: 0.82rem;
}
.dashboard-name-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(42vh, 420px);
  overflow: auto;
}
.dashboard-name-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--bri-navy, #0b2c4a);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  word-break: break-word;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.dashboard-name-title {
  line-height: 1.3;
}
.dashboard-name-meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted, #64748b);
}
.dashboard-name-link:hover {
  border-color: var(--bri-orange);
  color: var(--bri-navy, #0b2c4a);
  box-shadow: 0 0 0 1px rgba(244, 118, 42, 0.25);
}
.dashboard-name-empty {
  margin: 8px 0;
  padding: 8px 2px;
}
.dashboard-completed-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
[data-page="dashboard"] .dashboard-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dashboard-completed-foot a {
  font-weight: 600;
  color: var(--bri-navy, #0b2c4a);
  text-decoration: none;
}
.dashboard-completed-foot a:hover {
  color: var(--bri-orange-dark, #c2410c);
}
@media (max-width: 700px) {
  .dashboard-toolbar-grid {
    grid-template-columns: 1fr;
  }
}

.completed-search-bar {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
}
.completed-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.completed-toolbar {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.completed-toolbar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.completed-toolbar-head .muted {
  margin: 0;
  font-size: 0.85rem;
}
.completed-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 14px;
  align-items: end;
}
.completed-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  min-width: 0;
}
.completed-toolbar input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 400;
  color: var(--bri-navy);
  box-sizing: border-box;
}
.completed-results-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px 18px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.completed-split {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
  gap: 20px;
  align-items: start;
}
.completed-split-three {
  grid-template-columns: minmax(200px, 0.72fr) minmax(220px, 0.88fr) minmax(420px, 2fr);
}
.completed-path-host {
  margin-bottom: 12px;
}
.completed-path-host:empty,
.completed-path-host[hidden] {
  display: none;
}
.completed-step-card {
  margin-top: 0;
}
.completed-step-head {
  margin-bottom: 12px;
}
.completed-step-head h3 {
  margin: 0;
  color: var(--bri-navy, #0b2c4a);
}
.completed-table-wrap {
  margin-top: 4px;
}
.completed-opportunity-summary {
  margin-bottom: 16px;
}
.completed-project-group {
  margin-bottom: 20px;
}
.completed-project-group:last-child {
  margin-bottom: 0;
}
.completed-project-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 10px;
  background: #f8fafc;
  border-radius: 6px;
}
.completed-project-group-head strong {
  color: var(--bri-navy, #0b2c4a);
}
.completed-project-signs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px 10px;
}
.task-files-table {
  width: 100%;
  table-layout: fixed;
}
.task-files-table .completed-cell-filename {
  width: 46%;
  text-align: left;
}
.task-files-table .task-files-cell-pages {
  width: 14%;
  text-align: center;
}
.task-files-table .task-files-cell-status {
  width: 20%;
  text-align: center;
}
.task-files-table .completed-cell-open {
  width: 20%;
  text-align: center;
}
.completed-project-files-table {
  width: 100%;
  table-layout: fixed;
}
.completed-project-files-table .completed-cell-filename {
  width: 36%;
  text-align: left;
}
.completed-project-files-table .completed-cell-uploaded {
  width: 20%;
  text-align: left;
  white-space: nowrap;
}
.completed-project-files-table .completed-cell-uploader {
  width: 18%;
  text-align: left;
  white-space: nowrap;
}
.completed-project-files-table .completed-cell-signs {
  width: 12%;
  text-align: center;
}
.completed-project-files-table .completed-cell-open {
  width: 14%;
  text-align: center;
}
.completed-file-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.completed-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
}
.completed-file-row + .completed-file-row {
  border-top: 1px solid var(--line);
}
.completed-file-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.completed-file-row-main strong {
  color: var(--bri-navy, #0b2c4a);
}
.completed-file-row-main span {
  font-size: 12.5px;
}
.completed-file-row-open {
  flex-shrink: 0;
}
.completed-table-wrap table.completed-jobs-table,
.completed-table-wrap table.completed-pdfs-table {
  width: 100%;
  table-layout: fixed;
  min-width: 920px;
}
.completed-table-wrap .completed-col-filename {
  width: 34%;
}
.completed-table-wrap .completed-col-pdfs {
  width: 6%;
}
.completed-table-wrap .completed-col-project {
  width: 10%;
}
.completed-table-wrap .completed-col-uploaded {
  width: 18%;
}
.completed-table-wrap .completed-col-uploader {
  width: 14%;
}
.completed-table-wrap .completed-col-open {
  width: 10%;
}
.completed-table-wrap .completed-pdfs-table .completed-col-filename {
  width: 38%;
}
.completed-table-wrap .completed-pdfs-table .completed-col-project {
  width: 12%;
}
.completed-table-wrap .completed-pdfs-table .completed-col-uploaded {
  width: 20%;
}
.completed-table-wrap .completed-pdfs-table .completed-col-uploader {
  width: 16%;
}
.completed-table-wrap .completed-pdfs-table .completed-col-open {
  width: 10%;
}
.completed-table-wrap .completed-jobs-table th,
.completed-table-wrap .completed-jobs-table td,
.completed-table-wrap .completed-pdfs-table th,
.completed-table-wrap .completed-pdfs-table td {
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.completed-table-wrap .completed-cell-filename {
  white-space: normal;
  word-break: break-word;
}
.completed-table-wrap .completed-cell-project,
.completed-table-wrap .completed-cell-uploaded,
.completed-table-wrap .completed-cell-uploader {
  white-space: nowrap;
}
.completed-table-wrap .completed-cell-pdfs,
.completed-table-wrap .completed-cell-open {
  text-align: center;
}
.completed-table-wrap .completed-cell-open .history-link {
  display: inline-flex;
  min-width: 5.5rem;
  justify-content: center;
}
.completed-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e8eef5;
}
.completed-table-wrap .completed-jobs-table .completed-cell-pdfs,
.completed-table-wrap .completed-jobs-table thead th:nth-child(2),
.completed-table-wrap .completed-jobs-table thead th:last-child,
.completed-table-wrap .completed-pdfs-table thead th:last-child {
  text-align: center;
}
.dashboard-table-host .completed-table-wrap {
  max-height: min(42vh, 420px);
}
.completed-step-list {
  margin-top: 0;
}
.completed-detail-full {
  margin-top: 0;
}
.completed-detail-full .saved-boundary-canvas-wrap {
  height: min(68vh, 780px);
  min-height: 360px;
}
.completed-detail-full .saved-boundary-viewer-host {
  min-height: 380px;
}
.completed-detail-pane {
  background: #fff;
  max-height: min(88vh, 980px);
}
.completed-detail-empty {
  padding: 8px 2px 4px;
}
.completed-detail-empty h3 {
  margin: 0 0 8px;
  color: var(--bri-navy, #0b2c4a);
  font-size: 1rem;
}
.completed-detail-head {
  margin-bottom: 8px;
}
.completed-detail-head h3 {
  margin: 0 0 4px;
  color: var(--bri-navy, #0b2c4a);
  font-size: 1.05rem;
  word-break: break-word;
}
.completed-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.completed-detail-maps {
  margin-top: 10px;
}
.completed-detail-shell .saved-boundary-viewer-host {
  min-height: 640px;
}
.completed-detail-shell .saved-boundary-canvas-wrap {
  height: min(88vh, 1100px);
  min-height: 620px;
}
.completed-detail-maps .saved-boundary-canvas-wrap {
  height: min(88vh, 1100px);
  min-height: 620px;
}
.completed-detail-maps .saved-boundary-viewer-host {
  min-height: 640px;
}
.completed-detail-pane .saved-boundary-canvas-wrap {
  height: min(52vh, 640px);
  min-height: 320px;
}
.completed-focus-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 118, 42, 0.35);
  border-radius: 12px;
  background: #fff8f3;
}
.completed-focus-bar strong {
  display: block;
  margin-top: 2px;
  color: var(--bri-navy, #0b2c4a);
  word-break: break-word;
}
.completed-pane-hint {
  margin: 4px 0 0;
  font-size: 0.82rem;
}
.completed-empty {
  margin: 10px 0 4px;
}
.completed-name-title {
  line-height: 1.3;
  word-break: break-word;
}
.completed-name-meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted, #64748b);
}
.completed-name-cta {
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bri-orange-dark, #c2410c);
}
@media (max-width: 700px) {
  .completed-toolbar-grid {
    grid-template-columns: 1fr;
  }
}
.completed-search-bar .form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bri-navy, #0b2c4a);
}
.completed-search-bar input {
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.completed-split-compare {
  grid-template-columns: 1fr;
}
.completed-pdf-open {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.completed-pick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.completed-pick-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bri-navy, #0b2c4a);
  background: #e8eef5;
  padding: 2px 8px;
  border-radius: 6px;
}
.completed-pick-tag.revised {
  background: #fff0e6;
  color: #9a3d00;
}
.page-rev-entry {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 16px 18px;
  max-width: 560px;
}
.page-rev-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.page-rev-count-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bri-navy, #0b2c4a);
}
.page-rev-count-control select {
  font: inherit;
  font-weight: 600;
  min-width: 4.5rem;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.page-rev-bifurcation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 0;
  overflow-x: auto;
}
.page-rev-workspace {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.page-rev-view-bar {
  margin-bottom: 14px;
}
.page-rev-view-hint {
  margin: 0 0 8px;
  font-size: 0.88rem;
}
.page-rev-mode-note {
  margin: 0 0 10px;
  font-size: 0.88rem;
}
.page-rev-view-chips {
  flex-wrap: wrap;
}
.page-rev-summary-preview-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.page-rev-toggle-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.page-rev-page-guide {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px 14px;
  margin: 0 0 16px;
}
.page-rev-preface {
  max-width: 44rem;
  margin: 0 0 24px;
  padding: 4px 0 8px;
}
.page-rev-preface-eyebrow {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}
.page-rev-preface-title {
  margin: 0 0 10px;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--bri-navy, #0b1e3d);
  letter-spacing: -0.01em;
}
.page-rev-preface-rule {
  width: 3.5rem;
  height: 3px;
  background: var(--bri-orange, #f4762a);
  margin: 0 0 16px;
  border-radius: 2px;
}
.page-rev-preface-body {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #334155;
}
.page-rev-preface-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page-rev-preface-item-title {
  font-weight: 700;
  color: var(--bri-navy, #0b1e3d);
  font-size: 0.95rem;
}
.page-rev-preface-item-num {
  color: #64748b;
  font-weight: 700;
}
.page-rev-preface-item-note {
  margin: 4px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #64748b;
}
.page-rev-page-guide-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--bri-navy, #0b2c4a);
}
.page-rev-page-guide-intro {
  margin: 0 0 10px;
  font-size: 0.86rem;
}
.page-rev-guide-role {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #334155;
}
.page-rev-page-guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.page-rev-page-guide-list > li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.page-rev-guide-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e8eef5;
  color: var(--bri-navy, #0b2c4a);
  font-weight: 700;
  font-size: 0.85rem;
}
.page-rev-guide-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.page-rev-guide-body .muted {
  margin: 0;
  font-size: 0.82rem;
}
.page-rev-guide-kind {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.page-rev-guide-kind.is-guide {
  background: #e8eef5;
  color: var(--bri-navy, #0b2c4a);
}
.page-rev-guide-kind.is-struct {
  background: rgba(244, 118, 42, 0.14);
  color: #c2410c;
}
.page-rev-guide-kind.is-raw {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}
@media (max-width: 700px) {
  .page-rev-summary-preview-toggle {
    align-items: stretch;
  }
  .page-rev-toggle-btns {
    justify-content: flex-start;
  }
}
.page-rev-summary-maps {
  margin: 12px 0 18px;
}
.page-rev-summary-maps .completed-map-canvas {
  height: min(42vh, 420px);
  min-height: 240px;
}
.page-rev-summary-columns {
  display: grid;
  gap: 14px;
  margin: 12px 0 18px;
  align-items: start;
}
.page-rev-summary-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.page-rev-summary-column .completed-map-canvas {
  height: min(36vh, 360px);
  min-height: 220px;
}
.page-rev-summary-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  align-items: center;
}
.page-rev-summary-column .completed-map-banner {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
}
.page-rev-summary-codes .muted {
  width: 100%;
}
.page-rev-summary-codes .page-rev-col-diff {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  font-size: 0.88rem;
  width: 100%;
  text-align: center;
}
.page-rev-single-pane {
  max-width: 100%;
}
.page-rev-drawing-page h3,
.page-rev-summary-page h3 {
  margin: 0 0 8px;
  color: var(--bri-navy, #0b1e3d);
}
.page-rev-comments {
  margin-top: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px 16px;
}
.page-rev-comments-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.page-rev-comments-head h4 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: var(--bri-navy, #0b2c4a);
}
.page-rev-comments-head .muted {
  margin: 0;
}
.page-rev-comments-count {
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.page-rev-comments-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}
.page-rev-comments-list li {
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
}
.page-rev-comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  margin-bottom: 4px;
  font-size: 0.82rem;
}
.page-rev-comment-text {
  margin: 0;
  white-space: pre-wrap;
  color: var(--bri-navy, #0b2c4a);
  line-height: 1.45;
}
.page-rev-comments-empty {
  margin: 0 0 12px;
}
.page-rev-comments-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.page-rev-comments-label {
  margin: 0;
}
.page-rev-comments-form textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--bri-navy);
  background: #fff;
}
.page-rev-comments-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.page-rev-diff-stack {
  display: grid;
  gap: 12px;
}
.page-rev-diff-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
}
.page-rev-diff-block h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}
.page-rev-maps {
  overflow-x: auto;
}
.page-rev-side-pane {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.page-rev-side-pane .completed-map-banner {
  border-radius: 0;
  margin: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
}
.page-rev-pane-section {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.page-rev-side-pane > .completed-map-banner + .page-rev-pane-section {
  border-top: 0;
}
.page-rev-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.page-rev-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.page-rev-clear-btn {
  padding: 4px 10px;
  font-size: 0.8rem;
  min-height: 0;
}
.page-rev-search-row {
  margin: 0;
}
.page-rev-file-meta {
  font-size: 0.8rem;
  color: var(--muted);
}
.page-rev-side-list {
  flex: 1;
  max-height: min(28vh, 260px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.page-rev-side-list .completed-name-item {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  width: 100%;
  box-sizing: border-box;
}
.page-rev-side-picked {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.86rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}
.page-rev-side-picked strong {
  word-break: break-word;
}
.page-rev-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(120px, 0.75fr);
  gap: 10px;
  align-items: stretch;
}
.page-rev-preview-frame {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f172a;
  min-height: 148px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.page-rev-preview-frame.is-empty {
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #f1f5f9;
  text-align: center;
}
.page-rev-pick-canvas {
  width: 100%;
  height: 148px;
  display: block;
}
.page-rev-preview-caption {
  display: block;
  padding: 5px 8px;
  background: rgba(15, 23, 42, 0.94);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
}
.page-rev-page-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.page-rev-mini-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}
.page-rev-page-hint {
  margin: 0;
  font-size: 0.75rem;
}
.page-rev-side-pane .form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bri-navy, #0b2c4a);
}
.page-rev-side-pane input,
.page-rev-side-pane select {
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.page-rev-summary[data-testid="page-rev-summary"] {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px 18px;
  margin: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.page-rev-summary-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.page-rev-summary-top h3 {
  margin: 0 0 4px;
  color: var(--bri-navy, #0b1e3d);
}
.page-rev-summary-top .muted {
  margin: 0;
}
.page-rev-summary-actions {
  flex-wrap: wrap;
}
.page-rev-pick-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.page-rev-pick-chip {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  text-align: center;
  align-items: center;
}
.page-rev-pick-chip.is-ready {
  border-style: solid;
  border-color: rgba(244, 118, 42, 0.45);
  background: #fff7ed;
}
.page-rev-pick-role {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #64748b;
  width: 100%;
  text-align: center;
}
.page-rev-pick-chip strong {
  font-size: 0.9rem;
  word-break: break-word;
  color: var(--bri-navy, #0b1e3d);
}
.page-rev-result {
  margin-top: 0;
}
@media (max-width: 900px) {
  .page-rev-preview-row {
    grid-template-columns: 1fr;
  }
  .page-rev-bifurcation {
    grid-template-columns: 1fr !important;
  }
  .page-rev-maps.completed-maps-split,
  .page-rev-summary-columns {
    grid-template-columns: 1fr !important;
  }
}
.page-rev-entry .form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bri-navy, #0b2c4a);
}
.page-rev-entry input {
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.completed-pane {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px 16px;
  max-height: min(70vh, 760px);
  overflow: auto;
  min-width: 0;
}
.completed-pane h3 {
  margin: 0;
  color: var(--bri-navy, #0b2c4a);
  font-size: 1rem;
}
.completed-name-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.completed-name-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
a.completed-name-item {
  color: inherit;
}
.completed-name-item:hover,
.completed-name-item.active {
  border-color: var(--bri-orange);
  box-shadow: 0 0 0 1px rgba(244, 118, 42, 0.25);
}
.completed-name-item.active {
  background: #fff8f3;
}
.completed-focus {
  margin: 0 0 12px;
}
.completed-pdf-modal-panel {
  max-width: min(1480px, 98vw);
  width: 98vw;
  max-height: 96vh;
  overflow: auto;
  padding: 18px 22px 24px;
}
.completed-modal-backdrop {
  padding: 12px;
  align-items: stretch;
}
.completed-modal-backdrop .completed-pdf-modal-panel {
  margin: auto;
}
.completed-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.completed-modal-maps {
  margin-top: 10px;
}
.completed-compare-intro {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--muted, #64748b);
}
.completed-codes-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  margin: 10px 0 14px;
}
.completed-codes-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-bottom: 10px;
}
.completed-codes-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #64748b);
  font-weight: 600;
}
.completed-codes-summary strong {
  font-size: 1.35rem;
  color: var(--bri-navy, #0b2c4a);
}
.completed-codes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.completed-detail-sign-photos {
  margin-top: 14px;
}
.completed-sign-photos {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px 16px;
}
.completed-sign-photos-head h4 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--bri-navy, #0b1e3d);
}
.completed-sign-photos-head .muted {
  margin: 0 0 12px;
  font-size: 0.88rem;
}
.completed-sign-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.completed-sign-photo-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
  min-height: 160px;
}
.completed-sign-photo-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.completed-sign-photo-meta strong {
  color: var(--bri-navy, #0b1e3d);
  font-size: 0.98rem;
}
.completed-sign-photo-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: #0f172a;
  border-radius: 8px;
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.completed-sign-photo-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f172a;
}
.completed-sign-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.completed-sign-photo-view {
  font-size: 0.78rem;
  padding: 4px 12px;
  min-height: 32px;
}
.completed-sign-photo-name {
  font-size: 0.72rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.completed-sign-photo-empty {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.82rem;
  text-align: center;
  padding: 10px;
}
.completed-code-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 88px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.84rem;
}
.completed-maps-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.saved-boundary-primary {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}
.saved-boundary-primary .completed-map-banner {
  text-align: center;
}
.saved-boundary-viewer-host {
  min-height: 360px;
}
.saved-boundary-viewer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.saved-boundary-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.saved-boundary-tool {
  min-width: 2.5rem;
  padding: 6px 12px;
  font-weight: 700;
}
.saved-boundary-zoom-label {
  margin-left: auto;
  font-size: 0.85rem;
}
.saved-boundary-canvas-wrap {
  position: relative;
  width: 100%;
  height: min(62vh, 720px);
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  cursor: grab;
  touch-action: none;
}
.saved-boundary-toolbar-sep {
  width: 1px;
  height: 1.4rem;
  background: var(--line);
  margin: 0 2px;
}
.saved-boundary-viewer.is-fullscreen {
  position: fixed;
  inset: 10px;
  z-index: 1201;
  background: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.saved-boundary-viewer.is-fullscreen .saved-boundary-canvas-wrap {
  flex: 1;
  height: auto !important;
  min-height: 0;
}
.saved-boundary-canvas-wrap.is-fullscreen {
  position: fixed;
  inset: 48px 16px 16px;
  z-index: 1200;
  height: auto !important;
  max-height: none;
}
.saved-boundary-canvas-wrap:active {
  cursor: grabbing;
}
.saved-boundary-interactive-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.saved-boundary-primary-canvas,
.saved-boundary-primary .completed-map-canvas {
  width: 100%;
  height: min(62vh, 720px);
  min-height: 360px;
  display: block;
}
.saved-boundary-reference {
  margin-top: 8px;
}
.saved-boundary-reference summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--bri-navy, #0b2c4a);
  margin-bottom: 8px;
}
.completed-map-pane {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  min-width: 0;
}
.completed-map-banner {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 8px;
}
.completed-map-banner.actual {
  background: #e8eef5;
  color: var(--bri-navy, #0b2c4a);
}
.completed-map-banner.selected {
  background: #fff0e6;
  color: #9a3d00;
}
.completed-map-pane h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}
.completed-map-canvas,
.structures-compare-split .structures-preview-canvas {
  width: 100%;
  height: min(58vh, 620px);
  min-height: 320px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f172a;
}
@media (max-width: 900px) {
  .dashboard-name-split,
  .completed-split,
  .completed-split-three,
  .completed-maps-split {
    grid-template-columns: 1fr;
  }
  .completed-map-canvas,
  .structures-compare-split .structures-preview-canvas {
    height: min(42vh, 360px);
    min-height: 220px;
  }
}

.page-rev-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 14px;
  align-items: start;
}
.page-rev-select-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page-rev-step,
.page-rev-summary,
.page-rev-result {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px 16px;
}
.page-rev-step h3,
.page-rev-summary h3 {
  margin: 0 0 6px;
  color: var(--bri-navy, #0b2c4a);
  font-size: 1rem;
}
.page-rev-step.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
.page-rev-families {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
  max-height: min(70vh, 760px);
  overflow: auto;
}
.page-rev-families h3 {
  margin: 0 0 4px;
  color: var(--bri-navy, #0b2c4a);
}
.page-rev-pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.page-rev-pickers label,
.page-rev-step .form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bri-navy, #0b2c4a);
}
.page-rev-file-select {
  min-height: 180px;
  width: 100%;
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.page-rev-step select,
.page-rev-step input[type="search"] {
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.page-rev-diff {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  margin: 12px 0;
}
.page-rev-diff h4 {
  margin: 0 0 10px;
  color: var(--bri-navy, #0b2c4a);
}
.page-rev-diff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.page-rev-diff-grid strong {
  display: block;
  font-size: 1.25rem;
  color: var(--bri-navy, #0b2c4a);
}
.page-rev-compare .rev-side-head {
  margin-bottom: 10px;
}
@media (max-width: 900px) {
  .page-rev-layout,
  .page-rev-pickers,
  .page-rev-diff-grid {
    grid-template-columns: 1fr;
  }
}
.dashboard-resume-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.dashboard-resume-card:hover {
  border-color: var(--bri-orange);
}
.completion-review {
  margin-bottom: 16px;
}
.completion-review-head h3 {
  margin: 0;
  word-break: break-word;
}
.completion-review-actions {
  flex-shrink: 0;
}
.results-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.results-layout .file-summary {
  margin-top: 0;
  margin-bottom: 0;
}
.results-next-file {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}
.wizard-pane-results {
  width: 100%;
}
.results-layout .review-trail-nav {
  display: flex;
  width: 100%;
  box-sizing: border-box;
}
.results-layout .review-trail-tab {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 10px 12px;
}
.review-trail-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef2f7;
  width: fit-content;
  max-width: 100%;
}
.review-trail-tab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.review-trail-tab:hover:not(.is-active) {
  color: var(--bri-navy);
  background: rgba(255, 255, 255, 0.55);
}
.review-trail-tab.is-active {
  background: #fff;
  color: var(--bri-navy);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}
.review-trail-tab:focus-visible {
  outline: 2px solid var(--bri-orange);
  outline-offset: 2px;
}
.review-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  margin-bottom: 12px;
}
.review-card h4 {
  margin: 0 0 8px;
  color: var(--bri-navy);
}
.review-list {
  margin: 0;
  padding-left: 1.1rem;
}
.review-list li {
  margin: 4px 0;
}
.review-boundary-preview,
.review-preview-canvas {
  width: 100%;
  min-height: 200px;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f172a;
}
.review-all-stages {
  display: none;
}
.matrix-permalink {
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
  margin: 8px 0 16px;
}
.browse-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
}
.browse-search input,
.browse-toolbar select {
  min-width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.browse-row-actions {
  white-space: nowrap;
  font-size: 0.85rem;
}

.structures-breadcrumb {
  /* legacy class kept; address-bar styles own the look */
  margin: 0;
}

.structures-workspace {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.structures-path-host:empty,
.structures-path-host[hidden] {
  display: none;
}
.structures-shell {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 20px 22px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.structures-shell-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}
.structures-shell-intro h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: var(--bri-navy, #0b2c4a);
}
.structures-shell-intro .muted {
  margin: 0;
  max-width: 36rem;
}
.structures-shell-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, auto));
  gap: 10px;
}
.structures-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-align: center;
}
.structures-stat strong {
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--bri-navy, #0b2c4a);
}
.structures-stat span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  margin-top: 2px;
}
.structures-shell-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.structures-search-field {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
}
.structures-search-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: var(--bri-navy);
  box-sizing: border-box;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.structures-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}
.structures-project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 18px 16px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  min-height: 140px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.structures-project-card:hover {
  border-color: var(--bri-orange);
  box-shadow: 0 0 0 1px rgba(244, 118, 42, 0.22);
}
.structures-project-key {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bri-navy, #0b2c4a);
  word-break: break-word;
}
.structures-project-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.structures-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.78rem;
  color: var(--muted, #64748b);
}
.structures-metric strong {
  font-size: 1.05rem;
  color: var(--bri-navy, #0b2c4a);
}
.structures-project-cta {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bri-orange-dark, #c2410c);
}
.structures-empty {
  margin: 8px 0;
  grid-column: 1 / -1;
}
.structures-empty-card {
  padding: 28px 22px;
}
.structures-toolbar,
.structures-results-card {
  /* kept for any leftover markup */
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
}

.structures-files-panel h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.structures-files-panel h3 + .structures-file-list + h3 {
  margin-top: 18px;
}
.structures-file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.structures-file-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.structures-file-title {
  word-break: break-word;
  color: var(--bri-navy, #0b2c4a);
}
.structures-file-meta {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted, #64748b);
}
@media (max-width: 700px) {
  .structures-shell-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .structures-project-metrics {
    grid-template-columns: 1fr;
  }
}

.structures-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 18px;
  margin-top: 0;
  align-items: start;
}
.structures-files {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  max-height: min(70vh, 720px);
  overflow: auto;
}
.structures-files h3,
.structures-files h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.structures-files h4 {
  margin-top: 14px;
  font-size: 0.88rem;
}
.structures-summary-list {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.structures-file-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 0;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.structures-file-item:hover {
  border-color: var(--bri-orange);
  box-shadow: 0 0 0 1px rgba(244, 118, 42, 0.25);
}
.structures-file-item.active {
  border-color: var(--bri-orange);
  box-shadow: 0 0 0 1px var(--bri-orange);
  background: #fff8f3;
}
.structures-file-item .structures-project-cta {
  margin-top: 0;
  flex-shrink: 0;
}
.structures-page-nav {
  margin-bottom: 12px;
}
.structures-page-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.structures-readonly-note {
  margin: 6px 0 0;
  font-size: 0.84rem;
}
.structures-preview {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-height: 280px;
}
.structures-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--muted, #64748b);
}
.structures-preview-canvas {
  width: 100%;
  height: min(520px, 62vh);
  min-height: 240px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f172a;
}
.structures-regions-panel {
  margin-top: 14px;
}
.structures-regions-panel h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}
.structures-region-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.structures-points {
  margin: 6px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  word-break: break-word;
  color: #334155;
}
@media (max-width: 860px) {
  .structures-layout {
    grid-template-columns: 1fr;
  }
}

.dashboard-history {
  margin-top: 4px;
}
.dashboard-history h4 {
  margin-bottom: 6px;
}
.dashboard-history-intro {
  margin: 0 0 12px;
}
.dashboard-history-table th:nth-child(1) {
  min-width: 180px;
}
.dashboard-history-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.dashboard-history-progress-label {
  font-weight: 600;
  color: var(--bri-navy);
  font-size: 0.9rem;
}
.dashboard-history-bar {
  height: 6px;
  border-radius: 999px;
  background: #e8edf4;
  overflow: hidden;
}
.dashboard-history-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bri-orange), #ffb07a);
}
.dashboard-history-pages {
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  line-height: 1.35;
  max-width: 280px;
}
.dashboard-history-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.75rem;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
}
.dashboard-history-status.is-completed {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}
.dashboard-history-status.is-progress {
  background: rgba(244, 118, 42, 0.14);
  color: #c2410c;
}
.dashboard-history-status.is-pending {
  background: rgba(11, 30, 61, 0.08);
  color: var(--bri-navy);
}
.dashboard-history-links {
  font-size: 0.85rem;
}
.history-open-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 6.75rem;
}
.dashboard-history-table tbody tr:hover td {
  background: rgba(244, 118, 42, 0.04);
}
/* Beat table.data { vertical-align: top } so Status + Open stay level */
table.data.dashboard-history-table td,
table.data.dashboard-history-table th {
  vertical-align: middle;
}
.history-file-cell,
.history-uploaded-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.history-file-name {
  display: block;
  line-height: 1.35;
  word-break: break-word;
  color: var(--bri-navy, #0b2c4a);
}
.history-file-project,
.history-uploaded-who {
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  line-height: 1.3;
}
.history-uploaded-date {
  line-height: 1.35;
}
.history-col-status {
  width: 1%;
  white-space: nowrap;
  text-align: center;
  padding-left: 12px;
  padding-right: 12px;
}
.history-col-open {
  width: 1%;
  white-space: nowrap;
  padding-left: 12px;
  padding-right: 14px;
}
.history-col-progress {
  min-width: 160px;
  max-width: 300px;
}

.dashboard-metrics-intro {
  margin: 0 0 14px;
}

.history-workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.history-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 2px;
}
.history-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.history-filters-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.history-filters-head .muted {
  margin: 0;
  font-size: 0.85rem;
}
.history-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px 14px;
  align-items: end;
}
.history-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  min-width: 0;
}
.history-filters input,
.history-filters select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 400;
  color: var(--bri-navy);
  box-sizing: border-box;
}
.history-search-wide {
  grid-column: span 2;
}
@media (max-width: 700px) {
  .history-search-wide {
    grid-column: span 1;
  }
}
.history-body {
  margin: 0;
}
.history-results-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.history-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.history-results-head .muted {
  margin: 2px 0 0;
}
.history-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.history-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}
.history-stat-chip strong {
  font-size: 0.9rem;
}
.history-stat-chip.is-completed {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.28);
  color: #15803d;
}
.history-stat-chip.is-progress {
  background: rgba(244, 118, 42, 0.14);
  border-color: rgba(244, 118, 42, 0.3);
  color: #c2410c;
}
.history-stat-chip.is-pending {
  background: rgba(11, 30, 61, 0.08);
  border-color: rgba(11, 30, 61, 0.18);
  color: var(--bri-navy);
}
.history-table-wrap {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  max-height: min(68vh, 820px);
}
.history-table-wrap .dashboard-history-table {
  margin: 0;
}
.history-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e8eef5;
}
.history-table-wrap thead th:nth-child(4),
.history-table-wrap thead th:nth-child(5) {
  text-align: center;
}
.history-empty {
  padding: 18px 8px;
  text-align: center;
  color: var(--muted);
}
.dashboard-history-links .history-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  color: var(--bri-navy);
  font-weight: 600;
  font-size: 0.8rem;
  box-sizing: border-box;
  text-align: center;
}
.dashboard-history-links .history-link:hover {
  border-color: var(--bri-orange);
  color: #c2410c;
}
.history-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 2px;
}
.summary-metric-sub {
  line-height: 1.35;
  max-width: 14rem;
}

/* Sign Family library */
.sign-family-workspace {
  margin-top: 2px;
}
.sign-family-page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.sign-family-page-head h2 {
  margin: 0 0 4px;
  color: var(--bri-navy, #0b2c4a);
}
.sign-family-page-head .muted {
  margin: 0;
  max-width: 40rem;
}
.sign-family-shell {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sign-family-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.sign-family-toolbar-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  min-width: 0;
}
.sign-family-toolbar-title h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--bri-navy, #0b2c4a);
}
.sign-family-toolbar-title .muted {
  margin: 0;
  font-size: 0.82rem;
}
.sign-family-summary-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  flex: 1 1 220px;
  min-width: 0;
}
.sign-family-summary-block h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--bri-navy, #0b2c4a);
  flex: 0 0 auto;
}
.sign-family-summary-value {
  font-size: 1.55rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--bri-navy, #0b2c4a);
}
.sign-family-summary-block .muted {
  margin: 0;
  font-size: 0.88rem;
}
.sign-family-back {
  display: inline-block;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bri-orange-dark, #c2410c);
  text-decoration: none;
}
.sign-family-back:hover {
  text-decoration: underline;
}
.sign-family-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px 14px;
}
.sign-family-search-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  flex: 1 1 260px;
  min-width: min(100%, 240px);
  max-width: none;
  margin-left: 0;
}
.sign-family-search-field {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.sign-family-search-field input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: var(--bri-navy);
  box-sizing: border-box;
}
.sign-family-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.sign-family-table-head {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1fr) minmax(180px, 1fr) 72px 72px;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}
.sign-family-table-head span:nth-child(4) {
  text-align: right;
}
.sign-family-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1fr) minmax(180px, 1fr) 72px 72px;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  padding: 11px 14px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.12s ease;
}
.sign-family-row:last-child {
  border-bottom: none;
}
.sign-family-row:hover {
  background: #fffaf5;
}
.sign-family-row-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bri-navy, #0b2c4a);
  word-break: break-word;
}
.sign-family-row-num {
  text-align: right;
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--bri-navy, #0b2c4a);
}
.sign-family-row-num.is-warn {
  color: #c2410c;
}
.sign-family-row-open {
  justify-self: end;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #c2410c;
  white-space: nowrap;
}
.sign-family-row:hover .sign-family-row-open {
  border-color: var(--bri-orange);
  background: #ffedd5;
}
.sign-family-empty {
  padding: 22px 14px;
  text-align: center;
  color: var(--muted, #64748b);
}
.sign-family-panel {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px 14px;
  background: #fff;
  min-height: 80px;
}
.sign-family-code-list,
.sign-family-code-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sign-family-code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.sign-family-code-grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  text-align: center;
}
.sign-family-code-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(52vh, 420px);
  overflow: auto;
}
.sign-family-code-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.sign-family-code-list strong {
  font-variant-numeric: tabular-nums;
  color: var(--bri-navy, #0b2c4a);
}
.sign-family-empty-inline {
  margin: 8px 0 0;
  color: var(--muted, #64748b);
  font-size: 0.9rem;
}
.sign-family-code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--bri-navy, #0b2c4a);
  background: #eef2ff;
  padding: 2px 7px;
  border-radius: 6px;
}
@media (max-width: 720px) {
  .sign-family-page-head {
    flex-direction: column;
  }
  .sign-family-top-row {
    flex-direction: column;
  }
  .sign-family-search-row {
    max-width: none;
    width: 100%;
    margin-left: 0;
  }
  .sign-family-code-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  .sign-family-table-head,
  .sign-family-row {
    grid-template-columns: minmax(100px, 0.7fr) minmax(140px, 1fr) minmax(140px, 1fr) 56px 64px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 20, 40, 0.58);
  padding: 20px;
}
.auth-modal-overlay.bri-auth-overlay {
  background:
    radial-gradient(circle at top left, rgba(244, 118, 42, 0.18), transparent 42%),
    rgba(7, 20, 40, 0.62);
}
.auth-modal-overlay.hidden {
  display: none;
}
.auth-modal {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}
.auth-modal.bri-auth-modal {
  width: min(440px, 100%);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(11, 30, 61, 0.12);
  border-radius: 16px;
  box-shadow: 0 22px 56px rgba(7, 20, 40, 0.28);
}
.bri-auth-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--bri-navy) 0%, #12305c 100%);
  color: #fff;
  border-bottom: 3px solid var(--bri-orange);
}
.bri-auth-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
}
.bri-auth-heading {
  min-width: 0;
}
.bri-auth-brand {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 215, 191, 0.95);
}
.bri-auth-header h2,
.auth-modal.bri-auth-modal h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.bri-auth-body {
  padding: 18px 22px 20px;
}
.bri-auth-lead {
  margin: 0 0 4px;
}
.bri-auth-hint {
  margin: 0 0 14px;
  font-size: 0.78rem;
  color: var(--muted);
}
.bri-auth-error {
  min-height: 1.2em;
  margin: 10px 0 0;
  color: var(--bad);
  font-size: 0.88rem;
  font-weight: 600;
}
.auth-modal h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}
.auth-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
  font-weight: 600;
  color: var(--bri-navy);
  font-size: 0.9rem;
}
.auth-modal-field input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-modal-field input:focus {
  outline: none;
  border-color: var(--bri-orange);
  box-shadow: 0 0 0 3px rgba(244, 118, 42, 0.18);
}
.auth-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.auth-modal-actions .button.primary {
  min-width: 132px;
}
.bri-auth-modal .auth-modal-actions {
  justify-content: stretch;
}
.bri-auth-modal .auth-modal-actions .button.primary {
  width: 100%;
  min-height: 44px;
  font-weight: 700;
}
.storage-warning-banner {
  margin-bottom: 16px;
}

.toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  line-height: 1.35;
  color: #0b2c4a;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: none;
}
.toast-info {
  border-color: rgba(11, 44, 74, 0.18);
}
.toast-ok {
  border-color: rgba(22, 163, 74, 0.35);
  background: #f0fdf4;
}
.toast-warn {
  border-color: rgba(244, 118, 42, 0.45);
  background: #fff8f3;
}
.toast-error {
  border-color: rgba(220, 38, 38, 0.35);
  background: #fef2f2;
  color: #991b1b;
}
.batch-job-progress {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.batch-job-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.batch-job-progress-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.batch-job-spinner {
  width: 22px;
  height: 22px;
  margin: 0;
  border-width: 2px;
}
.batch-job-message {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}
.wizard-progress-bar.is-determinate {
  width: 0;
  animation: none;
  transform: none;
  transition: width 0.35s ease;
}

.bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bookmark-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: #fff;
}
.bookmark-card.is-new {
  border-color: rgba(244, 118, 42, 0.45);
  box-shadow: 0 0 0 1px rgba(244, 118, 42, 0.18);
}
.bookmark-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.bookmark-meta {
  margin: 0 0 12px;
}
.bookmark-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bookmark-remove {
  flex-shrink: 0;
}

.rbac-user-bar {
  margin-top: auto;
  padding: 16px 4px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rbac-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rbac-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bri-orange);
  color: var(--bri-navy);
  font-weight: 800;
  flex: 0 0 auto;
}
.rbac-user-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: #fff;
}
.rbac-user-meta strong {
  font-size: 0.9rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rbac-role-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(244, 118, 42, 0.2);
  color: #ffd7bf;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.rbac-side-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rbac-side-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(244, 118, 42, 0.55);
}
.rbac-workspace {
  display: grid;
  gap: 16px;
}
.panel[data-page="opportunities"],
.panel[data-page="tasks"],
.panel[data-page="time-reports"],
.panel[data-page="users"] {
  padding: 20px 22px 24px;
}
.panel[data-page="opportunities"] .extract-header h2,
.panel[data-page="tasks"] .extract-header h2,
.panel[data-page="time-reports"] .extract-header h2,
.panel[data-page="users"] .extract-header h2 {
  color: var(--bri-navy);
  letter-spacing: -0.02em;
}
.panel[data-page="opportunities"] .unfinished-toolbar,
.panel[data-page="tasks"] .unfinished-toolbar,
.panel[data-page="time-reports"] .unfinished-toolbar,
.panel[data-page="users"] .unfinished-toolbar {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.panel[data-page="opportunities"] .unfinished-results-card,
.panel[data-page="tasks"] .unfinished-results-card,
.panel[data-page="time-reports"] .unfinished-results-card,
.panel[data-page="users"] .unfinished-results-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.panel[data-page="opportunities"] .unfinished-table-action .button.primary,
.panel[data-page="tasks"] .unfinished-table-action .button.primary {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.86rem;
}
.panel[data-page="opportunities"] .pager,
.panel[data-page="tasks"] .pager,
.panel[data-page="time-reports"] .pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 4px 4px;
  border-top: 1px solid var(--line);
}
.rbac-primary-cell {
  display: grid;
  gap: 2px;
}
.rbac-primary-cell strong {
  color: var(--bri-navy);
  font-weight: 700;
}
.rbac-time-cell {
  display: grid;
  gap: 4px;
  justify-items: start;
}
.rbac-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.rbac-row-actions .button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.86rem;
}
.rbac-role-select {
  min-width: 140px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--bri-navy);
  font: inherit;
  font-weight: 600;
}
.rbac-role-select:focus {
  outline: none;
  border-color: var(--bri-orange);
  box-shadow: 0 0 0 3px rgba(244, 118, 42, 0.16);
}
.rbac-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(440px, calc(100vw - 32px));
}
.rbac-dialog::backdrop {
  background: rgba(11, 30, 61, 0.45);
}
.rbac-dialog-card {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(11, 30, 61, 0.22);
  overflow: hidden;
}
.rbac-dialog-card .extract-header {
  margin: 0;
  padding: 16px 20px 14px;
  background: linear-gradient(135deg, var(--bri-navy) 0%, #12305c 100%);
  border-bottom: 3px solid var(--bri-orange);
  color: #fff;
}
.rbac-dialog-card .extract-header h3 {
  margin: 0;
  color: #fff;
}
.rbac-dialog-card .extract-header .muted {
  color: rgba(255, 215, 191, 0.92);
}
.rbac-dialog-card .rbac-field,
.rbac-dialog-card .actions {
  margin-left: 20px;
  margin-right: 20px;
}
.rbac-dialog-card .actions {
  margin-bottom: 18px;
}
.rbac-field {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: var(--bri-navy);
}
.rbac-field input,
.rbac-field select {
  min-height: 42px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-family: inherit;
}
.rbac-field input:focus,
.rbac-field select:focus {
  outline: 2px solid var(--bri-orange);
  outline-offset: 1px;
}

/* Shared "wide dialog" treatment - apply this class to any dialog showing full opportunity
   details (assign, send-to-hod, hod-queue-assign, etc.) instead of listing IDs one by one. */
.rbac-dialog-wide {
  width: min(720px, calc(100vw - 40px));
  max-width: min(720px, calc(100vw - 40px));
}
.rbac-dialog-wide .rbac-dialog-card {
  gap: 20px;
  border-radius: 8px;
  border: 1px solid rgba(11, 44, 74, 0.18);
  box-shadow: 0 22px 60px rgba(11, 30, 61, 0.28);
}
.rbac-dialog-wide .extract-header {
  padding: 24px 32px 20px;
}
.rbac-dialog-wide .extract-header h3 {
  font-size: 18px;
  letter-spacing: 0.01em;
}
.rbac-dialog-wide .extract-header .muted {
  margin-top: 8px !important;
  font-size: 13px;
}
.rbac-dialog-wide .rbac-field,
.rbac-dialog-wide .actions,
.rbac-dialog-wide .assign-opportunity-details,
.rbac-dialog-wide .assign-deadline-locked {
  margin-left: 32px;
  margin-right: 32px;
}
.rbac-dialog-wide .rbac-field { gap: 8px; }
.rbac-dialog-wide .rbac-field span {
  font-size: 13px;
  font-weight: 800;
}
.rbac-dialog-wide .rbac-field select,
.rbac-dialog-wide .rbac-field input {
  min-height: 50px;
  font-size: 14px;
  border-radius: 6px;
  padding: 12px 14px;
}
.rbac-dialog-wide .actions {
  margin-top: 2px !important;
  margin-bottom: 30px;
  gap: 12px;
  justify-content: flex-end !important;
}
.rbac-dialog-wide .actions .button {
  min-width: 118px;
  min-height: 46px;
  font-weight: 800;
}


.rbac-field select,
.rbac-field input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--bri-navy);
}
.rbac-field input:focus,
.rbac-field select:focus {
  outline: none;
  border-color: var(--bri-orange);
  box-shadow: 0 0 0 3px rgba(244, 118, 42, 0.16);
}
.rbac-status-toggle {
  border: none;
  cursor: pointer;
  font: inherit;
}
.rbac-status-toggle:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.rbac-status-toggle:not(:disabled):hover {
  filter: brightness(0.97);
  box-shadow: 0 0 0 2px rgba(11, 30, 61, 0.08);
}
.rbac-opp-table-wrap {
  overflow-x: auto;
}
/* RBAC list tables: page/document scroll only - no fixed-height inner scrollbar. */
.table-wrap.rbac-results-table-wrap,
.rbac-results-table-wrap {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
}
.rbac-results-table-wrap thead th {
  background: #e8eef5;
  color: var(--bri-navy);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.panel[data-page="opportunities"] .pager .pager-meta,
.panel[data-page="tasks"] .pager .pager-meta,
.panel[data-page="time-reports"] .pager .pager-meta {
  font-size: 0.92rem;
  color: var(--muted, #64748b);
  text-align: center;
  flex: 1;
}
.task-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.task-summary-card {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.task-summary-card strong {
  font-size: 1.25rem;
}
.task-summary-card.is-active,
.task-summary-card:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.task-summary-card.is-completed {
  background: rgba(220, 252, 231, 0.68);
}
.task-summary-card.is-progress {
  background: rgba(219, 234, 254, 0.72);
}
.task-summary-card.is-pending {
  background: rgba(248, 250, 252, 0.95);
}
.rbac-opp-table {
  min-width: 0;
}
.rbac-opp-table th,
.rbac-opp-table td {
  vertical-align: top;
}
.rbac-opp-table td.rbac-opp-name,
td.rbac-opp-name {
  white-space: normal;
  min-width: 180px;
  max-width: 280px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.opp-id-code {
  color: var(--bri-navy);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.opp-id-cell {
  min-width: 120px;
  max-width: 220px;
}
.structures-file-opp {
  display: block;
  margin-top: 2px;
  color: var(--bri-navy);
  font-size: 0.82rem;
  font-weight: 700;
}
.completed-cell-opp,
.history-col-opp {
  min-width: 140px;
  max-width: 240px;
}

/* -- Org mgmt: audit timeline, workload, mobile shell -- */
.mobile-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  margin: -8px -12px 14px;
  background: var(--bri-navy);
  color: #fff;
  border-bottom: 2px solid var(--bri-orange);
  position: sticky;
  top: 0;
  z-index: 30;
}
.mobile-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.mobile-topbar-logo {
  border-radius: 6px;
  background: #fff;
}
.mobile-nav-toggle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.mobile-nav-toggle-bars,
.mobile-nav-toggle-bars::before,
.mobile-nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  content: "";
}
.mobile-nav-toggle-bars::before {
  position: absolute;
  top: -6px;
}
.mobile-nav-toggle-bars::after {
  position: absolute;
  top: 6px;
}
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 30, 61, 0.45);
  z-index: 40;
}
.audit-timeline {
  list-style: none;
  margin: 0;
  padding: 8px 4px 4px 18px;
  border-left: 2px solid rgba(11, 30, 61, 0.12);
}
.audit-timeline-item {
  position: relative;
  margin: 0 0 14px;
  padding-left: 14px;
}
.audit-timeline-dot {
  position: absolute;
  left: -23px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bri-orange);
  box-shadow: 0 0 0 3px rgba(244, 118, 42, 0.18);
}
.audit-timeline-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.audit-timeline-card p {
  margin: 6px 0 0;
  color: var(--bri-navy);
  font-weight: 600;
}
.audit-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted, #667085);
}
.audit-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(11, 30, 61, 0.06);
  color: var(--bri-navy);
  text-transform: capitalize;
  font-weight: 600;
}
.workload-flag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(244, 118, 42, 0.14);
  color: #b34a0c;
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
}
tr.is-overload td {
  background: rgba(244, 118, 42, 0.06);
}
.rbac-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.rbac-row-actions .button,
.pager .button,
.actions .button,
.unfinished-toolbar .button,
.rbac-side-btn,
.mobile-nav-toggle {
  min-height: 44px;
}
.boundary-zoom-controls button,
[data-zoom] {
  min-width: 44px;
  min-height: 44px;
}

@media (max-width: 760px) {
  .mobile-topbar {
    display: flex;
  }
  .nav-backdrop:not([hidden]) {
    display: block;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(288px, 86vw);
    flex: none;
    max-height: none;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 50;
    box-shadow: 12px 0 32px rgba(11, 30, 61, 0.28);
  }
  .app-shell.nav-open .sidebar {
    transform: translateX(0);
  }
  .sidebar-brand {
    margin: 0 -14px 14px;
    flex-direction: row;
    align-items: center;
  }
  .brand-text {
    display: block;
  }
  .nav a {
    justify-content: flex-start;
    font-size: 0.95rem;
    gap: 10px;
    min-height: 44px;
    padding: 12px 12px;
  }
  .app-main {
    padding: 8px 12px 40px;
    width: 100%;
  }
  .extract-header {
    flex-direction: column;
    align-items: stretch;
  }
  .extract-header .actions {
    width: 100%;
  }
  .extract-header .actions .button,
  .extract-header .actions a.button {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }
  .mobile-card-table table.data.unfinished-table thead {
    display: none;
  }
  .mobile-card-table table.data.unfinished-table,
  .mobile-card-table table.data.unfinished-table tbody,
  .mobile-card-table table.data.unfinished-table tr,
  .mobile-card-table table.data.unfinished-table td {
    display: block;
    width: 100%;
  }
  .mobile-card-table table.data.unfinished-table tr {
    margin: 0 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(11, 30, 61, 0.04);
  }
  .mobile-card-table table.data.unfinished-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    border: none;
    border-top: 1px solid rgba(11, 30, 61, 0.06);
    min-height: 44px;
  }
  .mobile-card-table table.data.unfinished-table td:first-child {
    border-top: none;
    background: rgba(11, 30, 61, 0.03);
  }
  .mobile-card-table table.data.unfinished-table td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    max-width: 42%;
    color: var(--muted, #667085);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-top: 2px;
  }
  .mobile-card-table table.data.unfinished-table td > * {
    flex: 1 1 auto;
    text-align: right;
  }
  .mobile-card-table .rbac-row-actions {
    justify-content: flex-end;
  }
  .mobile-card-table .rbac-primary-cell {
    align-items: flex-end;
  }
  .batch-layout {
    grid-template-columns: 1fr;
  }
  .rbac-dialog-card {
    width: min(100vw - 24px, 440px);
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: min(288px, 86vw);
    flex: none;
    padding: 0 14px 24px;
  }
  .sidebar-brand {
    flex-direction: row;
    align-items: center;
    margin: 0 -14px 14px;
    padding: 18px 14px 16px;
    gap: 12px;
  }
  .brand-text {
    display: block;
  }
  .nav a {
    justify-content: flex-start;
    padding: 12px 12px;
    font-size: 0.95rem;
    gap: 10px;
  }
  .nav-icon {
    width: 22px;
    height: 22px;
  }
}

.qs-assigned-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.qs-assigned-list {
  display: grid;
  gap: 10px;
}

.qs-assigned-panel-scroll .qs-assigned-list {
  max-height: min(56vh, 520px);
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

.qs-assigned-panel-scroll .qs-assigned-list::-webkit-scrollbar {
  width: 8px;
}

.qs-assigned-panel-scroll .qs-assigned-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.22);
  border-radius: 999px;
}

.qs-assigned-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.qs-assigned-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.qs-assigned-main h3,
.qs-assigned-main p {
  margin: 0;
}

.qs-assigned-main h3 {
  font-size: 1rem;
  line-height: 1.25;
}

@media (max-width: 760px) {
  .qs-assigned-card {
    align-items: stretch;
    flex-direction: column;
  }
}


.qs-task-upload-panel .wizard-dropzone {
  border-color: rgba(22, 101, 52, 0.35);
  background: rgba(240, 253, 244, 0.72);
}

.qs-task-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid rgba(30, 64, 175, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.95));
}

.qs-task-context h3 {
  margin: 8px 0 6px;
}

@media (max-width: 760px) {
  .qs-task-context {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Visual refresh: rectangular controls and plain status text. */
button,
.button,
button.button,
a.button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.export-menu-panel button,
.chip button,
.task-summary-card,
.completed-name-item,
.sign-family-row,
.batch-file-item,
.batch-thumb,
.rbac-status-toggle {
  border-radius: 3px !important;
}

.badge,
.batch-status,
.page-bstatus,
.skip-pill,
.unfinished-table-status,
.unfinished-card-status,
.dashboard-history-status,
.audit-type-pill,
.rbac-status-toggle {
  display: inline !important;
  padding: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  line-height: inherit !important;
  font-weight: 700;
}

.badge.pass,
.badge.unchanged,
.badge.review,
.badge.duplicate,
.badge.failed,
.badge.removed,
.badge.unsupported_dwg,
.badge.added,
.badge.moved,
.badge.modified_code,
.badge.queued,
.badge.processing,
.batch-status.needs_boundary,
.batch-status.boundary_set,
.batch-status.no_drawing,
.batch-status.processed,
.page-bstatus.saved,
.page-bstatus.draft,
.page-bstatus.empty,
.page-bstatus.blank,
.unfinished-table-status.is-boundary,
.unfinished-table-status.is-approval,
.unfinished-table-status.is-extract,
.unfinished-table-status.is-done,
.unfinished-table-status.is-pending,
.unfinished-table-status.is-progress,
.unfinished-table-status.is-other,
.unfinished-card-status.is-boundary,
.unfinished-card-status.is-approval,
.unfinished-card-status.is-extract,
.unfinished-card-status.is-other,
.dashboard-history-status.is-completed,
.dashboard-history-status.is-progress,
.dashboard-history-status.is-pending {
  background: transparent !important;
}

.qs-assigned-panel .unfinished-results-head .button[href="#/tasks"] {
  display: none !important;
}

.qs-assigned-list {
  max-height: min(58vh, 560px);
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

.qs-assigned-list::-webkit-scrollbar {
  width: 8px;
}

.qs-assigned-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.22);
  border-radius: 3px;
}


/* Platform typography normalization: consistent readable sizing across screens. */
:root {
  --ui-font-size: 14px;
  --ui-heading-size: 18px;
  --ui-small-size: 14px;
}

body,
button,
input,
select,
textarea,
table.data,
table.data th,
table.data td,
.button,
a.button,
.muted,
.history-link,
.history-stat-chip,
.unfinished-table-status,
.unfinished-card-status,
.dashboard-history-status,
.badge,
.batch-status,
.page-bstatus,
.history-file-project,
.history-uploaded-date,
.history-uploaded-who,
.dashboard-history-progress-label,
.dashboard-history-pages,
.qs-assigned-main h3,
.qs-assigned-main p,
.rbac-results-table-wrap thead th,
.rbac-row-actions .button,
.pager .button,
.actions .button,
.unfinished-toolbar .button {
  font-size: var(--ui-font-size) !important;
}

.panel h2,
.extract-header h2,
.auth-modal h2,
.bri-auth-header h2,
.sign-family-page-head h2 {
  font-size: var(--ui-heading-size) !important;
}

.panel h3,
.panel h4,
.extract-header h3,
.summary-report-head h3,
.completed-step-head h3,
.dashboard-history h4,
.sign-family-toolbar-title h3,
.qs-task-context h3 {
  font-size: var(--ui-font-size) !important;
}

.metric strong,
.metric.status-card strong,
.summary-metric-value,
.history-stat-chip strong,
.task-summary-card strong,
.sign-family-summary-block strong,
.structures-stat strong {
  font-size: var(--ui-font-size) !important;
}


.sign-family-row-opp,
.sign-family-op-summary {
  color: var(--bri-navy);
  line-height: 1.35;
}

.sign-family-op-item {
  display: inline-block;
  margin-right: 10px;
}


/* sign-family-op-layout-fix: keep OP No / Opportunity visible on the left. */
.sign-family-row-opp {
  justify-self: start;
  text-align: left;
  min-width: 0;
  word-break: break-word;
}
.sign-family-row-opp .sign-family-op-item {
  display: block;
  margin-right: 0;
}
.sign-family-table-head span:nth-child(2) {
  text-align: left;
}


/* sign-family-op-split-layout: OP No, OP Name, Project/Filename, Types, Open. */
.sign-family-row-opno,
.sign-family-row-opname {
  color: var(--bri-navy);
  min-width: 0;
  text-align: left;
  word-break: break-word;
}
.sign-family-op-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}


.deadline-text {
  font-weight: 700;
}
.deadline-text.is-none {
  color: var(--muted);
  font-weight: 600;
}
.deadline-text.is-normal {
  color: var(--bri-navy);
}
.deadline-text.is-soon {
  color: var(--bri-orange-dark);
}
.deadline-text.is-overdue {
  color: var(--bad);
}


.calendar-legend,
.calendar-range {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  color: var(--bri-navy);
}
.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.calendar-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 2px;
}
.calendar-legend i.is-pending { background: var(--status-pending-fg); }
.calendar-legend i.is-progress { background: var(--status-progress-fg); }
.calendar-legend i.is-overdue { background: var(--bad); }
.calendar-legend i.is-completed { background: var(--ok); }
.calendar-legend i.is-sent { background: #2563eb; }
.calendar-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) repeat(7, minmax(120px, 1fr));
  border: 1px solid var(--line);
  background: #fff;
  overflow: visible;
}
.calendar-user-head,
.calendar-day-head,
.calendar-user-cell,
.calendar-day-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 82px;
  padding: 10px;
}
.calendar-user-head,
.calendar-day-head {
  min-height: 54px;
  background: #f8fafc;
  font-weight: 700;
  color: var(--bri-navy);
}
.calendar-day-head {
  display: grid;
  gap: 2px;
}
.calendar-day-head em {
  justify-self: start;
  min-width: 22px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--bri-orange-dark);
  font-style: normal;
  text-align: center;
}
.calendar-row { display: contents; }
.calendar-user-cell {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-content: start;
  gap: 4px 8px;
}
.calendar-user-cell em {
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
}
.calendar-avatar {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 44, 74, 0.08);
  color: var(--bri-navy);
  font-weight: 700;
}
.calendar-day-cell {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: visible;
}
.calendar-task-card {
  position: relative;
  border: 1px solid var(--line);
  border-left: 4px solid var(--status-pending-fg);
  background: #fff;
  color: var(--bri-navy);
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
}
.calendar-task-card strong,
.calendar-task-card span { display: block; }
.calendar-task-card span { color: var(--muted); }
.calendar-task-card.is-progress { border-left-color: var(--status-progress-fg); }
.calendar-task-card.is-overdue { border-left-color: var(--bad); color: var(--bad); }
.calendar-tooltip {
  position: absolute;
  z-index: 50;
  left: 8px;
  top: calc(100% + 8px);
  min-width: 240px;
  max-width: 320px;
  display: none !important;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: 0 14px 36px rgba(11, 44, 74, 0.18);
  color: var(--bri-navy) !important;
  text-align: left;
  pointer-events: none;
}
.calendar-tooltip b,
.calendar-tooltip em {
  display: block;
  margin: 0 0 4px;
  color: var(--bri-navy);
  font-style: normal;
  font-size: 12px;
  line-height: 1.35;
}
.calendar-tooltip b { font-weight: 800; }
.calendar-task-card:hover,
.calendar-task-card:focus-visible { z-index: 60; }
.calendar-task-card:hover .calendar-tooltip,
.calendar-task-card:focus-visible .calendar-tooltip { display: block !important; }
.calendar-empty {
  grid-column: 1 / -1;
  padding: 22px;
  color: var(--muted);
}

.wizard-dropzone.is-disabled {
  position: relative;
  opacity: 0.55;
  filter: grayscale(0.35);
  cursor: not-allowed;
  background: #f3f6fa;
}
.wizard-dropzone.is-disabled * { pointer-events: none; }
.qs-upload-lock-note {
  margin: 8px 0 0;
  color: var(--bad);
  font-weight: 700;
}
.qs-task-context-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.assign-opportunity-details {
  margin: 0 32px;
  padding: 16px 18px;
  border: 1px solid rgba(11, 44, 74, 0.16);
  background: #fff;
  font-size: 13px;
  color: var(--bri-navy);
}
.assign-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
}
.assign-detail-grid span {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--bri-navy);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.assign-detail-grid strong {
  color: var(--bri-navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}
@media (max-width: 640px) {
  .rbac-dialog-wide { width: min(520px, calc(100vw - 24px)); }
  .rbac-dialog-wide .rbac-field,
  .rbac-dialog-wide .actions,
  .assign-opportunity-details {
    margin-left: 20px;
    margin-right: 20px;
  }
  .rbac-dialog-wide .extract-header {
    padding-left: 20px;
    padding-right: 20px;
  }
  .assign-detail-grid { grid-template-columns: 1fr; }
  .assign-detail-grid span { grid-template-columns: 110px minmax(0, 1fr); }
}

.qs-task-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0 10px;
}
.qs-task-meta p {
  margin: 0;
}
.qs-timer-note {
  font-weight: 600;
}
.qs-timer-note.is-running { color: var(--ok); }
.qs-timer-note:not(.is-running) { color: var(--status-progress-fg); }
.qs-shared-link-note {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.06);
}
.qs-shared-link-note strong {
  display: block;
  color: var(--bri-navy);
  margin-bottom: 2px;
}
.qs-shared-link-note p.muted {
  margin: 0 0 6px;
}
.qs-shared-link-note a {
  display: inline-block;
  word-break: break-all;
  font-weight: 600;
}

.qs-preloaded-workspace {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--bri-navy);
}
.qs-preloaded-workspace > .muted {
  margin: 4px 0 0;
}
.qs-extra-upload {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.qs-extra-upload input[type="file"] {
  flex: 1 1 260px;
  min-width: 200px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.opp-hod-status {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
}
.opp-hod-status.is-pending { color: var(--status-progress-fg); }
.opp-hod-status.is-assigned { color: var(--ok); }
.assign-uploaded-files {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.assign-uploaded-files strong { color: var(--bri-navy); }
.assign-uploaded-files span { color: var(--bri-navy); }
.assign-uploaded-files.is-empty { color: var(--bad); font-weight: 700; }
.assign-deadline-locked {
  margin: 0 32px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 6px;
  font-size: 13px;
}
.assign-deadline-locked strong { color: var(--bri-navy); }

.batch-boundary-canvas-readonly canvas {
  pointer-events: none;
}

.batch-view-only-banner {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #fffbeb;
  border: 1px solid #f5d78e;
  border-radius: 6px;
  font-size: 13px;
  color: #7c5a00;
}

.calendar-timeline-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.activity-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.activity-timeline-entry {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(90px, 120px) minmax(90px, 120px) 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.activity-timeline-entry time,
.activity-timeline-entry em {
  color: var(--muted);
  font-style: normal;
}
.activity-timeline-entry p { margin: 0; color: var(--bri-navy); font-weight: 700; }
.activity-status { font-weight: 800; }
.activity-status.is-new { color: var(--muted); }
.activity-status.is-in-progress { color: var(--status-progress-fg); }
.activity-status.is-on-hold { color: var(--bri-orange-dark); }
.activity-status.is-completed { color: var(--ok); }
@media (max-width: 820px) {
  .activity-timeline-entry { grid-template-columns: 1fr; }
}

.workcal-grid {
  display: grid;
  grid-template-columns: 160px repeat(7, minmax(140px, 1fr));
  border: 1px solid var(--line);
  background: #fff;
  overflow-x: auto;
}
.workcal-corner,
.workcal-day-head {
  min-height: 58px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: var(--bri-navy);
  font-weight: 800;
}
.workcal-day-head { display: grid; gap: 2px; }
.workcal-user-row { display: contents; }
.workcal-user,
.workcal-time-col,
.workcal-day-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.workcal-user {
  padding: 12px;
  background: #fff;
  color: var(--bri-navy);
}
.workcal-user span { display: block; color: var(--muted); margin-top: 4px; }
.workcal-time { padding: 2px 8px; border-bottom: 1px solid rgba(203,213,225,.55); color: var(--muted); font-size: 12px; }
.workcal-day-cell { position: relative; background: repeating-linear-gradient(to bottom, #fff 0, #fff 47px, rgba(203,213,225,.55) 48px); }
.workcal-block {
  position: absolute;
  left: 6px;
  right: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--status-progress-fg);
  background: rgba(244,118,42,.12);
  color: var(--bri-navy);
  padding: 4px 6px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}
.workcal-block strong,
.workcal-block span { display: block; }
.workcal-block.is-completed { border-left-color: var(--ok); background: rgba(22,163,74,.12); }
.workcal-block.is-overdue { border-left-color: var(--bad); background: rgba(220,38,38,.10); }
.workcal-block.is-pending { border-left-color: var(--muted); background: #f8fafc; }
.calendar-legend i.is-completed { background: var(--ok); }

/* Date-rows x hour-columns calendar grid (rotated 90deg from the old day-columns/time-rows layout). */
.datecal-scroll { overflow-x: auto; border: 1px solid var(--line); background: #fff; }
.datecal-grid { display: flex; flex-direction: column; min-width: 100%; }
.datecal-corner-row { display: flex; position: sticky; top: 0; z-index: 5; background: #f8fafc; }
.datecal-corner {
  width: 110px;
  min-width: 110px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: var(--bri-navy);
  font-weight: 800;
  font-size: 13px;
}
.datecal-hour-head {
  min-width: 84px;
  flex-shrink: 0;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.datecal-row { display: flex; }
.datecal-row.is-today .datecal-date { background: rgba(244,118,42,.10); }
.datecal-date {
  width: 110px;
  min-width: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #fff;
  color: var(--bri-navy);
}
.datecal-date strong { font-size: 16px; }
.datecal-date span { color: var(--muted); font-size: 12px; }
.datecal-hours-track {
  position: relative;
  flex-shrink: 0;
  background: #fff;
}
.datecal-block {
  position: absolute;
  overflow: hidden;
  border: none;
  border-left: 4px solid var(--status-progress-fg);
  border-radius: 4px;
  background: rgba(244,118,42,.12);
  color: var(--bri-navy);
  padding: 3px 7px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.3;
}
.datecal-block strong,
.datecal-block em,
.datecal-block span { display: block; }
.datecal-block em { color: var(--muted); font-style: normal; }
.datecal-block.is-completed { border-left-color: var(--ok); background: rgba(22,163,74,.12); }
.datecal-block.is-overdue { border-left-color: var(--bad); background: rgba(220,38,38,.10); }
.datecal-block.is-pending { border-left-color: var(--muted); background: #f8fafc; }
.datecal-block.is-sent { border-left-color: #2563eb; background: rgba(37,99,235,.10); }

.datecal-popup {
  position: fixed;
  z-index: 60;
  min-width: 220px;
  max-width: 280px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,.16);
  padding: 12px 14px;
  font-size: 13px;
}
.datecal-popup h4 { margin: 0 0 6px; font-size: 14px; color: var(--bri-navy); }
.datecal-popup dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.datecal-popup dt { color: var(--muted); }
.datecal-popup dd { margin: 0; }
.datecal-popup .actions { margin-top: 10px; display: flex; justify-content: flex-end; gap: 8px; }
