:root {
  color: #17212b;
  background: #f3f5f7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  --surface: #ffffff;
  --surface-subtle: #f7f8fa;
  --border: #d8dee6;
  --text: #17212b;
  --muted: #66717e;
  --green: #147d64;
  --green-soft: #e8f5f0;
  --blue: #245ea8;
  --blue-soft: #eaf1fb;
  --amber: #996000;
  --amber-soft: #fff4d6;
  --red: #b42318;
  --red-soft: #fff0ee;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f3f5f7; color: var(--text); }
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.1rem; line-height: 1.3; }
h2 { font-size: 1.35rem; line-height: 1.35; }
h3 { font-size: 1rem; line-height: 1.4; }

.login-page { min-height: 100vh; background: #eef1f4; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel {
  width: min(400px, 100%); padding: 30px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface); box-shadow: 0 12px 36px rgba(23, 33, 43, .09);
}
.login-brand { margin-bottom: 27px; }
.login-brand p, .login-version { margin-top: 4px; color: var(--muted); font-size: .8rem; }
.login-form { display: grid; gap: 17px; }
.login-form label { display: grid; gap: 6px; color: #3c4753; font-size: .82rem; font-weight: 650; }
.login-submit { width: 100%; min-height: 42px; margin-top: 3px; }
.login-error { margin-bottom: 18px; padding: 10px 12px; border-left: 3px solid var(--red); background: var(--red-soft); color: #7a1812; }
.login-version { margin-top: 22px; text-align: center; overflow-wrap: anywhere; }

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(18px, 4vw, 52px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center;
  border-radius: 6px; background: #182a3a; color: #fff; font-weight: 750; font-size: 1.15rem;
}
.brand p, .section-heading p { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.topbar-status { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.tabs {
  display: flex; gap: 2px; padding: 0 clamp(18px, 4vw, 52px); background: var(--surface);
  border-bottom: 1px solid var(--border); overflow-x: auto;
}
.tab {
  height: 46px; padding: 0 18px; border: 0; border-bottom: 3px solid transparent;
  background: transparent; color: var(--muted); white-space: nowrap; font-weight: 650;
}
.tab:hover { color: var(--text); background: var(--surface-subtle); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }

main { width: min(1440px, 100%); margin: 0 auto; padding: 28px clamp(18px, 4vw, 52px) 56px; }
.view { display: none; }
.view.active { display: block; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.settings-actions, .filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.overview-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.manual-purchase-control {
  height: 38px; display: grid; grid-template-columns: max-content minmax(130px, 190px) 68px max-content; align-items: stretch;
  overflow: hidden; border: 1px solid var(--border); border-radius: 5px; background: var(--surface);
}
.manual-purchase-label { display: flex; align-items: center; padding: 0 10px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.manual-purchase-control select {
  width: 100%; min-width: 0; min-height: 36px; height: 36px; padding: 6px 22px 6px 9px;
  border-width: 0 0 0 1px; border-radius: 0; background-color: var(--surface-subtle);
}
.manual-purchase-control #manual-purchase-count { width: 68px; min-width: 68px; }
.manual-purchase-control .button { min-height: 36px; height: 36px; border: 0; border-left: 1px solid var(--border); border-radius: 0; }

.button {
  min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px 13px; border-radius: 5px; border: 1px solid transparent; font-weight: 680;
}
.button:disabled { opacity: .55; cursor: not-allowed; }
.button.primary { background: var(--blue); color: #fff; }
.button.primary:hover { background: #1d4f90; }
.button.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.button.secondary:hover { background: var(--surface-subtle); }
.button.danger { background: var(--red); color: #fff; }
.button.compact { min-height: 30px; padding: 4px 8px; font-size: .76rem; }
.text-button { border: 0; padding: 4px; background: transparent; color: var(--blue); font-weight: 650; }
.icon-button {
  width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 34px;
  border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); font-size: 1.25rem;
}

.badge { display: inline-flex; align-items: center; min-height: 27px; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge.neutral { background: #edf0f3; color: #54606d; }
.badge.success { background: var(--green-soft); color: var(--green); }
.badge.warning { background: var(--amber-soft); color: var(--amber); }
.badge.error { background: var(--red-soft); color: var(--red); }
.badge.info { background: var(--blue-soft); color: var(--blue); }

.alert { margin-bottom: 18px; padding: 11px 14px; border-left: 4px solid var(--amber); background: var(--amber-soft); color: #6e4700; }
.alert.error { border-color: var(--red); background: var(--red-soft); color: #7a1812; }
.hidden { display: none !important; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 12px; }
.metric { min-height: 124px; padding: 17px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.metric-label { display: block; color: var(--muted); font-size: .82rem; }
.metric strong { display: block; margin-top: 13px; font-size: 1.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-detail { display: block; margin-top: 10px; color: var(--muted); font-size: .8rem; }

.inventory-band { margin: 18px 0 28px; }
.inventory-labels { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: .8rem; color: var(--muted); }
.progress { height: 9px; overflow: hidden; border-radius: 4px; background: #dfe4ea; }
.progress span { display: block; width: 0; height: 100%; background: var(--green); transition: width .2s ease; }

.split-layout { display: grid; grid-template-columns: 1.25fr .75fr; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.panel { min-height: 230px; padding: 22px 0; }
.panel + .panel { padding-left: 28px; margin-left: 28px; border-left: 1px solid var(--border); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.pending-select { width: min(180px, 48%); min-width: 0; }
.decision { min-height: 52px; font-size: 1.12rem; line-height: 1.55; font-weight: 650; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.facts { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 22px; }
.facts div { min-width: 0; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { color: var(--muted); font-size: .76rem; }
.facts dd { margin: 4px 0 0; font-weight: 620; overflow-wrap: anywhere; }
.pending-import-error { color: var(--red); }
.panel-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }
.empty-state { display: grid; place-items: center; min-height: 145px; color: var(--muted); background: var(--surface-subtle); border: 1px dashed var(--border); border-radius: 6px; }

.table-section { margin-top: 30px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 680px; table-layout: fixed; }
th, td { padding: 11px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid #e7ebef; overflow-wrap: anywhere; }
th { color: var(--muted); background: var(--surface-subtle); font-size: .75rem; font-weight: 700; }
td { font-size: .84rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfc; }
.empty-cell { height: 90px; text-align: center; vertical-align: middle; color: var(--muted); }
.event-result { font-weight: 700; }
.event-result.success { color: var(--green); }
.event-result.error { color: var(--red); }
.event-result.warning { color: var(--amber); }
.audit-table table { min-width: 1260px; }
.audit-table th:nth-child(1) { width: 70px; }
.audit-table th:nth-child(2) { width: 170px; }
.audit-table th:nth-child(3), .audit-table th:nth-child(4) { width: 105px; }
.audit-table th:nth-child(6) { width: 330px; }
.audit-table th:nth-child(7) { width: 100px; }
.audit-details { color: var(--muted); font-size: .78rem; line-height: 1.55; }
.supplier-status-table table { min-width: 1120px; }
.supplier-settings-table table { min-width: 1080px; }
.supplier-keys-table table { min-width: 1040px; }
.supplier-keys-table th:nth-child(1) { width: 52px; }
.supplier-keys-table th:nth-child(2) { width: 330px; }
.supplier-keys-table th:nth-child(3) { width: 100px; }
.supplier-keys-table th:nth-child(4) { width: 150px; }
.supplier-keys-table th:nth-child(5) { width: 130px; }
.supplier-keys-table th:nth-child(6) { width: 110px; }
.supplier-status-table th:nth-child(1) { width: 180px; }
.supplier-status-table th:nth-child(2) { width: 115px; }
.supplier-status-table th:nth-child(3) { width: 140px; }
.supplier-status-table th:nth-child(4) { width: 300px; }
.supplier-status-table th:nth-child(5) { width: 160px; }
.supplier-settings-table th:nth-child(1) { width: 190px; }
.supplier-settings-table th:nth-child(2), .supplier-settings-table th:nth-child(3) { width: 100px; }
.supplier-settings-table th:nth-child(4) { width: 220px; }
.supplier-settings-table th:nth-child(5), .supplier-settings-table th:nth-child(6) { width: 125px; }
.supplier-settings-table th:nth-child(7) { width: 250px; }
.table-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.supplier-key-actions, .personal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.supplier-key-actions select, .personal-actions select { min-width: 190px; }
.reveal-control { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.key-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.key-summary div { padding: 12px 16px; }
.key-summary dt { color: var(--muted); font-size: .76rem; }
.key-summary dd { margin: 5px 0 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.supplier-key-value { overflow-wrap: anywhere; }
.supplier-name { display: block; font-weight: 700; }
.supplier-id { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; }
.supplier-region-summary { white-space: pre-line; line-height: 1.55; }
.personal-history table { min-width: 1260px; }
.personal-history th:nth-child(1) { width: 165px; }
.personal-history th:nth-child(2) { width: 145px; }
.personal-history th:nth-child(3) { width: 135px; }
.personal-history th:nth-child(4) { width: 190px; }
.personal-history th:nth-child(5) { width: 130px; }
.personal-history th:nth-child(6) { width: 205px; }
.personal-history th:nth-child(8) { width: 95px; }
.personal-deliveries { margin-top: 24px; }
.personal-deliveries table { min-width: 980px; }
.personal-deliveries th:nth-child(1) { width: 165px; }
.personal-deliveries th:nth-child(2) { width: 130px; }
.personal-deliveries th:nth-child(3) { width: 230px; }
.personal-deliveries th:nth-child(4) { width: 145px; }
.personal-deliveries th:nth-child(5) { width: 210px; }
.personal-delivery-actions { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 6px; align-items: center; }
.personal-automation-summary { margin-top: -1px; }
.personal-automation-summary dd { overflow-wrap: anywhere; }
.personal-account-line + .personal-account-line { margin-top: 6px; }
.personal-account-line span { display: block; }
.personal-account-line .mono { margin-top: 2px; color: var(--muted); }
.pagination { display: flex; justify-content: center; margin-top: 16px; }

.filters label { display: grid; gap: 5px; color: var(--muted); font-size: .74rem; }
input, select {
  width: 100%; min-height: 38px; padding: 7px 10px; color: var(--text); background: var(--surface);
  border: 1px solid #bfc8d2; border-radius: 5px; outline: none;
}
input:focus, select:focus, button:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 94, 168, .16); }
select { min-width: 140px; }

#settings-form { border-top: 1px solid var(--border); }
.settings-section { min-width: 0; margin: 0; padding: 24px 0; border: 0; border-bottom: 1px solid var(--border); }
.settings-section legend { padding: 0; margin-bottom: 16px; font-weight: 750; font-size: .95rem; }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 17px; }
.endpoint-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 17px; }
.form-grid label, .endpoint-grid label { min-width: 0; display: grid; align-content: start; gap: 6px; color: #3c4753; font-size: .8rem; font-weight: 650; }
label small { min-height: 16px; color: var(--muted); font-size: .72rem; font-weight: 500; overflow-wrap: anywhere; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 620px; }
.toggle-row > span { display: grid; gap: 4px; }
.toggle-row small { color: var(--muted); }
.switch-control {
  width: 44px; min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.switch-control input { appearance: none; width: 44px; min-width: 44px; height: 24px; min-height: 24px; margin: 0; padding: 0; border-radius: 12px; background: #aeb8c2; position: relative; cursor: pointer; }
.switch-control input::after { content: ""; position: absolute; width: 18px; height: 18px; top: 2px; left: 3px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch-control input:checked { background: var(--green); }
.switch-control input:checked::after { transform: translateX(19px); }
.switch-control input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.switch-control input:disabled { opacity: .55; cursor: not-allowed; }
.supplier-enabled-cell { vertical-align: middle; }
.supplier-enabled-control { width: 44px; min-height: 44px; display: flex; align-items: center; }
.calculation { min-height: 67px; padding: 11px 13px; display: flex; flex-direction: column; justify-content: center; border-left: 3px solid var(--blue); background: var(--blue-soft); }
.calculation span { color: var(--muted); font-size: .76rem; }
.calculation strong { margin-top: 5px; font-size: 1.05rem; }
.secret-list { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 10px; }
.secret-item { padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; }
.secret-item strong, .secret-item span { display: block; }
.secret-item span { margin-top: 5px; color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; }
.inline-result { margin-top: 14px; padding: 10px 12px; border-left: 3px solid var(--green); background: var(--green-soft); color: #115b4b; }
.inline-result.error { border-color: var(--red); background: var(--red-soft); color: #7a1812; }
#purchase-result { margin: 0 0 18px; }

.webhook-supplier-row {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 18px;
}
.webhook-supplier-row label { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; }
.webhook-supplier-row select { min-width: 240px; }
.webhook-mode-config { display: grid; gap: 17px; margin-bottom: 20px; }
.blind-purchase-config { display: grid; gap: 13px; padding-top: 17px; border-top: 1px solid var(--line); }
.blind-purchase-fields { margin: 0; }
.webhook-mode-field { display: grid; gap: 7px; color: #3c4753; font-size: .8rem; font-weight: 650; }
.segmented-control {
  width: fit-content; max-width: 100%; display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(108px, 1fr);
  padding: 3px; border: 1px solid #bfc8d2; border-radius: 6px; background: var(--surface-subtle);
}
.segmented-control label { position: relative; min-width: 0; cursor: pointer; }
.segmented-control input { position: absolute; width: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.segmented-control label > span {
  min-height: 34px; padding: 7px 13px; display: grid; place-items: center; border-radius: 4px;
  color: #53606d; font-size: .8rem; font-weight: 700; white-space: nowrap;
}
.segmented-control input:checked + span { color: #115b4b; background: #fff; box-shadow: 0 1px 3px rgba(22, 33, 43, .16), inset 0 -2px 0 var(--green); }
.segmented-control input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.segmented-control input:disabled + span { opacity: .48; cursor: not-allowed; }
.webhook-policy-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); align-items: end; gap: 17px 24px; }
#setting-webhook-flash-config { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
.webhook-policy-grid .toggle-row { max-width: none; }
.webhook-number-field { min-width: 0; display: grid; gap: 6px; color: #3c4753; font-size: .8rem; font-weight: 650; }
.webhook-facts {
  margin: 0; display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px 22px; padding: 17px 0; border-top: 1px solid var(--border);
}
.webhook-facts div { min-width: 0; }
.webhook-facts dt { color: var(--muted); font-size: .76rem; }
.webhook-facts dd { margin: 4px 0 0; font-weight: 620; overflow-wrap: anywhere; }
.webhook-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 9px; }
.webhook-offer-actions { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.webhook-offer-actions small { color: var(--muted); }
.webhook-result {
  margin-top: 17px; padding: 14px; border-left: 3px solid var(--blue); background: var(--blue-soft);
}
.webhook-result > label { display: block; margin-bottom: 7px; color: #3c4753; font-size: .78rem; font-weight: 700; }
.webhook-result-row { display: grid; grid-template-columns: minmax(0, 1fr) max-content max-content; gap: 8px; }
.webhook-result-row input { min-width: 0; background: var(--surface); }
.webhook-result p { margin-top: 8px; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }

dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow: auto; border: 1px solid var(--border); border-radius: 6px; padding: 22px; color: var(--text); }
dialog::backdrop { background: rgba(17, 28, 39, .54); }
dialog p { margin-top: 12px; color: #45515e; line-height: 1.55; }
.confirm-live-field { display: grid; gap: 7px; margin-top: 18px; color: #3c4753; font-size: .8rem; font-weight: 700; }
.confirm-live-field input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; }
.supplier-dialog { width: min(860px, calc(100% - 32px)); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.dialog-heading p { margin-top: 3px; color: var(--muted); font-size: .8rem; }
.supplier-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 17px; }
.supplier-form-grid label { min-width: 0; display: grid; align-content: start; gap: 6px; color: #3c4753; font-size: .8rem; font-weight: 650; }
.supplier-form-grid .span-2 { grid-column: 1 / -1; }
.supplier-inventory-limits { min-width: 0; margin: 3px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--border); }
.supplier-inventory-limits legend { padding: 0 10px 0 0; color: #3c4753; font-size: .8rem; font-weight: 700; }
.supplier-inventory-limits > small { display: block; margin-top: 7px; color: var(--muted); font-size: .73rem; font-weight: 500; line-height: 1.45; }
.inventory-limit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 17px; }
.supplier-personal-settings { min-width: 0; margin: 3px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--border); }
.supplier-personal-settings legend { padding: 0 10px 0 0; color: #3c4753; font-size: .8rem; font-weight: 700; }
.personal-config-grid { display: grid; grid-template-columns: 1.4fr .8fr 1.4fr; align-items: center; gap: 15px 22px; }
.personal-config-grid > label { min-width: 0; display: grid; gap: 6px; color: #3c4753; font-size: .8rem; font-weight: 650; }
.personal-config-grid .toggle-row { max-width: none; }
.supplier-toggle-grid { display: grid; grid-template-columns: minmax(280px, 620px); gap: 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.supplier-toggle-grid .toggle-row { max-width: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 20; max-width: min(420px, calc(100% - 40px)); padding: 11px 14px; border-radius: 5px; background: #17212b; color: #fff; box-shadow: 0 8px 28px rgba(22, 33, 43, .22); overflow-wrap: anywhere; }
.toast.error { background: var(--red); }

@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .split-layout { grid-template-columns: 1fr; }
  .panel + .panel { padding-left: 0; margin-left: 0; border-left: 0; border-top: 1px solid var(--border); }
  .form-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .secret-list { grid-template-columns: 1fr; }
  .webhook-facts { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .webhook-policy-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  #setting-webhook-flash-config { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .supplier-toggle-grid { grid-template-columns: 1fr; }
	.personal-config-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-status { width: 100%; justify-content: flex-start; }
  main { padding-top: 21px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
	.key-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.supplier-key-actions, .personal-actions { width: 100%; justify-content: flex-start; }
	.personal-actions select { flex: 1 0 100%; width: 100%; min-width: 0; }
  .settings-actions { width: 100%; }
  .settings-actions .button { flex: 1; }
  .overview-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .manual-purchase-control { width: 100%; height: auto; grid-template-columns: 1fr 68px max-content; }
  .manual-purchase-label { grid-column: 1 / -1; min-height: 30px; border-bottom: 1px solid var(--border); }
  .overview-actions > .button { width: 100%; }
  .metrics, .form-grid, .endpoint-grid { grid-template-columns: 1fr; }
  .webhook-facts { grid-template-columns: 1fr; }
  .webhook-policy-grid { grid-template-columns: 1fr; align-items: stretch; }
  #setting-webhook-flash-config { grid-template-columns: 1fr; }
  .segmented-control { width: 100%; grid-auto-columns: minmax(0, 1fr); }
  .segmented-control label > span { padding-inline: 8px; }
  .webhook-offer-actions { align-items: stretch; flex-direction: column; }
  .webhook-offer-actions .button { width: 100%; }
  .webhook-actions { display: grid; grid-template-columns: 1fr 1fr; }
	.inventory-limit-grid { grid-template-columns: 1fr; }
  .webhook-result-row { grid-template-columns: 1fr 1fr; }
  .webhook-result-row input { grid-column: 1 / -1; }
  .metric { min-height: 108px; }
  .facts { grid-template-columns: 1fr; }
  .filters { width: 100%; }
  .filters label { flex: 1; }
  .filters select { min-width: 0; }
  .subsection-heading { align-items: stretch; flex-direction: column; }
  .supplier-form-grid { grid-template-columns: 1fr; }
  .supplier-form-grid .span-2 { grid-column: auto; }
  .webhook-supplier-row { align-items: stretch; flex-direction: column; }
  .webhook-supplier-row select, .webhook-supplier-row .button { width: 100%; min-width: 0; }
}

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