/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
@layer theme, base, components, utilities;
@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
      "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}
@layer base {
  *, ::after, ::before, ::backdrop, ::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
  }
  html, :host {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }
  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }
  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }
  b, strong {
    font-weight: bolder;
  }
  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }
  small {
    font-size: 80%;
  }
  sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }
  :-moz-focusring {
    outline: auto;
  }
  progress {
    vertical-align: baseline;
  }
  summary {
    display: list-item;
  }
  ol, ul, menu {
    list-style: none;
  }
  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }
  img, video {
    max-width: 100%;
    height: auto;
  }
  button, input, select, optgroup, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
  }
  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }
  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }
  ::file-selector-button {
    margin-inline-end: 4px;
  }
  ::placeholder {
    opacity: 1;
  }
  @supports (not (-webkit-appearance: -apple-pay-button))  or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentcolor;
      @supports (color: color-mix(in lab, red, red)) {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }
  textarea {
    resize: vertical;
  }
  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }
  ::-webkit-datetime-edit {
    display: inline-flex;
  }
  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }
  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }
  :-moz-ui-invalid {
    box-shadow: none;
  }
  button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
    appearance: button;
  }
  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
    height: auto;
  }
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}
@layer utilities;
:root {
  --navy: #0b3550;
  --navy-2: #0e4963;
  --ink: #162431;
  --muted: #667789;
  --line: #d7e0e8;
  --surface: #ffffff;
  --canvas: #eef3f6;
  --green: #13815a;
  --green-soft: #e7f7f0;
  --red: #b83c43;
  --red-soft: #fff0f1;
  --amber-soft: #fff7e5;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--canvas);
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Calibri, Arial, Helvetica, sans-serif;
  font-size: 14px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  padding: 14px 0;
}
.settings-grid label {
  display: grid;
  gap: 6px;
}
.settings-grid input,.settings-grid textarea,.settings-grid select,.control-panel input {
  min-height: 38px;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
.settings-grid input[type=checkbox] {
  width: auto;
  min-height: auto;
}
.settings-grid .full-width {
  grid-column: 1/-1;
}
.invoice-settings {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.invoice-settings summary {
  cursor: pointer;
  font-weight: bold;
}
.bill-preview {
  width: 100%;
  height: 75vh;
  border: 1px solid var(--line);
  margin-top: 20px;
}
.unassigned {
  padding: 14px;
  background: var(--amber-soft);
  margin-bottom: 14px;
  border-radius: 8px;
}
.status-pill.skipped {
  background: var(--amber-soft);
  color: #715423;
}
@media (max-width:650px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
button, input, select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: .48;
}
.app-shell {
  min-height: 100vh;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px clamp(20px, 4vw, 64px);
  color: #fff;
  background: linear-gradient(112deg, #092d49 0%, #0d4b63 68%, #0b586b 100%);
  box-shadow: 0 8px 24px rgba(7,45,72,.18);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  color: var(--navy);
  background: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.03em;
  box-shadow: inset 0 -3px 0 rgba(34,185,198,.28);
}
.topbar h1 {
  margin: 0 0 3px;
  font-size: clamp(18px, 2vw, 25px);
  letter-spacing: -.02em;
}
.topbar p {
  margin: 0;
  color: #d3e8ef;
  font-size: 13px;
}
.test-badge {
  margin-left: auto;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.workspace {
  width: min(1560px, calc(100% - 24px));
  margin: 0 auto;
  padding: 22px 0 36px;
}
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(10, minmax(90px, 1fr));
  gap: 5px;
  margin: 0 0 20px;
  overflow-x: auto;
}
.workflow-steps span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 112px;
  padding: 8px;
  border: 1px solid #d6e2e7;
  border-radius: 8px;
  color: #506a78;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.workflow-steps b {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: var(--navy-2);
  font-size: 10px;
}
.utility-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 6px;
}
.utility-row h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -.03em;
}
.utility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}
.utility-actions button, .file-button, .period-bar > button, .template-actions button {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #bdd0d8;
  border-radius: 8px;
  color: #315363;
  background: #fff;
  font-weight: 700;
}
.file-button {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.intro-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.eyebrow {
  margin: 0 0 7px;
  color: #168895;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.intro-row h2 {
  margin: 0;
  max-width: 800px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.subcopy {
  max-width: 1050px;
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid #cfe0e4;
  border-radius: 10px;
  background: #f8fcfd;
  color: #55717a;
  font-size: 12px;
}
.privacy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(19,129,90,.12);
}
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr .86fr;
  gap: 14px;
}
.upload-card, .run-card {
  position: relative;
  min-height: 178px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(21,47,68,.045);
}
.upload-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 14px;
  align-items: center;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.upload-card:hover {
  transform: translateY(-1px);
  border-color: #82c8d0;
  box-shadow: 0 10px 24px rgba(21,65,80,.08);
}
.upload-card.has-file {
  border-color: #55a891;
  background: linear-gradient(180deg, #fff 0%, #f5fcf9 100%);
}
.upload-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.upload-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #e9f6f8;
  color: var(--navy-2);
}
.upload-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.upload-number {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #577080;
  background: #edf2f5;
  font-size: 11px;
  font-weight: 800;
}
.upload-title {
  align-self: end;
  font-size: 17px;
  font-weight: 800;
}
.upload-help {
  align-self: start;
  color: var(--muted);
  font-size: 12.5px;
}
.file-pill {
  grid-column: 1 / -1;
  align-self: end;
  display: block;
  max-width: 100%;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px dashed #bad0da;
  border-radius: 9px;
  color: #2f5b6e;
  background: #f7fafb;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.has-file .file-pill {
  border-style: solid;
  border-color: #aed9cc;
  background: #eaf8f2;
  color: #17674d;
}
.run-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(145deg, #0d3955, #0e5868);
}
.run-label {
  margin: 0 0 6px;
  color: #7de1e6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.run-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.run-card p:not(.run-label) {
  margin: 0 0 16px;
  color: #d0e7ed;
  font-size: 12px;
  line-height: 1.45;
}
.month-field {
  display: grid;
  gap: 6px;
  margin: 0 0 7px;
  color: #fff;
  font-weight: 800;
}
.month-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}
.primary-button {
  min-height: 40px;
  padding: 9px 16px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #1b9dac, #127b92);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(9,89,109,.2);
}
.run-card .primary-button {
  color: #0b4052;
  background: #fff;
  box-shadow: none;
}
.status-message {
  min-height: 20px;
  margin: 12px 2px 18px;
  color: #587080;
  font-size: 12px;
}
.template-strip {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.template-strip h3 {
  margin: 0;
  font-size: 18px;
}
.template-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.template-chips span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #d7e5e8;
  border-radius: 8px;
  color: #315365;
  background: #f7fbfc;
  font-size: 11px;
  font-weight: 700;
}
.template-chips svg, .clean-check svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2.2;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.summary-grid button {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
}
.summary-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.summary-grid strong {
  display: block;
  color: var(--navy);
  font-size: 23px;
  letter-spacing: -.03em;
}
.summary-grid .positive {
  border-color: #bfe0d3;
  background: var(--green-soft);
}
.summary-grid .positive strong {
  color: var(--green);
}
.summary-grid .negative {
  border-color: #f1cbce;
  background: var(--red-soft);
}
.summary-grid .negative strong {
  color: var(--red);
}
.summary-grid .amount-card {
  border-color: #c4dce3;
  background: #edf8fa;
}
.period-bar {
  display: grid;
  grid-template-columns: 1.2fr 1fr .7fr auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid #cddce3;
  border-radius: 12px;
  background: #fff;
}
.period-bar div {
  padding-right: 12px;
  border-right: 1px solid #e0e7eb;
}
.period-bar span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10.5px;
}
.period-bar strong {
  color: #213f50;
  font-size: 13px;
}
.generate-button {
  white-space: nowrap;
}
.control-panel, .download-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #cddce3;
  border-radius: 12px;
  background: #fff;
}
.control-panel label {
  display: grid;
  gap: 4px;
  min-width: 210px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.control-panel select {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #c5d4db;
  border-radius: 8px;
  color: #294a5b;
  background: #fff;
}
.control-panel button, .download-bar > button {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #bdd0d8;
  border-radius: 8px;
  color: #315363;
  background: #fff;
  font-weight: 700;
}
.download-bar {
  justify-content: flex-end;
  background: #f8fbfc;
}
.download-bar > .primary-button {
  color: #fff;
  border: 0;
}
.results-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(18,49,69,.04);
}
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
.results-head h3 {
  margin: 0;
  font-size: 18px;
}
.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: #edf2f5;
}
.filter-tabs button {
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  color: #5e7080;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}
.filter-tabs button.active {
  color: #fff;
  background: var(--navy-2);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  padding: 10px 12px;
  color: #5b6e7d;
  background: #f4f7f9;
  font-size: 10.5px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
td {
  padding: 12px;
  border-top: 1px solid #e5eaee;
  color: #344d5d;
  font-size: 12px;
  vertical-align: middle;
}
td strong {
  display: block;
  max-width: 390px;
  color: #1d3444;
  font-size: 12.5px;
}
td small {
  display: block;
  margin-top: 4px;
  color: #80909b;
}
.invoice-number {
  color: var(--navy-2);
  font-weight: 800;
  white-space: nowrap;
}
.total-cell {
  font-weight: 800;
  color: #203f51;
  white-space: nowrap;
}
.status-pill {
  display: inline-flex;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.status-pill.ready {
  color: #116044;
  background: var(--green-soft);
}
.status-pill.error {
  color: #9d3037;
  background: var(--red-soft);
}
.status-pill.template-missing {
  color: #7d5719;
  background: var(--amber-soft);
}
.status-pill.excluded {
  color: #536472;
  background: #edf1f3;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.row-actions button {
  padding: 6px 8px;
  border: 1px solid #b7d6dd;
  border-radius: 7px;
  color: #116a7a;
  background: #f5fbfc;
  font-size: 10px;
  font-weight: 800;
}
.row-actions .details-button {
  color: #596d7c;
  border-color: #d6e0e5;
  background: #fff;
}
.open-row td {
  background: #fbfdfe;
}
.detail-row td {
  padding: 0;
  background: #f8fafb;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  padding: 14px 16px 10px;
}
.detail-grid div {
  padding: 9px 11px;
  border: 1px solid #dde6ea;
  border-radius: 8px;
  background: #fff;
}
.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.detail-grid strong {
  margin-top: 3px;
  font-size: 16px;
}
.issue-list {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 2px 16px 15px;
}
.issue {
  display: grid;
  grid-template-columns: 170px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 11px;
}
.issue.error {
  color: #7f2d33;
  background: var(--red-soft);
}
.issue.warning {
  color: #765116;
  background: var(--amber-soft);
}
.issue strong {
  font-size: 10px;
}
.issue small {
  color: inherit;
  opacity: .75;
}
.clean-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 16px 16px;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 700;
}
.empty-state {
  padding: 40px;
  color: var(--muted);
  text-align: center;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(20px, 4vw, 64px);
  color: #728491;
  background: #e3eaee;
  font-size: 11px;
}
footer span:first-child {
  color: #315363;
  font-weight: 800;
}
.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.template-actions .accent-button {
  color: #fff;
  border-color: #147e91;
  background: #147e91;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 28, 44, .64);
}
.modal {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.modal.wide {
  width: min(1400px, 98vw);
}
.modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  color: #fff;
  background: var(--navy);
}
.modal > header h3 {
  margin: 0;
  font-size: 18px;
}
.modal > header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.14);
  font-size: 24px;
}
.modal-body {
  max-height: calc(90vh - 64px);
  overflow: auto;
  padding: 18px;
}
.template-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.template-list div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.template-list strong, .template-list span {
  display: block;
}
.template-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.mapping-form {
  display: grid;
  gap: 12px;
}
.mapping-form p, .modal-note {
  margin: 0 0 5px;
  color: var(--muted);
  line-height: 1.45;
}
.mapping-form label {
  display: grid;
  gap: 5px;
  color: #355363;
  font-weight: 700;
}
.mapping-form input, .mapping-form select, .edit-table input {
  width: 100%;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid #cbd8de;
  border-radius: 7px;
  background: #fff;
}
.mapping-form small {
  color: var(--muted);
  font-weight: 400;
}
.edit-table {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid var(--line);
}
.edit-table table {
  min-width: 1100px;
}
.edit-table td {
  padding: 5px;
}
.edit-table input {
  min-height: 34px;
  font-size: 12px;
}
.selection-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d7e3e7;
  border-radius: 10px;
  background: #f5f9fa;
}
.selection-toolbar strong {
  color: var(--navy);
  font-size: 15px;
}
.selection-toolbar span {
  flex: 1 1 320px;
  color: var(--muted);
  font-size: 11px;
}
.selection-toolbar button, .preview-grid button {
  padding: 7px 10px;
  border: 1px solid #b9d2da;
  border-radius: 7px;
  color: #176477;
  background: #fff;
  font-weight: 700;
}
.override-row td {
  background: #fff8df;
}
.override-row td:last-child input {
  border-color: #d8aa32;
  background: #fffdf5;
}
.master-table {
  max-height: 67vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.master-table table {
  min-width: 900px;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.preview-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfe;
}
.preview-grid h3 {
  margin: 11px 0 4px;
  font-size: 16px;
}
.preview-grid p {
  margin: 0 0 12px;
  color: var(--muted);
}
.preview-grid dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 0 0 12px;
}
.preview-grid dl div {
  padding: 8px;
  border-radius: 7px;
  background: #fff;
}
.preview-grid dt {
  color: var(--muted);
  font-size: 10px;
}
.preview-grid dd {
  margin: 3px 0 0;
  color: #203f51;
  font-weight: 800;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.modal-actions > button:not(.primary-button) {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
@media (max-width: 1100px) {
  .upload-grid {
    grid-template-columns: 1fr 1fr;
  }
  .run-card {
    grid-column: 1 / -1;
    min-height: 145px;
  }
  .summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .period-bar {
    grid-template-columns: repeat(3, 1fr);
  }
  .generate-button {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .workspace {
    width: min(100% - 22px, 1440px);
    padding-top: 22px;
  }
  .topbar {
    padding-inline: 14px;
  }
  .topbar p {
    display: none;
  }
  .test-badge {
    font-size: 9px;
  }
  .intro-row {
    display: block;
  }
  .utility-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .utility-actions {
    justify-content: flex-start;
  }
  .privacy-note {
    margin-top: 14px;
    width: fit-content;
  }
  .upload-grid {
    grid-template-columns: 1fr;
  }
  .run-card {
    grid-column: auto;
  }
  .template-strip {
    grid-template-columns: 1fr;
  }
  .template-strip {
    align-items: flex-start;
    flex-direction: column;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .period-bar {
    grid-template-columns: 1fr;
  }
  .period-bar div {
    padding-bottom: 8px;
    border-right: 0;
    border-bottom: 1px solid #e0e7eb;
  }
  .results-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .filter-tabs {
    max-width: 100%;
    overflow-x: auto;
  }
  .filter-tabs button {
    white-space: nowrap;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .issue {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .template-list {
    grid-template-columns: 1fr;
  }
  .control-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .control-panel label, .control-panel button {
    width: 100%;
  }
  .download-bar {
    justify-content: stretch;
  }
  .download-bar > button {
    flex: 1 1 100%;
  }
  footer {
    flex-direction: column;
  }
}
.review-note {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
}
.review-note textarea {
  min-height: 64px;
  padding: 10px;
  border: 1px solid #bacbd6;
  border-radius: 7px;
}
.edit-table textarea {
  width: 260px;
  min-height: 70px;
  padding: 8px;
}
.edit-table input:not([type=checkbox]) {
  min-width: 120px;
}
.edit-table table {
  min-width: 1900px;
}
.edit-table td small {
  max-width: 180px;
  color: #a52727;
}
.status-message {
  font-size: 16px;
}
.upload-help,.subcopy,.modal-note {
  font-size: 14px;
}
.workflow-steps {
  flex-wrap: wrap;
}
.workflow-steps span {
  font-size: 14px;
}
.issue {
  font-size: 14px;
}
.file-pill {
  overflow-wrap: anywhere;
}
.error-target {
  outline: 3px solid #d38b00;
  outline-offset: 2px;
  background: #fff4cd;
}
.issue-list button.issue {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.download-progress {
  position: sticky;
  top: 8px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  margin: 16px 0;
  border: 2px solid #156477;
  border-radius: 12px;
  background: #edfaff;
  color: #103e50;
  box-shadow: 0 4px 16px #103e5020;
}
.download-progress div {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
@media (max-width:700px) {
  .download-progress {
    flex-direction: column;
    align-items: flex-start;
  }
  .download-progress div {
    flex-wrap: wrap;
  }
}
.case-totals {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.amount-totals {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}
.validation-totals th, .validation-totals td {
  font-weight: 700;
  background: #edf8fa;
  border-top: 2px solid var(--line);
}
@media (max-width: 700px) {
  .case-totals, .amount-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.esign-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #b5cbd4;
  border-radius: 8px;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
}
.esign-option input {
  width: 18px;
  height: 18px;
  accent-color: #104e63;
}
