:root {
  /* Silver Disk — Tandy × Apple */
  --bg-deep: #121212;
  --bg: #1a1a1a;
  --panel: #1e1e1e;
  --panel-mid: #242424;
  --border: #3a3a3a;
  --border-soft: rgba(58, 58, 58, 0.85);
  --text: #f5f5f7;
  --text-secondary: #c0c0c0;
  --amber: #f5a623;
  --amber-dark: #d4891a;
  --amber-soft: rgba(245, 166, 35, 0.18);
  --radius: 11px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --hairline: 1px solid var(--border);
  --panel-gradient: linear-gradient(
    155deg,
    #2a2a2a 0%,
    #1f1f1f 38%,
    #232323 62%,
    #1a1a1a 100%
  );
  --panel-inset: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --space: 1.25rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; }

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--text-secondary); text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* Shared silver-disk surface */
.card,
.panel,
.login-card,
.filter-bar,
.invoice-block,
.roadmap-list,
.note-entry,
.specialty-fieldset {
  background: var(--panel-gradient);
  border: var(--hairline);
  box-shadow: var(--panel-inset);
}

.admin-banner {
  background: var(--bg);
  color: var(--text-secondary);
  text-align: center;
  padding: 0.45rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: var(--hairline);
}

.site-header {
  background: var(--bg);
  border-bottom: var(--hairline);
  padding: 1.1rem 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand .console {
  font-size: 1.3rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand .product {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
}

.brand .accent {
  color: var(--amber);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
}

nav a {
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
}

nav a.active {
  background: transparent;
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--amber);
  border-radius: var(--radius-sm);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.25rem 1.75rem 3.5rem;
}

h1 {
  font-size: 1.85rem;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 0.45rem;
  letter-spacing: -0.025em;
}

.subtitle {
  color: var(--text-secondary);
  margin-bottom: 1.85rem;
  font-size: 0.98rem;
  font-weight: 400;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.15rem;
  margin-bottom: 2.25rem;
}

.card {
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
}

.card .label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.45rem;
  font-weight: 550;
}

.card .value {
  font-size: 2rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.card .hint {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.panel {
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  padding: 1rem 1.25rem;
  border-bottom: var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: rgba(0, 0, 0, 0.18);
}

.panel-header h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.filters a, .filters span {
  font-size: 0.78rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: var(--hairline);
  color: var(--text-secondary);
  text-decoration: none;
  background: transparent;
}

.filters a:hover {
  border-color: var(--amber);
  color: var(--amber);
  text-decoration: none;
}

.filters a.active, .filters span.active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg-deep);
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.85rem 1.2rem;
  border-bottom: var(--hairline);
}

th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.28);
  font-weight: 600;
  border-top: 2px solid var(--amber);
  border-bottom: var(--hairline);
}

td {
  color: var(--text);
  font-size: 0.94rem;
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: rgba(245, 166, 35, 0.045); }

.price {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 600;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: var(--hairline);
  font-weight: 550;
}

.badge.active {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: rgba(245, 166, 35, 0.35);
}

.empty-state {
  text-align: center;
  padding: 4rem 1.75rem;
  color: var(--text-secondary);
}

.empty-state h2 {
  color: var(--text);
  margin-bottom: 0.55rem;
  font-weight: 600;
}

.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 0.85rem;
  color: var(--text-secondary);
}

.muted { color: var(--text-secondary); font-size: 0.9rem; }

.error {
  background: #2a1515;
  border: 1px solid #8a3a3a;
  color: #f0c0c0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  margin-bottom: 1.15rem;
}

footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.75rem 2.5rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
}
footer a:hover {
  color: var(--amber);
  text-decoration: none;
}

.logout-form button {
  background: transparent;
  border: var(--hairline);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.8rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}
.logout-form button:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* --- login --- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.75rem;
  background: var(--bg-deep);
}

.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  padding: 2rem 1.85rem;
}

.login-card h1 {
  margin: 1.15rem 0 1.35rem;
  font-size: 1.35rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.login-form input {
  background: var(--bg-deep);
  border: var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.7rem 0.85rem;
  font: inherit;
}

.login-form input:focus {
  border-color: var(--amber);
  outline: none;
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.login-form button {
  margin-top: 0.4rem;
  background: var(--amber);
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
}

.login-form button:hover {
  background: var(--amber-dark);
}

.login-card .error {
  margin-bottom: 0.85rem;
}

/* --- editable v1 additions --- */
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.btn, button.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn:hover { text-decoration: none; }

.btn-primary, button.btn-primary {
  background: var(--amber);
  color: var(--bg-deep);
  border-color: var(--amber);
}
.btn-primary:hover { background: var(--amber-dark); color: var(--bg-deep); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-link {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link:hover { color: var(--amber); }
.btn-link.danger { color: #f88; }

.flash.ok {
  background: var(--amber-soft);
  border: 1px solid rgba(245, 166, 35, 0.45);
  color: var(--text);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.15rem;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-body label, .filter-bar label, .inline-add label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 550;
}

.form-body input, .form-body select, .form-body textarea,
.filter-bar select, .inline-add select, .inline-add input {
  background: var(--bg-deep);
  border: var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
}

.form-body input:focus,
.form-body select:focus,
.form-body textarea:focus,
.filter-bar select:focus,
.filter-bar input:focus,
.inline-add select:focus,
.inline-add input:focus {
  border-color: var(--amber);
  outline: none;
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem;
}

.form-actions { margin-top: 0.6rem; }

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: 0.95rem !important;
  color: var(--text) !important;
}

.view-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.view-tabs a {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: var(--hairline);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.view-tabs a:hover {
  border-color: var(--amber);
  color: var(--amber);
  text-decoration: none;
}
.view-tabs a.active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg-deep);
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.9rem;
  align-items: end;
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-bottom: 1.25rem;
}
.filter-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.calendar-panel .panel-body { padding: 1.15rem; }
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}
.calendar-nav h2 { font-size: 1.15rem; color: var(--text); font-weight: 600; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-dow {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.5rem;
  text-align: center;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  font-weight: 600;
}
.cal-cell {
  background: var(--panel);
  min-height: 92px;
  padding: 0.4rem;
}
.cal-cell.empty { background: rgba(0, 0, 0, 0.22); }
.cal-day {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.cal-jobs { display: flex; flex-direction: column; gap: 0.22rem; }
.cal-job {
  display: block;
  font-size: 0.7rem;
  padding: 0.22rem 0.4rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
}
.cal-job:hover {
  background: var(--amber-soft);
  color: var(--amber);
  text-decoration: none;
  border-color: rgba(245, 166, 35, 0.25);
}
.cal-job.status-unassigned {
  background: rgba(245, 166, 35, 0.22);
  color: var(--amber);
  border-color: rgba(245, 166, 35, 0.35);
}
.cal-job.status-scheduled {
  background: rgba(148, 168, 190, 0.16);
  color: #b7c6d8;
  border-color: rgba(148, 168, 190, 0.32);
}
.cal-job.status-in_progress {
  background: rgba(56, 178, 172, 0.18);
  color: #7ed6cf;
  border-color: rgba(56, 178, 172, 0.32);
}
.cal-job.status-complete {
  background: rgba(120, 160, 130, 0.16);
  color: #a8c4ae;
  border-color: rgba(120, 160, 130, 0.28);
}
.cal-job.status-inquiry {
  background: rgba(192, 192, 192, 0.1);
  color: var(--text-secondary);
}
.cal-job.status-cancelled {
  background: rgba(180, 90, 100, 0.16);
  color: #e8a0a8;
  border-color: rgba(180, 90, 100, 0.3);
}

/* Status pills — amber ONLY for Unassigned (needs attention) */
.badge.unassigned {
  background: rgba(245, 166, 35, 0.22);
  color: var(--amber);
  border-color: rgba(245, 166, 35, 0.45);
  font-weight: 650;
}
.badge.scheduled {
  background: rgba(148, 168, 190, 0.16);
  color: #b7c6d8;
  border-color: rgba(148, 168, 190, 0.35);
}
.badge.progress {
  background: rgba(56, 178, 172, 0.18);
  color: #7ed6cf;
  border-color: rgba(56, 178, 172, 0.35);
}
.badge.complete {
  background: rgba(120, 160, 130, 0.16);
  color: #a8c4ae;
  border-color: rgba(120, 160, 130, 0.3);
}
.badge.inquiry {
  background: rgba(192, 192, 192, 0.1);
  color: var(--text-secondary);
  border-color: rgba(192, 192, 192, 0.2);
  font-weight: 500;
}
.badge.cancelled {
  background: rgba(180, 90, 100, 0.16);
  color: #e8a0a8;
  border-color: rgba(180, 90, 100, 0.32);
}

/* Legacy aliases (non-status uses / older markup) */
.badge.bad { background: rgba(180, 90, 100, 0.16); color: #e8a0a8; border-color: rgba(180, 90, 100, 0.32); }
.badge.warn { background: rgba(56, 178, 172, 0.18); color: #7ed6cf; border-color: rgba(56, 178, 172, 0.35); }
.badge.info {
  background: rgba(148, 168, 190, 0.16);
  color: #b7c6d8;
  border-color: rgba(148, 168, 190, 0.35);
}

.board-latches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: -0.35rem 0 1rem;
}

.status-latch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: var(--hairline);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 550;
  background: rgba(255, 255, 255, 0.03);
}

.status-latch:hover {
  text-decoration: none;
  border-color: rgba(245, 166, 35, 0.35);
  color: var(--text);
}

.status-latch.active {
  border-color: rgba(245, 166, 35, 0.45);
  color: var(--amber);
  background: var(--amber-soft);
}

.status-latch-unassigned {
  font-weight: 650;
}

.status-latch-unassigned .latch-count,
.board-unassigned-badge {
  font-variant-numeric: tabular-nums;
}

.status-latch-inquiry {
  opacity: 0.72;
  font-weight: 500;
}

.status-latch-inquiry:hover,
.status-latch-inquiry.active {
  opacity: 1;
}

.status-latch-completed {
  font-weight: 550;
}
.status-latch-completed .latch-count {
  background: rgba(120, 160, 130, 0.22);
  color: #a8c4ae;
}
.status-latch-completed.active {
  border-color: rgba(120, 160, 130, 0.45);
  color: #a8c4ae;
  background: rgba(120, 160, 130, 0.12);
}

.paid-chip {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  border: var(--hairline);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.paid-chip-yes {
  background: rgba(120, 160, 130, 0.16);
  color: #a8c4ae;
  border-color: rgba(120, 160, 130, 0.3);
}
.paid-chip-no {
  background: rgba(192, 192, 192, 0.08);
  color: var(--text-secondary);
  border-color: rgba(192, 192, 192, 0.2);
  font-weight: 500;
}

.job-board-panel-completed > .panel-header h2 {
  color: #c5d4c8;
}

.latch-count {
  display: inline-block;
  min-width: 1.1rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 650;
}

.status-latch-unassigned .latch-count {
  background: rgba(245, 166, 35, 0.28);
  color: var(--amber);
}

tr.row-unassigned td {
  background: rgba(245, 166, 35, 0.06);
}

body.density-tight .board-latches {
  margin-bottom: 0.75rem;
}


.invoice-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.15rem;
  margin-bottom: 0.75rem;
}
.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.invoice-meta {
  text-align: right;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--text-secondary);
}
.invoice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.15rem;
}
.invoice-block {
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}
.invoice-block h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.55rem;
  font-weight: 600;
}
.invoice-strong {
  font-weight: 650;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.inline-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: end;
}
.inline-form { display: inline; }
tfoot td {
  border-bottom: none;
  background: rgba(0, 0, 0, 0.22);
  font-weight: 600;
}

@media (max-width: 700px) {
  .cal-cell { min-height: 68px; }
  .cal-job { font-size: 0.65rem; }
  .invoice-meta { text-align: left; }
  main { padding: 1.5rem 1.15rem 2.5rem; }
  .site-header { padding: 0.9rem 1.15rem; }
}

/* --- Form sections (logical groups + scanable bands) --- */
.form-body-sections {
  gap: 0.85rem;
}

.form-section {
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  font-weight: 650;
  margin: 0;
}

/* Calm Silver Disk section tints — never amber except primary/active elsewhere */
.form-section--identity {
  background: rgba(210, 210, 215, 0.045);
  border-color: rgba(210, 210, 215, 0.08);
}
.form-section--parties {
  background: rgba(130, 155, 185, 0.07);
  border-color: rgba(130, 155, 185, 0.12);
}
.form-section--assignment {
  background: rgba(180, 165, 130, 0.06);
  border-color: rgba(180, 165, 130, 0.11);
}
.form-section--commercial {
  background: rgba(150, 140, 170, 0.07);
  border-color: rgba(150, 140, 170, 0.12);
}
.form-section--contact {
  background: rgba(140, 170, 155, 0.06);
  border-color: rgba(140, 170, 155, 0.11);
}
.form-section--location {
  background: rgba(160, 160, 150, 0.055);
  border-color: rgba(160, 160, 150, 0.1);
}
.form-section--capabilities {
  background: rgba(130, 155, 185, 0.07);
  border-color: rgba(130, 155, 185, 0.12);
}

/* Panel-level band when classed as a section tint */
.panel.form-section--assignment,
.panel.form-section--parties,
.panel.form-section--commercial,
.panel.form-section--identity,
.panel.form-section--contact,
.panel.form-section--location {
  background: var(--panel-gradient);
}
.panel.form-section--assignment .panel-header { background: rgba(180, 165, 130, 0.1); }
.panel.form-section--parties .panel-header { background: rgba(130, 155, 185, 0.1); }
.panel.form-section--commercial .panel-header { background: rgba(150, 140, 170, 0.1); }

/* Header density toggle */
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
}
.density-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
}
.density-toggle .density-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-right: 0.3rem;
  font-weight: 550;
}
.density-toggle button {
  background: transparent;
  border: var(--hairline);
  color: var(--text-secondary);
  font-size: 0.74rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
}
.density-toggle button.active {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: rgba(245, 166, 35, 0.4);
  font-weight: 600;
}
.density-toggle button:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ============================================================
   Density: Comfortable (default) stays airy.
   Tight = command-center compact — not Comfortable-minus-padding.
   ============================================================ */

body.density-comfortable {
  line-height: 1.55;
}

/* Comfortable: sections remain readable bands with room to breathe */
body.density-comfortable .form-section {
  padding: 1.05rem 1.15rem;
  gap: 0.85rem;
}
body.density-comfortable .form-body-sections {
  gap: 1rem;
}

/* --- Tight remake --- */
body.density-tight {
  line-height: 1.35;
}

body.density-tight main {
  padding: 0.55rem 0.85rem 1.15rem;
}

body.density-tight .site-header {
  padding: 0.4rem 0.85rem;
  gap: 0.65rem;
}

body.density-tight .admin-banner {
  padding: 0.15rem 0.65rem;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

body.density-tight .brand .console {
  font-size: 1.1rem;
}

body.density-tight .brand .product {
  font-size: 0.62rem;
}

body.density-tight nav a {
  padding: 0.28rem 0.55rem;
  font-size: 0.8rem;
}

body.density-tight h1 {
  margin-bottom: 0.1rem;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

body.density-tight .subtitle {
  margin-bottom: 0.45rem;
  font-size: 0.84rem;
}

body.density-tight .page-actions {
  margin-bottom: 0.45rem;
  gap: 0.4rem;
}

body.density-tight .btn,
body.density-tight button.btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

body.density-tight .cards {
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

body.density-tight .card {
  padding: 0.55rem 0.7rem;
}

body.density-tight .panel {
  margin-bottom: 0.55rem;
  border-radius: var(--radius-sm);
}

body.density-tight .panel-header {
  padding: 0.4rem 0.65rem;
}

body.density-tight .panel-header h2 {
  font-size: 0.88rem;
}

body.density-tight .panel-body,
body.density-tight .form-body {
  padding: 0.45rem 0.55rem;
  gap: 0.45rem;
}

body.density-tight .form-body-sections {
  gap: 0.4rem;
  padding: 0.4rem 0.45rem;
}

body.density-tight .form-section {
  padding: 0.45rem 0.55rem;
  gap: 0.4rem;
  border-radius: 6px;
}

body.density-tight .form-section-title {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  margin-bottom: -0.1rem;
}

body.density-tight .form-grid {
  gap: 0.5rem;
}

body.density-tight .form-row {
  gap: 0.4rem;
}

body.density-tight .form-body label,
body.density-tight .filter-bar label,
body.density-tight .inline-add label {
  gap: 0.18rem;
  font-size: 0.66rem;
  margin-bottom: 0;
}

body.density-tight .form-body input,
body.density-tight .form-body select,
body.density-tight .form-body textarea,
body.density-tight .filter-bar select,
body.density-tight .inline-add select,
body.density-tight .inline-add input {
  padding: 0.28rem 0.45rem;
  font-size: 0.84rem;
  border-radius: 6px;
}

body.density-tight .checkbox-label {
  font-size: 0.84rem !important;
  gap: 0.35rem !important;
}

body.density-tight .specialty-fieldset {
  padding: 0.45rem 0.55rem;
  margin: 0;
}

body.density-tight .specialty-fieldset legend {
  font-size: 0.66rem;
  padding: 0 0.25rem;
}

body.density-tight .checkbox-group {
  gap: 0.25rem 0.65rem;
}

body.density-tight .form-actions {
  margin-top: 0.25rem;
}

/* Dense tables — command-center ready */
body.density-tight table th,
body.density-tight table td {
  padding: 0.28rem 0.5rem;
}

body.density-tight table td {
  font-size: 0.82rem;
}

body.density-tight table th {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 0.32rem 0.5rem;
  border-top-width: 1px;
}

body.density-tight .job-board-table th,
body.density-tight .job-board-table td,
body.density-tight .density-table th,
body.density-tight .density-table td {
  padding: 0.2rem 0.4rem;
}

body.density-tight .job-board-table td,
body.density-tight .density-table td {
  font-size: 0.78rem;
  line-height: 1.25;
}

body.density-tight .job-board-table th,
body.density-tight .density-table th {
  font-size: 0.58rem;
  padding: 0.25rem 0.4rem;
}

body.density-tight .assign-link {
  font-size: 0.7rem;
  margin-left: 0.25rem;
  opacity: 0.75;
}

body.density-tight .badge {
  font-size: 0.62rem;
  padding: 0.1rem 0.4rem;
}

body.density-tight .filter-bar {
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
  margin-bottom: 0.5rem;
}

body.density-tight .view-tabs {
  margin-bottom: 0.45rem;
  gap: 0.25rem;
}

body.density-tight .board-latches {
  margin: -0.15rem 0 0.5rem;
  gap: 0.3rem;
}

body.density-tight .status-latch {
  padding: 0.2rem 0.55rem;
  font-size: 0.74rem;
}

body.density-tight .latch-count {
  font-size: 0.64rem;
  padding: 0.02rem 0.3rem;
  min-width: 0.95rem;
}

body.density-tight .cal-cell {
  min-height: 3.6rem;
  padding: 0.18rem;
}

body.density-tight .cal-job {
  padding: 0.05rem 0.2rem;
  font-size: 0.64rem;
}

body.density-tight .invoice-header {
  margin-bottom: 0.45rem;
  gap: 0.65rem;
}

body.density-tight .invoice-grid {
  gap: 0.5rem;
}

body.density-tight .invoice-block {
  padding: 0.5rem 0.65rem;
}

body.density-tight .invoice-block h3 {
  margin-bottom: 0.35rem;
  font-size: 0.64rem;
}

body.density-tight .eyebrow {
  margin-bottom: 0.15rem;
  font-size: 0.64rem;
}

body.density-tight .tech-assign-row {
  gap: 0.45rem;
}

body.density-tight .tech-assign-hint {
  margin-top: 0.25rem;
  font-size: 0.78rem;
}

body.density-tight .notes-panel {
  margin-top: 0.65rem !important;
}

body.density-tight .note-entry {
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.35rem;
}

body.density-tight .flash.ok,
body.density-tight .error {
  padding: 0.5rem 0.7rem;
  margin-bottom: 0.55rem;
  font-size: 0.84rem;
}

body.density-tight .density-toggle button {
  padding: 0.18rem 0.45rem;
  font-size: 0.68rem;
}

body.density-tight footer {
  padding: 0.65rem 0.85rem;
  font-size: 0.72rem;
}

/* --- landing / desire page --- */
.landing-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
}

.landing-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  background: var(--bg);
  border-bottom: var(--hairline);
}

.landing-nav a {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: var(--hairline);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.landing-nav a:hover {
  border-color: var(--amber);
  color: var(--amber);
  text-decoration: none;
}

.landing-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 3.75rem 1.75rem 2.5rem;
  text-align: left;
}
.landing-hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.5rem);
  line-height: 1.18;
  margin: 0.55rem 0 1.15rem;
  letter-spacing: -0.03em;
}
.landing-hero .lead {
  color: var(--text-secondary);
  font-size: 1.08rem;
  max-width: 40rem;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}
.landing-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem;
}
.landing-cta-note {
  font-size: 0.9rem;
}

.landing-features,
.landing-roadmap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.75rem 2.25rem;
}
.landing-features h2,
.landing-roadmap h2 {
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.landing-cards .card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: 0.4rem;
  line-height: 1.5;
}

.roadmap-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}
.roadmap-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.7rem;
  line-height: 1.5;
}

.landing-footer {
  max-width: 1100px;
  margin: auto auto 0;
  padding: 1.75rem 1.75rem 2.75rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}
.landing-footer a {
  color: var(--text-secondary);
}
.landing-footer a:hover {
  color: var(--amber);
  text-decoration: none;
}

/* --- changelog --- */
.changelog-body {
  padding: 1.4rem 1.5rem 2rem;
}
.changelog-body h1 {
  font-size: 1.4rem;
  margin-bottom: 0.9rem;
}
.changelog-body h2 {
  font-size: 1.12rem;
  color: var(--text);
  margin: 1.65rem 0 0.7rem;
  padding-top: 0.9rem;
  border-top: var(--hairline);
  font-weight: 650;
  letter-spacing: -0.015em;
}
.changelog-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
}
.changelog-body h3 {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0.95rem 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}
.changelog-body p {
  color: var(--text-secondary);
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
}
.changelog-body ul {
  margin: 0.4rem 0 0.95rem 1.2rem;
  color: var(--text);
}
.changelog-body li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.changelog-body a { color: var(--amber); }

/* --- team filters / specialty chips --- */
.filter-bar input[type="search"],
.filter-bar input[type="text"] {
  background: var(--bg-deep);
  border: var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
}
.filter-bar .filter-check {
  flex-direction: row;
  align-items: center;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.9rem;
  gap: 0.45rem;
  padding-bottom: 0.35rem;
}
.chip {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  margin: 0.1rem 0.15rem 0.1rem 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: var(--hairline);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.chips-cell { line-height: 1.65; }
.specialty-fieldset {
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem 0.6rem;
  margin: 0.55rem 0 0.85rem;
}
.specialty-fieldset legend {
  padding: 0 0.4rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 550;
}
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: 0.4rem;
}

/* --- append-only notes timeline --- */
.notes-panel .notes-rule {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
}
.note-add-form {
  margin-bottom: 1.35rem;
  padding-bottom: 1.15rem;
  border-bottom: var(--hairline);
}
.notes-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.note-entry {
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
}
.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.note-meta time { color: var(--text-secondary); }
.note-author {
  color: var(--text);
  font-weight: 600;
}
.note-body {
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
}
.note-empty { margin: 0.25rem 0 0; }

/* Legacy alias tokens for any residual references */
:root {
  --charcoal: var(--bg);
  --charcoal-mid: var(--panel);
  --charcoal-light: var(--border);
  --silver: var(--text-secondary);
  --silver-light: var(--text);
}


/* Job board assign affordance */
td.tech-col .assign-link {
  margin-left: 0.35rem;
  font-size: 0.8em;
  white-space: nowrap;
  opacity: 0.75;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
td.tech-col .assign-link:hover,
td.tech-col .assign-link[aria-expanded="true"] {
  opacity: 1;
}


/* --- 2h: prominent tech assign on job detail --- */
.tech-assign-panel {
  margin-top: 1.1rem;
  border: 1px solid rgba(192, 192, 192, 0.22);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.08);
}
.tech-assign-panel .panel-header h2 {
  letter-spacing: 0.04em;
}
.tech-assign-form {
  padding-top: 0.35rem;
}
.tech-assign-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1rem;
}
.tech-assign-label {
  flex: 1 1 16rem;
  min-width: 12rem;
}
.tech-assign-select {
  font-size: 1.05rem;
  min-height: 2.6rem;
}
.tech-assign-hint {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
}


/* --- 2h-i: Assign popover (Silver Disk + Tight-friendly) --- */
button.assign-link.assign-trigger {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.35rem;
  font: inherit;
  font-size: 0.8em;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
  opacity: 0.75;
  text-decoration: underline;
  text-underline-offset: 2px;
}
button.assign-link.assign-trigger:hover,
button.assign-link.assign-trigger[aria-expanded="true"] {
  opacity: 1;
}

.assign-popover {
  position: fixed;
  z-index: 1200;
  max-height: min(22rem, 70vh);
  display: flex;
  flex-direction: column;
  background: var(--panel, #2a2a2e);
  color: var(--text, #e8e8ea);
  border: 1px solid rgba(192, 192, 192, 0.28);
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.assign-popover[hidden] {
  display: none !important;
}
.assign-popover-chrome {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
}
.assign-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  background: rgba(180, 165, 130, 0.1);
  border-bottom: 1px solid rgba(192, 192, 192, 0.18);
}
.assign-popover-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary, #b8b8bc);
}
.assign-popover-close {
  background: transparent;
  border: none;
  color: var(--text-secondary, #b8b8bc);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}
.assign-popover-close:hover {
  color: var(--amber, #f5a623);
}
.assign-popover-search {
  margin: 0.4rem 0.5rem 0;
  padding: 0.35rem 0.45rem;
  font-size: 0.85rem;
  border-radius: 4px;
  border: 1px solid rgba(192, 192, 192, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text, #e8e8ea);
  min-height: 1.85rem;
}
.assign-popover-search:focus {
  outline: none;
  border-color: rgba(245, 166, 35, 0.55);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.25);
}
.assign-popover-hint {
  margin: 0.3rem 0.55rem 0.15rem;
  font-size: 0.72rem;
  line-height: 1.3;
}
.assign-popover-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.4rem;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}
.assign-popover-list li[role="option"] {
  display: block;
  width: 100%;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 0.86rem;
  line-height: 1.35;
  border-left: 2px solid transparent;
}
.assign-popover-list li[role="option"]:hover {
  background: rgba(245, 166, 35, 0.1);
}
.assign-popover-list li[role="option"].is-selected {
  border-left-color: var(--amber, #f5a623);
  background: rgba(245, 166, 35, 0.12);
}
.assign-popover-list.is-busy {
  opacity: 0.55;
  pointer-events: none;
}
.assign-row-main {
  display: block;
}
.assign-empty {
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
}

.tech-assign-current {
  flex: 1 1 12rem;
  min-width: 8rem;
}
.tech-assign-label-text {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.15rem;
}
.tech-assign-name {
  font-size: 1.05rem;
  font-weight: 600;
}

body.density-tight .assign-popover-head {
  padding: 0.3rem 0.45rem;
}
body.density-tight .assign-popover-search {
  margin: 0.3rem 0.4rem 0;
  padding: 0.25rem 0.35rem;
  font-size: 0.8rem;
  min-height: 1.55rem;
}
body.density-tight .assign-popover-list li[role="option"] {
  padding: 0.28rem 0.5rem;
  font-size: 0.8rem;
}
body.density-tight .assign-popover-hint {
  margin: 0.2rem 0.45rem 0.1rem;
  font-size: 0.68rem;
}
body.density-tight .tech-assign-name {
  font-size: 0.95rem;
}
body.density-tight button.assign-link.assign-trigger {
  font-size: 0.75em;
}

/* --- 2i Nested job board (command center) --- */
.filter-bar .group-by-label,
.filter-bar .nest-by-label {
  min-width: 9.5rem;
}
.filter-bar .group-by-label select,
.filter-bar .nest-by-label select {
  font-weight: 600;
  border-color: rgba(245, 166, 35, 0.28);
  background: rgba(245, 166, 35, 0.06);
}
.filter-bar .nest-by-label select:disabled {
  opacity: 0.45;
  font-weight: 500;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.job-board-panel-nested .panel-header,
.job-board-panel.job-board-panel-nested .panel-header {
  border-bottom: 1px solid rgba(245, 166, 35, 0.22);
}

.job-board-body {
  padding: 0.65rem 0.75rem 0.85rem;
}
.job-board-panel-nested .job-board-body {
  padding: 0.55rem 0.65rem 0.75rem;
}

.board-nest {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.board-section {
  border-radius: var(--radius);
  border: var(--hairline);
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
  box-shadow: var(--panel-inset);
}

.board-section-l1 {
  border-color: rgba(192, 192, 192, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, transparent 42%),
    rgba(30, 30, 30, 0.55);
}

.board-section-l2 {
  margin: 0.45rem 0.55rem 0.55rem;
  border-radius: var(--radius-sm);
  border-color: rgba(192, 192, 192, 0.14);
  background: rgba(18, 18, 18, 0.45);
}

.board-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(
    100deg,
    rgba(210, 210, 215, 0.08) 0%,
    rgba(36, 36, 36, 0.92) 55%,
    rgba(26, 26, 26, 0.98) 100%
  );
}

.board-section-l1 > .board-section-header {
  padding: 0.85rem 1.05rem;
  border-left: 3px solid rgba(192, 192, 192, 0.45);
}

.board-section-l2 > .board-section-header {
  padding: 0.5rem 0.75rem;
  border-left: 2px solid rgba(130, 155, 185, 0.4);
  background: linear-gradient(
    100deg,
    rgba(130, 155, 185, 0.1) 0%,
    rgba(28, 28, 28, 0.9) 60%
  );
}

.board-section-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.board-section-eyebrow {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  font-weight: 650;
}

.board-section-eyebrow-nest {
  letter-spacing: 0.12em;
  opacity: 0.9;
}

.board-section-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.board-section-l2 .board-section-title {
  font-size: 0.95rem;
  font-weight: 650;
}

.board-section-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.board-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.board-section-count-loud {
  background: rgba(245, 166, 35, 0.28);
  color: var(--amber);
  border-color: rgba(245, 166, 35, 0.4);
}

.board-section-un-chip {
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--amber);
  background: rgba(245, 166, 35, 0.14);
  border: 1px solid rgba(245, 166, 35, 0.28);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-variant-numeric: tabular-nums;
}

.board-section-body {
  padding: 0;
}

.board-section-body .job-board-table {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.board-section-l1 > .board-section-body > .job-board-table thead th {
  background: rgba(0, 0, 0, 0.25);
}

/* Kind accents */
.board-section-kind-state > .board-section-header {
  border-left-color: rgba(160, 160, 150, 0.65);
}
.board-section-kind-tech > .board-section-header {
  border-left-color: rgba(130, 155, 185, 0.7);
}
.board-section-kind-status > .board-section-header {
  border-left-color: rgba(150, 140, 170, 0.7);
}
.board-section-kind-line > .board-section-header {
  border-left-color: rgba(140, 170, 155, 0.7);
}
.board-section-kind-empty > .board-section-header {
  border-left-color: rgba(120, 120, 120, 0.45);
}
.board-section-kind-empty .board-section-title {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Unassigned sections stay LOUD */
.board-section-loud > .board-section-header,
.board-section-kind-unassigned > .board-section-header {
  border-left-color: var(--amber);
  background: linear-gradient(
    100deg,
    rgba(245, 166, 35, 0.18) 0%,
    rgba(40, 32, 18, 0.95) 48%,
    rgba(26, 26, 26, 0.98) 100%
  );
  box-shadow: inset 0 1px 0 rgba(245, 166, 35, 0.12);
}
.board-section-loud .board-section-title,
.board-section-kind-unassigned .board-section-title {
  color: var(--amber);
}
.board-section-loud .board-section-eyebrow,
.board-section-kind-unassigned .board-section-eyebrow {
  color: rgba(245, 166, 35, 0.85);
}

/* Payables unpaid buckets — attention without stealing Unassigned amber monopoly */
.board-section-kind-unpaid > .board-section-header {
  border-left-color: rgba(232, 168, 96, 0.85);
  background: linear-gradient(
    100deg,
    rgba(232, 168, 96, 0.12) 0%,
    rgba(36, 28, 20, 0.95) 48%,
    rgba(26, 26, 26, 0.98) 100%
  );
}
.board-section-kind-unpaid .board-section-title {
  color: rgba(232, 168, 96, 0.95);
}
.board-section-kind-unpaid .board-section-eyebrow {
  color: rgba(232, 168, 96, 0.8);
}

body.density-comfortable .board-nest {
  gap: 1.05rem;
}
body.density-comfortable .board-section-l1 > .board-section-header {
  padding: 0.95rem 1.15rem;
}
body.density-comfortable .board-section-title {
  font-size: 1.2rem;
}
body.density-comfortable .board-section-l2 {
  margin: 0.55rem 0.7rem 0.7rem;
}
body.density-comfortable .job-board-body {
  padding: 0.85rem 1rem 1.05rem;
}

body.density-tight .board-nest {
  gap: 0.45rem;
}
body.density-tight .board-section-l1 > .board-section-header {
  padding: 0.45rem 0.65rem;
  border-left-width: 2px;
}
body.density-tight .board-section-l2 {
  margin: 0.25rem 0.35rem 0.35rem;
}
body.density-tight .board-section-l2 > .board-section-header {
  padding: 0.32rem 0.5rem;
}
body.density-tight .board-section-title {
  font-size: 0.92rem;
}
body.density-tight .board-section-l2 .board-section-title {
  font-size: 0.82rem;
}
body.density-tight .board-section-eyebrow {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
}
body.density-tight .board-section-count {
  min-width: 1.45rem;
  padding: 0.08rem 0.4rem;
  font-size: 0.68rem;
}
body.density-tight .board-section-un-chip {
  font-size: 0.62rem;
  padding: 0.06rem 0.35rem;
}
body.density-tight .job-board-body {
  padding: 0.35rem 0.4rem 0.45rem;
}
body.density-tight .filter-bar .group-by-label,
body.density-tight .filter-bar .nest-by-label {
  min-width: 8rem;
}

/* --- 2i-i / 2i-ii Command bar: nest chips + Narrow latch --- */
.board-command {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: -0.25rem 0 1rem;
  padding: 0.65rem 0.75rem 0.7rem;
  border-radius: var(--radius);
  border: var(--hairline);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 55%),
    rgba(28, 28, 28, 0.72);
  box-shadow: var(--panel-inset);
  border-color: rgba(192, 192, 192, 0.18);
}
.board-command-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}
.board-command-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(192, 192, 192, 0.75);
  margin-right: 0.15rem;
}
.board-command-nest {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.board-command-lenses {
  gap: 0.4rem;
}
.board-latches-inline {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nest-path {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  flex: 1 1 auto;
  min-width: 12rem;
}
.nest-path-empty {
  font-size: 0.8rem;
  margin-right: 0.25rem;
}
.nest-path-sep {
  color: rgba(245, 166, 35, 0.55);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0 0.1rem;
}
.nest-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.22rem 0.35rem 0.22rem 0.28rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 166, 35, 0.32);
  background: rgba(245, 166, 35, 0.1);
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text);
}
.nest-chip-label {
  padding: 0 0.2rem;
  white-space: nowrap;
}
.nest-chip-x,
.nest-chip-move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(220, 220, 220, 0.75);
  font-size: 0.85rem;
  line-height: 1;
}
.nest-chip-x:hover,
.nest-chip-move:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--amber);
  text-decoration: none;
}
.nest-chip-move-disabled {
  opacity: 0.25;
  pointer-events: none;
}
.nest-add {
  position: relative;
  display: inline-block;
}
.nest-add-btn {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  border: 1px dashed rgba(245, 166, 35, 0.45);
  background: rgba(245, 166, 35, 0.06);
  color: var(--amber);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}
.nest-add-btn::-webkit-details-marker { display: none; }
.nest-add-btn::marker { content: ''; }
.nest-add[open] .nest-add-btn {
  border-style: solid;
  background: rgba(245, 166, 35, 0.16);
}
.nest-add-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.3rem);
  left: 0;
  min-width: 9.5rem;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  border: var(--hairline);
  background: rgba(22, 22, 22, 0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.nest-add-option {
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 550;
}
.nest-add-option:hover {
  background: rgba(245, 166, 35, 0.12);
  color: var(--amber);
  text-decoration: none;
}

.nest-presets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-left: auto;
}
.nest-preset {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(160, 175, 195, 0.28);
  color: rgba(180, 190, 205, 0.9);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
.nest-preset:hover {
  border-color: rgba(245, 166, 35, 0.4);
  color: var(--text);
  text-decoration: none;
}
.nest-preset.active {
  border-color: rgba(245, 166, 35, 0.5);
  color: var(--amber);
  background: rgba(245, 166, 35, 0.1);
}

.narrow-latch {
  position: relative;
  margin-left: auto;
}
.narrow-latch-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.narrow-latch-summary::-webkit-details-marker { display: none; }
.narrow-latch-summary::marker { content: ''; }
.narrow-latch[open] > .narrow-latch-summary {
  border-color: rgba(148, 168, 190, 0.45);
  color: #b7c6d8;
  background: rgba(148, 168, 190, 0.12);
}
.narrow-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(148, 168, 190, 0.28);
  color: #c5d2e2;
}
.narrow-panel {
  position: absolute;
  z-index: 35;
  right: 0;
  top: calc(100% + 0.4rem);
  width: min(52rem, calc(100vw - 2.5rem));
  padding: 0.65rem 0.75rem 0.75rem;
  border-radius: var(--radius);
  border: var(--hairline);
  background: rgba(20, 20, 20, 0.98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.narrow-hint {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
}
.narrow-hint-dedupe {
  margin-top: 0.5rem;
}
.filter-bar-narrow {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.board-section-twist {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(200, 200, 205, 0.7);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.board-section-header {
  cursor: pointer;
}
.board-section.is-collapsed > .board-section-header .board-section-twist {
  transform: rotate(-90deg);
}
.board-section.is-collapsed > .board-section-body {
  display: none;
}

/* First-nest section drag-reorder (Silver Disk) */
.board-section-drag {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.5rem;
  margin: 0 0.15rem 0 0;
  padding: 0;
  border: 1px solid rgba(192, 192, 192, 0.22);
  border-radius: 6px;
  background: linear-gradient(
    180deg,
    rgba(70, 72, 76, 0.95) 0%,
    rgba(36, 36, 38, 0.98) 100%
  );
  color: rgba(180, 182, 188, 0.85);
  font-size: 0.62rem;
  letter-spacing: -0.08em;
  line-height: 1.45rem;
  cursor: grab;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  user-select: none;
  -webkit-user-select: none;
}
.board-section-drag:hover {
  border-color: rgba(245, 166, 35, 0.45);
  color: rgba(245, 166, 35, 0.9);
}
.board-section-drag:active {
  cursor: grabbing;
}
.board-section-l1 > .board-section-header {
  gap: 0.55rem;
}
.board-section.is-dragging {
  opacity: 0.45;
  border-color: rgba(245, 166, 35, 0.35);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.2);
}
.board-section.is-drag-over {
  border-color: rgba(192, 192, 192, 0.55);
  box-shadow:
    0 -2px 0 0 rgba(245, 166, 35, 0.65),
    var(--panel-inset);
}
.board-nest[data-section-reorder] > .board-section[data-section-key] {
  transition: box-shadow 0.12s ease, opacity 0.12s ease, border-color 0.12s ease;
}
body.density-tight .board-section-drag {
  width: 1.15rem;
  height: 1.25rem;
  font-size: 0.55rem;
  line-height: 1.2rem;
  margin-right: 0.05rem;
}

.board-section-l3 {
  margin: 0.35rem 0.45rem 0.45rem;
  border-radius: var(--radius-sm);
  border-color: rgba(192, 192, 192, 0.1);
  background: rgba(12, 12, 12, 0.4);
}
.board-section-l3 > .board-section-header {
  padding: 0.4rem 0.65rem;
  border-left: 2px solid rgba(160, 140, 100, 0.35);
  background: linear-gradient(
    100deg,
    rgba(180, 170, 150, 0.06) 0%,
    rgba(28, 28, 28, 0.92) 60%,
    rgba(22, 22, 22, 0.98) 100%
  );
}
.board-section-l3 .board-section-title {
  font-size: 0.88rem;
}

body.density-tight .board-command {
  padding: 0.4rem 0.5rem 0.45rem;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
body.density-tight .board-command-nest {
  padding-bottom: 0.3rem;
}
body.density-tight .nest-chip {
  font-size: 0.72rem;
  padding: 0.14rem 0.28rem 0.14rem 0.2rem;
}
body.density-tight .nest-preset {
  font-size: 0.66rem;
  padding: 0.14rem 0.42rem;
}
body.density-tight .nest-add-btn {
  width: 1.45rem;
  height: 1.45rem;
  font-size: 0.95rem;
}
body.density-tight .narrow-panel {
  padding: 0.45rem 0.55rem 0.55rem;
}
body.density-tight .board-section-twist {
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.65rem;
}
body.density-tight .board-section-l3 > .board-section-header {
  padding: 0.28rem 0.45rem;
}
body.density-tight .board-section-l3 .board-section-title {
  font-size: 0.8rem;
}


/* --- v1.1.14 Jobs board-only chrome + payables --- */
.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.page-title-row h1 {
  margin: 0 0 0.25rem;
}
.page-title-row .subtitle {
  margin: 0;
}
.page-title-actions {
  flex-shrink: 0;
  padding-top: 0.15rem;
}
.paid-inline-form,
.paid-inline-form {
  display: inline;
}
.btn-link.paid-mark,
.btn-link.paid-clear,
button.btn-link {
  background: none;
  border: none;
  color: var(--accent, #c9a227);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  padding: 0;
  text-decoration: underline;
}
.invoice-email-note {
  margin: 0.35rem 0 1rem;
  font-size: 0.85rem;
}
body.density-tight .page-title-row {
  margin-bottom: 0.45rem;
}


/* —— Ops pulse (Home dashboard) —— */
.ops-pulse {
  margin: 1.25rem 0 1.5rem;
}
.ops-pulse-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}
.ops-pulse-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.ops-pulse-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 960px) {
  .ops-pulse-grid { grid-template-columns: 1fr; }
}
.ops-pulse-card .ops-pulse-body {
  padding: 1rem 1.15rem 1.15rem;
}
.pulse-donut-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.pulse-donut-total {
  fill: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
  font-family: var(--font);
}
.pulse-ring { transition: stroke 0.2s ease; }
.pulse-legend {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1;
  min-width: 120px;
}
.pulse-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.pulse-legend-item:hover { color: var(--text); text-decoration: underline; }
.pulse-legend-item strong {
  margin-left: auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.pulse-swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  flex-shrink: 0;
}
.pulse-hbar-wrap { margin-top: 0.85rem; }
.pulse-hbar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--panel-mid);
  border: 1px solid var(--border);
}
.pulse-hbar-seg { display: block; height: 100%; min-width: 2px; }
.pulse-hbar-empty { flex: 1; background: var(--border); }
.pulse-note { margin: 0 0 0.75rem; font-size: 0.8rem; }
.pulse-footer { margin: 0.85rem 0 0; font-size: 0.82rem; }
.pulse-dual { display: flex; flex-direction: column; gap: 0.85rem; }
.pulse-dual-row { display: flex; flex-direction: column; gap: 0.28rem; }
.pulse-dual-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.pulse-dual-tracks { display: flex; flex-direction: column; gap: 0.22rem; }
.pulse-dual-track {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 1.15rem;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.pulse-dual-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 3px 0 0 3px;
}
.pulse-dual-fill.is-steel { background: #7a9bb8; }
.pulse-dual-fill.is-attention { background: var(--amber); }
.pulse-dual-n {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  padding-right: 0.4rem;
}
.pulse-dual-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.pulse-dual-legend .is-attention-text { color: var(--amber); }
.pulse-aging-total {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}
.pulse-aging {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 0.75rem;
  min-height: 100px;
  padding: 0.25rem 0 0;
}
.pulse-aging-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
}
.pulse-aging-bar {
  width: 100%;
  max-width: 48px;
  border-radius: 4px 4px 0 0;
  background: #7a9bb8;
  border: 1px solid var(--border);
  border-bottom: none;
}
.pulse-aging-bar.is-attention {
  background: var(--amber);
  border-color: var(--amber-dark);
}
.pulse-aging-n {
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pulse-aging-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
}
body.density-tight .ops-pulse { margin: 0.75rem 0 1rem; }
body.density-tight .ops-pulse-card .ops-pulse-body { padding: 0.65rem 0.85rem 0.85rem; }
