:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #667085;
  --border: #d9e0e8;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
}

.parameter-tabs { display:flex; gap:8px; margin:18px 0 24px; padding:6px; border:1px solid #d7dde5; border-radius:14px; background:#f4f7fa; overflow-x:auto; }
.parameter-tabs a { padding:10px 16px; border-radius:10px; color:#3c4a59; text-decoration:none; white-space:nowrap; font-weight:650; }
.parameter-tabs a:hover { background:#e8edf3; }
.parameter-tabs a.is-active { background:#fff; color:#9e1d2d; box-shadow:0 2px 8px rgba(24,38,52,.12); }
.text-snippet-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:20px; }
.text-snippet-card { display:grid; grid-template-columns:1fr 1fr; gap:12px; align-content:start; }
.text-snippet-new { border:2px dashed #bec8d3; background:#f8fafc; }
.token-chips { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:12px 0; }
.token-chips span { color:#607080; font-size:.88rem; }
.token-chips code { padding:5px 8px; border-radius:7px; background:#eef2f6; color:#374555; }
.order-documents-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.order-documents-head h2,.order-documents-head p { margin-top:0; }
.order-email-layout { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr); gap:18px; align-items:start; }
.order-email-editor,.order-email-sidebar { display:grid; gap:16px; }
.order-email-sidebar { position:sticky; top:18px; }
.snippet-editor-row { margin-bottom:16px; }
.snippet-editor-head { display:flex; justify-content:space-between; gap:12px; align-items:end; margin-bottom:6px; }
.snippet-editor-head select { width:auto; max-width:240px; }
.attachment-head { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.attachment-head h2,.attachment-head p { margin-top:0; }
.attachment-card { display:flex; gap:11px; align-items:flex-start; margin:8px 0; padding:11px; border:1px solid #d8dfe7; border-radius:10px; cursor:pointer; background:#fff; }
.attachment-card.is-selected { border-color:#b52b3c; background:#fff3f4; box-shadow:0 0 0 1px #b52b3c inset; }
.attachment-card input { width:auto; flex:0 0 auto; margin-top:3px; }
.attachment-card span,.attachment-card small { display:block; }
.attachment-card small { margin-top:4px; color:#697786; }
.mail-preview { max-height:320px; overflow:auto; }
.mail-preview > strong { display:block; padding-bottom:10px; border-bottom:1px solid #dfe4ea; }
.mail-preview [data-preview-message] { margin-top:12px; white-space:pre-wrap; line-height:1.55; }
.order-email-send { width:100%; min-height:48px; }

@media (max-width: 900px) {
  .text-snippet-grid,.order-email-layout { grid-template-columns:1fr; }
  .order-email-sidebar { position:static; }
  .order-documents-head,.snippet-editor-head { flex-direction:column; align-items:stretch; }
  .snippet-editor-head select { width:100%; max-width:none; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 72px;
  padding: 16px 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-area { display: flex; align-items: center; gap: 12px; }
.brand-logo { display: block; width: auto; height: 42px; object-fit: contain; }
.brand-text { display: grid; gap: 2px; }
.brand { font-size: 20px; font-weight: 700; letter-spacing: 0; line-height: 24px; }
.sub { color: var(--muted); font-size: 13px; line-height: 16px; }
.nav { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.nav a { color: var(--accent-dark); text-decoration: none; font-weight: 600; }
.nav-menu { position: relative; }
.nav-menu-trigger {
  border: 1px solid #b8c7d6;
  border-radius: 6px;
  padding: 8px 12px;
  background: #f7fafc;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
.nav-menu-trigger:hover,
.nav-menu-trigger:focus-visible {
  background: #eaf3f2;
  border-color: var(--accent);
  outline: none;
}
.nav-menu-trigger::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.nav-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  display: none;
  min-width: 190px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.nav-menu:hover .nav-submenu,
.nav-menu:focus-within .nav-submenu,
.nav-menu.is-open .nav-submenu {
  display: block;
}
.nav-submenu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.nav-submenu a:hover,
.nav-submenu a:focus-visible {
  background: #eef3f7;
  outline: none;
}
.nav-menu-empty .nav-menu-trigger::after,
.nav-submenu[hidden] {
  display: none !important;
}
.nav-help-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--accent-dark);
  background: #eef8f6;
  border: 1px solid #9acbc5;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-help-button span {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}
.nav-help-button:hover,
.nav-help-button:focus-visible {
  background: #dff2ef;
  border-color: var(--accent);
  outline: 3px solid rgba(15, 118, 110, .16);
  outline-offset: 2px;
}

.page { max-width: 1440px; margin: 0 auto; padding: 32px 24px; }
.panel, .login-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 28px;
}
.login-panel { max-width: 440px; margin: 72px auto; }
.login-brand { display: grid; justify-items: center; gap: 18px; margin-bottom: 26px; text-align: center; }
.login-brand img { display: block; width: min(260px, 100%); height: auto; object-fit: contain; }
.login-brand h1 { margin: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.2; }
h2 { margin: 0 0 16px; font-size: 18px; }
p { color: var(--muted); margin: 0 0 16px; line-height: 1.5; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; background: #fafbfc; }
.cell-warning {
  background: #fff7cc;
  color: #7a4d00;
  font-weight: 700;
}
.cell-danger {
  background: #fee4e2;
  color: #912018;
  font-weight: 700;
}

.special-customer-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid #7c3aed;
  border-radius: 999px;
  background: #f3e8ff;
  color: #6b21a8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}
.special-customer-row td { background: #fcfaff; }
.special-process-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid #c4b5fd;
  border-left: 6px solid #7c3aed;
  border-radius: 8px;
  background: #faf5ff;
}
.special-process-banner > div:first-child { display: grid; gap: 5px; }
.special-process-banner span { color: #6b7280; font-size: 13px; }
.special-process-progress { display: grid; min-width: 110px; text-align: right; }
.special-process-progress strong { color: #6b21a8; font-size: 24px; }
.compact-upload-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  margin-top: 18px;
}
.compact-upload-form .actions { align-self: end; }
.special-process-box { margin-top: 20px; border-color: #c4b5fd; background: #fcfaff; }
.special-process-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.parker-reference {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
  padding: 12px 14px;
  border-radius: 7px;
  background: #ede9fe;
  color: #4c1d95;
}
.parker-reference strong { font-size: 22px; letter-spacing: 3px; }
.parker-reference small { color: #6d5b91; }
.process-step-list { display: grid; gap: 8px; }
.process-step {
  display: grid;
  grid-template-columns: 34px minmax(260px, 1fr) 145px minmax(160px, .7fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
}
.process-step.is-completed { border-color: #a7d7be; background: #f0fdf4; }
.process-step-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 12px;
  font-weight: 800;
}
.process-step.is-completed .process-step-number { background: #dcfae6; color: #067647; }
.process-step-main { display: grid; gap: 3px; }
.process-step-main span { color: var(--muted); font-size: 12px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.box { border: 1px solid var(--border); border-radius: 8px; padding: 18px; background: #fbfcfd; }
.wide-box { grid-column: 1 / -1; }
.admin-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 4px 0 14px; }
.admin-section-head h2, .admin-section-head p { margin-bottom: 4px; }
.transfer-log-filter { grid-template-columns: repeat(4, minmax(150px, 1fr)); margin: 0 28px 22px; }
.transfer-log-filter .actions { align-self: end; }
.transfer-log-archive-filter { grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; margin-bottom: 18px; }
.transfer-log-archive-filter .actions { align-self: end; }
.transfer-log-table { min-width: 1180px; }
.transfer-log-table tr.has-log-errors td, tr.has-log-errors td { background: #fff1f0; }
.transfer-log-table tr.has-log-warnings td, tr.has-log-warnings td { background: #fff8e7; }
.transfer-direction { display: inline-flex; padding: 3px 8px; border-radius: 999px; background: #e8f5f3; color: #0f766e; font-size: 11px; font-weight: 800; }
.transfer-log-page code { display: block; max-width: 520px; max-height: 130px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; }
.roles-heading { margin-top: 34px; }
.user-create-form { grid-template-columns: repeat(3, minmax(160px, 1fr)); margin-bottom: 18px; }
.user-create-form .actions { align-self: end; }
.check-label { display: flex !important; flex-direction: row !important; align-items: center; justify-content: flex-start; gap: 8px !important; min-height: 42px; font-size: 14px !important; font-weight: 600; }
.check-label input { width: auto; min-width: 0; margin: 0; }
.user-cards { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; }
.user-card { display: grid; gap: 14px; }
.user-card-head { display: flex; align-items: center; gap: 12px; }
.user-card-head h3 { margin: 0 0 5px; font-size: 17px; }
.user-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #d9eeeb; color: var(--accent-dark); font-weight: 800; }
.status-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-badge.is-active { background: #dcfae6; color: #067647; }
.status-badge.is-inactive { background: #f2f4f7; color: #667085; }
.user-edit-form { grid-template-columns: 1fr 1fr; gap: 10px; }
.user-edit-form label:first-child, .user-edit-form label:nth-child(3), .user-edit-form label:nth-child(5) { grid-column: 1 / -1; }
.user-meta { color: var(--muted); font-size: 12px; }
.user-card-actions { justify-content: space-between; align-items: center; }
.role-card { margin-bottom: 14px; padding: 0; overflow: hidden; }
.role-card summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px; cursor: pointer; list-style: none; background: #fbfcfd; }
.role-card summary::-webkit-details-marker { display: none; }
.role-card summary span:first-child { display: grid; gap: 4px; }
.role-card summary small { display: block; color: var(--muted); font-weight: 400; }
.role-card[open] summary { border-bottom: 1px solid var(--border); }
.role-form { padding: 18px; }
.role-meta-form { grid-template-columns: 180px 1fr 2fr 120px; margin-bottom: 18px; }
.permission-groups { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; }
.permission-groups fieldset { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 8px; }
.permission-groups legend { padding: 0 6px; font-size: 13px; font-weight: 800; color: var(--accent-dark); }
.permission-item { display: flex; flex-direction: row; align-items: flex-start; gap: 9px; padding: 8px 4px; font-size: 13px; font-weight: 600; }
.permission-item + .permission-item { border-top: 1px solid #edf0f3; }
.permission-item input { width: auto; min-width: 0; margin: 2px 0 0; }
.permission-item span { min-width: 0; }
.permission-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; overflow-wrap: anywhere; }
.new-role-card summary { color: var(--accent-dark); }
.button-link { display: inline-flex; align-items: center; text-decoration: none; }
.inquiry-capture { max-width: 1180px; margin: 0 auto; }
.inquiry-form { gap: 18px; }
.inquiry-form-section {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
}
.inquiry-form-section legend { padding: 0 8px; font-size: 15px; font-weight: 800; color: var(--accent-dark); }
.inquiry-form-main label:first-of-type,
.inquiry-form-main label:nth-of-type(2) { grid-column: 1 / -1; }
.inquiry-form-main label:last-of-type { grid-column: span 2; }
.inquiry-datetime-fields { display: grid; grid-template-columns: max-content; gap: 12px; min-width: 0; justify-self: start; }
.inquiry-datetime-fields label { min-width: 0; }
.inquiry-datetime-fields input[type="date"] { display: block; width: 175px; min-width: 0; max-width: 175px; }
.inquiry-datetime-fields input[type="time"] { display: block; width: 135px; min-width: 0; max-width: 135px; }
.inquiry-form textarea { resize: vertical; min-height: 130px; }
.inquiry-submit-bar {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #a7cfca;
  border-radius: 8px;
  background: #eef8f6;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .12);
}
.inquiry-submit-bar span { color: var(--muted); font-size: 13px; }
.inquiry-filter { grid-template-columns: 2fr 1fr 1fr auto; margin-bottom: 20px; }
.inquiry-filter .actions { align-self: end; }
.inquiry-table { min-width: 1100px; table-layout: fixed; }
.inquiry-table th, .inquiry-table td { padding: 9px 8px; font-size: 12px; line-height: 1.35; }
.inquiry-table th:nth-child(1) { width: 112px; }
.inquiry-table th:nth-child(2) { width: 125px; }
.inquiry-table th:nth-child(3) { width: 80px; }
.inquiry-table th:nth-child(4) { width: 190px; }
.inquiry-table th:nth-child(5) { width: 30%; }
.inquiry-table th:nth-child(6) { width: 90px; }
.inquiry-table th:nth-child(7) { width: 130px; }
.inquiry-table th:nth-child(8) { width: 130px; }
.inquiry-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eef2f6; color: #344054; font-weight: 700; }
.inquiry-status.status-new { background: #e0f2fe; color: #075985; }
.inquiry-status.status-incomplete { background: #fff7cc; color: #7a4d00; }
.inquiry-status.status-ordered { background: #dcfae6; color: #067647; }
.inquiry-status.status-declined { background: #f2f4f7; color: #667085; }
.inquiry-detail-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr); gap: 20px; align-items: start; }
.inquiry-edit-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: #fbfcfd; }
.inquiry-edit-form .span-2 { grid-column: 1 / -1; }
.inquiry-sidebar { display: grid; gap: 16px; }
.inquiry-sidebar .box { background: #fff; }
.inquiry-timeline { display: grid; gap: 0; }
.inquiry-timeline > div { position: relative; display: grid; gap: 4px; padding: 0 0 16px 18px; border-left: 2px solid #d9e0e8; font-size: 12px; }
.inquiry-timeline > div::before { content: ""; position: absolute; left: -5px; top: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.inquiry-timeline span { color: var(--muted); }
.task-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0 10px; }
.task-section-head h2 { margin: 0; }
.task-section-head > span, .task-section-head .actions > span { color: var(--muted); font-size: 13px; }
.task-section-spacing { margin-top: 30px; }
.inquiry-task-table { min-width: 980px; }
.priority-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #f2f4f7; color: #475467; font-size: 11px; font-weight: 700; }
.priority-badge.priority-high { background: #fff7cc; color: #7a4d00; }
.priority-badge.priority-urgent { background: #fee4e2; color: #912018; }
.inventory-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.inventory-summary .box h2 {
  margin-bottom: 8px;
  font-size: 15px;
}
.inventory-summary .box p {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; word-break: break-word; }
.facts dd .inline-action { margin-top: 8px; }
.compact-facts {
  grid-template-columns: 115px 1fr;
  margin-top: 14px;
  margin-bottom: 14px;
}
.status-note {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 14px;
  line-height: 1.4;
}
.status-note.success {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}
.status-note.warning {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}
.field-warning {
  display: block;
  margin-top: 6px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.form { display: grid; gap: 16px; }
.review-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inventory-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
}
.inventory-form label:nth-of-type(1),
.inventory-form label:nth-of-type(2),
.inventory-form label:nth-of-type(9) {
  grid-column: span 2;
}
.inventory-select-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 22px;
}
.inventory-item-panel {
  margin-bottom: 28px;
}
.inventory-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.inventory-item-head h2 {
  margin: 0;
}
.inventory-items-form {
  display: grid;
  gap: 16px;
}
.inventory-items-form input,
.inventory-items-form select {
  min-width: 120px;
  padding: 8px;
}
.inventory-items-form td:first-child input {
  min-width: 220px;
}
.inventory-items-form tr.is-assigned {
  background: #f3f6f8;
}
.inventory-stock-filter {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 22px;
}
.invoice-filter {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 22px;
}
.supplier-filter {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 22px;
}
.login-history-filter {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 22px;
}
.inventory-stock-filter label:first-of-type {
  grid-column: span 2;
}
.invoice-filter label:first-of-type {
  grid-column: span 2;
}
.supplier-filter label:first-of-type {
  grid-column: span 2;
}
.login-history-filter label:first-of-type {
  grid-column: span 2;
}
.inventory-stock-actions {
  justify-content: flex-end;
  margin-bottom: 14px;
}
.invoice-actions {
  justify-content: flex-end;
  margin-bottom: 14px;
}
.supplier-actions {
  justify-content: flex-end;
  margin-bottom: 14px;
}
.inventory-stock-editor {
  margin-bottom: 16px;
}
.invoice-editor {
  margin-bottom: 16px;
}
.supplier-editor {
  margin-bottom: 16px;
}
.inventory-stock-editor h2 {
  margin-bottom: 12px;
}
.invoice-editor h2 {
  margin-bottom: 12px;
}
.supplier-editor h2 {
  margin-bottom: 12px;
}
.inventory-stock-edit-form {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}
.invoice-edit-form {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}
.supplier-edit-form {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}
.inventory-stock-edit-form label:first-of-type,
.inventory-stock-edit-form label:last-of-type {
  grid-column: span 2;
}
.invoice-edit-form label:first-of-type,
.invoice-edit-form label:nth-of-type(10) {
  grid-column: span 2;
}
.supplier-edit-form label:first-of-type,
.supplier-edit-form label:nth-of-type(18) {
  grid-column: span 2;
}
.inventory-stock-filter label,
.inventory-stock-edit-form label,
.invoice-filter label,
.invoice-edit-form label,
.supplier-filter label,
.supplier-edit-form label,
.login-history-filter label {
  font-size: 0;
  gap: 0;
}
.inventory-stock-filter input,
.inventory-stock-filter select,
.inventory-stock-edit-form input,
.inventory-stock-edit-form select,
.invoice-filter input,
.invoice-filter select,
.invoice-edit-form input,
.invoice-edit-form select,
.supplier-filter input,
.supplier-filter select,
.supplier-edit-form input,
.supplier-edit-form select,
.login-history-filter input {
  font-size: 14px;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.inventory-stock-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.invoice-grid-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.supplier-grid-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.login-history-table {
  width: 100%;
  min-width: 780px;
  table-layout: fixed;
}
.inventory-stock-table th,
.inventory-stock-table td,
.invoice-grid-table th,
.invoice-grid-table td,
.supplier-grid-table th,
.supplier-grid-table td,
.login-history-table th,
.login-history-table td {
  padding: 8px 7px;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: normal;
}
.inventory-stock-table th,
.invoice-grid-table th,
.supplier-grid-table th,
.login-history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.inventory-stock-table td,
.invoice-grid-table td,
.supplier-grid-table td,
.login-history-table td {
  vertical-align: middle;
}
.login-history-table th:nth-child(1), .login-history-table td:nth-child(1) { width: 54px; }
.login-history-table th:nth-child(2), .login-history-table td:nth-child(2) { width: 132px; }
.login-history-table th:nth-child(3), .login-history-table td:nth-child(3) { width: 24%; }
.login-history-table th:nth-child(4), .login-history-table td:nth-child(4) { width: 78px; }
.login-history-table th:nth-child(5), .login-history-table td:nth-child(5) { width: 20%; }
.login-history-table th:nth-child(6), .login-history-table td:nth-child(6) { width: 16%; }
.login-history-table th:nth-child(7), .login-history-table td:nth-child(7) { width: 18%; }
.inventory-stock-table th:nth-child(1), .inventory-stock-table td:nth-child(1) { width: 54px; text-align: center; }
.inventory-stock-table th:nth-child(2), .inventory-stock-table td:nth-child(2) { width: 44px; }
.inventory-stock-table th:nth-child(3), .inventory-stock-table td:nth-child(3) { width: 118px; }
.inventory-stock-table th:nth-child(4), .inventory-stock-table td:nth-child(4) { width: 98px; }
.inventory-stock-table th:nth-child(5), .inventory-stock-table td:nth-child(5) { width: 24%; }
.inventory-stock-table th:nth-child(6), .inventory-stock-table td:nth-child(6) { width: 76px; }
.inventory-stock-table th:nth-child(7), .inventory-stock-table td:nth-child(7) { width: 76px; }
.inventory-stock-table th:nth-child(8), .inventory-stock-table td:nth-child(8) { width: 132px; }
.inventory-stock-table th:nth-child(9), .inventory-stock-table td:nth-child(9) { width: 92px; }
.inventory-stock-table th:nth-child(10), .inventory-stock-table td:nth-child(10) { width: 150px; }
.inventory-stock-table th:nth-child(12), .inventory-stock-table td:nth-child(12) { width: 82px; }
.invoice-grid-table th:nth-child(1), .invoice-grid-table td:nth-child(1) { width: 54px; text-align: center; }
.invoice-grid-table th:nth-child(2), .invoice-grid-table td:nth-child(2) { width: 44px; }
.invoice-grid-table th:nth-child(3), .invoice-grid-table td:nth-child(3) { width: 122px; }
.invoice-grid-table th:nth-child(4), .invoice-grid-table td:nth-child(4) { width: 18%; }
.invoice-grid-table th:nth-child(5), .invoice-grid-table td:nth-child(5) { width: 92px; }
.invoice-grid-table th:nth-child(6), .invoice-grid-table td:nth-child(6) { width: 92px; }
.invoice-grid-table th:nth-child(7), .invoice-grid-table td:nth-child(7) { width: 78px; }
.invoice-grid-table th:nth-child(8), .invoice-grid-table td:nth-child(8) { width: 82px; }
.invoice-grid-table th:nth-child(9), .invoice-grid-table td:nth-child(9) { width: 60px; }
.invoice-grid-table th:nth-child(10), .invoice-grid-table td:nth-child(10) { width: 94px; }
.invoice-grid-table th:nth-child(11), .invoice-grid-table td:nth-child(11) { width: 86px; }
.invoice-grid-table th:nth-child(12), .invoice-grid-table td:nth-child(12) { width: 82px; }
.supplier-grid-table th:nth-child(1), .supplier-grid-table td:nth-child(1) { width: 54px; text-align: center; }
.supplier-grid-table th:nth-child(2), .supplier-grid-table td:nth-child(2) { width: 44px; }
.supplier-grid-table th:nth-child(3), .supplier-grid-table td:nth-child(3) { width: 90px; }
.supplier-grid-table th:nth-child(4), .supplier-grid-table td:nth-child(4) { width: 68px; }
.supplier-grid-table th:nth-child(5), .supplier-grid-table td:nth-child(5) { width: 22%; }
.supplier-grid-table th:nth-child(6), .supplier-grid-table td:nth-child(6) { width: 116px; }
.supplier-grid-table th:nth-child(7), .supplier-grid-table td:nth-child(7) { width: 19%; }
.supplier-grid-table th:nth-child(8), .supplier-grid-table td:nth-child(8) { width: 21%; }
.supplier-grid-table th:nth-child(9), .supplier-grid-table td:nth-child(9) { width: 20%; }
.inventory-stock-table tr.is-selected {
  background: #eaf3f2;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.invoice-grid-table tr.is-selected {
  background: #eaf3f2;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.supplier-grid-table tr.is-selected {
  background: #eaf3f2;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.inventory-stock-table tbody tr {
  cursor: pointer;
}
.invoice-grid-table tbody tr {
  cursor: pointer;
}
.supplier-grid-table tbody tr {
  cursor: pointer;
}
.inventory-stock-table tbody tr:hover,
.invoice-grid-table tbody tr:hover,
.supplier-grid-table tbody tr:hover {
  background: #f6fbfa;
}
.stock-quantity-cell {
  display: grid;
  grid-template-columns: 90px 70px 90px;
  gap: 6px;
}
.checkbox-label {
  grid-template-columns: auto 1fr;
  align-items: start;
  color: var(--text);
}
.checkbox-label input {
  width: auto;
  margin-top: 3px;
}
.compact-checkbox {
  font-size: 12px;
  gap: 6px;
}
.inline-form {
  display: inline;
}
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 600; }
.field-help-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
}
.field-help-button {
  display: inline-grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  place-items: center;
  color: var(--accent-dark);
  background: #eef8f6;
  border: 1px solid #91c8c1;
  border-radius: 50%;
  font: 800 12px/1 Arial, Helvetica, sans-serif;
  cursor: help;
}
.field-help-button:hover,
.field-help-button:focus-visible,
.field-help-button[aria-expanded="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  outline: 3px solid rgba(15, 118, 110, .17);
  outline-offset: 1px;
}
.field-help-popover {
  position: fixed;
  z-index: 1000;
  max-width: calc(100vw - 24px);
  padding: 12px 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid #8bbfb9;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(16, 24, 40, .2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.48;
}
.field-help-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 14px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-top: 1px solid #8bbfb9;
  border-left: 1px solid #8bbfb9;
  transform: rotate(45deg);
}
.customer-name-field {
  position: relative;
  display: grid;
  gap: 7px;
}
.field-label-with-help {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
}
.field-label-with-help > label {
  display: block;
}
.field-info {
  position: static;
}
.field-info > summary {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--accent-dark);
  background: #eef8f6;
  border: 1px solid #9acbc5;
  border-radius: 50%;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.field-info > summary::-webkit-details-marker {
  display: none;
}
.field-info > summary:hover,
.field-info > summary:focus-visible {
  color: #fff;
  background: var(--accent);
  outline: 3px solid rgba(15, 118, 110, .2);
  outline-offset: 2px;
}
.field-info-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: min(340px, 100%);
  padding: 12px 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid #9acbc5;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.help-dialog {
  width: min(760px, calc(100vw - 36px));
  max-width: none;
  max-height: min(820px, calc(100vh - 36px));
  padding: 0;
  color: var(--text);
  background: #fff;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, .28);
  overflow: hidden;
}
.help-dialog::backdrop { background: rgba(16, 24, 40, .58); }
.help-dialog-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: inherit; }
.help-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  color: #fff;
  background: var(--accent-dark);
}
.help-dialog-head span {
  display: block;
  margin-bottom: 4px;
  color: #c7e8e4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.help-dialog-head h2 { margin: 0; color: #fff; font-size: 22px; }
.help-close {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.help-close:hover,
.help-close:focus-visible { background: rgba(255, 255, 255, .2); outline: 2px solid #fff; }
.help-dialog-body { padding: 24px; overflow-y: auto; }
.help-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  color: var(--muted);
  background: #f8fafc;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.help-center { scroll-behavior: smooth; }
.help-center-intro { align-items: center; }
.help-center-intro p { max-width: 820px; margin-bottom: 0; }
.help-version {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--accent-dark);
  background: #eef8f6;
  border: 1px solid #b9dcd7;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}
.help-search {
  max-width: 760px;
  margin: 26px auto;
  padding: 20px;
  background: #f7fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.help-search > div { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 8px; }
.help-search .sub { margin: 9px 0 0; }
.help-index {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.help-index a {
  padding: 8px 11px;
  color: var(--accent-dark);
  background: #fff;
  border: 1px solid #b9d3d0;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.help-index a:hover,
.help-index a:focus-visible { background: #eef8f6; outline: 2px solid rgba(15, 118, 110, .18); }
.help-process-overview {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 9px;
  margin: 0 0 30px;
  padding: 16px 18px;
  background: #f0f7f6;
  border: 1px solid #c6dfdc;
  border-radius: 9px;
  color: #234e4a;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.help-process-overview i { height: 2px; background: #8cbcb6; position: relative; }
.help-process-overview i::after {
  content: "";
  position: absolute;
  top: -3px;
  right: 0;
  width: 7px;
  height: 7px;
  border-top: 2px solid #6b9f99;
  border-right: 2px solid #6b9f99;
  transform: rotate(45deg);
}
.help-register {
  margin-bottom: 28px;
  padding: 22px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.help-register-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.help-register-head h2 { margin-bottom: 5px; }
.help-register-head p { max-width: 850px; margin: 0; font-size: 14px; }
.help-register-head > span {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: var(--accent-dark);
  background: #e4f2f0;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}
.help-register-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.help-register-grid article {
  position: relative;
  min-height: 112px;
  padding: 13px 14px 34px;
  background: #fff;
  border: 1px solid #d8e2e7;
  border-radius: 7px;
}
.help-register-grid article > span { color: var(--accent); font-size: 11px; font-weight: 900; }
.help-register-grid h3 { margin: 4px 0 5px; font-size: 14px; line-height: 1.3; }
.help-register-grid p { margin: 0; font-size: 12px; }
.help-register-grid a {
  position: absolute;
  left: 14px;
  bottom: 11px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}
.help-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.help-topic {
  scroll-margin-top: 100px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 9px;
}
.help-topic-head { display: flex; align-items: flex-start; gap: 13px; }
.help-topic-number {
  display: grid;
  flex: 0 0 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-weight: 900;
}
.help-topic h2 { margin: 2px 0 5px; }
.help-topic-head p { margin: 0 0 16px; font-size: 14px; }
.help-steps { display: grid; gap: 10px; margin: 4px 0 18px; padding-left: 22px; }
.help-steps li { padding-left: 4px; color: #344054; font-size: 14px; line-height: 1.5; }
.help-steps li::marker { color: var(--accent); font-weight: 800; }
.help-tips { padding: 13px 14px; color: #344054; background: #f4f8f7; border-left: 3px solid #7bb5ae; border-radius: 0 7px 7px 0; font-size: 13px; }
.help-tips strong { display: block; margin-bottom: 6px; color: var(--accent-dark); }
.help-tips ul { display: grid; gap: 5px; margin: 0; padding-left: 18px; }
.help-topic-compact { padding: 0; border: 0; }
.help-topic-compact .help-topic-head { display: none; }
.help-topic-compact .help-steps { margin-top: 0; }
.help-empty { padding: 36px; text-align: center; }
.help-empty p { margin: 8px 0 0; }
.parameter-table input { min-width: 90px; padding: 8px; }
.parameter-table input[type="checkbox"] { min-width: 0; width: auto; }
.parameter-section {
  display: grid;
  gap: 12px;
}
.parameter-section + .parameter-section {
  margin-top: 26px;
}
.runtime-settings-form {
  margin-bottom: 34px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfd;
}
.runtime-settings-form label,
.runtime-mail-columns fieldset {
  min-width: 0;
}
.runtime-settings-form label { display: grid; gap: 6px; color: #344054; font-size: 12px; font-weight: 800; }
.runtime-settings-grid { display: grid; gap: 14px; }
.runtime-path-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
.runtime-path-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.runtime-path-field > label { display: block; }
.runtime-path-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.runtime-path-control button { white-space: nowrap; }
.runtime-path-status { min-height: 17px; color: var(--muted); font-size: 12px; font-weight: 500; }
.runtime-path-status.is-error { color: var(--danger); }
.runtime-timer-grid { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.runtime-mail-columns { display: grid; grid-template-columns: repeat(2, minmax(300px, 1fr)); gap: 18px; }
.runtime-mail-columns fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.runtime-mail-columns legend { padding: 0 8px; color: var(--accent-dark); font-weight: 800; }
.runtime-mail-columns label:first-of-type,
.runtime-mail-columns label:nth-of-type(4),
.runtime-mail-columns label:nth-of-type(5) { grid-column: 1 / -1; }
.own-company-intro {
  padding: 2px 2px 8px;
}
.own-company-intro h2 {
  margin-bottom: 4px;
}
.own-company-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
}
.own-company-grid fieldset {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.own-company-grid legend {
  padding: 0 8px;
  color: var(--accent-dark);
  font-weight: 800;
}
.own-company-logo-card {
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, .65fr) minmax(320px, 1.35fr);
  align-items: start;
}
.own-company-logo-card legend,
.own-company-logo-card > .sub,
.own-company-logo-card > .actions {
  grid-column: 1 / -1;
}
.company-logo-preview {
  grid-row: span 2;
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 18px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background:
    linear-gradient(45deg, #f4f6f8 25%, transparent 25%),
    linear-gradient(-45deg, #f4f6f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f4f6f8 75%),
    linear-gradient(-45deg, transparent 75%, #f4f6f8 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.company-logo-preview img {
  display: block;
  max-width: 100%;
  max-height: 125px;
  object-fit: contain;
}
.company-logo-preview.is-empty {
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
}
.company-logo-options {
  display: grid;
  align-content: start;
  gap: 10px;
}
.company-logo-options .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
}
.company-logo-options input[type="checkbox"] {
  width: auto;
  margin-top: 2px;
}
.own-company-fields-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.own-company-postal-city {
  grid-template-columns: minmax(110px, .45fr) minmax(180px, 1fr);
}
.own-company-bank {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}
.own-company-bank legend,
.own-company-bank .own-company-fields-2 {
  grid-column: 1 / -1;
}
.number-range-form {
  position: relative;
}
.number-range-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.number-range-intro h2 {
  margin-bottom: 4px;
}
.number-range-lock {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #475467;
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 800;
}
.number-range-lock.is-unlocked {
  border-color: #abefc6;
  color: #067647;
  background: #ecfdf3;
}
.number-range-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}
.number-range-grid fieldset {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.number-range-grid fieldset.is-critical {
  border-color: #f4c7c7;
  box-shadow: inset 4px 0 0 #b42318;
}
.number-range-grid legend {
  padding: 0 8px;
  color: var(--accent-dark);
  font-weight: 800;
}
.number-range-grid input:disabled {
  border-color: #d0d5dd;
  color: #667085;
  background: #eaecf0;
  cursor: not-allowed;
}
.number-range-facts {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(130px, 1.2fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 12px;
}
.number-range-facts dt {
  color: var(--muted);
}
.number-range-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.number-range-critical-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 7px;
  color: #912018;
  background: #fef3f2;
  font-size: 12px;
  line-height: 1.45;
}
.number-range-actions {
  margin-top: 18px;
}
.number-range-dialog {
  width: min(660px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, .28);
}
.number-range-dialog::backdrop {
  background: rgba(16, 24, 40, .58);
}
.number-range-dialog-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  padding: 26px;
  color: var(--text);
  background: #fff;
}
.number-range-dialog-panel h2 {
  margin: 0 0 10px;
}
.number-range-dialog-panel p {
  margin: 0 0 12px;
  line-height: 1.55;
}
.number-range-dialog-panel .actions {
  margin-top: 22px;
}
.number-range-dialog-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #b42318;
  background: #fee4e2;
  font-size: 22px;
  font-weight: 900;
}
.parameter-new-row td {
  background: #f6fbfa;
  border-top: 2px solid var(--accent);
}
.table-date-input { min-width: 140px; padding: 8px; }
.candidate-table th:last-child,
.candidate-table td:last-child {
  text-align: right;
  white-space: nowrap;
}
.candidate-table td {
  word-break: break-word;
}
textarea, .actions { grid-column: 1 / -1; }
pre {
  min-height: 54px;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}
.label { font-size: 13px; font-weight: 700; margin-bottom: 8px; }

.primary, .secondary, .danger {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 11px 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  min-height: 40px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.10), inset 0 -1px 0 rgba(16, 24, 40, 0.12);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
  white-space: normal;
  text-align: center;
}
.primary:hover,
.secondary:hover,
.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.14), inset 0 -1px 0 rgba(16, 24, 40, 0.12);
}
.primary:active,
.secondary:active,
.danger:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.10), inset 0 1px 2px rgba(16, 24, 40, 0.16);
}
.primary:focus-visible,
.secondary:focus-visible,
.danger:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}
.primary:disabled,
.secondary:disabled,
.danger:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}
.primary {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: #fff;
}
.primary:hover { background: var(--accent-dark); }
.secondary {
  background: #ffffff;
  border-color: #9aaabd;
  color: #213547;
}
.secondary:hover {
  background: #eef4f8;
  border-color: #697b8f;
}
.danger {
  background: var(--danger);
  border-color: #7a271a;
  color: #fff;
}
.danger:hover { background: #912018; }
.small {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 13px;
}
.actions { display: flex; gap: 12px; justify-content: flex-end; }
.op-actions { margin-top: 18px; }
.alert, .success {
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.alert { background: #fef3f2; color: #912018; border: 1px solid #fecdca; }
.success { background: #ecfdf3; color: #05603a; border: 1px solid #abefc6; }
.intake-status {
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: #ecfdf3;
  color: #05603a;
  border: 1px solid #abefc6;
  font-weight: 700;
}
.intake-status.is-error {
  background: #fef3f2;
  color: #912018;
  border-color: #fecdca;
}
.intake-popup {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(23, 32, 42, 0.28);
}
.intake-popup.is-visible { display: grid; }
.intake-popup__panel {
  width: min(420px, 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 22px;
  display: grid;
  gap: 18px;
}
.intake-popup__panel p {
  color: var(--text);
  font-weight: 700;
  margin: 0;
}
.intake-popup.is-error .intake-popup__panel {
  border-color: #fecdca;
}

.explorer {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.explorer-head,
.explorer-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.7fr) minmax(180px, 1fr) 100px 140px minmax(260px, auto);
  gap: 12px;
  align-items: center;
}
.explorer-head {
  padding: 11px 14px;
  background: #fafbfc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.explorer-row {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.explorer-row.is-hidden {
  display: none;
}
.explorer-row.is-folder {
  background: #fbfcfd;
}
.explorer-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: calc(var(--level) * 22px);
}
.explorer-icon {
  width: 24px;
  text-align: center;
  flex: 0 0 24px;
}
.tree-toggle,
.tree-spacer {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.tree-toggle {
  border: 1px solid #b8c7d6;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.10);
}
.tree-toggle::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 8px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--muted);
}
.explorer-row.is-expanded > .explorer-name .tree-toggle::before {
  top: 8px;
  left: 6px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--muted);
  border-bottom: 0;
}
.tree-toggle:hover,
.tree-toggle:focus-visible {
  border-color: var(--accent);
  background: #eef3f7;
  outline: none;
}
.explorer-name strong,
.explorer-name small {
  display: block;
  overflow-wrap: anywhere;
}
.explorer-name small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.explorer-empty {
  padding: 18px;
  color: var(--muted);
}
.document-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.document-print-action { color: #7a3412; border-color: #fdba74; background: #fff7ed; }
.document-selection {
  margin: 24px 0 30px;
  padding: 22px;
  background: #f8fafc;
  border: 1px solid #cfd9e3;
  border-radius: 10px;
}
.document-selection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.document-selection-head h2 { margin-bottom: 5px; }
.document-selection-head p { max-width: 820px; margin: 0; }
.document-selection-head > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--accent-dark);
  background: #e4f2f0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}
.document-selection-form { display: grid; gap: 16px; }
.document-area-picker {
  margin: 0;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.document-area-picker legend { padding: 0 7px; color: #344054; font-size: 13px; font-weight: 800; }
.document-area-picker label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #344054;
  cursor: pointer;
}
.document-area-picker input { width: auto; min-width: 0; margin: 0; }
.document-area-picker > div { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 11px; }
.document-area-picker > div label {
  padding: 6px 9px;
  background: #f8fafc;
  border: 1px solid #d5dde5;
  border-radius: 6px;
  font-size: 12px;
}
.document-area-all { width: fit-content; font-weight: 800; }
.document-filter-fields { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 12px; }
.document-filter-actions { display: flex; justify-content: flex-end; gap: 9px; }
.document-selection-results {
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.document-result-head,
.document-result-row {
  display: grid;
  grid-template-columns: minmax(140px, .7fr) minmax(280px, 1.8fr) 110px 90px minmax(260px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
}
.document-result-head {
  color: var(--muted);
  background: #f5f7fa;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.document-result-row { border-top: 1px solid var(--border); font-size: 13px; }
.document-result-row strong,
.document-result-row small { display: block; overflow-wrap: anywhere; }
.document-result-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.document-area-badge {
  display: inline-block;
  padding: 5px 7px;
  color: #225e58;
  background: #eaf5f3;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}
.document-result-empty { padding: 24px; color: var(--muted); text-align: center; }
.document-archive-browser {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}
.document-archive-browser > summary {
  padding: 15px 18px;
  color: var(--accent-dark);
  background: #f8fafc;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.document-archive-browser[open] > summary { border-bottom: 1px solid var(--border); border-radius: 9px 9px 0 0; }
.document-archive-browser-body { padding: 4px 18px 20px; }
.document-print-page { min-height: calc(100vh - 136px); }
.document-print-hint {
  margin-bottom: 14px;
  padding: 10px 12px;
  color: #344054;
  background: #f0f7f6;
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-size: 13px;
}
.document-print-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 280px);
  min-height: 560px;
  background: #e9edf2;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.task-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) 12px minmax(520px, 1.15fr);
  gap: 12px;
  align-items: start;
}
.task-results { min-width: 0; }
.document-pane {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
  min-height: 760px;
}
.layout-resizer {
  align-self: stretch;
  min-height: 760px;
  cursor: col-resize;
  border-radius: 6px;
  position: relative;
}
.layout-resizer::before {
  content: "";
  position: absolute;
  inset: 0 4px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: #eef3f7;
  border-radius: 6px;
}
.layout-resizer:hover::before,
.layout-resizer:focus-visible::before {
  background: #d9e8e6;
  border-color: var(--accent);
}
.is-resizing,
.is-resizing * {
  cursor: col-resize !important;
  user-select: none;
}
.document-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.document-head h2 { margin: 0; }
.document-frame {
  width: 100%;
  height: 700px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.document-empty {
  min-height: 700px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: #fff;
}

.bank-reconciliation { padding-bottom: 22px; }
.bank-page-head { align-items: center; }
.bank-access-note {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.bank-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 8px 0 26px;
  padding: 0;
  list-style: none;
}
.bank-steps li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
}
.bank-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(50% + 70px);
  right: calc(-50% + 70px);
  border-top: 1px solid #cbd5df;
}
.bank-steps span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #b8c7d6;
  border-radius: 50%;
  background: #fff;
  font-weight: 800;
}
.bank-steps .is-active { color: var(--accent-dark); }
.bank-steps .is-active span { border-color: var(--accent); background: var(--accent); color: #fff; }
.bank-steps .is-complete span { border-color: #99c8c3; background: #d9eeeb; color: var(--accent-dark); }
.bank-import-box,
.bank-history {
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
  overflow: hidden;
}
.bank-import-box > summary,
.bank-history > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.bank-import-box > summary::-webkit-details-marker,
.bank-history > summary::-webkit-details-marker { display: none; }
.bank-import-box > summary span:first-child { display: grid; gap: 4px; }
.bank-import-box > summary small { color: var(--muted); font-weight: 400; }
.bank-import-form { padding: 18px; border-top: 1px solid var(--border); background: #fff; }
.bank-upload-fields {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(220px, 1fr) 170px 170px minmax(190px, .8fr);
  gap: 14px;
  align-items: end;
}
.bank-upload-fields label,
.bank-mapping-grid label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}
.bank-header-check { padding-bottom: 2px; }
.bank-mapping-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f8fafb;
}
.article-mapping-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
[data-quote-items] table { min-width: 1450px; }
[data-quote-items] select[data-article-select] { min-width: 250px; }
.bank-mapping-grid label span {
  display: block;
  min-height: 30px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.bank-file-preview {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: #eef8f7;
  color: #344054;
  font-size: 12px;
}
.bank-import-summary {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) 3fr;
  gap: 20px;
  align-items: center;
  margin: 0 0 24px;
  padding: 17px 18px;
  border: 1px solid #b9d9d5;
  border-radius: 8px;
  background: #f7fcfb;
}
.bank-import-summary > div { display: flex; align-items: center; gap: 10px; color: #067647; }
.bank-summary-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #16a34a;
  border-radius: 50%;
  font-weight: 900;
}
.bank-import-summary dl {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr .65fr 1fr;
  gap: 0;
  margin: 0;
}
.bank-import-summary dl div { min-width: 0; padding: 0 18px; border-left: 1px solid var(--border); }
.bank-import-summary dt,
.bank-confirm-bar dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.bank-import-summary dd,
.bank-confirm-bar dd { margin: 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.bank-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 10px; }
.bank-section-head h2 { margin: 0; }
.bank-section-head span { color: var(--muted); font-size: 12px; }
.bank-match-table { min-width: 1120px; table-layout: fixed; border: 1px solid var(--border); }
.bank-match-table th,
.bank-match-table td { padding: 10px 9px; font-size: 12px; vertical-align: middle; }
.bank-match-table th:nth-child(1) { width: 64px; text-align: center; }
.bank-match-table th:nth-child(2) { width: 125px; }
.bank-match-table th:nth-child(3) { width: 27%; }
.bank-match-table th:nth-child(4) { width: 125px; }
.bank-match-table th:nth-child(5) { width: 24%; }
.bank-match-table th:nth-child(6) { width: 125px; }
.bank-match-table th:nth-child(7) { width: 25%; }
.bank-match-table td:first-child { text-align: center; }
.bank-match-table tr.has-no-match { background: #fffafa; }
.bank-match-table tr.is-booked { background: #f3faf7; color: #475467; }
.bank-match-check { width: 18px; height: 18px; accent-color: var(--accent); }
.bank-booked-mark {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #dcfae6;
  color: #067647;
  font-weight: 900;
}
.bank-empty-mark { color: #98a2b3; }
.bank-text-detail summary { display: grid; gap: 3px; cursor: pointer; line-height: 1.4; }
.bank-text-detail summary small { color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.bank-text-detail p { margin: 8px 0 4px; color: #344054; font-size: 11px; }
.bank-text-detail small { color: var(--muted); overflow-wrap: anywhere; }
.bank-metadata-list {
  display: grid;
  gap: 0;
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.bank-metadata-list div {
  display: grid;
  grid-template-columns: minmax(105px, .65fr) minmax(160px, 1.35fr);
  gap: 10px;
  padding: 7px 9px;
}
.bank-metadata-list div + div { border-top: 1px solid #edf0f3; }
.bank-metadata-list dt { color: var(--muted); font-size: 10px; font-weight: 800; }
.bank-metadata-list dd { margin: 0; color: #344054; font-size: 11px; overflow-wrap: anywhere; }
.bank-metadata-empty { display: block; margin: 8px 0; color: var(--muted); font-size: 10px; }
.bank-amount { white-space: nowrap; font-weight: 800; }
.bank-amount.is-outgoing { color: #b42318; }
.bank-amount.is-incoming { color: #067647; }
.bank-candidate-grid {
  display: grid;
  grid-template-columns: minmax(250px, 1.35fr) 115px minmax(200px, 1fr);
  gap: 14px;
  align-items: center;
}
.bank-candidate-grid select { min-width: 0; font-size: 12px; }
.bank-invoice-amount { white-space: nowrap; text-align: right; }
.bank-match-reasons { display: grid; gap: 4px; }
.bank-match-reasons small { color: var(--muted); line-height: 1.35; }
.match-quality { font-weight: 800; }
.match-quality.is-strong,
.match-quality.is-good { color: #067647; }
.match-quality.is-possible { color: #b54708; }
.match-quality.is-none { color: #b42318; }
.bank-result-line { display: flex; align-items: center; gap: 16px; }
.bank-result-line span:last-child { color: var(--muted); }
.bank-confirm-bar {
  position: sticky;
  bottom: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(300px, 1.2fr) auto;
  gap: 24px;
  align-items: center;
  margin: 26px -10px 0;
  padding: 16px 20px;
  border: 1px solid #b8c7d6;
  border-radius: 8px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 12px 35px rgba(16, 24, 40, .14);
}
.bank-confirm-bar dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 0; }
.bank-confirm-bar p { margin: 0; font-size: 12px; }
.bank-confirm-bar button { white-space: nowrap; }
.bank-discard-form { display: flex; justify-content: flex-end; margin: 12px 0 26px; }
.bank-history { margin-top: 28px; }
.bank-history > summary { color: var(--accent-dark); font-weight: 800; }
.bank-history .table-scroll { border-top: 1px solid var(--border); }
.bank-data-filter {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
}
.bank-filter-row > label,
.bank-advanced-filter label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}
.bank-filter-row {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.bank-filter-row-primary { grid-template-columns: minmax(280px, 2fr) minmax(190px, 1.25fr) repeat(3, minmax(135px, .8fr)); }
.bank-filter-row-secondary {
  grid-template-columns: repeat(3, minmax(150px, 190px)) minmax(280px, 1fr);
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.bank-advanced-filter { border-top: 1px solid var(--border); padding-top: 12px; }
.bank-advanced-filter summary { color: var(--accent-dark); cursor: pointer; font-size: 12px; font-weight: 800; }
.bank-advanced-filter > div {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.bank-filter-actions { grid-column: auto; justify-content: flex-end; min-width: 0; margin: 0; }
.bank-data-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.bank-data-summary > div {
  display: grid;
  gap: 6px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
}
.bank-data-summary span { color: var(--muted); font-size: 11px; font-weight: 700; }
.bank-data-summary strong { color: #344054; font-size: 18px; }
.bank-period-summary { margin-bottom: 24px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.bank-period-summary > summary { padding: 14px 16px; background: #f8fafb; color: var(--accent-dark); cursor: pointer; font-size: 13px; font-weight: 800; }
.bank-period-summary .table-scroll { border-top: 1px solid var(--border); }
.bank-data-grid-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 10px; }
.bank-data-grid-head h2 { margin: 0; }
.bank-data-grid-head span { color: var(--muted); font-size: 11px; }
.bank-data-scroll { max-height: 68vh; border: 1px solid var(--border); }
.bank-data-table { min-width: 2180px; table-layout: fixed; }
.bank-data-table th,
.bank-data-table td { padding: 8px 7px; font-size: 11px; line-height: 1.35; vertical-align: top; }
.bank-data-table th { position: sticky; top: 0; z-index: 2; }
.bank-data-table th:nth-child(1) { width: 58px; }
.bank-data-table th:nth-child(2) { width: 190px; }
.bank-data-table th:nth-child(3), .bank-data-table th:nth-child(4) { width: 94px; }
.bank-data-table th:nth-child(5) { width: 190px; }
.bank-data-table th:nth-child(6) { width: 330px; }
.bank-data-table th:nth-child(7) { width: 260px; }
.bank-data-table th:nth-child(8) { width: 190px; }
.bank-data-table th:nth-child(9) { width: 115px; }
.bank-data-table th:nth-child(10) { width: 110px; }
.bank-data-table th:nth-child(11) { width: 72px; }
.bank-data-table th:nth-child(12) { width: 185px; }
.bank-data-table th:nth-child(13) { width: 210px; }
.bank-data-table th:nth-child(14) { width: 230px; }
.bank-data-table tbody tr.is-reconciled { background: #eaf7ef; }
.bank-data-table tbody tr.is-reconciled:hover { background: #dff2e7; }
.bank-grid-text summary { color: #344054; cursor: pointer; }
.bank-grid-text p { margin: 8px 0; color: #344054; font-size: 11px; }
.document-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid #9ec5d6;
  border-radius: 999px;
  background: #eaf6fb;
  color: #17566f;
  font-size: 11px;
  font-weight: 800;
}
.delivery-note-review-form label > small {
  display: block;
  margin-top: 6px;
  color: #9a3412;
  font-weight: 700;
  line-height: 1.35;
}
.delivery-note-review-form [hidden] { display: none !important; }

/* Central CSV import workbench */
.data-import-page { padding: 0; overflow: hidden; }
.data-import-page > .panel-head,
.data-import-page > .success,
.data-import-page > .alert,
.data-import-page > .data-import-followup { margin-inline: 28px; }
.data-import-page > .panel-head { margin-top: 28px; }
.data-import-followup {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #a6d5ca;
  border-radius: 6px;
  background: #ecf8f5;
  color: #115e59;
}
.data-import-followup a { color: #0f766e; font-weight: 700; }
.data-import-workbench { border-top: 1px solid var(--border); }
.data-import-tabs {
  display: flex;
  align-items: end;
  gap: 2px;
  min-height: 52px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfd;
}
.data-import-tabs button {
  align-self: stretch;
  min-width: 130px;
  padding: 0 22px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #667085;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.data-import-tabs button:hover { color: var(--accent-dark); background: #f3f8f7; }
.data-import-tabs button.is-active {
  border-bottom-color: var(--accent);
  background: #fff;
  color: var(--accent-dark);
}
.data-import-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) minmax(150px, .7fr) minmax(170px, .8fr) minmax(210px, 1fr);
  align-items: end;
  gap: 14px 18px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.data-import-toolbar label:not(.check-label) {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}
.data-import-toolbar input[type="file"] {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #b8c4d0;
  border-radius: 6px;
  background: #fff;
  color: #344054;
}
.data-import-toolbar input[type="file"]::file-selector-button {
  margin: -3px 10px -3px -3px;
  padding: 7px 10px;
  border: 0;
  border-right: 1px solid #cfd8e3;
  background: #f2f5f7;
  color: #344054;
  font-weight: 700;
  cursor: pointer;
}
.data-import-check {
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafb;
  color: #344054;
}
.data-import-toolbar > button { justify-self: start; }
.data-import-grid-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px 14px;
}
.data-import-grid-head h2 { margin: 0 0 5px; }
.data-import-grid-head p { margin: 0; font-size: 13px; }
.data-import-selection-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.data-import-validation {
  min-height: 38px;
  margin: 0 28px 14px;
  padding: 10px 12px;
  border: 1px solid #c9d8e5;
  border-radius: 5px;
  background: #f4f8fb;
  color: #36566d;
  font-size: 13px;
}
.data-import-validation.is-error {
  border-color: #f0b4ae;
  background: #fff3f2;
  color: var(--danger);
}
.data-import-validation.has-duplicates {
  border-color: #e6a8a2;
  background: #fff0ef;
  color: #9f241b;
  font-weight: 700;
}
.data-import-validation.is-cleaned {
  border-color: #98d6c5;
  background: #ecf8f5;
  color: #0b665d;
}
.data-import-grid-scroll {
  min-height: 340px;
  max-height: 570px;
  overflow: auto;
  border-block: 1px solid var(--border);
  background: #fff;
}
.data-import-grid { min-width: 980px; table-layout: fixed; }
.data-import-grid th,
.data-import-grid td { padding: 8px; vertical-align: middle; }
.data-import-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  width: 210px;
  min-width: 210px;
  padding-block: 10px;
  border-right: 1px solid var(--border);
  background: #eef3f6;
  text-transform: none;
}
.data-import-grid thead th > span,
.data-import-grid thead th > strong { display: block; }
.data-import-grid thead th > span {
  margin-bottom: 3px;
  color: #7c8997;
  font-size: 10px;
  text-transform: uppercase;
}
.data-import-grid thead th > strong {
  overflow: hidden;
  margin-bottom: 7px;
  color: #344054;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-import-grid select,
.data-import-grid td input:not([type="checkbox"]) {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #c4cfda;
  border-radius: 4px;
  background: #fff;
  color: #17202a;
  font: inherit;
  font-size: 12px;
}
.data-import-grid select:focus,
.data-import-grid td input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(15, 118, 110, .12);
}
.data-import-grid tbody tr:hover { background: #f8fbfb; }
.data-import-grid tbody tr.is-deselected { opacity: .48; background: #f6f7f8; }
.data-import-grid tbody tr.is-duplicate,
.data-import-grid tbody tr.is-duplicate:hover { background: #fff0ef; }
.data-import-grid tbody tr.is-duplicate td { border-bottom-color: #efc4c0; }
.data-import-grid tbody tr.is-duplicate input:not([type="checkbox"]) {
  border-color: #dfa29b;
  background: #fff8f7;
}
.data-import-select-cell { width: 48px !important; min-width: 48px !important; text-align: center; }
.data-import-row-number { width: 62px !important; min-width: 62px !important; color: #667085; text-align: center; }
.data-import-duplicate-badge {
  display: block;
  margin-top: 4px;
  color: #b42318;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.data-import-action-cell { width: 92px !important; min-width: 92px !important; text-align: center; }
.data-import-delete {
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.data-import-delete:hover { text-decoration: underline; }
.data-import-empty {
  min-height: 340px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 40px;
  color: #667085;
  text-align: center;
}
.data-import-empty strong { color: #344054; font-size: 17px; }
.data-import-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfd;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}
.data-import-submit-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 14px;
}
.data-import-duplicate-release {
  margin: 0;
  color: #7a271a;
  white-space: nowrap;
}
.data-import-pagination { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.data-import-pagination[hidden],
.data-import-grid[hidden],
.data-import-empty[hidden] { display: none !important; }
.data-import-history { padding: 24px 28px 28px; }
.data-import-history > .data-import-grid-head { padding: 0 0 14px; }
.data-import-history table { min-width: 1040px; }
.data-import-history td { font-size: 12px; }
.data-import-duplicate-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #e1a7a1;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(70, 17, 13, .24);
}
.data-import-duplicate-dialog::backdrop { background: rgba(23, 32, 42, .48); }
.data-import-duplicate-dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px 10px;
}
.data-import-duplicate-dialog-head h2 { margin: 0 0 5px; color: #912018; }
.data-import-duplicate-dialog-head p { margin: 0; }
.data-import-duplicate-icon {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #fee4e2;
  color: #b42318;
  font-size: 20px;
  font-weight: 800;
}
.data-import-duplicate-dialog > p { margin: 0; padding: 8px 24px 22px; color: #475467; }
.data-import-duplicate-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}

@media (max-width: 1180px) {
  .help-register-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-filter-fields { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
  .document-result-head,
  .document-result-row { grid-template-columns: minmax(130px, .7fr) minmax(240px, 1.5fr) 105px minmax(240px, 1fr); }
  .document-result-head > :nth-child(4),
  .document-result-row > :nth-child(4) { display: none; }
  .compact-upload-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-step { grid-template-columns: 34px 1fr; }
  .process-step > input, .process-step > button { grid-column: 2; }
  .runtime-mail-columns, .runtime-timer-grid, .own-company-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .bank-upload-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bank-mapping-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .article-mapping-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .bank-import-summary { grid-template-columns: 1fr; }
  .bank-import-summary dl div:first-child { border-left: 0; padding-left: 0; }
  .bank-confirm-bar { grid-template-columns: 1fr auto; }
  .bank-confirm-bar p { grid-row: 2; }
  .bank-filter-row-primary { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .bank-filter-search { grid-column: span 2; }
  .bank-filter-row-secondary { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .bank-filter-actions { grid-column: 1 / -1; }
  .bank-advanced-filter > div { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .data-import-toolbar { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}

.document-viewer-dialog {
  width: min(1180px, calc(100vw - 40px));
  height: min(900px, calc(100vh - 40px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 24, 40, .28);
  overflow: hidden;
}
.document-viewer-dialog::backdrop { background: rgba(16, 24, 40, .64); }
.document-viewer-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.document-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid #d0d5dd;
  background: #f8fafc;
}
.document-viewer-head span {
  display: block;
  margin-bottom: 2px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.document-viewer-head h2 { margin: 0; font-size: 19px; }
.document-viewer-actions { display: flex; align-items: center; gap: 8px; }
.document-viewer-body { min-height: 0; display: grid; place-items: center; background: #e9edf2; }
.document-viewer-body iframe,
.document-viewer-body img,
.document-viewer-fallback { display: none; }
.document-viewer-body iframe.is-visible {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.document-viewer-body img.is-visible {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.document-viewer-fallback.is-visible {
  display: block;
  max-width: 520px;
  margin: 24px;
  padding: 28px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}
.document-viewer-fallback p { margin: 8px 0 0; color: #667085; }

@media (max-width: 1440px) {
  .brand-text { display: none; }
  .nav { justify-content: flex-end; flex-wrap: wrap; gap: 10px 12px; }
}

@media (max-width: 780px) {
  .help-dialog { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .help-dialog-foot { align-items: stretch; flex-direction: column; }
  .help-dialog-foot .button-link { text-align: center; }
  .help-center-intro { align-items: flex-start; }
  .help-search > div, .help-topics, .help-register-grid { grid-template-columns: 1fr; }
  .help-register-head { flex-direction: column; }
  .document-selection { margin-inline: -10px; padding: 16px; }
  .document-selection-head { flex-direction: column; }
  .document-area-picker > div { display: grid; grid-template-columns: 1fr; }
  .document-filter-fields { grid-template-columns: 1fr; }
  .document-filter-actions { align-items: stretch; flex-direction: column-reverse; }
  .document-filter-actions .secondary,
  .document-filter-actions .primary { width: 100%; text-align: center; }
  .document-result-head { display: none; }
  .document-result-row { grid-template-columns: 1fr; gap: 7px; padding: 15px; }
  .document-result-row > :nth-child(4) { display: block; }
  .document-actions { justify-content: flex-start; }
  .document-print-page .panel-head .actions { width: 100%; align-items: stretch; flex-direction: column; }
  .document-print-frame { height: 70vh; min-height: 440px; }
  .help-process-overview {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .help-process-overview i { width: 2px; height: 18px; margin: 0 auto; }
  .help-process-overview i::after { top: auto; right: -3px; bottom: 0; transform: rotate(135deg); }
  .document-viewer-dialog { width: 100vw; height: 100vh; border-radius: 0; }
  .document-viewer-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .document-viewer-actions { width: 100%; justify-content: space-between; }
  .special-process-banner, .special-process-head { align-items: flex-start; flex-direction: column; }
  .special-process-progress { text-align: left; }
  .compact-upload-form { grid-template-columns: 1fr; }
  .compact-upload-form .actions { grid-column: auto; }
  .parker-reference { grid-template-columns: 1fr; }
  .topbar, .panel-head { flex-direction: column; align-items: flex-start; }
  .nav { flex-wrap: wrap; }
  .grid, .review-form, .inventory-form, .inventory-select-form, .inventory-summary, .inventory-stock-filter, .inventory-stock-edit-form, .invoice-filter, .invoice-edit-form, .supplier-filter, .supplier-edit-form, .login-history-filter, .task-layout { grid-template-columns: 1fr !important; }
  .inventory-stock-filter label:first-of-type { grid-column: auto; }
  .invoice-filter label:first-of-type { grid-column: auto; }
  .supplier-filter label:first-of-type { grid-column: auto; }
  .login-history-filter label:first-of-type { grid-column: auto; }
  .inventory-stock-edit-form label:first-of-type,
  .inventory-stock-edit-form label:last-of-type { grid-column: auto; }
  .invoice-edit-form label:first-of-type,
  .invoice-edit-form label:nth-of-type(10) { grid-column: auto; }
  .supplier-edit-form label:first-of-type,
  .supplier-edit-form label:nth-of-type(18) { grid-column: auto; }
  .explorer-head { display: none; }
  .explorer-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .facts { grid-template-columns: 1fr; }
  .runtime-path-grid, .runtime-mail-columns, .runtime-mail-columns fieldset, .runtime-timer-grid, .own-company-grid, .own-company-fields-2, .own-company-bank, .own-company-logo-card, .number-range-grid { grid-template-columns: 1fr; }
  .runtime-mail-columns label { grid-column: auto !important; }
  .own-company-bank { grid-column: auto; }
  .own-company-bank legend,
  .own-company-bank .own-company-fields-2 { grid-column: auto; }
  .own-company-logo-card { grid-column: auto; }
  .own-company-logo-card legend,
  .own-company-logo-card > .sub,
  .own-company-logo-card > .actions { grid-column: auto; }
  .company-logo-preview { grid-row: auto; }
  .number-range-intro { flex-direction: column; }
  .number-range-dialog-panel { grid-template-columns: 1fr; padding: 22px; }
  .number-range-dialog-panel .actions { align-items: stretch; flex-direction: column-reverse; }
  .document-pane { min-height: 520px; }
  .layout-resizer { display: none; }
  .document-frame, .document-empty { height: 460px; min-height: 460px; }
  .user-create-form, .user-cards, .user-edit-form, .role-meta-form, .permission-groups { grid-template-columns: 1fr !important; }
  .user-edit-form label { grid-column: auto !important; }
  .inquiry-form-section, .inquiry-filter, .inquiry-edit-form, .inquiry-detail-layout { grid-template-columns: 1fr !important; }
  .inquiry-form-section label, .inquiry-edit-form .span-2 { grid-column: auto !important; }
  .inquiry-submit-bar { position: static; flex-direction: column; align-items: stretch; }
  .inquiry-datetime-fields { width: auto; max-width: 100%; }
  .inquiry-datetime-fields input[type="date"] { width: 165px; max-width: 165px; }
  .inquiry-datetime-fields input[type="time"] { width: 125px; max-width: 125px; }
  th:nth-child(4), td:nth-child(4), th:nth-child(5), td:nth-child(5) { display: none; }
  .inventory-stock-table th:nth-child(4),
  .inventory-stock-table td:nth-child(4),
  .inventory-stock-table th:nth-child(5),
  .inventory-stock-table td:nth-child(5) { display: table-cell; }
  .invoice-grid-table th:nth-child(4),
  .invoice-grid-table td:nth-child(4),
  .invoice-grid-table th:nth-child(5),
  .invoice-grid-table td:nth-child(5) { display: table-cell; }
  .supplier-grid-table th:nth-child(4),
  .supplier-grid-table td:nth-child(4),
  .supplier-grid-table th:nth-child(5),
  .supplier-grid-table td:nth-child(5) { display: table-cell; }
  .bank-steps { grid-template-columns: 1fr; gap: 6px; }
  .bank-steps li { justify-content: flex-start; }
  .bank-steps li::after { display: none; }
  .bank-upload-fields, .bank-mapping-grid, .bank-import-summary dl, .bank-confirm-bar { grid-template-columns: 1fr; }
  .article-mapping-grid { grid-template-columns: 1fr; }
  .bank-import-summary dl { gap: 10px; }
  .bank-import-summary dl div { padding: 0; border-left: 0; }
  .bank-confirm-bar { position: static; margin-inline: 0; }
  .bank-confirm-bar p { grid-row: auto; }
  .bank-confirm-bar button { white-space: normal; }
  .bank-match-table th:nth-child(4), .bank-match-table td:nth-child(4),
  .bank-match-table th:nth-child(5), .bank-match-table td:nth-child(5) { display: table-cell; }
  .bank-filter-row, .bank-advanced-filter > div, .bank-data-summary { grid-template-columns: 1fr; }
  .bank-filter-search, .bank-advanced-filter, .bank-filter-actions { grid-column: auto; }
  .bank-filter-actions { justify-content: flex-start; }
  .bank-data-grid-head { align-items: flex-start; flex-direction: column; }
  .bank-data-table th:nth-child(4), .bank-data-table td:nth-child(4),
  .bank-data-table th:nth-child(5), .bank-data-table td:nth-child(5) { display: table-cell; }
  .data-import-page { border-radius: 0; }
  .data-import-page > .panel-head,
  .data-import-page > .success,
  .data-import-page > .alert,
  .data-import-page > .data-import-followup { margin-inline: 18px; }
  .data-import-tabs { padding-inline: 12px; overflow-x: auto; }
  .data-import-tabs button { min-width: 112px; padding-inline: 14px; }
  .data-import-toolbar { grid-template-columns: 1fr; padding: 18px; }
  .data-import-grid-head { padding-inline: 18px; flex-direction: column; }
  .data-import-validation { margin-inline: 18px; }
  .data-import-footer { grid-template-columns: 1fr; padding-inline: 18px; }
  .data-import-submit-actions { grid-column: 1; width: 100%; align-items: stretch; flex-direction: column; }
  .data-import-submit-actions .primary { width: 100%; }
  .data-import-duplicate-release { white-space: normal; }
  .data-import-history { padding-inline: 18px; }
  .data-import-duplicate-actions { flex-direction: column-reverse; }
  .data-import-duplicate-actions button { width: 100%; }
  .transfer-log-filter, .transfer-log-archive-filter { grid-template-columns: 1fr; margin-inline: 18px; }
  .data-import-grid th:nth-child(4), .data-import-grid td:nth-child(4),
  .data-import-grid th:nth-child(5), .data-import-grid td:nth-child(5) { display: table-cell; }
}
.environment-badge {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-left: .8rem;
  padding: .25rem .55rem;
  white-space: nowrap;
}

.environment-development {
  background: #6d28d9;
  color: #fff;
}

.environment-test {
  background: #f59e0b;
  color: #271500;
}

.environment-production {
  background: #15803d;
  color: #fff;
}

.backup-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.25rem 0;
}

.backup-summary article {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #d9e0e7);
  border-radius: 12px;
  display: grid;
  gap: .35rem;
  padding: 1rem;
}

.backup-summary span {
  color: var(--muted, #667085);
  font-size: .82rem;
}

.backup-summary strong {
  font-size: 1.3rem;
}

.backup-download-box {
  align-items: center;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

.backup-download-box h2 {
  margin-top: 0;
}

.backup-note {
  background: #fff7e6;
  border-left: 4px solid #f59e0b;
  margin-top: 1rem;
  padding: 1rem;
}

@media (max-width: 760px) {
  .backup-summary {
    grid-template-columns: 1fr;
  }

  .backup-download-box {
    align-items: stretch;
    flex-direction: column;
  }
}
