:root {
  --bg: #f5f7f8;
  --bg-strong: #e9eef0;
  --panel: #ffffff;
  --panel-soft: #f9fbfb;
  --ink: #101820;
  --muted: #5f6d75;
  --line: #dbe3e6;
  --line-strong: #c7d1d6;
  --accent: #17664d;
  --accent-dark: #0f4736;
  --accent-soft: #e6f2ed;
  --warn: #9a5b12;
  --bad: #b42318;
  --good: #157347;
  --info: #235a97;
  --shadow-sm: 0 1px 2px rgba(16, 24, 32, 0.06);
  --shadow-md: 0 12px 32px rgba(16, 24, 32, 0.08);
  --radius: 8px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,.65), rgba(245,247,248,0) 280px),
    var(--bg);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 50;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-140%);
}
.skip-link:focus { transform: translateY(0); }
.page-loading-indicator {
  position: fixed;
  top: 74px;
  left: 50%;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(15, 71, 54, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent-dark);
  box-shadow: 0 10px 30px rgba(16, 24, 32, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}
.page-loading-indicator.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.page-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(23, 102, 77, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: page-loading-spin 800ms linear infinite;
}
@keyframes page-loading-spin {
  to { transform: rotate(360deg); }
}
.app-shell,
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}
.topbar {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 28px;
  background: #0f241d;
  color: white;
  border-bottom: 3px solid #d7b15a;
}
.brand-block { display: grid; gap: 2px; }
.brand { font-weight: 800; letter-spacing: 0; }
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 6px;
  color: #edf7f2;
}
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.user-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-weight: 700;
}
.supplier-mobile-account {
  display: none;
}
.container { width: min(1240px, calc(100vw - 40px)); min-width: 0; margin: 28px auto 56px; }
.role-admin .container,
.role-finance .container,
.role-finance_manager .container {
  width: min(1440px, calc(100vw - 40px));
}
.page-stack { display: grid; gap: 16px; min-width: 0; }
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.page-heading h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.2;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.panel h1, .panel h2, .panel h3 { margin: 0 0 12px; }
.panel h2 { font-size: 20px; }
.panel h3 { font-size: 16px; }
.muted { color: var(--muted); }
.metric-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metric-card {
  display: grid;
  gap: 6px;
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.metric-card-accent { background: linear-gradient(180deg, #ffffff, #f4faf7); border-color: #cfe1d9; }
.metric-label { color: var(--muted); font-weight: 800; font-size: 13px; }
.metric { font-size: 32px; font-weight: 900; line-height: 1.1; letter-spacing: 0; }
.metric-note { color: var(--muted); font-size: 13px; }
.bill-detail-summary {
  margin-top: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.bill-detail-summary .metric-card {
  min-height: 84px;
  padding: 14px 16px;
  align-content: center;
  box-shadow: none;
}
.bill-detail-summary .metric {
  font-size: 28px;
}
.bill-detail-summary .metric-note {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}
.bill-detail-summary .settlement-summary-card {
  border-color: #b9d9ca;
  background: #f2f8f5;
}
.bill-detail-summary .settlement-summary-card .metric-note {
  color: var(--accent-dark);
  font-size: 14px;
}
.settlement-confirmed-amount {
  color: var(--accent-dark);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.diff-value-alert {
  color: var(--bad);
  font-weight: 900;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 800;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(23, 102, 77, .24);
  outline-offset: 2px;
}
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #edf2ef; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: #e3ebe7; }
.btn.danger { background: #c75245; color: white; }
.btn.danger:hover { background: #9f372d; }
.btn:disabled { cursor: not-allowed; opacity: 0.72; transform: none; }
.btn.compact { min-height: 36px; padding: 7px 12px; }
.search-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
}
.search-bar-wide {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto auto;
}
.search-bar-bills {
  grid-template-columns: minmax(150px, .7fr) minmax(150px, .7fr) minmax(240px, 1.1fr) minmax(240px, 1.1fr) auto auto;
}
.search-bar label {
  display: block;
  margin: 0 0 6px;
  font-weight: 900;
}
.search-bar input,
.search-bar select,
.search-bar textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfdcd6;
  border-radius: 6px;
  padding: 9px 11px;
  font: inherit;
  background: #fff;
}
.search-bar textarea {
  min-height: 96px;
  resize: vertical;
}
.search-batch-panel {
  grid-column: 1 / -1;
}
.table-wrap {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
table { width: 100%; border-collapse: collapse; background: white; }
.data-table th,
.data-table td,
th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}
.role-admin .data-table th,
.role-admin .data-table td,
.role-finance .data-table th,
.role-finance .data-table td {
  white-space: nowrap;
}
.data-table th,
th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf3ef;
  font-weight: 900;
  color: #17211b;
}
.data-table th.menu-layer-open {
  z-index: 130;
}
.data-table tbody tr:hover td { background: #fafcfb; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.supplier-line-detail-table th:nth-child(10),
.supplier-line-detail-table td:nth-child(10) {
  text-align: center;
}
.supplier-line-detail-table td:nth-child(10) .status {
  justify-content: center;
}
.supplier-line-detail-table th:nth-child(11),
.supplier-line-detail-table td:nth-child(11) {
  text-align: center;
}
.table-link { font-weight: 800; }
.history-row-actions { margin: 0; }
.history-row-actions .btn.compact {
  min-height: 30px;
  padding: 5px 9px;
}
.supplier-line-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.supplier-line-detail-heading h2 {
  margin: 0;
}
.supplier-bill-detail-mobile-actions {
  display: none;
}
.supplier-line-detail-actions {
  display: flex;
  justify-content: flex-start;
  padding: 10px 0 0;
}
.supplier-line-add-button .bill-action-symbol {
  display: inline;
}
.supplier-line-edit-form {
  display: inline-flex;
  justify-content: center;
  margin: 0;
}
.supplier-line-edit-form[hidden] {
  display: none;
}
.supplier-line-edit-input {
  display: none;
  width: min(100%, 132px);
  min-height: 30px;
  border: 1px solid #cfdcd6;
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}
.supplier-line-edit-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(21, 125, 90, 0.12);
  outline: 0;
}
.supplier-line-edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
[data-supplier-line-edit-display] {
  cursor: default;
}
.supplier-line-detail-row.is-editing [data-supplier-line-edit-display].is-editing .supplier-line-edit-value {
  display: none;
}
.supplier-line-detail-row.is-editing [data-supplier-line-edit-display].is-editing .supplier-line-edit-input {
  display: inline-block;
}
.supplier-line-detail-row.is-editing .supplier-line-mobile-edit {
  display: none;
}
.supplier-line-edit-confirm-dialog {
  position: relative;
}
.supplier-line-edit-confirm-dialog .modal-close-button {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.inline-link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  user-select: text;
  white-space: nowrap;
}
.inline-link-button:hover,
.inline-link-button:focus-visible {
  text-decoration: underline;
}
.dialog-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.status.PASS { background: #dff3e8; color: var(--good); }
.status.CONFIRMED { background: #dff3e8; color: var(--good); }
.status.FAIL { background: #fde2df; color: var(--bad); }
.status.REVIEW, .status.RUNNING { background: #fff2d6; color: var(--warn); }
.role-supplier .status.REVIEW, .role-supplier .status.RUNNING { background: #fde2df; color: var(--bad); }
.status.SUBMITTED { background: #e3eefc; color: var(--info); }
.status-cell { text-align: center; }
.status-cell .status { justify-content: center; }
.status.MAPPING_SINGLE { background: #e6f2ff; color: #1766a6; }
.status.MAPPING_MULTI { background: #f1e9ff; color: #6f3fb5; }
.status.MAPPING_INACTIVE { background: #eceff3; color: #687481; }
.form-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; }
label { display: grid; gap: 6px; font-weight: 800; color: #2e3a33; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  background: white;
  color: var(--ink);
}
input::placeholder { color: #7a8790; opacity: 1; }
textarea { min-height: 76px; }
.adjust-form {
  display: grid;
  gap: 8px;
  min-width: 220px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.fixed-code,
.fixed-id,
.readonly-value,
.supplier-name-value {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  background: #edf3ef;
  font-weight: 900;
  color: var(--accent-dark);
}
.fixed-id { color: var(--ink); font-weight: 800; }
.readonly-value {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 800;
}
.supplier-name-value {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 900;
}
.state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 900;
}
.state-pill.enabled { background: #eef1f4; color: #24303a; }
.state-pill.disabled { background: #f4ece8; color: #9f372d; }
.page-heading + .message,
.page-heading + .error { margin-top: 0; }
.error,
.message {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-weight: 800;
}
.error { border: 1px solid #f0b4ad; background: #fff0ee; color: var(--bad); }
.message { border: 1px solid #9fd6bb; background: #e8f8ef; color: var(--good); }
.message.is-dismissing {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.line-detail-heading {
  margin-bottom: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.line-status-filter {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.line-status-filter label {
  font-weight: 900;
  color: var(--muted);
}
.line-status-filter select {
  min-height: 36px;
  min-width: 138px;
  border: 1px solid #cfdcd6;
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  font: inherit;
}
.line-status-header-filter {
  display: inline-flex;
  align-items: center;
}
.line-status-dropdown { display: inline-flex; }
.line-status-dropdown-trigger {
  min-height: 32px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  border-radius: 4px;
  padding: 3px 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  box-shadow: none;
  transition: color 160ms var(--ease);
}
.line-status-dropdown-trigger:hover,
.line-status-dropdown-trigger:focus-visible,
.line-status-dropdown.is-open .line-status-dropdown-trigger {
  color: var(--accent-dark);
  outline: none;
}
.line-status-dropdown-menu {
  position: fixed;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 84px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(16, 24, 32, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}
.line-status-dropdown:hover .line-status-dropdown-menu,
.line-status-dropdown.is-open .line-status-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.line-status-dropdown-menu button {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 5px 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: center;
}
.line-status-dropdown-menu button:hover,
.line-status-dropdown-menu button:focus-visible {
  background: #edf3ef;
  outline: none;
}
.line-status-dropdown-menu button.is-selected {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.line-action-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.line-resolution-dialog {
  width: min(480px, calc(100vw - 40px));
}
.line-resolution-dialog form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.line-resolution-dialog label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 900;
}
.line-resolution-dialog select,
.line-resolution-dialog textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.line-resolution-dialog select {
  min-height: 38px;
  padding: 7px 10px;
}
.line-resolution-dialog textarea {
  min-height: 96px;
  padding: 9px 10px;
  resize: vertical;
}
.modal-loading-note {
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
}
.account-table { display: grid; gap: 8px; }
.supplier-account-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.account-name,
.account-main,
.account-actions,
.inline-password-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.account-name {
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
}
.account-title-line,
.account-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.account-meta-line {
  color: var(--muted);
  font-size: 13px;
}
.account-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.account-state.enabled { background: #eef1f4; color: #24303a; }
.account-state.disabled { background: #f4ece8; color: #9f372d; }
.account-role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf7f2;
  color: #17633f;
  font-size: 12px;
  font-weight: 900;
}
.inline-password-form input { width: 150px; min-height: 36px; padding: 7px 9px; }
.empty-row {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: #fbfcfd;
}
.password-panel {
  max-width: 680px;
  margin: 0 auto;
}
.password-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}
.password-input-wrap {
  position: relative;
  display: block;
}
.supplier-home-simple {
  max-width: 760px;
  margin: 0 auto;
}
.supplier-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.supplier-entry-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}
.supplier-entry-card:hover,
.supplier-entry-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(16, 24, 32, 0.08);
  outline: none;
  text-decoration: none;
  transform: translateY(-1px);
}
.supplier-entry-card strong {
  font-size: 22px;
}
.supplier-entry-card span {
  color: var(--muted);
  line-height: 1.6;
}
.supplier-entry-card.primary {
  background: #f2f8f5;
  border-color: #c8ded4;
}
.role-supplier {
  font-size: 16px;
}
.role-supplier .container {
  width: min(1120px, calc(100vw - 48px));
  margin-top: 30px;
}
.role-supplier:has(.supplier-history-page) .container {
  width: min(1380px, calc(100vw - 72px));
}
.role-supplier:has([data-bill-entry-form]) .container {
  width: min(1380px, calc(100vw - 72px));
}
.role-supplier:has(.supplier-bill-detail-page) .container {
  width: min(1380px, calc(100vw - 72px));
}
.role-supplier .panel {
  padding: 24px;
  border-color: #d6e1de;
  border-radius: 10px;
}
.role-supplier .page-heading {
  align-items: center;
}
.role-supplier .page-heading h1 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.15;
}
.role-supplier .page-heading .muted {
  color: #52636d;
  font-size: 16px;
}
.role-supplier .bill-detail-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.role-supplier .bill-detail-summary .metric-card {
  min-height: 96px;
  padding: 14px 12px;
  border-radius: 10px;
  background: #fff;
}
.role-supplier .bill-detail-summary .metric {
  font-size: 26px;
}
.role-supplier .bill-detail-summary .metric-note {
  font-size: 15px;
}
.role-supplier .bill-detail-summary .settlement-summary-card {
  background: #edf7f2;
  border-color: #afd5c5;
}
.role-supplier .bill-detail-summary .settlement-summary-card .metric {
  color: var(--accent-dark);
}
.role-supplier .supplier-history-page .actions {
  justify-content: space-between;
  margin-bottom: 16px;
}
.role-supplier .supplier-history-page .actions h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}
.role-supplier .month-summary-card {
  padding: 14px 16px;
  border-radius: 10px;
}
.role-supplier .supplier-history-table th,
.role-supplier .supplier-line-detail-table th {
  font-size: 13px;
}
.role-supplier .supplier-history-table,
.role-supplier .supplier-line-detail-table {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.role-supplier .supplier-line-detail-table-wrap {
  overflow-x: visible;
}
.role-supplier .supplier-line-detail-table {
  table-layout: fixed;
}
.role-supplier:has(.supplier-bill-detail-page) .panel {
  padding: 28px;
}
.role-supplier:has(.supplier-bill-detail-page) .supplier-line-detail-table-wrap {
  border-radius: 10px;
}
.role-supplier:has(.supplier-bill-detail-page) .supplier-line-detail-table {
  font-size: 16px;
}
.role-supplier .supplier-line-detail-table th,
.role-supplier .supplier-line-detail-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}
.role-supplier .supplier-line-detail-table th:nth-child(1),
.role-supplier .supplier-line-detail-table td:nth-child(1) {
  width: 16%;
}
.role-supplier .supplier-line-detail-table th:nth-child(10),
.role-supplier .supplier-line-detail-table td:nth-child(10) {
  width: 96px;
}
.role-supplier .supplier-line-detail-table th:nth-child(11),
.role-supplier .supplier-line-detail-table td:nth-child(11) {
  width: 96px;
}
.role-supplier .supplier-history-table th,
.role-supplier .supplier-history-table td,
.role-supplier .supplier-line-detail-table th,
.role-supplier .supplier-line-detail-table td {
  padding: 12px 14px;
}
.role-supplier:has(.supplier-bill-detail-page) .supplier-line-detail-table th,
.role-supplier:has(.supplier-bill-detail-page) .supplier-line-detail-table td {
  padding: 14px 16px;
}
.role-supplier .supplier-history-table th:nth-child(2),
.role-supplier .supplier-history-table th:nth-child(3),
.role-supplier .supplier-history-table th:nth-child(8),
.role-supplier .supplier-history-table th:nth-child(9),
.role-supplier .supplier-history-table th:nth-child(10),
.role-supplier .supplier-history-table td:nth-child(2),
.role-supplier .supplier-history-table td:nth-child(3),
.role-supplier .supplier-history-table td:nth-child(8),
.role-supplier .supplier-history-table td:nth-child(9),
.role-supplier .supplier-history-table td:nth-child(10) {
  text-align: center;
}
.role-supplier .supplier-line-detail-table th:nth-child(2),
.role-supplier .supplier-line-detail-table th:nth-child(3),
.role-supplier .supplier-line-detail-table th:nth-child(4),
.role-supplier .supplier-line-detail-table th:nth-child(5),
.role-supplier .supplier-line-detail-table th:nth-child(6),
.role-supplier .supplier-line-detail-table th:nth-child(7),
.role-supplier .supplier-line-detail-table th:nth-child(8),
.role-supplier .supplier-line-detail-table th:nth-child(9),
.role-supplier .supplier-history-table td:nth-child(5),
.role-supplier .supplier-history-table td:nth-child(6),
.role-supplier .supplier-history-table td:nth-child(7),
.role-supplier .supplier-line-detail-table td:nth-child(2),
.role-supplier .supplier-line-detail-table td:nth-child(3),
.role-supplier .supplier-line-detail-table td:nth-child(4),
.role-supplier .supplier-line-detail-table td:nth-child(5),
.role-supplier .supplier-line-detail-table td:nth-child(6),
.role-supplier .supplier-line-detail-table td:nth-child(7),
.role-supplier .supplier-line-detail-table td:nth-child(8),
.role-supplier .supplier-line-detail-table td:nth-child(9) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.role-supplier .supplier-history-table th:nth-child(5),
.role-supplier .supplier-history-table th:nth-child(6),
.role-supplier .supplier-history-table th:nth-child(7) {
  text-align: right;
}
.role-supplier .supplier-line-detail-table th:nth-child(10),
.role-supplier .supplier-line-detail-table td:nth-child(10) {
  text-align: center;
}
.role-supplier .supplier-line-detail-table td:nth-child(10) .status {
  min-width: 62px;
}
.role-supplier .supplier-line-detail-table th:nth-child(11),
.role-supplier .supplier-line-detail-table td:nth-child(11) {
  text-align: center;
}
.role-supplier .history-row-actions .btn.compact {
  min-height: 34px;
  padding: 6px 12px;
}
.month-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}
.month-summary-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.month-summary-card strong {
  color: var(--accent-dark);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.supplier-history-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px)) auto auto;
  align-items: end;
  gap: 12px;
  margin: 14px 0 16px;
}
.supplier-history-filter-month {
  width: min(1000px, 100%);
  grid-template-columns: minmax(200px, 280px) minmax(140px, 220px) auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  box-shadow: var(--shadow-sm);
}
.supplier-history-actions {
  justify-self: end;
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}
.supplier-history-export-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.supplier-history-filter select {
  width: 100%;
  min-height: 44px;
}
@media (min-width: 761px) and (max-width: 1050px) {
  .supplier-history-filter-month { grid-template-columns: 1fr 1fr; }
  .supplier-history-actions { grid-column: 1 / -1; }
}
.supplier-history-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.supplier-history-pagination .btn.disabled {
  cursor: not-allowed;
  opacity: 0.58;
}
.supplier-history-page-indicator {
  color: var(--muted);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.supplier-history-filter label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.supplier-history-filter input[type="date"],
.supplier-history-filter input[type="month"] {
  width: 100%;
}
.month-picker {
  position: relative;
  display: block;
}
.month-picker-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
}
.month-picker-trigger:hover,
.month-picker-trigger:focus-visible,
.month-picker-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  outline: 3px solid rgba(23, 102, 77, .16);
  outline-offset: 1px;
}
.month-picker-icon {
  color: var(--muted);
  font-size: 13px;
}
.month-picker-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 20;
  width: 292px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 32, 0.16);
}
.month-picker-heading,
.month-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.month-picker-heading {
  margin-bottom: 0;
}
.month-picker-heading strong {
  font-size: 16px;
  font-weight: 900;
}
.month-picker-nav,
.month-picker-link,
.month-picker-option,
.month-picker-title,
.month-picker-year-option {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.month-picker-title {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  padding: 0 10px;
  font-weight: 900;
}
.month-picker-nav {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  font-size: 24px;
  line-height: 1;
}
.month-picker-year-list {
  display: grid;
  gap: 3px;
  max-height: 156px;
  overflow-y: auto;
  margin: 0;
  padding: 2px 0 8px;
  border-bottom: 1px solid var(--line);
}
.month-picker-year-option {
  min-height: 30px;
  border-radius: 6px;
  padding: 0 10px;
  font-weight: 800;
  text-align: left;
}
.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.month-picker-option {
  min-height: 36px;
  border-radius: 6px;
  font-weight: 800;
}
.month-picker-nav:hover,
.month-picker-title:hover,
.month-picker-title:focus-visible,
.month-picker-option:hover,
.month-picker-link:hover,
.month-picker-year-option:hover,
.month-picker-year-option:focus-visible,
.month-picker-option:focus-visible {
  background: #edf3ef;
  outline: none;
  text-decoration: none;
}
.month-picker-option.is-selected,
.month-picker-year-option.is-selected {
  background: var(--accent);
  color: #fff;
}
.month-picker-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.month-picker-link {
  min-height: 30px;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--accent-dark);
  font-weight: 800;
}
.bill-entry {
  overflow: hidden;
  padding: 0;
}
.bill-entry-heading {
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(23, 102, 77, 0.08), rgba(255,255,255,0) 48%),
    #fff;
}
.bill-entry-heading h1 {
  margin-bottom: 4px;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.bill-meta-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(180deg, #fbfdfc, #f6faf8);
}
.bill-meta-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.bill-meta-heading > div {
  display: grid;
  gap: 3px;
}
.bill-meta-heading strong {
  font-size: 17px;
  line-height: 1.25;
}
.bill-meta-fields {
  display: flex;
  align-items: start;
  gap: 14px;
  flex-wrap: wrap;
}
.delivery-window-hint {
  margin-left: 10px;
  padding-bottom: 0;
  font-size: 13px;
  color: #b42318;
  font-weight: 800;
  white-space: nowrap;
}
.delivery-date-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.delivery-date-row .date-picker {
  width: 330px;
  max-width: 100%;
}
.bill-meta-panel label {
  display: grid;
  align-items: flex-end;
  gap: 7px;
  min-width: 220px;
  color: var(--ink);
  font-weight: 800;
}
.bill-field-label {
  color: #263731;
  font-size: 14px;
  font-weight: 900;
}
.bill-meta-panel input,
.bill-meta-panel select {
  min-height: 42px;
  border: 1px solid #cfdcd6;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}
.bill-meta-panel select {
  min-width: 220px;
  padding-right: 34px;
  cursor: pointer;
}
.bill-settlement-picker {
  position: relative;
  display: block;
  width: 240px;
  max-width: 100%;
}
.bill-settlement-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.bill-settlement-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid #cfdcd6;
  border-radius: 10px;
  padding: 8px 12px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbfa);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.bill-settlement-trigger:hover,
.bill-settlement-trigger:focus-visible,
.bill-settlement-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  outline: 3px solid rgba(23, 102, 77, .16);
  outline-offset: 1px;
  background: #f3faf6;
  box-shadow: 0 8px 20px rgba(15, 54, 42, 0.08);
}
.bill-settlement-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 65;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #cfdcd6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 32, 0.16);
}
.bill-settlement-options[hidden] {
  display: none;
}
.bill-settlement-option {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
}
.bill-settlement-option:hover,
.bill-settlement-option:focus-visible {
  background: #eef6f2;
  outline: none;
}
.bill-settlement-option.is-selected {
  background: var(--accent);
  color: #fff;
}
.bill-settlement-select:hover,
.bill-settlement-select:focus-visible {
  border-color: var(--accent);
  outline: 3px solid rgba(23, 102, 77, .16);
  outline-offset: 1px;
}
.date-picker {
  position: relative;
  display: block;
}
.date-picker-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
}
.date-picker-trigger:hover,
.date-picker-trigger:focus-visible,
.date-picker-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  outline: 3px solid rgba(23, 102, 77, .16);
  outline-offset: 1px;
}
.date-picker-icon {
  color: var(--muted);
  font-size: 13px;
}
.date-picker-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 25;
  display: grid;
  gap: 8px;
  width: 328px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 32, 0.16);
}
.date-picker-heading,
.date-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.date-picker-nav,
.date-picker-title,
.date-picker-link,
.date-picker-year-option,
.date-picker-day {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.date-picker-nav {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  font-size: 24px;
  line-height: 1;
}
.date-picker-title {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  padding: 0 10px;
  font-weight: 900;
}
.date-picker-year-list {
  display: grid;
  gap: 3px;
  max-height: 156px;
  overflow-y: auto;
  padding: 2px 0 8px;
  border-bottom: 1px solid var(--line);
}
.date-picker-year-option {
  min-height: 30px;
  border-radius: 6px;
  padding: 0 10px;
  font-weight: 800;
  text-align: left;
}
.date-picker-weekdays,
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.date-picker-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.date-picker-day {
  min-height: 34px;
  border-radius: 6px;
  font-weight: 800;
  text-align: center;
}
.date-picker-day.is-empty {
  min-height: 34px;
}
.date-picker-day:disabled {
  cursor: not-allowed;
  color: #a5b0b7;
  background: #f4f6f7;
}
.date-picker-nav:hover,
.date-picker-title:hover,
.date-picker-title:focus-visible,
.date-picker-link:hover,
.date-picker-year-option:hover,
.date-picker-year-option:focus-visible,
.date-picker-day:not(:disabled):hover,
.date-picker-day:focus-visible {
  background: #edf3ef;
  outline: none;
  text-decoration: none;
}
.date-picker-year-option.is-selected,
.date-picker-day.is-selected {
  background: var(--accent);
  color: #fff;
}
.date-picker-footer {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.date-picker-link {
  min-height: 30px;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--accent-dark);
  font-weight: 800;
}
.supplier-unbilled-page .date-picker {
  width: min(240px, 100%);
}
.supplier-unbilled-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}
.supplier-unbilled-picker {
  position: relative;
  display: block;
  width: 100%;
}
.supplier-unbilled-picker-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}
.supplier-unbilled-picker-trigger:hover,
.supplier-unbilled-picker-trigger:focus-visible,
.supplier-unbilled-picker-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  outline: 3px solid rgba(23, 102, 77, .16);
  outline-offset: 1px;
  background: #f7fbf9;
}
.supplier-unbilled-picker-options {
  position: absolute;
  z-index: 35;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 4px;
  max-height: 236px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 32, .16);
}
.supplier-unbilled-picker-option {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}
.supplier-unbilled-picker-option:hover,
.supplier-unbilled-picker-option:focus-visible,
.supplier-unbilled-picker-option[aria-selected="true"] {
  background: #edf3ef;
  outline: none;
}
.supplier-unbilled-add-dialog {
  position: relative;
  width: min(480px, calc(100vw - 32px));
  padding: 22px;
  border-color: #cfdcd6;
  border-radius: 12px;
}
.supplier-unbilled-add-dialog .modal-close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  line-height: 1;
}
.supplier-unbilled-add-dialog .modal-close-button:hover,
.supplier-unbilled-add-dialog .modal-close-button:focus-visible {
  border-color: var(--accent);
  background: #f3faf6;
  color: var(--accent-dark);
  outline: 3px solid rgba(23, 102, 77, .16);
  outline-offset: 1px;
}
.supplier-unbilled-add-dialog h2 {
  margin: 0;
  padding-right: 44px;
  font-size: 22px;
  line-height: 1.3;
}
.supplier-unbilled-add-dialog form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.supplier-unbilled-add-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.supplier-unbilled-add-item strong {
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.supplier-unbilled-item-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.supplier-unbilled-add-dialog label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.supplier-unbilled-add-dialog input:not([type="hidden"]) {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}
.supplier-unbilled-add-dialog input:not([type="hidden"]):focus-visible {
  border-color: var(--accent);
  outline: 3px solid rgba(23, 102, 77, .16);
  outline-offset: 1px;
}
.supplier-unbilled-add-note {
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f5f8f7;
  color: #52615a;
  font-size: 13px;
  line-height: 1.55;
}
.supplier-unbilled-add-dialog .confirm-actions {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.supplier-unbilled-add-dialog .confirm-actions .btn {
  min-width: 108px;
  min-height: 42px;
  justify-content: center;
}
@media (max-width: 560px) {
  .supplier-unbilled-add-dialog { padding: 18px; }
  .supplier-unbilled-add-dialog .confirm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-unbilled-add-dialog .confirm-actions .btn { width: 100%; min-width: 0; }
}
.bill-lines-panel {
  min-width: 0;
  padding: 0 20px 4px;
}
.bill-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0 12px;
}
.bill-toolbar > div { display: grid; gap: 2px; }
.bill-toolbar strong {
  font-size: 17px;
}
.bill-warning-tip {
  color: #8a4b10;
  font-weight: 800;
}
.bill-table-wrap {
  max-height: min(62vh, 680px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.bill-table { min-width: 1040px; }
.bill-table input { min-width: 128px; }
.role-supplier .bill-table {
  min-width: 0;
  table-layout: fixed;
}
.role-supplier .bill-table th:nth-child(1),
.role-supplier .bill-table td:nth-child(1) {
  width: 58px;
  text-align: center;
}
.role-supplier .bill-table th:nth-child(2),
.role-supplier .bill-table td:nth-child(2) {
  width: 24%;
}
.role-supplier .bill-table th:nth-child(3),
.role-supplier .bill-table td:nth-child(3) {
  width: 17%;
}
.role-supplier .bill-table th:nth-child(4),
.role-supplier .bill-table td:nth-child(4),
.role-supplier .bill-table th:nth-child(5),
.role-supplier .bill-table td:nth-child(5) {
  width: 17%;
}
.role-supplier .bill-table th:nth-child(6),
.role-supplier .bill-table td:nth-child(6) {
  width: 15%;
}
.role-supplier .bill-table th:nth-child(7),
.role-supplier .bill-table td:nth-child(7) {
  width: 76px;
  text-align: center;
}
.role-supplier .bill-table input,
.role-supplier .bill-table select {
  width: 100%;
  min-width: 0;
}
.role-supplier .bill-table .amount-cell {
  text-align: left;
}
.role-supplier .bill-table .row-action-cell .bill-icon-button {
  margin-inline: auto;
}
.bill-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef5f1;
  color: #2b3d38;
  font-size: 13px;
  font-weight: 900;
}
.bill-table tbody tr:hover td {
  background: #fbfdfc;
}
.bill-table tr.needs-color-choice td {
  background: #fff5f3;
}
.bill-table tr.needs-color-choice td:first-child {
  box-shadow: inset 4px 0 0 var(--bad);
}
.bill-table tr.needs-color-choice select[data-color-select] {
  border-color: #d92d20;
  background: #fffafa;
  color: #9f1f17;
  font-weight: 800;
}
.bill-table-actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px 10px 0;
}
.bill-icon-button {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease);
}
.bill-icon-button:hover { background: var(--accent-dark); }
.bill-icon-button:active { transform: translateY(1px); }
.bill-action-text {
  display: none;
  font-size: 14px;
  line-height: 1;
}
.bill-icon-button-muted {
  background: #edf2ef;
  color: var(--ink);
}
.bill-icon-button-muted:hover {
  background: #e3ebe7;
}
.bill-icon-button-danger {
  border-color: #e7b8b2;
  background: #fff3f1;
  color: var(--bad);
}
.bill-icon-button-danger:hover {
  border-color: #d7867c;
  background: #fde2df;
}
.amount-cell {
  min-width: 112px;
  font-weight: 900;
  color: var(--accent-dark);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bill-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin: 14px 0 0;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  font-weight: 900;
}
.sticky-total {
  position: sticky;
  bottom: 0;
  z-index: 3;
  box-shadow: 0 -10px 24px rgba(16, 24, 32, 0.07);
}
.bill-total-label {
  color: #4f6260;
}
.bill-total-amount-group {
  min-width: 148px;
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  color: var(--accent-dark);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.bill-total strong {
  min-width: 130px;
  text-align: right;
  color: var(--accent-dark);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.modal-backdrop.bill-alert-modal {
  background: transparent;
  pointer-events: none;
  transition: opacity 320ms var(--ease);
}
.modal-backdrop.bill-alert-modal.is-fading {
  opacity: 0;
}
.confirm-dialog.bill-alert-dialog {
  width: min(320px, calc(100vw - 48px));
  padding: 16px 20px;
  border-color: #e7b8b2;
  background: #fffaf9;
  box-shadow: 0 18px 44px rgba(16, 24, 32, 0.18);
  text-align: center;
}
.confirm-dialog.bill-alert-dialog h2 {
  margin: 0;
  color: var(--bad);
  font-size: 18px;
  line-height: 1.35;
}
.modal-backdrop.delete-row-confirm-modal {
  padding: 18px;
}
.confirm-dialog.delete-row-confirm-dialog {
  width: min(340px, calc(100vw - 36px));
  padding: 18px;
  border-radius: 14px;
  border-color: #f0d4cf;
  background: #fffdfc;
  box-shadow: 0 22px 52px rgba(17, 24, 39, 0.20);
}
.confirm-dialog.delete-row-confirm-dialog h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
}
.delete-row-confirm-dialog .confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.delete-row-confirm-dialog .confirm-actions .btn {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  border-radius: 10px;
  padding: 0 12px;
}
.delete-row-confirm-dialog .confirm-actions .btn.danger {
  background: #d44f45;
  border-color: #d44f45;
}
.delete-row-confirm-dialog .confirm-actions .btn.danger:hover {
  background: #bd3f36;
  border-color: #bd3f36;
}
.row-action-cell {
  width: 58px;
  text-align: center;
}
.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.38);
}
.modal-backdrop[hidden] { display: none; }
.confirm-dialog {
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
}
.col-resize-dragging {
  cursor: col-resize;
  user-select: none;
}
.resizable-data-table {
  table-layout: fixed;
}
.resizable-data-table th,
.resizable-data-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.resizable-data-table th {
  position: relative;
}
.resizable-data-table .col-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 3;
  touch-action: none;
}
.resizable-data-table .col-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  right: 3px;
  width: 1px;
  height: 100%;
  background: transparent;
}
.resizable-data-table .col-resizer:hover::after {
  background: #16805f;
}
.resizable-data-table .col-resizer:active::after {
  background: #16805f;
  width: 2px;
}
.confirm-dialog h2 { margin: 0 0 10px; font-size: 20px; }
.confirm-dialog p { margin: 0; color: var(--muted); line-height: 1.7; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-card { width: min(420px, 100%); }
.login-card h1 { font-size: 24px; }

@media (max-width: 480px) {
  .login {
    align-items: center;
    justify-items: stretch;
    padding: 14px;
  }
  .login-card {
    padding: 18px 14px;
  }
  .login-card h1 {
    font-size: 24px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .metric-grid,
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .container { width: min(100% - 24px, 980px); }
}

@media (max-width: 700px) {
  .topbar {
    padding: 14px 18px;
    align-items: flex-start;
    flex-direction: column;
  }
  .nav { justify-content: flex-start; }
  .page-heading { flex-direction: column; }
  .metric-grid,
  .grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
.data-table th,
  .data-table td,
  th,
  td {
    white-space: normal;
  }
  .bill-toolbar,
  .bill-total {
    align-items: stretch;
    flex-direction: column;
  }
  .bill-total {
    margin-left: -18px;
    margin-right: -18px;
  }
  .bill-total strong { text-align: left; }
  .search-bar {
    grid-template-columns: 1fr;
  }
.role-supplier .topbar {
    gap: 12px;
    padding: 12px;
  }
  .role-supplier .brand {
    font-size: 15px;
  }
  .role-supplier .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .role-supplier .nav a,
  .role-supplier .user-chip {
    width: 100%;
    justify-content: center;
  }
  .role-supplier:has(.bill-entry) .topbar {
    align-items: flex-start;
    gap: 0;
    padding: 10px 12px;
  }
  .role-supplier:has(.supplier-history-page) .topbar {
    align-items: flex-start;
    gap: 0;
    padding: 10px 12px;
  }
  .role-supplier:has(.bill-detail-summary) .topbar {
    align-items: flex-start;
    gap: 0;
    padding: 10px 12px;
  }
  .role-supplier:has(.bill-entry) .brand-block,
  .role-supplier:has(.bill-entry) .user-chip,
  .role-supplier:has(.bill-entry) .nav > a:not([href="/supplier"]) {
    display: none;
  }
  .role-supplier:has(.supplier-history-page) .brand-block,
  .role-supplier:has(.supplier-history-page) .user-chip,
  .role-supplier:has(.supplier-history-page) .nav > a:not([href="/supplier"]) {
    display: none;
  }
  .role-supplier:has(.bill-detail-summary) .brand-block,
  .role-supplier:has(.bill-detail-summary) .user-chip,
  .role-supplier:has(.bill-detail-summary) .nav > a:not([href="/supplier"]) {
    display: none;
  }
  .role-supplier:has(.bill-entry) .nav,
  .role-supplier:has(.supplier-history-page) .nav,
  .role-supplier:has(.bill-detail-summary) .nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-template-columns: none;
  }
  .role-supplier:has(.bill-entry) .nav a[href="/supplier"] {
    width: auto;
    min-height: 38px;
    padding: 0 14px;
  }
  .role-supplier:has(.supplier-history-page) .nav a[href="/supplier"] {
    width: auto;
    min-height: 38px;
    padding: 0 14px;
  }
  .role-supplier:has(.bill-detail-summary) .nav a[href="/supplier"] {
    width: auto;
    min-height: 38px;
    padding: 0 14px;
  }
  .role-supplier:has(.supplier-home-simple) .topbar {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
    padding: 12px;
  }
  .role-supplier:has(.supplier-home-simple) .brand-block {
    min-width: 0;
  }
  .role-supplier:has(.supplier-home-simple) .brand {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .role-supplier:has(.supplier-home-simple) .user-chip,
  .role-supplier:has(.supplier-home-simple) .nav > a {
    display: none;
  }
  .role-supplier:has(.supplier-home-simple) .nav {
    width: auto;
    display: flex;
    flex: 0 0 auto;
    grid-template-columns: none;
  }
  .role-supplier .supplier-mobile-account {
    position: relative;
    display: block;
  }
  .role-supplier .supplier-mobile-account-trigger {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    padding: 0 14px;
    background: rgba(255,255,255,.12);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
  }
  .role-supplier .supplier-mobile-account-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 80;
    display: grid;
    min-width: 132px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(16, 24, 32, .22);
  }
  .role-supplier .supplier-mobile-account-menu[hidden] {
    display: none;
  }
  .role-supplier .supplier-mobile-account-menu a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
  }
  .role-supplier .supplier-mobile-account-menu a:hover,
  .role-supplier .supplier-mobile-account-menu a:focus-visible {
    background: #edf3ef;
  }
  .role-supplier .container {
    width: min(100% - 20px, 760px);
    margin-top: 14px;
    margin-bottom: 28px;
  }
  .role-supplier .panel {
    padding: 14px;
    border-radius: 8px;
  }
  .role-supplier .page-heading {
    align-items: stretch;
  }
  .role-supplier .page-heading h1 {
    font-size: 28px;
  }
  .role-supplier .supplier-bill-detail-back {
    display: none;
  }
  .role-supplier:has(.supplier-bill-detail-page) .panel:first-child {
    padding: 14px;
  }
  .role-supplier .supplier-bill-detail-page .page-heading {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }
  .role-supplier .supplier-bill-detail-page .page-heading h1 {
    font-size: 26px;
    line-height: 1.18;
  }
  .role-supplier .supplier-bill-detail-mobile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
  }
  .role-supplier .bill-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .role-supplier .bill-detail-summary .metric-card {
    min-height: 0;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
  }
  .role-supplier .bill-detail-summary .metric-label {
    font-size: 14px;
    line-height: 1.25;
  }
  .role-supplier .bill-detail-summary .metric,
  .role-supplier .bill-detail-summary .metric-note {
    font-size: 19px;
    line-height: 1.2;
  }
  .role-supplier .bill-detail-summary .bill-summary-value {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .role-supplier .bill-detail-summary .bill-summary-value--date {
    font-size: 18px;
  }
  .role-supplier .bill-detail-summary .bill-summary-value--amount {
    font-size: 18px;
    letter-spacing: 0;
  }
  .role-supplier .supplier-history-page .actions {
    margin-bottom: 10px;
  }
  .role-supplier .bill-entry {
    padding: 0;
  }
  .role-supplier .bill-entry form {
    display: flex;
    flex-direction: column;
  }
  .role-supplier .bill-lines-panel {
    order: 1;
  }
  .role-supplier .bill-meta-panel {
    order: 2;
  }
  .role-supplier .bill-total {
    order: 3;
  }
  .role-supplier .supplier-entry-grid,
  .role-supplier .supplier-history-filter-month {
    grid-template-columns: 1fr;
  }
  .role-supplier .supplier-history-filter {
    gap: 10px;
    margin: 10px 0 14px;
    padding: 12px;
    box-shadow: none;
  }
  .role-supplier .supplier-history-filter label {
    gap: 8px;
  }
  .role-supplier .supplier-history-filter .month-picker-trigger {
    min-height: 48px;
  }
  .role-supplier .supplier-history-filter .month-picker-panel {
    width: 100%;
    min-width: 0;
  }
  .role-supplier .supplier-history-filter .month-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .role-supplier .month-summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 10px 0 14px;
  }
  .role-supplier .supplier-entry-card {
    min-height: 112px;
  }
  .role-supplier .supplier-history-actions {
    justify-self: stretch;
  }
  .role-supplier .supplier-history-actions .btn {
    flex: 1 1 120px;
  }
  .role-supplier .bill-meta-panel {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
  }
  .role-supplier .bill-meta-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .role-supplier .bill-meta-panel label,
  .role-supplier .delivery-date-row .date-picker,
  .role-supplier .bill-settlement-picker,
  .role-supplier .bill-meta-panel select {
    width: 100%;
    min-width: 0;
  }
  .role-supplier .bill-settlement-options {
    position: static;
    margin-top: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 32, 0.12);
  }
  .role-supplier .date-picker-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: min(72vh, 520px);
    overflow-y: auto;
    padding: 14px;
    border-radius: 16px 16px 0 0;
    z-index: 70;
    box-shadow: 0 -18px 42px rgba(16, 24, 32, 0.18);
  }
  .role-supplier .delivery-window-hint {
    margin-left: 0;
  }
  .role-supplier .bill-table-wrap,
  .role-supplier .supplier-history-table-wrap,
  .role-supplier .supplier-line-detail-table-wrap {
    max-height: none;
    overflow-x: visible;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .role-supplier .supplier-line-detail-heading {
    margin-bottom: 8px;
  }
  .role-supplier .supplier-line-detail-actions {
    display: none;
  }
  .role-supplier .supplier-line-add-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
  }
  .role-supplier .bill-icon-button.supplier-line-add-button .bill-action-symbol {
    display: inline;
    font-size: 24px;
    line-height: 1;
  }
  .role-supplier .bill-table,
  .role-supplier .supplier-history-table,
  .role-supplier .supplier-line-detail-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
    background: transparent;
  }
  .role-supplier .bill-table thead,
  .role-supplier .supplier-history-table thead,
  .role-supplier .supplier-line-detail-table thead {
    display: none;
  }
  .role-supplier .bill-table tbody,
  .role-supplier .supplier-history-table tbody,
  .role-supplier .supplier-line-detail-table tbody,
  .role-supplier .bill-table-card-row,
  .role-supplier .supplier-history-table-card-row,
  .role-supplier .supplier-line-detail-row {
    display: block;
  }
  .role-supplier .bill-table-card-row,
  .role-supplier .supplier-history-table-card-row,
  .role-supplier .supplier-line-detail-row {
    position: relative;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }
  .role-supplier .supplier-history-table-card-row {
    padding: 4px 0;
  }
  .role-supplier .bill-table-card-row {
    position: relative;
  }
  .role-supplier .bill-table-card-row td,
  .role-supplier .supplier-history-table-card-row td,
  .role-supplier .supplier-line-detail-row td {
    display: grid;
    grid-template-columns: minmax(0, 112px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: normal;
  }
  .role-supplier .bill-table-card-row td {
    box-sizing: border-box;
    grid-template-columns: minmax(78px, 28%) minmax(0, 1fr);
    max-width: 100%;
    min-width: 0;
    width: 100% !important;
  }
  .role-supplier .bill-table-card-row td:first-child {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    min-height: 58px;
    padding-right: 104px;
  }
  .role-supplier .bill-table-card-row td:first-child::before,
  .role-supplier .bill-table-card-row td:first-child {
    text-align: left;
  }
  .role-supplier .bill-table td:nth-child(n) {
    width: 100% !important;
  }
  .role-supplier .bill-table-card-row td::before {
    justify-self: start;
    text-align: left;
    white-space: nowrap;
  }
  .role-supplier .bill-table-card-row td > input,
  .role-supplier .bill-table-card-row td > select {
    justify-self: stretch;
  }
  .role-supplier .supplier-history-table-card-row td,
  .role-supplier .supplier-line-detail-row td {
    box-sizing: border-box;
    display: grid;
    max-width: 100%;
    min-width: 0;
    width: 100% !important;
  }
  .role-supplier .supplier-line-detail-table td:nth-child(n) {
    width: 100% !important;
  }
  .role-supplier .supplier-history-table-card-row td {
    display: grid;
    grid-template-columns: minmax(0, 104px) minmax(0, 1fr);
    gap: 10px;
    min-height: 42px;
    padding: 8px 14px;
    border-bottom: 1px solid #edf2ef;
    font-size: 15px;
  }
  .role-supplier .supplier-history-table-card-row td:first-child {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .role-supplier .supplier-history-table-card-row td:first-child::before {
    display: block;
  }
  .role-supplier .supplier-history-table-card-row .table-link {
    display: inline-block;
    overflow-wrap: anywhere;
    color: var(--accent-dark);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.25;
  }
  .role-supplier .supplier-history-table-card-row td::before {
    color: #64747d;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
  }
  .role-supplier .supplier-history-table-card-row td:nth-child(5),
  .role-supplier .supplier-history-table-card-row td:nth-child(6),
  .role-supplier .supplier-history-table-card-row td:nth-child(7) {
    font-weight: 900;
  }
  .role-supplier .supplier-history-table-card-row td:nth-child(7) {
    color: var(--accent-dark);
  }
  .role-supplier .supplier-history-table-card-row .status {
    justify-self: start;
    width: auto;
  }
  .role-supplier .supplier-history-table-card-row td:last-child {
    padding-top: 10px;
    padding-bottom: 12px;
  }
  .role-supplier .supplier-history-table td:nth-child(5),
  .role-supplier .supplier-history-table td:nth-child(6),
  .role-supplier .supplier-history-table td:nth-child(7),
  .role-supplier .supplier-line-detail-table td:nth-child(2),
  .role-supplier .supplier-line-detail-table td:nth-child(3),
  .role-supplier .supplier-line-detail-table td:nth-child(4),
  .role-supplier .supplier-line-detail-table td:nth-child(5),
  .role-supplier .supplier-line-detail-table td:nth-child(6),
  .role-supplier .supplier-line-detail-table td:nth-child(7),
  .role-supplier .supplier-line-detail-table td:nth-child(8),
  .role-supplier .supplier-line-detail-table td:nth-child(9) {
    text-align: left;
  }
  .role-supplier .bill-table-card-row td:last-child,
  .role-supplier .supplier-history-table-card-row td:last-child,
  .role-supplier .supplier-line-detail-row td:last-child {
    border-bottom: 0;
  }
  .role-supplier .bill-table-card-row td::before,
  .role-supplier .supplier-history-table-card-row td::before,
  .role-supplier .supplier-line-detail-row td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
  }
  .role-supplier .bill-table-card-row input,
  .role-supplier .bill-table-card-row select {
    width: 100%;
    min-width: 0;
  }
  .role-supplier .supplier-history-table-card-row td {
    grid-template-columns: clamp(88px, 26vw, 104px) minmax(0, 1fr);
    column-gap: 10px;
    align-items: center;
    justify-items: start;
    text-align: left;
    font-size: 16px;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
  }
  .role-supplier .supplier-line-detail-row td {
    grid-template-columns: minmax(92px, 30%) minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    justify-items: stretch;
    font-size: 16px;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
  }
  .role-supplier .supplier-line-detail-row td:first-child {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .role-supplier .supplier-line-detail-row td:first-child::before {
    display: block;
    white-space: nowrap;
  }
  .role-supplier .supplier-line-detail-row td:first-child .supplier-line-edit-value {
    display: block;
    width: 100%;
    color: var(--accent-dark);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .role-supplier .supplier-line-detail-row td:not(:first-child) > :not(form) {
    justify-self: start;
  }
  .role-supplier .supplier-history-table-card-row td::before {
    justify-self: start;
    color: #536571;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
  }
  .role-supplier .supplier-line-detail-row td::before {
    justify-self: start;
    text-align: left;
  }
  .role-supplier .supplier-history-table-card-row td > * {
    justify-self: start;
  }
  .role-supplier .supplier-history-table-card-row td.status-cell > *,
  .role-supplier .supplier-line-detail-row td.status-cell > * {
    justify-self: center;
  }
  .role-supplier .supplier-history-table-card-row td:nth-child(5),
  .role-supplier .supplier-history-table-card-row td:nth-child(6),
  .role-supplier .supplier-history-table-card-row td:nth-child(7),
  .role-supplier .supplier-history-table-card-row td:nth-child(8),
  .role-supplier .supplier-history-table-card-row td:nth-child(9),
  .role-supplier .supplier-history-table-card-row td:nth-child(10) {
    text-align: left;
  }
  .role-supplier .supplier-history-table-card-row .table-link {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 17px;
    letter-spacing: 0;
  }
  .role-supplier .supplier-history-table-card-row td:nth-child(5),
  .role-supplier .supplier-history-table-card-row td:nth-child(6),
  .role-supplier .supplier-history-table-card-row td:nth-child(7) {
    font-size: 17px;
    letter-spacing: 0.01em;
  }
  .role-supplier .supplier-history-table-card-row .history-row-actions,
  .role-supplier .supplier-history-table-card-row .history-row-actions .btn {
    width: 100%;
  }
  .role-supplier .supplier-line-detail-row td:last-child {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .role-supplier .supplier-line-detail-row td:last-child::before {
    display: none;
  }
  .role-supplier .supplier-line-mobile-edit,
  .role-supplier .supplier-line-edit-form,
  .role-supplier .supplier-line-edit-input {
    width: 100%;
  }
  .role-supplier .supplier-line-edit-form {
    margin-top: 0;
    justify-content: stretch;
  }
  .role-supplier .supplier-line-edit-input {
    min-height: 42px;
    font-size: 16px;
  }
  .role-supplier .supplier-line-edit-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .role-supplier .supplier-line-edit-actions .btn {
    width: 100%;
  }
  .role-supplier .supplier-line-detail-row.is-editing .supplier-line-edit-value {
    display: none;
  }
  .role-supplier .supplier-line-detail-row.is-editing .supplier-line-edit-input {
    display: inline-block;
  }
  .role-supplier .bill-table-card-row .amount-cell {
    min-width: 0;
    text-align: left;
  }
  .role-supplier .bill-table-card-row .row-action-cell {
    position: absolute;
    top: 12px;
    right: 14px;
    left: auto;
    display: flex;
    width: max-content !important;
    max-width: max-content;
    min-height: 0;
    min-width: 0;
    padding: 0;
    border-bottom: 0;
    text-align: left;
  }
  .role-supplier .bill-table-card-row .row-action-cell::before {
    content: none;
  }
  .role-supplier .bill-table-card-row .row-action-cell .bill-icon-button {
    justify-self: start;
    width: auto;
    min-width: 72px;
    height: 40px;
    margin-inline: 0;
    padding: 0 10px;
    font-size: 14px;
  }
  .role-supplier .bill-icon-button .bill-action-text {
    display: inline;
  }
  .role-supplier .bill-icon-button .bill-action-symbol {
    display: none;
  }
  .role-supplier .bill-table-actions {
    justify-content: stretch;
    padding: 8px 0 0;
  }
  .role-supplier .bill-table-actions .bill-icon-button {
    width: 100%;
    height: 44px;
    font-size: 16px;
  }
  .role-supplier .bill-total {
    gap: 8px;
    margin: 12px 0 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .role-supplier .bill-total-amount-group {
    justify-content: flex-start;
  }
  .role-supplier .bill-total .btn {
    width: 100%;
  }
  .role-supplier .history-row-actions .btn {
    width: 100%;
  }
  .role-supplier .supplier-history-pagination {
    justify-content: flex-end;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .role-supplier .supplier-unbilled-page .search-bar {
    gap: 10px;
    margin-bottom: 12px;
  }
  .role-supplier:has(.supplier-unbilled-page) .container {
    margin-bottom: 8px;
  }
  .role-supplier .supplier-unbilled-page .page-heading h1 {
    margin-bottom: 0;
    font-size: 26px;
  }
  .role-supplier .supplier-unbilled-page .page-heading .muted {
    display: none;
  }
  .role-supplier .supplier-unbilled-page .search-bar .date-picker,
  .role-supplier .supplier-unbilled-page .search-bar .btn {
    width: 100%;
  }
  .role-supplier .supplier-unbilled-page .search-bar .btn {
    min-height: 44px;
  }
  .role-supplier .supplier-unbilled-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .role-supplier .supplier-unbilled-table {
    display: block;
    min-width: 0;
    border-collapse: separate;
    background: transparent;
  }
  .role-supplier .supplier-unbilled-table thead {
    display: none;
  }
  .role-supplier .supplier-unbilled-table tbody {
    display: grid;
    gap: 10px;
  }
  .role-supplier .supplier-unbilled-table tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }
  .role-supplier .supplier-unbilled-table td {
    display: grid;
    grid-template-columns: minmax(84px, 32%) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 7px 12px;
    border-bottom: 1px solid var(--line);
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .role-supplier .supplier-unbilled-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
  }
  .role-supplier .supplier-unbilled-table .status-cell {
    text-align: left;
  }
  .role-supplier .supplier-unbilled-table td:last-child {
    display: block;
    padding: 10px 12px 12px;
    border-bottom: 0;
  }
  .role-supplier .supplier-unbilled-table td:last-child::before,
  .role-supplier .supplier-unbilled-table td.muted::before {
    display: none;
  }
  .role-supplier .supplier-unbilled-table td.muted {
    display: block;
    padding: 20px 12px;
    text-align: center;
  }
  .role-supplier .supplier-unbilled-table td:last-child .btn {
    width: 100%;
    min-height: 44px;
  }
  .role-supplier .supplier-unbilled-pagination {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
    min-height: 60px;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    border-top: 0;
  }
  .role-supplier .supplier-unbilled-pagination [data-unbilled-page-summary] {
    align-self: center;
    justify-self: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
  }
  .role-supplier .supplier-unbilled-pagination .btn {
    min-width: 76px;
    min-height: 44px;
  }
  .role-supplier .bill-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
}
.item-no-correction {
  margin-top: 6px;
  padding: 8px;
  border: 1px solid #e6b86a;
  border-radius: 6px;
  background: #fff8e8;
  color: #704b12;
  font-size: 13px;
}

.item-no-correction[data-item-lookup-state="loading"] {
  border-color: #cbd7dc;
  background: #f4f7f8;
  color: var(--muted);
}

.item-no-correction span {
  display: block;
  margin-bottom: 6px;
}

.item-no-correction button {
  margin: 0 6px 4px 0;
  padding: 4px 8px;
  border: 1px solid #b98532;
  border-radius: 5px;
  background: #fff;
  color: #5c3c0d;
  cursor: pointer;
}

@media (max-width: 700px) {
  .role-supplier .bill-table-card-row .item-no-correction {
    grid-column: 1 / -1;
    width: 100%;
  }
  .modal-backdrop.item-no-correction-modal {
    z-index: 90;
    place-items: end center;
    padding: 12px 12px max(12px, env(safe-area-inset-bottom));
    background: rgba(16, 24, 32, 0.52);
  }
  .item-no-correction-dialog {
    width: min(100%, 480px);
    max-height: min(78vh, 620px);
    overflow-y: auto;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 -18px 48px rgba(16, 24, 32, 0.24);
  }
  .item-no-correction-dialog-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
  }
  .item-no-correction-dialog h2 {
    margin: 0;
    color: var(--ink);
    font-size: 21px;
    line-height: 1.35;
  }
  .item-no-correction-dialog p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
  }
  .item-no-correction-dialog p strong {
    color: var(--ink);
    overflow-wrap: anywhere;
  }
  .item-no-correction-dialog .modal-close-button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #eef3f1;
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }
  .item-no-correction-dialog-options {
    display: grid;
    gap: 10px;
    margin-top: 20px;
  }
  .item-no-correction-dialog .item-no-correction-option {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    padding: 12px 16px;
    background: #f3f8f6;
    color: var(--accent-dark);
    font: inherit;
    font-size: 17px;
    font-weight: 900;
    overflow-wrap: anywhere;
    cursor: pointer;
  }
  .item-no-correction-back {
    width: 100%;
    min-height: 48px;
    margin-top: 12px;
  }
}
