/* Data Integrity Tool — table-first workbench */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: #1e293b;
  background: #f1f5f9;
  min-height: 100vh;
}
.dit-top {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #115e59 100%);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.dit-top--slim {
  padding: 8px 20px;
}
.dit-top-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.dit-top-meta {
  font-size: 11px;
  opacity: 0.95;
  text-align: right;
}
.dit-panels {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dit-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
/* noUiSlider handles extend above track; avoid clipping in Filter & View */
.dit-panel.dit-panel--filters {
  overflow: visible;
}
.dit-panel > summary.dit-panel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdfa 100%);
  border-bottom: 1px solid #a7f3d0;
  user-select: none;
}
.dit-panel > summary.dit-panel-summary::-webkit-details-marker {
  display: none;
}
.dit-panel-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 800;
  color: #0f766e;
  transition: transform 0.18s ease;
}
.dit-panel-chevron::before {
  content: "▸";
}
.dit-panel[open] > summary.dit-panel-summary .dit-panel-chevron {
  transform: rotate(90deg);
}
.dit-panel-summary-title {
  letter-spacing: 0.02em;
}
.dit-panel-body {
  padding: 14px 16px 12px;
}
.dit-panel-section {
  margin-bottom: 16px;
}
.dit-panel-section:last-of-type {
  margin-bottom: 12px;
}
.dit-panel-section-head {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 8px;
}
.dit-panel-section-head--flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
}
.dit-panel-section-head--flags .dit-open-flag-settings {
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
}
.dit-panel-section-head-text {
  display: inline-block;
}
.dit-panel-section-row--wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-end;
}
.dit-filter-group--in-panel.dit-filter-group--bill {
  min-width: 220px;
  flex: 1 1 200px;
}
.dit-filter-group--in-panel .dit-filter-group-title {
  margin-bottom: 4px;
}
.dit-filter-group--panel-metrics {
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}
.dit-panel-flags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-end;
  padding: 10px 12px;
  background: linear-gradient(180deg, #faf5ff 0%, #f5f3ff 100%);
  border: 1px solid #ddd6fe;
  border-radius: 8px;
}
.dit-field--focus-rule {
  flex: 1 1 360px;
  min-width: 280px;
}
.dit-panel-flags-row--issue {
  margin-top: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
}
.dit-panel-footer {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}
.dit-panel-footer-actions {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.dit-panel-save-hint {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
  flex: 1 1 200px;
}
.dit-panel-footer .dit-summary {
  margin: 0;
  border-radius: 8px;
}
.dit-bulk-panel-intro {
  margin: 0 0 12px;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}
.dit-bulk-panel-intro code {
  font-size: 11px;
}
.dit-bulk-global-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.dit-panel--bulk .dit-bulk {
  margin-top: 0;
}
.dit-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}
.dit-filter-group--metrics {
  flex: 1 1 auto;
  min-width: min(100%, 520px);
  flex-direction: row;
  flex-wrap: wrap;
}
.dit-filter-group--metrics .dit-field--inline-filter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 118px;
}
.dit-filter-group--metrics .dit-field--inline-filter label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}
.dit-filter-group--metrics .dit-field--inline-filter select {
  min-width: 0;
}
.dit-filter-group--metrics .dit-filter-group-title {
  flex: 1 0 100%;
}
.dit-filter-group--bill {
  min-width: 200px;
}
.dit-filter-group--staff {
  flex: 0 1 200px;
  max-width: 220px;
  flex-direction: column;
  align-items: stretch;
}
.dit-filter-group-title {
  display: block;
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 2px;
}
.dit-num-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 168px;
}
.dit-num-filter > label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.dit-num-filter-op {
  min-width: 140px !important;
  max-width: 180px;
}
.dit-num-filter-inputs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.dit-num-filter-val--first {
  flex: 1 1 72px;
  min-width: 64px !important;
  max-width: none !important;
  width: auto !important;
}
.dit-num-filter-val--second {
  flex: 0 0 72px;
  min-width: 60px !important;
  max-width: 88px !important;
  width: 72px !important;
}
.dit-num-filter-between-slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 0;
  min-width: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-width 0.12s ease, opacity 0.12s ease;
}
.dit-num-filter--between .dit-num-filter-between-slot {
  flex: 0 0 auto;
  max-width: 200px;
  min-width: 0;
  opacity: 1;
  pointer-events: auto;
}
.dit-num-filter-val {
  min-width: 64px !important;
}
.dit-num-filter-sep {
  font-size: 11px;
  color: #64748b;
  user-select: none;
  white-space: nowrap;
}
.dit-panel-numbers-row {
  align-items: flex-start;
}
.dit-field--num {
  flex: 0 1 212px;
  min-width: min(212px, 100%);
}
.dit-field.dit-filter-active > label {
  color: #0f766e;
}
.dit-field.dit-filter-active input:not([type="checkbox"]),
.dit-field.dit-filter-active select,
.dit-field.dit-filter-active .dit-staff-dd-toggle {
  border-color: #5eead4;
  background-color: #f0fdfa;
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.2);
}
.dit-field--flag label {
  color: #4c1d95;
}
.dit-field--flag select {
  min-width: 120px !important;
  background: #fff;
}
.dit-staff-hint {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}
.dit-staff-dd {
  position: relative;
  width: 100%;
}
.dit-staff-dd-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
  text-align: left;
  min-height: 34px;
}
.dit-staff-dd-toggle:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.dit-staff-dd-toggle:focus {
  outline: 2px solid #0d9488;
  outline-offset: 1px;
}
#dit-staff-dd-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dit-staff-dd-panel {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: auto;
  width: min(440px, 92vw);
  min-width: 300px;
  z-index: 80;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  padding: 4px 0;
}
.dit-staff-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 8px 6px;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.dit-staff-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 12px;
}
.dit-staff-row label {
  margin: 0;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #1e293b;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.dit-staff-row input {
  min-width: auto !important;
  flex-shrink: 0;
}
.dit-field-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-end;
}
.dit-field-inline input {
  flex: 1 1 100px;
  min-width: 100px;
}
.dit-field-inline select {
  min-width: 96px;
}
.dit-field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 4px;
}
.dit-field input, .dit-field select {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  min-width: 140px;
}
.dit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  align-items: flex-end;
}
button.dit-btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #0d9488;
  color: #fff;
}
button.dit-btn:hover { background: #0f766e; }
button.dit-btn.secondary { background: #e2e8f0; color: #334155; }
button.dit-btn.secondary:hover { background: #cbd5e1; }
button.dit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.dit-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 20px;
  background: #ecfdf5;
  border-bottom: 1px solid #a7f3d0;
  font-size: 12px;
}
.dit-summary span { color: #047857; }
.dit-summary strong { color: #065f46; }
.dit-wrap { padding: 12px 20px 40px; overflow: auto; }
.dit-filter-summary {
  margin: 0 0 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
}
.dit-filter-summary strong {
  color: #0f766e;
}
.dit-filter-summary-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  color: #64748b;
}
.dit-sortable {
  cursor: pointer;
  user-select: none;
}
.dit-sortable:hover {
  background: #e2e8f0;
}
.dit-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 20px;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.dit-sum-sortable {
  cursor: pointer;
  user-select: none;
}
.dit-sum-sortable:hover {
  background: #e2e8f0;
}
.dit-summary-table-wrap {
  margin-top: 0;
}
.dit-table-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: auto;
  max-height: calc(100vh - 280px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
table.dit-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dit-grid thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  z-index: 2;
}
.dit-grid tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.dit-grid tbody tr:hover { background: #f8fafc; }
.dit-grid tbody tr.selected { background: #ccfbf1; }
.dit-grid tbody tr.pending-edit { outline: 2px solid #f59e0b; outline-offset: -2px; }

.dit-tbody-filter-stats tr.dit-tr-filter-stats td {
  background: #f1f5f9;
  font-size: 11px;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  padding-top: 4px;
  padding-bottom: 4px;
  font-weight: 600;
}
.dit-tbody-filter-stats tr.dit-tr-filter-stats:hover td {
  background: #f1f5f9;
}
#dit-transaction-table-wrap .dit-tbody-filter-stats tr.dit-tr-filter-stats td.dit-col-group-end {
  border-right: 1px solid #cbd5e1;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.5);
}

/* Right-align numeric measure columns (headers + cells); overrides thead th { text-align: left }. */
.dit-grid thead th.dit-col-num,
.dit-grid tbody td.dit-col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Transaction table: subtle column groups */
#dit-transaction-table-wrap .dit-grid thead th.dit-col-group-end,
#dit-transaction-table-wrap .dit-grid tbody td.dit-col-group-end {
  border-right: 1px solid #cbd5e1;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.6);
}

.dit-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.dit-chip--validity-valid {
  background: #dcfce7;
  color: #166534;
}
.dit-chip--validity-invalid {
  background: #fee2e2;
  color: #991b1b;
}
.dit-chip--validity-unset {
  background: #f1f5f9;
  color: #64748b;
}
.dit-chip--change-yes {
  background: #ffedd5;
  color: #9a3412;
}
.dit-chip--change-no {
  background: #f1f5f9;
  color: #64748b;
}
.dit-chip--discount-yes {
  background: #ede9fe;
  color: #5b21b6;
}
.dit-chip--discount-no {
  background: #f1f5f9;
  color: #64748b;
}
.dit-table-toolbar {
  margin-bottom: 8px;
}
.dit-col-picker-wrap {
  position: relative;
  display: inline-block;
}
.dit-col-picker-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 75;
  min-width: 220px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  padding: 8px 10px;
}
.dit-col-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.dit-col-picker-actions .dit-btn {
  font-size: 0.8rem;
  padding: 4px 8px;
}
.dit-col-picker-group {
  margin-bottom: 10px;
}
.dit-col-picker-group:last-child {
  margin-bottom: 0;
}
.dit-col-picker-group-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 4px 0 6px;
}
.dit-settings-seat-hint {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #64748b;
}
.dit-col-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.dit-col-picker-row label {
  cursor: pointer;
  user-select: none;
}
.dit-issues-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.dit-chip--issue-covers {
  background: #e0e7ff;
  color: #3730a3;
}
.dit-chip--issue-payment {
  background: #fef3c7;
  color: #92400e;
}
.dit-chip--issue-duration {
  background: #dbeafe;
  color: #1e40af;
}
.dit-chip--issue-discount {
  background: #fce7f3;
  color: #9d174d;
}
.dit-chip--issue-service {
  background: #ccfbf1;
  color: #115e59;
}
.dit-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}
.dit-tag.yes { background: #dcfce7; color: #166534; }
.dit-tag.no { background: #fee2e2; color: #991b1b; }
.dit-tag.warn { background: #fef3c7; color: #92400e; }
/* Scope: filtered list + selection (plain-language counts) */
.dit-scope-card {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.dit-scope-line1 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #1e293b;
}
.dit-scope-line1 strong {
  color: #0f766e;
  font-weight: 700;
}
.dit-scope-line2 {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}
.dit-scope-line2 strong {
  color: #334155;
}
.dit-scope-all-on {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
}

/* Status & treatment pills (restrained) */
.dit-pill {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.dit-pill--amber {
  background: #fef3c7;
  color: #92400e;
}
.dit-pill--green {
  background: #dcfce7;
  color: #166534;
}
.dit-pill--red {
  background: #fee2e2;
  color: #991b1b;
}
.dit-pill--muted {
  background: #e2e8f0;
  color: #475569;
}
.dit-pill--neutral {
  background: #f1f5f9;
  color: #64748b;
}
.dit-pill-trt {
  font-weight: 600;
  letter-spacing: 0;
}
.dit-pill-trt--neutral {
  background: #f8fafc;
  color: #64748b;
}
.dit-pill-trt--adjust {
  background: #e0f2fe;
  color: #0369a1;
}
.dit-pill-trt--risk {
  background: #ffe4e6;
  color: #9f1239;
}

/* Subtle row cues (works with .selected) */
.dit-grid tbody tr.dit-row-attn {
  box-shadow: inset 3px 0 0 #f59e0b;
}
.dit-grid tbody tr.dit-row-alert {
  box-shadow: inset 3px 0 0 #e11d48;
}
.dit-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 12px;
  color: #64748b;
}
.dit-pager-gap {
  flex: 1;
  min-width: 8px;
}
.dit-field--inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.dit-field-inline-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  white-space: nowrap;
}
.dit-field--inline select {
  min-width: 72px;
}
.dit-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
}
.dit-drawer-backdrop.open { display: block; }
.dit-settings-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1020;
}
.dit-settings-backdrop.open {
  display: block;
}

.dit-issue-summary-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1024;
}
.dit-issue-summary-backdrop.open {
  display: block;
}
.dit-issue-summary-modal {
  display: none;
  position: fixed;
  z-index: 1025;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, calc(100vw - 28px));
  max-height: min(88vh, 920px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.dit-issue-summary-modal.open {
  display: block;
}
.dit-issue-summary-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e2e8f0;
}
.dit-issue-summary-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}
.dit-issue-summary-lede {
  margin: 0;
  padding: 10px 18px 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}
.dit-issue-summary-scroll {
  padding: 12px 18px 20px;
  max-height: calc(88vh - 120px);
  overflow-y: auto;
}
.dit-issue-summary-subhead {
  margin: 18px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dit-issue-summary-subhead:first-of-type {
  margin-top: 4px;
}
.dit-issue-summary-hint {
  margin: 0 0 10px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}
.dit-issue-summary-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.dit-issue-summary-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dit-issue-summary-grid th,
.dit-issue-summary-grid td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: top;
}
.dit-issue-summary-grid thead th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}
.dit-issue-summary-grid .dit-col-num {
  text-align: right;
  white-space: nowrap;
}
.dit-issue-summary-total th,
.dit-issue-summary-total td {
  border-top: 2px solid #e2e8f0;
  font-weight: 600;
  background: #f8fafc;
}
.dit-issue-summary-empty {
  color: #64748b;
  font-style: italic;
  text-align: center;
  padding: 16px 12px;
}
.dit-table-empty-msg {
  text-align: center;
  padding: 28px 16px;
  color: #64748b;
  font-size: 14px;
}
.dit-rule-code {
  font-size: 11px;
  font-weight: 600;
  color: #4338ca;
  background: #eef2ff;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.dit-rule-code--secondary,
.dit-rule-code--muted {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}
.dit-drawer-flags-audit-v--stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dit-drawer-flags-audit-sub {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 6px;
}
.dit-drawer-rule-hit-list {
  margin: 0;
  padding-left: 1.15rem;
}
.dit-drawer-rule-hit {
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.dit-drawer-rule-hit:last-child {
  margin-bottom: 0;
}
.dit-drawer-rule-hit-label {
  font-size: 12px;
  color: #334155;
  line-height: 1.35;
}
.dit-flag-rule-list--sidecar .dit-flag-rule-li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  list-style: disc;
}
.dit-flag-rule-label {
  font-size: 12px;
  color: #334155;
  line-height: 1.4;
}
.dit-chip--scope {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px dashed #9ca3af;
  font-size: 10px;
  font-weight: 600;
}
.dit-settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 100vw);
  height: 100%;
  background: #fff;
  z-index: 1021;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.14);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  overflow-y: auto;
  padding: 20px 22px 28px;
}
.dit-settings-drawer.open {
  transform: translateX(0);
}
.dit-settings-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.dit-settings-drawer-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}
.dit-settings-section {
  margin-bottom: 24px;
}
.dit-settings-section-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dit-settings-subtitle {
  margin: 20px 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.dit-settings-section-lede {
  margin: 0 0 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.dit-settings-saved-msg {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: #047857;
}
.dit-settings-threshold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 16px;
  margin-bottom: 8px;
}
.dit-settings-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}
.dit-settings-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
}
.dit-flag-rules-dynamic--sidecar {
  max-width: none;
}
.dit-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100vw);
  height: 100%;
  background: #fff;
  z-index: 1001;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  overflow-y: auto;
  padding: 20px;
}
.dit-drawer.open { transform: translateX(0); }
.dit-drawer-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
}
.dit-drawer-persist-chip {
  flex-shrink: 0;
}
.dit-drawer-covers-suggest-text {
  margin: 4px 0 6px;
  font-size: 0.8rem;
  color: var(--dit-muted, #6b7280);
  line-height: 1.35;
}
.dit-drawer-covers-apply {
  margin: 0 0 8px;
  align-self: flex-start;
}

.dit-drawer-fin-sub {
  display: inline;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--dit-muted, #6b7280);
}

.dit-drawer-fin-foot {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
}
.dit-drawer-panel--headed .dit-drawer-panel-title {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 13px;
  font-weight: 650;
  color: #0f172a;
  letter-spacing: 0.01em;
}
.dit-drawer-panel--readonly.dit-drawer-panel--headed .dit-drawer-panel-title {
  border-bottom-color: #e2e8f0;
}
.dit-drawer-panel--editable.dit-drawer-panel--headed .dit-drawer-panel-title {
  border-bottom-color: #86efac;
}
.dit-drawer-panel--diff.dit-drawer-panel--headed .dit-drawer-panel-title {
  border-bottom-color: #e5e7eb;
}
.dit-drawer-panel-body {
  padding-top: 2px;
}
.dit-drawer-dl-sub--muted .dit-drawer-dl-k,
.dit-drawer-dl-sub--muted .dit-drawer-dl-v {
  color: #64748b;
}
.dit-drawer-flags-audit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dit-drawer-flags-audit-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
}
.dit-drawer-flags-audit-k {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  padding-top: 3px;
}
.dit-drawer-flags-audit-v {
  min-width: 0;
}
.dit-drawer-flag-none {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
}
.dit-drawer-staged-strip {
  margin: 0 0 14px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
}
.dit-drawer-section {
  margin-bottom: 18px;
}
.dit-drawer-section-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
}
.dit-drawer-section-lede {
  margin: 0 0 8px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}
.dit-drawer-panel {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
}
.dit-drawer-panel--readonly {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
}
.dit-drawer-panel--editable {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.dit-drawer-panel--diff {
  background: #fafafa;
  border: 1px solid #e5e7eb;
}
.dit-drawer-dl {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dit-drawer-dl-sub {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}
.dit-drawer-dl-row {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 62%);
  gap: 8px 10px;
  align-items: baseline;
}
.dit-drawer-dl-k {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}
.dit-drawer-dl-v {
  font-size: 12px;
  color: #0f172a;
  word-break: break-word;
}
.dit-drawer-details {
  margin-top: 10px;
  font-size: 11px;
  color: #64748b;
}
.dit-drawer-details-sum {
  cursor: pointer;
  font-weight: 600;
  color: #475569;
}
.dit-drawer-details-body {
  margin: 6px 0 0;
  padding: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  word-break: break-word;
}
.dit-drawer-diff-empty {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  font-style: italic;
}
.dit-drawer-diff-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.dit-drawer-diff-list li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}
.dit-drawer-diff-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.dit-drawer-diff-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}
.dit-drawer-diff-arrow {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.dit-drawer-diff-val {
  display: block;
  font-size: 12px;
  color: #0f172a;
}
.dit-drawer-diff-sep {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin: 0 4px;
}
.dit-drawer-diff-before {
  color: #64748b;
}
.dit-drawer-diff-after {
  font-weight: 600;
  color: #0f172a;
}
.dit-drawer-src-hint {
  margin: 0 0 6px;
  font-size: 11px;
  color: #64748b;
}
.dit-drawer-field--editable .dit-drawer-src-hint {
  margin-top: -2px;
}
.dit-drawer-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.dit-drawer-reporting-sum {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.dit-drawer-reporting-inner {
  padding-top: 8px;
}
.dit-drawer-details--nested {
  margin-top: 8px;
}
.dit-form-row { margin-bottom: 12px; }
.dit-form-row label { display: block; font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 4px; }
.dit-form-row input, .dit-form-row select, .dit-form-row textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
}
.dit-form-row textarea { min-height: 72px; resize: vertical; }
.dit-drawer-panel--editable .dit-drawer-panel-body .dit-form-row:last-child {
  margin-bottom: 0;
}
.dit-bulk {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0;
  margin-top: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.dit-bulk-card .dit-bulk-head {
  padding: 10px 14px;
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
  border-bottom: 1px solid #fed7aa;
  border-radius: 10px 10px 0 0;
}
.dit-bulk-card .dit-bulk-head strong {
  display: block;
  font-size: 13px;
  color: #9a3412;
  margin-bottom: 4px;
}
.dit-bulk-sub {
  display: block;
  font-size: 11px;
  color: #78716c;
  line-height: 1.45;
  max-width: 900px;
}
.dit-bulk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 16px;
  padding: 14px;
  align-items: end;
}
.dit-bulk-field label.dit-bulk-apply {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #57534e;
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
}
.dit-bulk-field label.dit-bulk-apply input {
  min-width: auto !important;
  width: auto;
  margin: 0;
  cursor: pointer;
}
.dit-bulk-field .dit-field label {
  margin-bottom: 0;
}
.dit-bulk-field select,
.dit-bulk-field input[type="number"],
.dit-bulk-field input[type="text"] {
  width: 100%;
  min-width: 0 !important;
}
.dit-bulk-actions {
  padding: 0 14px 14px;
}
.dit-chip--takeaway-dine {
  background: #dcfce7;
  color: #166534;
}
.dit-chip--takeaway-yes {
  background: #cffafe;
  color: #0e7490;
}
.dit-chip--takeaway-unknown {
  background: #f1f5f9;
  color: #64748b;
}
.dit-field-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}
.dit-drawer-foot {
  margin: 12px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
}
.dit-msg { padding: 12px 20px; font-size: 12px; }
.dit-msg.err { background: #fef2f2; color: #b91c1c; }
.dit-msg.ok { background: #ecfdf5; color: #047857; }

/* Legacy sub-details (unused in shell; kept for reuse) */
.dit-panel-section--tools {
  margin-bottom: 12px;
}
.dit-sub-details {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fafafa;
  margin-bottom: 8px;
  overflow: hidden;
}
.dit-sub-details:last-child {
  margin-bottom: 0;
}
.dit-sub-details-summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  background: linear-gradient(180deg, #f0fdfa 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  user-select: none;
}
.dit-sub-details-summary::-webkit-details-marker {
  display: none;
}
.dit-sub-details[open] > .dit-sub-details-summary {
  border-bottom-color: #e2e8f0;
}
.dit-sub-details-body {
  padding: 10px 12px 12px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
}
.dit-flag-rules-dynamic {
  max-width: 920px;
}
.dit-flag-rules-tech {
  margin: 0 0 12px;
  color: #64748b;
}
.dit-flag-rules-foot {
  margin: 8px 0 0;
  color: #475569;
  max-width: 920px;
}
.dit-flag-rules-intro {
  margin: 0 0 12px;
  color: #475569;
  font-size: 11px;
}
.dit-flag-cat {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.dit-flag-cat:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.dit-flag-cat-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}
.dit-flag-cat-desc {
  margin: 0 0 8px;
  font-size: 11px;
  color: #64748b;
}
.dit-flag-rule-list {
  margin: 0;
  padding-left: 1.1rem;
}
.dit-flag-rule-list li {
  margin-bottom: 10px;
}
.dit-flag-rule-list li:last-child {
  margin-bottom: 0;
}
.dit-rule-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
.dit-rule-pill--active {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #6ee7b7;
}
.dit-rule-pill--planned {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}
.dit-flag-rule-list code {
  font-size: 10px;
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 3px;
}
.dit-seat-settings-intro {
  margin: 0 0 8px;
  font-size: 11px;
  color: #475569;
}
.dit-seat-table-wrap {
  overflow-x: auto;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}
.dit-settings-drawer .dit-seat-table-wrap {
  max-height: min(420px, 45vh);
}
.dit-seat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dit-seat-table th,
.dit-seat-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}
.dit-seat-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  position: sticky;
  top: 0;
  z-index: 1;
}
.dit-seat-table tr:last-child td {
  border-bottom: none;
}
.dit-seat-site {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: #0f172a;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dit-seat-input {
  width: 100%;
  max-width: 120px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
}
.dit-seat-empty {
  color: #94a3b8;
  font-style: italic;
  text-align: center;
  padding: 12px !important;
}

/* —— Fiscal timeline (aligned with Demand & Spend colours) —— */
.dit-label-muted {
  font-weight: 400;
  color: #94a3b8;
  font-size: 11px;
}
.dit-fiscal-timeline-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px 12px;
  margin-bottom: 12px;
}
.dit-fiscal-timeline-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 8px;
}
.dit-fiscal-timeline-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dit-fiscal-timeline-note {
  font-size: 11px;
  color: #64748b;
}
.dit-fiscal-timeline-fallback {
  margin: 0 0 8px;
  font-size: 12px;
  color: #b45309;
  line-height: 1.45;
}
.dit-timeline-range-row {
  margin-bottom: 4px;
}
.dit-timeline-range-display {
  display: inline-block;
  font-size: 12px;
  color: #334155;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: 600;
}
.dit-timeline-slider-wrap {
  padding: 4px 0 2px;
}
#dit-timeline-slider {
  height: 8px;
  margin: 6px 0 4px;
  border: none;
  background: #e2e8f0;
  border-radius: 4px;
}
#dit-timeline-slider .noUi-connect {
  background: #0f766e;
  border-radius: 4px;
}
#dit-timeline-slider .noUi-handle {
  height: 20px;
  width: 20px;
  top: -7px;
  right: -10px;
  border-radius: 50%;
  background: #0f766e;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  cursor: grab;
}
#dit-timeline-slider .noUi-handle:before,
#dit-timeline-slider .noUi-handle:after {
  display: none;
}
#dit-timeline-slider .noUi-pips {
  display: none;
}
.dit-timeline-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.dit-timeline-preset-btn {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  cursor: pointer;
  line-height: 1.2;
}
.dit-timeline-preset-btn:hover:not(:disabled) {
  border-color: #0f766e;
  color: #0f766e;
  background: #f0fdfa;
}
.dit-timeline-preset-btn.active {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}
.dit-timeline-preset-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.dit-timeline-layers-scroll {
  margin-top: 8px;
  border-radius: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.dit-timeline-layers-inner {
  min-width: 100%;
}
.dit-timeline-layer {
  display: flex;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.dit-tl-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  border-right: 1px solid rgba(255, 255, 255, 0.45);
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 1;
}
.dit-tl-segment:last-child {
  border-right: none;
}
.dit-tl-week {
  min-height: 16px;
}
.dit-tl-week .dit-tl-segment {
  background: #e8f4f0;
  color: #134e4a;
}
.dit-tl-week .dit-tl-segment.dit-tl-in-range {
  background: #0f766e;
  color: #fff;
}
.dit-tl-period {
  min-height: 18px;
}
.dit-tl-period .dit-tl-segment {
  background: #d4e8e0;
  color: #0f766e;
  font-size: 9px;
}
.dit-tl-period .dit-tl-segment.dit-tl-in-range {
  background: #115e59;
  color: #fff;
}
.dit-tl-quarter {
  min-height: 19px;
}
.dit-tl-quarter .dit-tl-segment {
  background: #b8d9cb;
  color: #134e4a;
  font-size: 10px;
}
.dit-tl-quarter .dit-tl-segment.dit-tl-in-range {
  background: #115e59;
  color: #fff;
}
.dit-tl-year {
  min-height: 22px;
}
.dit-tl-year .dit-tl-segment {
  background: #99d0ba;
  color: #042f2e;
  font-size: 11px;
  font-weight: 700;
}
.dit-tl-year .dit-tl-segment.dit-tl-in-range {
  background: #0a3d38;
  color: #fff;
}
