/* Gateway workspace page treatment. Keep the mission shell and map surface
   owned by their existing modules; this file only arranges this page's docks. */
.gateway-workspace {
  --gateway-border: #284354;
  --gateway-border-strong: #345463;
  --gateway-panel: #0d1c28;
  --gateway-panel-raised: #102534;
  --gateway-text: #e7f2f0;
  --gateway-muted: #91a8ad;
  --gateway-cyan: #45d8df;
  --gateway-amber: #f4b866;
  background: #08131d;
}

.gateway-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 24px !important;
}

.gateway-hero {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 420px);
  align-items: end;
  gap: 18px;
  padding: 6px 0 10px;
}

.gateway-hero h1 {
  font-size: clamp(28px, 3vw, 40px) !important;
  line-height: 1.05 !important;
}

.gateway-hero .intel-lede {
  margin-top: 8px;
  font-size: 12px;
}

.gateway-query {
  padding: 12px;
}

.gateway-view-nav {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  border: 1px solid var(--gateway-border-strong);
  background: #0b1924;
  scrollbar-width: thin;
}

.gateway-view-nav button {
  min-width: 90px;
  border: 0;
  border-right: 1px solid var(--gateway-border);
  padding: 10px 16px;
  color: var(--gateway-muted);
  background: transparent;
  cursor: pointer;
  font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.gateway-view-nav button:hover,
.gateway-view-nav button[aria-selected="true"] {
  color: var(--gateway-cyan);
  background: #103747;
}

.gateway-view-nav button[aria-selected="true"] {
  box-shadow: inset 0 -2px var(--gateway-cyan);
}

.gateway-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gateway-summary > div {
  min-height: 72px;
  padding: 10px 14px;
}

.gateway-summary strong {
  margin: 6px 0 3px;
  font-size: 20px;
}

.gateway-layout {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr) 312px;
  align-items: start;
  gap: 10px;
}

.gateway-left-column,
.gateway-stage,
.gateway-right-column {
  min-width: 0;
}

.gateway-left-column,
.gateway-right-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.gateway-right-column {
  position: sticky;
  top: 10px;
}

.gateway-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 0;
}

.gateway-card-heading h2 {
  margin: 0;
  color: var(--gateway-text);
  font: 600 16px/1.2 system-ui, sans-serif;
}

.gateway-card-heading > span {
  color: var(--gateway-muted);
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  white-space: nowrap;
}

.gateway-selector-card {
  padding-bottom: 12px;
}

.gateway-select-label {
  display: grid;
  gap: 6px;
  margin: 14px 12px 0;
  color: var(--gateway-muted);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gateway-select-label select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--gateway-border-strong);
  padding: 9px 10px;
  color: var(--gateway-text);
  background: var(--gateway-panel-raised);
  font: 12px system-ui, sans-serif;
}

.gateway-location {
  margin: 10px 12px 0;
  color: var(--gateway-muted);
  font-size: 11px;
}

.gateway-actions-card {
  padding-bottom: 8px;
}

.gateway-actions-card > button {
  display: flex;
  width: calc(100% - 24px);
  align-items: center;
  justify-content: space-between;
  margin: 8px 12px 0;
  border: 1px solid var(--gateway-border-strong);
  padding: 9px 10px;
  color: var(--gateway-text);
  background: var(--gateway-panel-raised);
  cursor: pointer;
  font: 11px system-ui, sans-serif;
  text-align: left;
}

.gateway-actions-card > button:hover {
  border-color: var(--gateway-cyan);
  color: var(--gateway-cyan);
}

.gateway-actions-card > button span {
  color: var(--gateway-cyan);
}

.gateway-left-column .private-import-card {
  margin-top: 0;
}

.gateway-stage > section:not([hidden]) {
  display: block;
}

.gateway-stage .intel-card {
  min-width: 0;
}

.gateway-map-card .intel-card-head,
.gateway-evidence-card .intel-card-head,
.gateway-timeline-card .intel-card-head {
  padding-top: 12px;
}

.gateway-map-card .intel-geographic-surface {
  margin: 10px;
}

.gateway-map-card .intel-globe {
  height: min(61dvh, 720px);
  min-height: 420px;
}

.gateway-map-link {
  margin: 0 12px 8px;
}

.gateway-evidence-card {
  margin-top: 0;
  min-height: 420px;
}

.gateway-evidence-card .intel-graph {
  margin-top: 16px;
}

.gateway-table-secondary,
.gateway-timeline-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.gateway-record-list {
  display: grid;
  gap: 0;
  margin: 12px;
  padding: 0;
  list-style: none;
}

.gateway-record-list li {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--gateway-border);
  padding: 10px 0;
  color: var(--gateway-text);
  font-size: 11px;
}

.gateway-record-list small {
  color: var(--gateway-muted);
  font-size: 9px;
}

.gateway-record-list a,
.gateway-source-list a,
.gateway-available-card .intel-card-head a {
  color: var(--gateway-cyan);
}

.gateway-timeline-card {
  margin-top: 0;
}

.gateway-timeline-secondary {
  align-items: start;
}

/* The shared signal-list rule reserves a leading metadata column. Gateway
 * regulatory rows only contain one content wrapper, so that rule otherwise
 * strands the wrapper in a 66px column and makes titles read vertically. */
.gateway-timeline-secondary .intel-signal-list li {
  grid-template-columns: minmax(0, 1fr);
}

.gateway-timeline-secondary .intel-signal-list li > div {
  min-width: 0;
}

#gateway-panel-table .intel-table-wrap:focus-visible {
  outline: 2px solid var(--gateway-cyan);
  outline-offset: 2px;
}

.gateway-timeline-secondary .intel-signal-card,
.gateway-timeline-secondary .intel-source-card {
  min-height: 0;
}

.gateway-right-column .intel-selected-card {
  padding: 14px;
}

.gateway-right-column .intel-selected-card h2 {
  font-size: 21px;
  line-height: 1.15;
}

.gateway-right-column .intel-facts {
  gap: 10px;
  margin: 20px 0 16px;
}

.gateway-right-column .intel-facts dd {
  font-size: 12px;
}

.gateway-reporting-area {
  margin-top: 18px;
  border-top: 1px solid var(--gateway-border);
  padding-top: 14px;
}

.gateway-reporting-area h3 {
  margin: 0 0 8px;
  color: var(--gateway-text);
  font: 600 14px/1.25 system-ui, sans-serif;
}

.gateway-reporting-area p {
  margin: 0 0 12px;
  color: var(--gateway-muted);
  font-size: 11px;
  line-height: 1.45;
}

.gateway-reporting-area .intel-button {
  margin-bottom: 9px;
}

.gateway-actions-card > .intel-text-link {
  display: block;
  width: fit-content;
  margin-top: 8px;
  line-height: 1.5;
}

.gateway-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.gateway-detail-actions > a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.gateway-detail-actions > .intel-button {
  margin-bottom: 0;
}

.gateway-available-card {
  padding-bottom: 8px;
}

.gateway-source-list {
  display: grid;
  gap: 0;
  margin: 10px 12px 0;
}

.gateway-source-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px;
  border-top: 1px solid var(--gateway-border);
  padding: 10px 0;
  text-decoration: none;
}

.gateway-source-list a:hover strong {
  color: var(--gateway-cyan);
}

.gateway-source-list a span {
  grid-row: span 2;
  border: 1px solid var(--gateway-border-strong);
  padding: 3px 5px;
  color: var(--gateway-muted);
  font-size: 8px;
  letter-spacing: .05em;
  white-space: nowrap;
}

.gateway-source-list a strong {
  color: var(--gateway-text);
  font-size: 11px;
}

.gateway-source-list a small {
  overflow-wrap: anywhere;
  color: var(--gateway-muted);
  font-size: 9px;
}

@media (max-width: 1220px) {
  .gateway-layout {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .gateway-right-column {
    position: static;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  }
}

@media (max-width: 900px) {
  .gateway-hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gateway-layout {
    grid-template-columns: 1fr;
  }

  .gateway-left-column,
  .gateway-right-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gateway-left-column .private-import-card {
    grid-column: 1 / -1;
  }

  .gateway-stage {
    grid-row: 2;
  }

  .gateway-right-column {
    grid-column: auto;
    grid-row: 3;
  }

  .gateway-map-card .intel-globe {
    height: 52dvh;
    min-height: 320px;
  }
}

@media (max-width: 600px) {
  .gateway-main {
    padding: 10px 10px 18px !important;
  }

  .gateway-view-nav button {
    min-width: 78px;
    padding: 9px 12px;
  }

  .gateway-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gateway-summary > div:nth-child(2) {
    border-right: 0;
  }

  .gateway-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--gateway-border);
  }

  .gateway-left-column,
  .gateway-right-column,
  .gateway-table-secondary,
  .gateway-timeline-secondary {
    grid-template-columns: 1fr;
  }

  .gateway-right-column {
    grid-row: auto;
  }

  .gateway-stage {
    grid-row: auto;
  }

  .gateway-map-card .intel-globe {
    height: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gateway-workspace * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Compact operational frame. The map surface remains owned by
   FreightWeaveSurface; this page only changes the surrounding frame and
   positions its existing controls over the map so the geographic work area
   starts in the first viewport. */
.gateway-main {
  gap: 8px;
  padding: 8px 14px 18px !important;
}

.gateway-command-bar {
  display: grid;
  grid-template-columns: minmax(210px, .8fr) minmax(300px, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
}

.gateway-hero {
  display: contents;
}

.gateway-heading {
  min-width: 0;
}

.gateway-heading .intel-kicker,
.gateway-heading .intel-lede {
  display: none;
}

.gateway-heading h1 {
  overflow: hidden;
  margin: 0;
  color: var(--gateway-text);
  font-size: clamp(23px, 2.2vw, 30px) !important;
  line-height: 1 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gateway-query {
  min-width: 0;
  padding: 5px 8px;
}

.gateway-query label {
  margin-bottom: 4px;
  font-size: 9px;
}

.gateway-query > div {
  min-width: 0;
  height: 31px;
}

.gateway-query input {
  min-width: 0;
  padding: 7px 9px;
  font-size: 11px;
}

.gateway-query button {
  padding: 0 12px;
  font-size: 10px;
}

.gateway-query small {
  display: none;
}

.gateway-view-nav {
  min-width: 288px;
  height: 38px;
}

.gateway-view-nav button {
  min-width: 72px;
  padding: 8px 12px;
}

.gateway-summary {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 34px;
  border-top: 1px solid var(--gateway-border);
  border-bottom: 1px solid var(--gateway-border);
}

.gateway-summary > div {
  display: flex;
  min-height: 0;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
}

.gateway-summary span,
.gateway-summary small {
  overflow: hidden;
  color: var(--gateway-muted);
  font-size: 8px;
  letter-spacing: .1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gateway-summary strong {
  flex: none;
  margin: 0;
  font-size: 14px;
  line-height: 1;
}

.gateway-summary small {
  margin-left: auto;
  letter-spacing: .03em;
}

.gateway-layout {
  min-height: calc(100dvh - 150px);
}

.gateway-stage {
  min-width: 0;
}

.gateway-map-card .intel-card-head {
  align-items: center;
  padding: 9px 12px 0;
}

.gateway-map-card .intel-card-head h2 {
  font-size: 16px;
}

.gateway-map-card .intel-card-head .intel-kicker {
  margin-bottom: 4px;
}

.gateway-map-card .intel-geographic-surface {
  position: relative;
  margin: 6px;
}

.gateway-map-card .intel-view-modes {
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 9px;
  padding: 0;
}

.gateway-map-card .intel-mode-switch {
  background: #0b1924e8;
}

.gateway-map-card .intel-mode-switch button {
  padding: 7px 10px;
  font-size: 11px;
}

.gateway-map-card .intel-map-toolbar {
  position: absolute;
  z-index: 3;
  top: 51px;
  right: 9px;
  left: 9px;
  max-height: 58px;
  overflow: auto;
  border: 1px solid var(--gateway-border);
  padding: 6px 8px;
  background: #0b1924e8;
  gap: 4px 9px;
}

.gateway-map-card .intel-map-toolbar label {
  font-size: 10px;
}

.gateway-map-card .intel-globe {
  height: clamp(420px, calc(100dvh - 265px), 720px);
  min-height: 420px;
}

.gateway-map-card .intel-gateway-picker {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 30px;
  left: 8px;
  margin: 0;
  padding: 4px;
  background: #0b1924d9;
}

@media (max-width: 1100px) and (min-width: 901px) {
  .gateway-command-bar {
    grid-template-columns: minmax(180px, .75fr) minmax(250px, 1fr) auto;
  }

  .gateway-view-nav {
    min-width: 272px;
  }
}

@media (max-width: 600px) {
  .gateway-main {
    gap: 7px;
    padding: 8px 10px 18px !important;
  }

  .gateway-command-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .gateway-heading h1 {
    font-size: 24px !important;
  }

  .gateway-query {
    padding: 7px;
  }

  .gateway-query small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gateway-view-nav {
    min-width: 0;
    height: 34px;
  }

  .gateway-view-nav button {
    min-width: 0;
    flex: 1;
    padding: 7px 7px;
    font-size: 9px;
  }

  .gateway-summary {
    min-height: 40px;
  }

  .gateway-summary > div {
    display: grid;
    min-width: 0;
    gap: 2px;
    padding: 5px 6px;
  }

  .gateway-summary span,
  .gateway-summary small {
    margin: 0;
    font-size: 7px;
    line-height: 1.1;
  }

  .gateway-summary strong {
    font-size: 13px;
  }

  .gateway-layout {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 8px;
  }

  .gateway-stage {
    order: 0;
    width: 100%;
  }

  .gateway-left-column {
    order: 1;
  }

  .gateway-right-column {
    order: 2;
  }

  .gateway-map-card .intel-card-head {
    padding: 8px 10px 0;
  }

  .gateway-map-card .intel-card-head h2 {
    font-size: 15px;
  }

  .gateway-map-card .intel-geographic-surface {
    margin: 5px;
  }

  .gateway-map-card .intel-view-modes {
    top: 6px;
    right: 7px;
    left: 7px;
    gap: 5px;
  }

  .gateway-map-card .intel-mode-switch button {
    padding: 6px 7px;
    font-size: 10px;
  }

  .gateway-map-card .intel-map-toolbar {
    top: 44px;
    right: 7px;
    left: 7px;
    max-height: 90px;
    padding: 5px 6px;
    gap: 4px 7px;
  }

  .gateway-map-card .intel-map-toolbar label {
    font-size: 9px;
  }

  .gateway-map-card .intel-globe {
    height: 360px;
    min-height: 300px;
  }

  .gateway-map-card .intel-gateway-picker {
    right: 7px;
    bottom: 28px;
    left: 7px;
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
  }

  .gateway-map-card .intel-gateway-picker button {
    flex: none;
    padding: 6px 8px;
    font-size: 10px;
  }
}
.watchlist-panel__form {
  display: grid;
  grid-template-columns: minmax(110px, .4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
}

.watchlist-panel__form > .watchlist-panel__field {
  min-width: 0;
}

@media (max-width: 640px) {
  .watchlist-panel__form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .watchlist-panel__field--type,
  .watchlist-panel__form > button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .watchlist-panel__form {
    grid-template-columns: minmax(0, 1fr);
  }
}
.saved-investigation-panel {
  --saved-investigation-bg: #0d1d29;
  --saved-investigation-surface: #102534;
  --saved-investigation-surface-soft: rgba(16, 37, 52, .68);
  --saved-investigation-line: #284354;
  --saved-investigation-line-strong: #345463;
  --saved-investigation-text: #e7f2f0;
  --saved-investigation-muted: #a9bdc0;
  --saved-investigation-faint: #78949b;
  --saved-investigation-cyan: #45d8df;
  --saved-investigation-amber: #f2b866;
  width: 100%;
  min-width: 0;
  margin-top: 16px;
  border: 1px solid var(--saved-investigation-line);
  background: var(--saved-investigation-bg);
  color: var(--saved-investigation-text);
  font: 12px/1.5 system-ui, sans-serif;
}

.saved-investigation-panel,
.saved-investigation-panel * {
  box-sizing: border-box;
}

.saved-investigation-panel :focus-visible {
  outline: 2px solid var(--saved-investigation-cyan);
  outline-offset: 3px;
}

.saved-investigation-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--saved-investigation-line);
  padding: 18px 20px 16px;
}

.saved-investigation-panel__kicker {
  margin: 0 0 5px;
  color: var(--saved-investigation-cyan);
  font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
}

.saved-investigation-panel h2,
.saved-investigation-panel h3,
.saved-investigation-panel h4,
.saved-investigation-panel p {
  overflow-wrap: anywhere;
}

.saved-investigation-panel h2 {
  margin: 0;
  color: var(--saved-investigation-text);
  font: 600 18px/1.25 system-ui, sans-serif;
  letter-spacing: -.015em;
}

.saved-investigation-panel__intro {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--saved-investigation-muted);
  font-size: 12px;
}

.saved-investigation-panel__header-actions,
.saved-investigation-panel__detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.saved-investigation-panel__header-actions > span {
  color: var(--saved-investigation-muted);
  font-size: 11px;
  white-space: nowrap;
}

.saved-investigation-panel__button {
  min-height: 38px;
  border: 1px solid var(--saved-investigation-cyan);
  padding: 8px 12px;
  color: #07181f;
  background: var(--saved-investigation-cyan);
  cursor: pointer;
  font: 600 12px/1.2 system-ui, sans-serif;
}

.saved-investigation-panel__button:hover:not(:disabled) {
  background: #8be9eb;
}

.saved-investigation-panel__button--quiet {
  border-color: var(--saved-investigation-line-strong);
  color: var(--saved-investigation-text);
  background: var(--saved-investigation-surface);
}

.saved-investigation-panel__button--quiet:hover:not(:disabled) {
  border-color: var(--saved-investigation-cyan);
  color: var(--saved-investigation-cyan);
  background: var(--saved-investigation-surface);
}

.saved-investigation-panel__button:disabled,
.saved-investigation-panel select:disabled {
  cursor: default;
  opacity: .5;
}

.saved-investigation-panel__message,
.saved-investigation-panel__success,
.saved-investigation-panel__error-line {
  margin: 0;
  padding: 12px 20px;
  color: var(--saved-investigation-muted);
}

.saved-investigation-panel__success {
  border-bottom: 1px solid var(--saved-investigation-line);
  color: #a6e7d0;
}

.saved-investigation-panel__error-line {
  border-bottom: 1px solid var(--saved-investigation-line);
  color: #ffd0ae;
}

.saved-investigation-panel__error {
  margin: 16px 20px;
  border-left: 2px solid var(--saved-investigation-amber);
  padding: 2px 0 2px 12px;
  color: var(--saved-investigation-muted);
}

.saved-investigation-panel__error strong {
  color: var(--saved-investigation-text);
}

.saved-investigation-panel__error p {
  margin: 5px 0 12px;
}

.saved-investigation-panel__create {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  border-bottom: 1px solid var(--saved-investigation-line);
  padding: 16px 20px;
}

.saved-investigation-panel__field {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--saved-investigation-muted);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.saved-investigation-panel select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--saved-investigation-line-strong);
  padding: 8px 10px;
  color: var(--saved-investigation-text);
  background: var(--saved-investigation-surface);
  font: 12px/1.2 system-ui, sans-serif;
  text-transform: none;
}

.saved-investigation-panel__cutoff {
  display: grid;
  min-width: 0;
  gap: 2px;
  border-left: 1px solid var(--saved-investigation-line);
  padding-left: 12px;
}

.saved-investigation-panel__cutoff span,
.saved-investigation-panel__cutoff small {
  color: var(--saved-investigation-faint);
  font-size: 10px;
}

.saved-investigation-panel__cutoff strong {
  color: var(--saved-investigation-text);
  font: 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.saved-investigation-panel__workspace {
  display: grid;
  grid-template-columns: minmax(230px, 310px) minmax(0, 1fr);
  min-width: 0;
}

.saved-investigation-panel__list-column {
  min-width: 0;
  border-right: 1px solid var(--saved-investigation-line);
  padding: 16px;
}

.saved-investigation-panel__subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.saved-investigation-panel h3,
.saved-investigation-panel h4 {
  margin: 0;
  color: var(--saved-investigation-text);
  font-family: system-ui, sans-serif;
}

.saved-investigation-panel h3 {
  font-size: 14px;
}

.saved-investigation-panel h4 {
  margin-bottom: 9px;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.saved-investigation-panel__subhead span {
  color: var(--saved-investigation-faint);
  font-size: 10px;
}

.saved-investigation-panel__list,
.saved-investigation-panel__columns ul,
.saved-investigation-panel__evidence ul,
.saved-investigation-panel__secondary ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.saved-investigation-panel__list {
  border-top: 1px solid var(--saved-investigation-line);
}

.saved-investigation-panel__list li {
  border-bottom: 1px solid var(--saved-investigation-line);
}

.saved-investigation-panel__list button {
  display: grid;
  width: 100%;
  min-height: 62px;
  gap: 4px;
  border: 0;
  padding: 11px 8px;
  color: var(--saved-investigation-text);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.saved-investigation-panel__list button:hover,
.saved-investigation-panel__list button[aria-pressed='true'] {
  background: rgba(69, 216, 223, .08);
}

.saved-investigation-panel__list button strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.saved-investigation-panel__list button small {
  color: var(--saved-investigation-muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.saved-investigation-panel__empty {
  margin: 0 0 14px;
  border: 1px dashed var(--saved-investigation-line);
  padding: 12px;
  color: var(--saved-investigation-muted);
  font-size: 11px;
}

.saved-investigation-panel__list-column > .saved-investigation-panel__button {
  margin-top: 12px;
}

.saved-investigation-panel__detail {
  min-width: 0;
  padding: 18px 20px 24px;
}

.saved-investigation-panel__detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--saved-investigation-line);
  padding-bottom: 13px;
}

.saved-investigation-panel__detail-head p {
  margin: 5px 0 0;
  color: var(--saved-investigation-muted);
  font-size: 11px;
}

.saved-investigation-panel__temporal {
  margin: 13px 0 0;
  color: var(--saved-investigation-cyan);
  font-size: 11px;
}

.saved-investigation-panel__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 22px;
}

.saved-investigation-panel__facts div {
  min-width: 0;
  border-top: 1px solid var(--saved-investigation-line);
  padding-top: 8px;
}

.saved-investigation-panel__facts dt {
  color: var(--saved-investigation-faint);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.saved-investigation-panel__facts dd {
  margin: 4px 0 0;
  color: var(--saved-investigation-text);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.saved-investigation-panel a {
  color: var(--saved-investigation-cyan);
  text-decoration: none;
}

.saved-investigation-panel a:hover {
  text-decoration: underline;
}

.saved-investigation-panel__columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.saved-investigation-panel__columns section,
.saved-investigation-panel__evidence,
.saved-investigation-panel__secondary section {
  min-width: 0;
  border-top: 1px solid var(--saved-investigation-line);
  padding-top: 12px;
}

.saved-investigation-panel__columns li {
  position: relative;
  margin-top: 8px;
  padding-left: 12px;
  color: var(--saved-investigation-muted);
  font-size: 11px;
}

.saved-investigation-panel__columns li::before {
  position: absolute;
  top: .65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--saved-investigation-cyan);
  content: '';
}

.saved-investigation-panel__unknown {
  border-left: 2px solid var(--saved-investigation-amber) !important;
  padding-left: 12px;
}

.saved-investigation-panel__unknown li::before {
  background: var(--saved-investigation-amber);
}

.saved-investigation-panel__evidence {
  margin-top: 20px;
}

.saved-investigation-panel__evidence li,
.saved-investigation-panel__secondary li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--saved-investigation-line);
  padding: 10px 0 0;
}

.saved-investigation-panel__evidence li + li,
.saved-investigation-panel__secondary li + li {
  margin-top: 10px;
}

.saved-investigation-panel__evidence strong,
.saved-investigation-panel__secondary strong {
  display: block;
  color: var(--saved-investigation-text);
  font-size: 11px;
}

.saved-investigation-panel__evidence p {
  margin: 3px 0 0;
  color: var(--saved-investigation-muted);
  font-size: 11px;
}

.saved-investigation-panel__evidence a,
.saved-investigation-panel__secondary a {
  flex: 0 0 auto;
  font-size: 10px;
}

.saved-investigation-panel__secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.saved-investigation-panel__secondary small,
.saved-investigation-panel__secondary span {
  display: block;
  margin-top: 3px;
  color: var(--saved-investigation-muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.saved-investigation-panel__secondary span {
  flex: 0 1 42%;
  margin-top: 0;
  text-align: right;
}

.saved-investigation-panel__note {
  color: var(--saved-investigation-faint);
  font-size: 10px;
}

@media (max-width: 900px) {
  .saved-investigation-panel__create {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .saved-investigation-panel__create > .saved-investigation-panel__button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .saved-investigation-panel__workspace {
    grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  }

  .saved-investigation-panel__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .saved-investigation-panel__columns {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 680px) {
  .saved-investigation-panel__header,
  .saved-investigation-panel__detail-head {
    flex-direction: column;
  }

  .saved-investigation-panel__header-actions,
  .saved-investigation-panel__detail-actions {
    justify-content: flex-start;
  }

  .saved-investigation-panel__workspace {
    display: block;
  }

  .saved-investigation-panel__list-column {
    border-right: 0;
    border-bottom: 1px solid var(--saved-investigation-line);
  }

  .saved-investigation-panel__secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .saved-investigation-panel__header,
  .saved-investigation-panel__create,
  .saved-investigation-panel__list-column,
  .saved-investigation-panel__detail {
    padding-right: 12px;
    padding-left: 12px;
  }

  .saved-investigation-panel__create,
  .saved-investigation-panel__facts {
    grid-template-columns: 1fr;
  }

  .saved-investigation-panel__cutoff {
    border-top: 1px solid var(--saved-investigation-line);
    border-left: 0;
    padding-top: 10px;
    padding-left: 0;
  }

  .saved-investigation-panel__create > .saved-investigation-panel__button {
    width: 100%;
  }

  .saved-investigation-panel__evidence li,
  .saved-investigation-panel__secondary li {
    flex-direction: column;
    gap: 5px;
  }

  .saved-investigation-panel__secondary span {
    text-align: left;
  }
}
.invoice-case-panel {
  --invoice-bg: #08131d;
  --invoice-panel: #0d1c28;
  --invoice-panel-raised: #102534;
  --invoice-line: #284354;
  --invoice-line-strong: #345463;
  --invoice-text: #e7f2f0;
  --invoice-muted: #91a8ad;
  --invoice-cyan: #45d8df;
  --invoice-cyan-soft: rgba(69, 216, 223, .08);
  --invoice-amber: #f4b866;
  --invoice-danger: #f29a8d;
  min-width: 0;
  color: var(--invoice-text);
  background: var(--invoice-bg);
  border: 1px solid var(--invoice-line);
  font-family: system-ui, sans-serif;
}

.invoice-case-panel *,
.invoice-case-panel *::before,
.invoice-case-panel *::after { box-sizing: border-box; }

.invoice-case-panel button,
.invoice-case-panel input { font: inherit; }

.invoice-case-panel h2,
.invoice-case-panel h3,
.invoice-case-panel h4 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.invoice-case-panel button:focus-visible,
.invoice-case-panel input:focus-visible,
.invoice-case-panel label:has(input:focus-visible) {
  outline: 2px solid var(--invoice-cyan);
  outline-offset: 3px;
}

.invoice-case-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--invoice-line);
  padding: 14px 18px 12px;
  background: #0b1924;
}

.invoice-case-header h2,
.invoice-case-detail-header h3,
.invoice-case-correction-header h3,
.invoice-case-placeholder h3,
.invoice-case-section-heading h3 {
  margin: 0;
  color: var(--invoice-text);
  font-weight: 650;
  letter-spacing: -.02em;
}

.invoice-case-header h2 { font-size: 18px; line-height: 1.15; }
.invoice-case-kicker { margin: 0 0 6px; color: var(--invoice-cyan); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.invoice-case-intro { max-width: 720px; margin: 4px 0 0; color: #b5ced4; font-size: 11px; line-height: 1.4; }
.invoice-case-note { max-width: 720px; margin: 8px 0 0; color: var(--invoice-muted); font-size: 11px; line-height: 1.5; }
.invoice-case-actions { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.invoice-case-button,
.invoice-case-load-more,
.invoice-case-save,
.invoice-case-link-button {
  min-height: 32px;
  border: 1px solid var(--invoice-line-strong);
  padding: 7px 10px;
  color: #d9f8f3;
  background: var(--invoice-panel-raised);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.invoice-case-button:hover,
.invoice-case-load-more:hover,
.invoice-case-save:hover,
.invoice-case-link-button:hover { border-color: var(--invoice-cyan); color: var(--invoice-cyan); }
.invoice-case-button-subtle { color: var(--invoice-muted); background: transparent; }
.invoice-case-upload { display: inline-flex; align-items: center; justify-content: center; }
.invoice-case-button:disabled,
.invoice-case-load-more:disabled,
.invoice-case-save:disabled,
.invoice-case-list-items button:disabled { cursor: default; opacity: .48; }
.invoice-case-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.invoice-case-status,
.invoice-case-error,
.invoice-case-auth,
.invoice-case-muted,
.invoice-case-empty,
.invoice-case-placeholder { color: var(--invoice-muted); font-size: 12px; line-height: 1.55; }
.invoice-case-status { margin: 0; border-bottom: 1px solid var(--invoice-line); padding: 10px 22px; color: #b9e9e4; background: var(--invoice-cyan-soft); }
.invoice-case-error { margin: 0; border-left: 2px solid var(--invoice-amber); padding: 10px 14px; color: #d4dedf; }
.invoice-case-error strong { color: var(--invoice-text); }
.invoice-case-error p { margin: 4px 0 10px; }
.invoice-case-auth { margin: 20px; border: 1px solid var(--invoice-line); padding: 18px; }
.invoice-case-empty,
.invoice-case-placeholder { margin: 18px; }
.invoice-case-placeholder h3 { margin-bottom: 8px; font-size: 15px; }
.invoice-case-placeholder p { margin: 0; }
.invoice-case-link-button { min-height: 0; padding: 5px 8px; background: transparent; }

.invoice-case-downloads { border-bottom: 1px solid var(--invoice-line); padding: 7px 12px; }
.invoice-case-downloads .invoice-case-actions { gap: 6px; }

.invoice-case-workspace {
  display: grid;
  min-width: 0;
  grid-template-areas: "list main correction" "draft draft draft";
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) minmax(270px, 330px);
}

.invoice-case-list,
.invoice-case-main,
.invoice-case-correction,
.invoice-case-draft-region { min-width: 0; }
.invoice-case-list { grid-area: list; border-right: 1px solid var(--invoice-line); background: #0a1925; }
.invoice-case-main { grid-area: main; background: var(--invoice-bg); }
.invoice-case-correction { grid-area: correction; border-left: 1px solid var(--invoice-line); background: #0a1925; }
.invoice-case-draft-region { grid-area: draft; grid-column: 1 / -1; border-top: 1px solid var(--invoice-line); background: var(--invoice-bg); }

.invoice-case-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
}
.invoice-case-section-heading h3 { font-size: 14px; }
.invoice-case-section-heading > span { color: var(--invoice-muted); font: 12px ui-monospace, monospace; }
.invoice-case-list-items { display: grid; margin: 0; padding: 0 10px; list-style: none; }
.invoice-case-list-items li { border-top: 1px solid var(--invoice-line); }
.invoice-case-list-items li:last-child { border-bottom: 1px solid var(--invoice-line); }
.invoice-case-list-items button {
  display: grid;
  width: 100%;
  gap: 5px;
  border: 1px solid transparent;
  padding: 12px 10px;
  color: var(--invoice-text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.invoice-case-list-items button:hover,
.invoice-case-list-items button[aria-pressed="true"] { border-color: var(--invoice-cyan); background: var(--invoice-cyan-soft); }
.invoice-case-list-items strong { overflow-wrap: anywhere; font-size: 12px; line-height: 1.35; }
.invoice-case-list-items span { overflow-wrap: anywhere; color: #b5ced4; font-size: 11px; }
.invoice-case-list-items small { color: var(--invoice-muted); font-size: 10px; line-height: 1.35; }
.invoice-case-list > .invoice-case-muted { margin: 10px 14px; }
.invoice-case-list > .invoice-case-error { margin: 10px 14px 16px; }
.invoice-case-load-more { display: block; width: calc(100% - 28px); margin: 14px; }

.invoice-case-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--invoice-line);
  padding: 14px 18px 11px;
}
.invoice-case-detail-header h3 { font-size: 18px; overflow-wrap: anywhere; }
.invoice-case-detail-header p:not(.invoice-case-kicker) { margin: 4px 0 0; color: var(--invoice-muted); font-size: 11px; overflow-wrap: anywhere; }
.invoice-case-facts { display: grid; min-width: 220px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.invoice-case-facts div { min-width: 0; border-top: 1px solid var(--invoice-line); padding-top: 5px; }
.invoice-case-facts dt { color: var(--invoice-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.invoice-case-facts dd { margin: 4px 0 0; color: #d5e4e5; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.invoice-case-missing { display: grid; gap: 4px; margin: 14px 20px 0; border-left: 2px solid var(--invoice-amber); padding-left: 12px; color: #d2dfe0; font-size: 11px; line-height: 1.45; }
.invoice-case-missing p { margin: 0; }
.invoice-case-missing strong { color: var(--invoice-text); }

.invoice-case-table-wrap { width: 100%; overflow-x: auto; padding: 12px 10px 0; }
.invoice-case-table { width: 100%; min-width: 850px; border-collapse: collapse; color: #d8e7e7; font-size: 11px; }
.invoice-case-table th,
.invoice-case-table td { border: 1px solid var(--invoice-line); padding: 8px 8px; vertical-align: top; text-align: left; }
.invoice-case-table thead th { position: sticky; top: 0; z-index: 1; color: #b5ced4; background: #0d1c28; font-size: 10px; font-weight: 700; white-space: nowrap; }
.invoice-case-table tbody tr[aria-selected="true"] { background: rgba(69, 216, 223, .06); }
.invoice-case-table tbody tr:hover { background: rgba(69, 216, 223, .04); }
.invoice-case-table td { max-width: 220px; overflow-wrap: anywhere; line-height: 1.4; }
.invoice-case-table th:first-child { width: 60px; }
.invoice-case-table td:nth-child(3) { white-space: nowrap; }
.invoice-case-row-select { min-width: 32px; border: 1px solid transparent; padding: 3px 6px; color: var(--invoice-cyan); background: transparent; cursor: pointer; font: 700 11px ui-monospace, monospace; text-align: left; }
.invoice-case-row-select[aria-pressed="true"] { border-color: var(--invoice-cyan); background: var(--invoice-cyan-soft); }
.invoice-case-state { color: #b5ced4; white-space: nowrap; }
.invoice-case-state-needs_correction { color: var(--invoice-amber); }
.invoice-case-state-confirmed { color: #89e4b0; }
.invoice-case-state-rejected { color: var(--invoice-danger); }

.invoice-case-totals { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(0, 2fr); gap: 18px; margin-top: 14px; border-top: 1px solid var(--invoice-line); padding: 12px 18px 16px; }
.invoice-case-totals-heading p { margin: 0; color: var(--invoice-muted); font-size: 11px; line-height: 1.45; }
.invoice-case-totals-heading .invoice-case-kicker { margin-bottom: 6px; }
.invoice-case-total-items { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: flex-start; }
.invoice-case-total-items > div { min-width: 115px; border-left: 1px solid var(--invoice-line-strong); padding-left: 14px; }
.invoice-case-total-items span { display: block; color: var(--invoice-muted); font-size: 10px; letter-spacing: .08em; }
.invoice-case-total-items strong { display: block; margin-top: 4px; color: var(--invoice-text); font: 650 20px ui-monospace, monospace; }

.invoice-case-correction-header { border-bottom: 1px solid var(--invoice-line); padding: 12px 14px 10px; }
.invoice-case-correction-header h3 { font-size: 15px; }
.invoice-case-correction-header p:not(.invoice-case-kicker) { margin: 4px 0 0; color: var(--invoice-muted); font-size: 11px; }
.invoice-case-original { border-bottom: 1px solid var(--invoice-line); padding: 10px 14px; }
.invoice-case-original h4,
.invoice-case-correction-form h4 { margin: 0 0 8px; color: var(--invoice-text); font-size: 12px; font-weight: 700; }
.invoice-case-original dl { display: grid; gap: 6px; margin: 0; }
.invoice-case-original dl div { border-top: 1px solid var(--invoice-line); padding-top: 5px; }
.invoice-case-original dt { color: var(--invoice-muted); font-size: 9px; text-transform: uppercase; }
.invoice-case-original dd { margin: 3px 0 0; color: #d5e4e5; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.invoice-case-original > .invoice-case-muted { margin: 0; font-size: 11px; }
.invoice-case-correction-form { display: grid; gap: 8px; padding: 12px 14px 14px; }
.invoice-case-correction-form label { display: grid; gap: 4px; color: #b5ced4; font-size: 10px; font-weight: 700; }
.invoice-case-correction-form input { width: 100%; min-width: 0; border: 1px solid var(--invoice-line-strong); border-radius: 0; padding: 7px 8px; color: var(--invoice-text); background: var(--invoice-panel-raised); font-size: 12px; }
.invoice-case-correction-form input:hover { border-color: #4f7180; }
.invoice-case-form-grid { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.invoice-case-save { width: 100%; border-color: var(--invoice-cyan); color: #06131c; background: var(--invoice-cyan); }
.invoice-case-save:hover { color: #06131c; background: #73e9ed; }
.invoice-case-correction-form .invoice-case-status,
.invoice-case-correction-form .invoice-case-error { border: 0; padding: 0; background: transparent; font-size: 11px; }

@media (max-width: 1180px) {
  .invoice-case-workspace { grid-template-areas: "list main" "list main" "draft draft" "correction correction"; grid-template-columns: minmax(210px, 260px) minmax(0, 1fr); }
  .invoice-case-correction { border-top: 1px solid var(--invoice-line); border-left: 0; }
  .invoice-case-correction-header { padding-top: 16px; }
}

@media (max-width: 820px) {
  .invoice-case-header { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px 16px; }
  .invoice-case-actions { justify-content: flex-start; }
  .invoice-case-workspace { grid-template-areas: "list" "main" "draft" "correction"; grid-template-columns: minmax(0, 1fr); }
  .invoice-case-list { border-right: 0; border-bottom: 1px solid var(--invoice-line); }
  .invoice-case-list-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invoice-case-list-items li { min-width: 0; }
  .invoice-case-detail-header { flex-direction: column; padding: 16px; }
  .invoice-case-facts { width: 100%; min-width: 0; }
  .invoice-case-totals { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px 18px; }
}

@media (max-width: 520px) {
  .invoice-case-intro { font-size: 11px; }
  .invoice-case-actions { width: 100%; }
  .invoice-case-button { flex: 1 1 120px; }
  .invoice-case-list-items { grid-template-columns: 1fr; }
  .invoice-case-facts { grid-template-columns: 1fr; gap: 9px; }
  .invoice-case-table-wrap { padding-right: 8px; padding-left: 8px; }
  .invoice-case-correction-form,
  .invoice-case-original,
  .invoice-case-correction-header { padding-right: 12px; padding-left: 12px; }
  .invoice-case-form-grid { grid-template-columns: 1fr; }
}
.invoice-dispute-draft-editor {
  --draft-bg: #08131d;
  --draft-panel: #0d1c28;
  --draft-raised: #102534;
  --draft-line: #284354;
  --draft-line-strong: #345463;
  --draft-text: #e7f2f0;
  --draft-muted: #91a8ad;
  --draft-cyan: #45d8df;
  --draft-cyan-soft: rgba(69, 216, 223, .08);
  --draft-amber: #f4b866;
  --draft-danger: #f29a8d;
  min-width: 0;
  color: var(--draft-text);
  background: var(--draft-bg);
  border: 1px solid var(--draft-line);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.invoice-dispute-draft-editor *,
.invoice-dispute-draft-editor *::before,
.invoice-dispute-draft-editor *::after { box-sizing: border-box; }

.invoice-dispute-draft-editor button,
.invoice-dispute-draft-editor input,
.invoice-dispute-draft-editor select,
.invoice-dispute-draft-editor textarea { font: inherit; }

.invoice-dispute-draft-editor button:focus-visible,
.invoice-dispute-draft-editor input:focus-visible,
.invoice-dispute-draft-editor select:focus-visible,
.invoice-dispute-draft-editor textarea:focus-visible { outline: 2px solid var(--draft-cyan); outline-offset: 3px; }

.invoice-dispute-draft-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--draft-line);
  padding: 18px 20px 16px;
  background: #0b1924;
}

.invoice-dispute-draft-editor__eyebrow {
  margin: 0 0 6px;
  color: var(--draft-cyan);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.invoice-dispute-draft-editor h2,
.invoice-dispute-draft-editor h3,
.invoice-dispute-draft-editor h4 {
  margin: 0;
  color: var(--draft-text);
  letter-spacing: -.02em;
}
.invoice-dispute-draft-editor h2 { font-size: 24px; line-height: 1.1; }
.invoice-dispute-draft-editor h3 { font-size: 15px; }
.invoice-dispute-draft-editor h4 { font-size: 12px; }

.invoice-dispute-draft-editor__intro,
.invoice-dispute-draft-editor__snapshot span,
.invoice-dispute-draft-editor__snapshot small,
.invoice-dispute-draft-editor__section-heading p,
.invoice-dispute-draft-editor__muted,
.invoice-dispute-draft-editor__saved p { color: var(--draft-muted); }

.invoice-dispute-draft-editor__intro { max-width: 700px; margin: 6px 0 0; font-size: 12px; line-height: 1.45; }
.invoice-dispute-draft-editor__snapshot { display: grid; flex: none; gap: 3px; min-width: 190px; padding-top: 3px; text-align: right; }
.invoice-dispute-draft-editor__snapshot strong { color: var(--draft-text); font-size: 13px; }
.invoice-dispute-draft-editor__snapshot span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-dispute-draft-editor__snapshot small { font-size: 10px; }

.invoice-dispute-draft-editor__auth,
.invoice-dispute-draft-editor__boundary,
.invoice-dispute-draft-editor__warning,
.invoice-dispute-draft-editor__error,
.invoice-dispute-draft-editor__success {
  font-size: 12px;
  line-height: 1.45;
}

.invoice-dispute-draft-editor__auth { margin: 0; border-bottom: 1px solid var(--draft-line); padding: 12px 20px; color: var(--draft-muted); }

.invoice-dispute-draft-editor__layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .78fr);
}

.invoice-dispute-draft-editor__evidence,
.invoice-dispute-draft-editor__draft { min-width: 0; }
.invoice-dispute-draft-editor__evidence { border-right: 1px solid var(--draft-line); background: var(--draft-bg); }
.invoice-dispute-draft-editor__draft { background: #0a1925; }

.invoice-dispute-draft-editor__section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 11px;
}

.invoice-dispute-draft-editor__section-heading p { margin: 4px 0 0; font-size: 11px; line-height: 1.4; }
.invoice-dispute-draft-editor__section-heading > span { flex: none; color: var(--draft-muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }

.invoice-dispute-draft-editor__table-wrap {
  max-height: 620px;
  overflow: auto;
  border-top: 1px solid var(--draft-line);
  border-bottom: 1px solid var(--draft-line);
}

.invoice-dispute-draft-editor__table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 11px;
}

.invoice-dispute-draft-editor__table th,
.invoice-dispute-draft-editor__table td {
  border-right: 1px solid rgba(40, 67, 84, .62);
  border-bottom: 1px solid var(--draft-line);
  padding: 8px 9px;
  color: #c8dcdd;
  text-align: left;
  vertical-align: middle;
}

.invoice-dispute-draft-editor__table th:last-child,
.invoice-dispute-draft-editor__table td:last-child { border-right: 0; }
.invoice-dispute-draft-editor__table thead th { position: sticky; top: 0; z-index: 1; color: var(--draft-muted); background: #0d202d; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.invoice-dispute-draft-editor__table tbody th { width: 52px; color: var(--draft-text); font: 650 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.invoice-dispute-draft-editor__table tbody tr:hover { background: rgba(69, 216, 223, .035); }
.invoice-dispute-draft-editor__table select {
  width: 100%;
  min-width: 112px;
  border: 1px solid var(--draft-line-strong);
  padding: 5px 6px;
  color: var(--draft-text);
  background: var(--draft-panel);
  font-size: 11px;
}

.invoice-dispute-draft-editor__add,
.invoice-dispute-draft-editor__remove,
.invoice-dispute-draft-editor__quiet-button,
.invoice-dispute-draft-editor__saved button,
.invoice-dispute-draft-editor__error button,
.invoice-dispute-draft-editor__warning button,
.invoice-dispute-draft-editor__reread,
.invoice-dispute-draft-editor__save {
  border: 1px solid var(--draft-line-strong);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.invoice-dispute-draft-editor__add { min-width: 58px; padding: 6px 7px; color: #d9f8f3; background: var(--draft-raised); }
.invoice-dispute-draft-editor__add:hover:not(:disabled),
.invoice-dispute-draft-editor__remove:hover,
.invoice-dispute-draft-editor__quiet-button:hover:not(:disabled),
.invoice-dispute-draft-editor__reread:hover:not(:disabled) { border-color: var(--draft-cyan); color: var(--draft-cyan); }
.invoice-dispute-draft-editor__add:disabled,
.invoice-dispute-draft-editor__save:disabled,
.invoice-dispute-draft-editor__quiet-button:disabled,
.invoice-dispute-draft-editor__reread:disabled { cursor: default; opacity: .45; }

.invoice-dispute-draft-editor__selected { padding: 13px 16px 16px; }
.invoice-dispute-draft-editor__selected-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.invoice-dispute-draft-editor__selected-heading span { color: var(--draft-muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.invoice-dispute-draft-editor__selected > .invoice-dispute-draft-editor__muted { margin: 8px 0 0; }
.invoice-dispute-draft-editor__selected ul { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
.invoice-dispute-draft-editor__selected li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--draft-line); padding-top: 7px; color: #c8dcdd; font-size: 11px; line-height: 1.35; }
.invoice-dispute-draft-editor__selected li span { min-width: 0; }
.invoice-dispute-draft-editor__selected li strong { color: var(--draft-text); }
.invoice-dispute-draft-editor__remove { flex: none; border-color: transparent; padding: 3px 0 3px 8px; color: var(--draft-muted); background: transparent; }

.invoice-dispute-draft-editor__draft { padding-bottom: 18px; }
.invoice-dispute-draft-editor__draft > .invoice-dispute-draft-editor__section-heading { border-bottom: 1px solid var(--draft-line); }
.invoice-dispute-draft-editor__quiet-button { padding: 6px 8px; color: var(--draft-muted); background: transparent; }
.invoice-dispute-draft-editor__boundary { margin: 14px 16px 0; border-left: 2px solid var(--draft-cyan); padding: 7px 9px; color: #b7ced1; background: var(--draft-cyan-soft); }
.invoice-dispute-draft-editor__warning { display: grid; gap: 3px; margin: 12px 16px 0; border: 1px solid rgba(244, 184, 102, .55); padding: 9px 10px; color: #dfd4c3; background: rgba(244, 184, 102, .08); }
.invoice-dispute-draft-editor__warning strong { color: var(--draft-amber); }
.invoice-dispute-draft-editor__warning button { justify-self: start; margin-top: 3px; border-color: transparent; padding: 0; color: var(--draft-amber); background: transparent; text-decoration: underline; }

.invoice-dispute-draft-editor__saved { margin: 14px 16px 0; border-top: 1px solid var(--draft-line); padding-top: 12px; }
.invoice-dispute-draft-editor__saved p { margin: 0 0 6px; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.invoice-dispute-draft-editor__saved ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.invoice-dispute-draft-editor__saved button { display: grid; gap: 2px; border-color: var(--draft-line); padding: 7px 8px; color: #c8dcdd; background: var(--draft-panel); text-align: left; }
.invoice-dispute-draft-editor__saved button:hover,
.invoice-dispute-draft-editor__saved button[aria-pressed="true"] { border-color: var(--draft-cyan); color: var(--draft-cyan); }
.invoice-dispute-draft-editor__saved button small { color: var(--draft-muted); font-size: 10px; font-weight: 500; }

.invoice-dispute-draft-editor__muted { margin: 12px 16px; }
.invoice-dispute-draft-editor__error { display: grid; gap: 4px; margin: 12px 16px; border-left: 2px solid var(--draft-amber); padding: 8px 10px; color: #d4dedf; background: rgba(244, 184, 102, .06); }
.invoice-dispute-draft-editor__error strong { color: var(--draft-text); }
.invoice-dispute-draft-editor__error button { justify-self: start; border-color: transparent; padding: 0; color: var(--draft-cyan); background: transparent; text-decoration: underline; }
.invoice-dispute-draft-editor__success { margin: 0; border-left: 2px solid var(--draft-cyan); padding: 8px 10px; color: #b9e9e4; background: var(--draft-cyan-soft); }

.invoice-dispute-draft-editor__form { display: grid; gap: 12px; margin: 14px 16px 0; }
.invoice-dispute-draft-editor__form label { display: grid; gap: 5px; color: #c8dcdd; font-size: 11px; font-weight: 700; }
.invoice-dispute-draft-editor__form input,
.invoice-dispute-draft-editor__form textarea { width: 100%; border: 1px solid var(--draft-line-strong); padding: 9px 10px; color: var(--draft-text); background: var(--draft-panel); font-size: 12px; line-height: 1.4; }
.invoice-dispute-draft-editor__form textarea { min-height: 86px; resize: vertical; }
.invoice-dispute-draft-editor__form input::placeholder,
.invoice-dispute-draft-editor__form textarea::placeholder { color: #6f878d; }
.invoice-dispute-draft-editor__actions { display: grid; gap: 8px; margin-top: 3px; }
.invoice-dispute-draft-editor__save { min-height: 38px; border-color: var(--draft-cyan); color: #062129; background: var(--draft-cyan); font-size: 13px; }
.invoice-dispute-draft-editor__save:hover:not(:disabled) { background: #71e7ea; }
.invoice-dispute-draft-editor__reread { min-height: 34px; color: var(--draft-cyan); background: transparent; }

.invoice-dispute-draft-editor__visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 840px) {
  .invoice-dispute-draft-editor__layout { grid-template-columns: minmax(0, 1fr); }
  .invoice-dispute-draft-editor__evidence { border-right: 0; border-bottom: 1px solid var(--draft-line); }
}

@media (max-width: 520px) {
  .invoice-dispute-draft-editor__header { display: grid; gap: 10px; padding: 15px 14px 13px; }
  .invoice-dispute-draft-editor__snapshot { min-width: 0; padding-top: 0; text-align: left; }
  .invoice-dispute-draft-editor h2 { font-size: 21px; }
  .invoice-dispute-draft-editor__section-heading { padding-left: 13px; padding-right: 13px; }
  .invoice-dispute-draft-editor__selected,
  .invoice-dispute-draft-editor__form { margin-left: 13px; margin-right: 13px; }
  .invoice-dispute-draft-editor__boundary,
  .invoice-dispute-draft-editor__warning,
  .invoice-dispute-draft-editor__error,
  .invoice-dispute-draft-editor__saved { margin-left: 13px; margin-right: 13px; }
  .invoice-dispute-draft-editor__table-wrap { max-height: 430px; }
  .invoice-dispute-draft-editor__table { min-width: 690px; }
}
