:root {
  --green: #10483b;
  --green-2: #1d5a4b;
  --green-soft: #89a595;
  --mint: #dfe9db;
  --cream: #faf8f2;
  --paper: #fffefa;
  --ink: #272722;
  --muted: #70736e;
  --line: #dfded7;
  --orange: #b66a2d;
  --orange-soft: #f4e8d9;
  --shadow: 0 12px 32px rgba(30, 45, 38, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(16, 72, 59, .22);
  outline-offset: 2px;
}
.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;
}
.material-symbols-outlined { font-size: 21px; line-height: 1; }
.inline-icon { font-size: 16px; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 74px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, .97);
}
.app-header-inner {
  width: 100%;
  height: 100%;
  padding: 0 29px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
}
.header-identity, .header-actions, .brand, .workspace-switcher, .top-navigation {
  display: flex;
  align-items: center;
}
.header-identity { min-width: 0; gap: 22px; }
.brand {
  flex: 0 0 auto;
  gap: 13px;
  color: #1f211d;
  text-decoration: none;
  letter-spacing: .13em;
  font-weight: 700;
  font-size: 19px;
}
.brand img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; }
.brand b { color: var(--green-2); }
.workspace-switcher {
  min-width: 0;
  gap: 8px;
  border: 0;
  padding: 9px 0;
  color: var(--ink);
  background: transparent;
  font-weight: 500;
  white-space: nowrap;
  cursor: default;
}
.demo-data-control {
  position: relative;
  min-height: 28px;
  margin-left: 5px;
  padding: 0 7px 0 9px;
  border: 1px solid #cfd8d2;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  background: #f2f6f2;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.demo-data-control[hidden] { display: none; }
.demo-data-control input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.demo-data-control i { position: relative; width: 27px; height: 16px; border-radius: 999px; background: #b9c3bd; transition: background .18s ease; }
.demo-data-control i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s ease; }
.demo-data-control input:checked + i { background: var(--green); }
.demo-data-control input:checked + i::after { transform: translateX(11px); }
.demo-data-control input:focus-visible + i { outline: 3px solid rgba(16,72,59,.22); outline-offset: 2px; }
.demo-data-control.updating { opacity: .55; pointer-events: none; }
.top-navigation { min-width: 0; height: 100%; justify-content: center; gap: 28px; }
.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  color: #282a26;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-item::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: transparent;
}
.nav-item:hover, .nav-item.active { color: var(--green); }
.nav-item.active::after { background: var(--green); }
.header-actions { flex: 0 0 auto; justify-content: flex-end; gap: 14px; }
.primary {
  min-height: 43px;
  border: 0;
  border-radius: 9px;
  padding: 0 20px;
  color: #fff;
  background: var(--green);
  font-weight: 700;
  box-shadow: 0 7px 16px rgba(16, 72, 59, .13);
}
.primary:hover { background: #0b3d32; }
.header-upload {
  flex: 0 0 auto;
  min-width: 126px;
  padding-inline: 16px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}
.icon-button, .avatar, .menu-button {
  border: 0;
  background: transparent;
}
.notification-button { position: relative; flex: 0 0 32px; width: 32px; height: 40px; padding: 0; color: #252721; }
.notification-dot {
  position: absolute;
  top: 4px;
  right: 0;
  width: 10px;
  height: 10px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #74a185;
}
.avatar {
  flex: 0 0 39px;
  min-width: 39px;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  color: var(--green);
  background: #e8eee3;
  font-weight: 600;
}
.menu-button { display: none; }
.notification-panel {
  position: absolute;
  top: 66px;
  right: 69px;
  width: min(370px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.notification-panel[hidden] { display: none; }
.notification-panel-heading { padding: 8px 8px 10px; display: flex; justify-content: space-between; }
.notification-panel-heading span { color: var(--green); font-size: 12px; }
.notification-panel a { padding: 11px 9px; display: grid; gap: 3px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.notification-panel a:hover { background: #f6f6f0; }
.notification-panel a b { font-size: 13px; }
.notification-panel a span { color: var(--muted); font-size: 12px; }
.notification-empty { min-height: 104px; padding: 18px 9px; border-top: 1px solid var(--line); display: grid; place-items: center; align-content: center; gap: 4px; text-align: center; }
.notification-empty span { color: var(--muted); font-size: 11px; }

.app-shell {
  width: 100%;
  height: calc(100dvh - 74px);
  padding: 18px 54px;
  overflow: hidden;
}
.app-view {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.view-hidden { display: none !important; }
.app-view-overview { overflow: hidden; }
.app-view-invoices { display: grid; align-content: stretch; overflow: hidden; }
.app-view-products > .panel,
.app-view-reports > .panel {
  max-height: 100%;
  margin-top: 0;
  overflow: auto;
}
.app-view-suppliers,
.app-view-reorder {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 15px;
  overflow: hidden;
}
.view-title-row {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.view-title-row h1 { font-size: 38px; }
.view-title-row p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.supplier-tabs {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
  display: flex;
  gap: 3px;
}
.supplier-tabs button {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}
.supplier-tabs button.active { color: #fff; background: var(--green); }
.app-view-suppliers > .panel,
.app-view-reorder > .panel {
  height: 100%;
  margin-top: 0;
  overflow: auto;
}
.supplier-subview-hidden { display: none !important; }
.planner-subview-hidden { display: none !important; }
section[id] { scroll-margin-top: 94px; }
.pulse-heading {
  min-height: 127px;
  padding: 0 2px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--green-2);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .15em;
  font-weight: 700;
}
h1, h2 { font-family: "DM Serif Display", serif; font-weight: 400; }
h1 { margin: 0; font-size: clamp(37px, 2.8vw, 42px); line-height: 1.05; }
h2 { margin: 0; font-size: 27px; line-height: 1.15; }
.pulse-heading p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.overview-period-toolbar {
  min-width: 344px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
  display: flex;
  align-items: end;
  gap: 4px;
}
.overview-period-toolbar.loading { opacity: .72; }
.overview-period-button { width: 34px; height: 40px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 7px; color: var(--green); background: transparent; display: grid; place-items: center; }
.overview-period-button:hover { background: #edf4f0; }
.overview-period-button:disabled { cursor: default; color: #a8aaa5; background: transparent; }
.overview-period-button .material-symbols-outlined { font-size: 18px; }
.overview-period-field { height: 40px; padding: 4px 9px 3px; border-radius: 7px; display: grid; align-content: center; gap: 1px; }
.overview-period-field > span { color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.overview-period-field input, .overview-period-field select { height: 22px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: 600 11px/1 "DM Sans", sans-serif; }
.overview-period-field:focus-within { background: #edf4f0; box-shadow: inset 0 0 0 1px #b9c9c0; }
.overview-month-field { min-width: 138px; }
.overview-month-field input { width: 122px; }
.overview-history-field { min-width: 99px; border-left: 1px solid var(--line); border-radius: 0 7px 7px 0; }
.overview-history-field select { width: 88px; }

.attention-strip {
  min-height: 106px;
  padding: 20px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .75);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.attention-item {
  min-width: 0;
  padding: 0 56px;
  border-left: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 25px;
  color: var(--ink);
  text-decoration: none;
}
.attention-item:first-child { padding-left: 30px; border-left: 0; }
.attention-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--green);
  background: #e8eee3;
}
.attention-primary .attention-icon { color: #fff; background: var(--green); }
.attention-warning .attention-icon { color: var(--orange); background: var(--orange-soft); }
.attention-icon .material-symbols-outlined { font-size: 29px; }
.attention-item > span:last-child { min-width: 0; display: grid; gap: 10px; }
.attention-item strong { font: 400 20px/1.15 "DM Serif Display", serif; }
.attention-item small { color: var(--green); display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; }

.pulse-grid {
  height: 512px;
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(340px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
}
.pulse-panel, .panel, .next-decisions {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .77);
  box-shadow: 0 2px 5px rgba(35, 43, 39, .025);
}
.pulse-panel { min-width: 0; padding: 25px; }
.spend-panel { min-height: 0; display: flex; flex-direction: column; }
.spend-panel-heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.hero-metric { display: block; font: 400 47px/1 "DM Serif Display", serif; }
.metric-comparison { margin: 11px 0 0; color: var(--muted); font-size: 13px; }
.metric-comparison.positive { color: var(--green); }
.average-reference { margin: 8px 0 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.average-reference[hidden] { display: none; }
.average-reference i { width: 24px; border-top: 2px dashed #89a595; }
.average-reference strong { color: var(--green); font-weight: 700; }
.supporting-metrics { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(125px, 1fr)); }
.supporting-metrics > div { padding: 7px 38px; border-left: 1px solid var(--line); }
.supporting-metrics dt { color: var(--muted); font-size: 12px; }
.supporting-metrics dd { margin: 8px 0 0; font: 400 20px/1 "DM Serif Display", serif; }
.supporting-metrics > div:last-child dd { color: var(--green); }
.chart-frame { position: relative; min-width: 0; }
.chart-frame canvas { width: 100%; height: 100%; display: block; }
.spend-chart-frame { height: auto; min-height: 160px; margin-top: 16px; flex: 1 1 300px; }
.chart-note { flex: 0 0 auto; margin: 5px 0 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.25; }
.pulse-rail { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.supplier-mix-panel, .invoice-review-panel { min-height: 0; }
.donut-layout { height: calc(100% - 22px); display: grid; grid-template-columns: minmax(160px, .9fr) minmax(150px, 1.1fr); align-items: center; gap: 14px; }
.donut-chart-frame { width: min(100%, 180px); aspect-ratio: 1; justify-self: center; }
.chart-legend { display: grid; gap: 15px; }
.legend-item { display: grid; grid-template-columns: 12px 1fr; column-gap: 11px; }
.legend-dot { width: 11px; height: 11px; margin-top: 4px; border-radius: 50%; }
.legend-item span { color: var(--muted); font-size: 13px; }
.legend-item strong { grid-column: 2; margin-top: 2px; font: 400 21px/1 "DM Serif Display", serif; }
.review-layout { height: calc(100% - 22px); display: grid; grid-template-columns: minmax(150px, .8fr) minmax(155px, 1fr); align-items: center; gap: 28px; }
.review-chart-frame { width: min(100%, 148px); aspect-ratio: 1; justify-self: center; }
.review-chart-value { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.review-chart-value strong { color: var(--green); font: 400 33px/1 "DM Serif Display", serif; }
.review-chart-value span { margin-top: 7px; color: var(--muted); font-size: 11px; }
.review-copy { display: grid; gap: 8px; }
.review-copy strong { color: var(--green); font: 400 30px/1 "DM Serif Display", serif; }
.review-copy span { max-width: 145px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.review-copy small { color: var(--muted); font-size: 12px; }

.next-decisions {
  min-height: 150px;
  margin-top: 16px;
  padding: 17px 23px 17px 18px;
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(280px, 1fr);
  align-items: center;
}
.decision-list { padding-right: 36px; }
.decision-list .eyebrow { margin-left: 2px; margin-bottom: 5px; }
.decision-row {
  min-height: 36px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 48px minmax(220px, 1fr) minmax(150px, .7fr) 26px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.decision-row:last-child { border-bottom: 0; }
.decision-row > .material-symbols-outlined:first-child { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--green); background: #e8eee3; font-size: 16px; }
.decision-row.warning > .material-symbols-outlined:first-child { color: var(--orange); background: var(--orange-soft); }
.decision-row strong { font-size: 13px; }
.decision-row em { color: var(--orange); font-size: 12px; font-style: normal; }
.decision-row > .material-symbols-outlined:last-child { font-size: 18px; }
.operational-empty { min-height: 150px; padding: 24px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.operational-empty .material-symbols-outlined { color: #8fa198; font-size: 30px; }
.operational-empty strong { color: var(--ink); }
.operational-empty p, .operational-empty span { max-width: 430px; margin: 0; font-size: 11px; line-height: 1.5; }
.operational-empty.compact { min-height: 72px; padding: 8px 0; align-items: start; justify-items: start; text-align: left; }
.chart-empty { min-height: 95px; display: grid; align-content: center; gap: 5px; }
.chart-empty strong { color: var(--ink); font-size: 13px; }
.chart-empty span { color: var(--muted); font-size: 10px; line-height: 1.4; }
.attention-queue-link { justify-self: center; width: 216px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.workspace-summary { display: none; }

.panel { padding: 28px; }
.workspace-grid { height: 100%; margin-top: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; }
.invoice-capture-panel { padding: 12px 18px; display: grid; grid-template-columns: minmax(260px, .72fr) minmax(430px, 1.28fr); grid-template-rows: auto auto; column-gap: 24px; align-items: center; }
.invoice-capture-panel .panel-heading { grid-row: 1 / 3; margin: 0; }
.invoice-capture-panel .dropzone { min-height: 68px; padding: 9px 18px; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto auto; justify-items: start; column-gap: 11px; row-gap: 1px; text-align: left; }
.invoice-capture-panel .dropzone .file-icon { grid-row: 1 / 3; align-self: center; }
.invoice-capture-panel .dropzone strong { align-self: end; font-size: 13px; }
.invoice-capture-panel .dropzone > span:not(.file-icon) { align-self: start; font-size: 10px; }
.invoice-capture-panel .dropzone em { grid-column: 3; grid-row: 1 / 3; align-self: center; margin: 0; white-space: nowrap; }
.invoice-capture-panel .process { margin-top: 4px; }
.recent-panel { min-height: 0; padding: 14px 18px 10px; overflow: hidden; display: flex; flex-direction: column; }
.recent-panel .panel-heading { flex: 0 0 auto; margin-bottom: 7px; }
.recent-panel .panel-copy { margin-top: 4px; font-size: 10px; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 22px; }
.panel-copy { max-width: 760px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.secure, .demo-label { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 9px; letter-spacing: .11em; font-weight: 700; white-space: nowrap; }
.dropzone { width: 100%; min-height: 238px; border: 1.5px dashed #9eb4aa; border-radius: 13px; color: var(--ink); background: #fbfcfa; display: grid; place-items: center; align-content: center; gap: 8px; }
.dropzone:hover { border-color: var(--green); background: #f6faf7; }
.dropzone.is-dragging { border-color: var(--green); background: #edf5f0; box-shadow: inset 0 0 0 2px rgba(16, 72, 59, .08); }
.dropzone > span:not(.file-icon) { color: var(--muted); font-size: 13px; }
.dropzone em { margin-top: 8px; padding: 10px 16px; border-radius: 8px; color: #fff; background: var(--green); font-style: normal; font-weight: 700; font-size: 13px; }
.file-icon { color: var(--green); font-size: 35px; }
.process { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--muted); font-size: 11px; }
.process span { display: flex; align-items: center; gap: 6px; }
.process b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--green); background: #e5eee9; font-size: 10px; }
.process i { width: 28px; height: 1px; background: var(--line); }
.text-button { border: 0; color: var(--green); background: transparent; font-weight: 700; font-size: 12px; }
.invoice-list { min-height: 0; flex: 1 1 auto; overflow: hidden; }
.empty-state { min-height: 260px; border-radius: 12px; background: #f8f7f2; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }
.empty-state span { color: #93a49b; font-size: 30px; }
.empty-state p { max-width: 300px; margin: 0; color: var(--muted); font-size: 13px; }
.invoice-row { padding: 15px 4px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 13px; }
.invoice-row.reviewable { color: inherit; text-decoration: none; border-radius: 9px; }
.invoice-row.reviewable:hover { background: #f5f6f2; }
.invoice-row:last-child { border-bottom: 0; }
.invoice-row .doc { width: 40px; height: 46px; border: 1px solid var(--green); border-radius: 7px; display: grid; place-items: center; color: var(--green); }
.invoice-row strong { display: block; font-size: 14px; }
.invoice-row small { color: var(--muted); }
.status-pill { padding: 7px 10px; border-radius: 999px; color: var(--green); background: #edf4f0; font-size: 11px; font-weight: 700; }
.status-pill.queued { color: #a75221; background: #f7eee5; }
.status-pill.failed { color: #923d31; background: #fbefec; }
.invoice-list-notice { flex: 0 0 auto; min-height: 30px; margin-bottom: 6px; padding: 6px 10px; border: 1px solid #c9d7d0; border-radius: 8px; color: var(--green); background: #edf4f0; font-size: 9px; line-height: 1.45; }
.invoice-list-notice[hidden] { display: none; }
.invoice-list-notice.error { border-color: #e0b7ae; color: #923d31; background: #fbefec; }
.invoice-table-wrap { height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.invoice-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; }
.invoice-table th { height: 33px; padding: 7px 12px; color: var(--muted); background: #f2f1eb; font-size: 8px; font-weight: 700; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.invoice-table td { height: 47px; padding: 6px 12px; overflow: hidden; border-top: 1px solid var(--line); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-table tbody tr:hover { background: #fbfaf6; }
.invoice-table th:nth-child(1) { width: 31%; }
.invoice-table th:nth-child(2) { width: 23%; }
.invoice-table th:nth-child(3) { width: 18%; }
.invoice-table th:nth-child(4) { width: 16%; }
.invoice-table th:nth-child(5) { width: 12%; text-align: right; }
.invoice-table td:last-child { text-align: right; }
.invoice-file-cell { min-width: 0; display: flex; align-items: center; gap: 10px; }
.invoice-file-icon { width: 31px; height: 35px; flex: 0 0 auto; border: 1px solid #a5b7ae; border-radius: 6px; color: var(--green); display: grid; place-items: center; font-size: 18px; }
.invoice-file-copy { min-width: 0; display: grid; gap: 3px; }
.invoice-file-copy strong, .invoice-file-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-file-copy strong { font-size: 11px; }
.invoice-file-copy small, .invoice-date-cell { color: var(--muted); font-size: 9px; }
.invoice-action { min-height: 29px; padding: 0 9px; border: 1px solid #b9c9c0; border-radius: 7px; color: var(--green); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; text-decoration: none; }
.invoice-action:hover { background: #edf4f0; }
.invoice-action-muted { color: var(--muted); font-size: 9px; }
.invoice-pagination { flex: 0 0 auto; min-height: 38px; padding-top: 6px; display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; gap: 10px; }
.invoice-pagination button { min-height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 9px; }
.invoice-pagination button:last-child { justify-self: end; }
.invoice-pagination button:disabled { cursor: default; opacity: .42; }
.invoice-pagination .material-symbols-outlined { font-size: 15px; }
.invoice-pagination > span { color: var(--muted); text-align: center; font-size: 9px; }

.products-panel, .comparison, .network-panel, .operational-panel, .report-panel { margin-top: 20px; }
.matched-opportunities { padding: 20px; color: #fff; background: var(--green); }
.matched-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.matched-heading .eyebrow { color: #b6d2c3; }
.matched-heading h3 { margin: 5px 0 0; font: 400 23px/1.2 "DM Serif Display", serif; }
.matched-summary { display: flex; align-items: baseline; gap: 6px; color: #c6d7cf; white-space: nowrap; }
.matched-summary strong { color: #fff; font: 400 24px/1 "DM Serif Display", serif; }
.matched-summary span { font-size: 9px; }
.matched-summary i { width: 1px; height: 22px; margin: 0 8px; background: rgba(255,255,255,.18); }
.opportunity-list { margin-top: 16px; display: grid; gap: 9px; }
.opportunity-card { overflow: hidden; border-radius: 11px; color: var(--ink); background: var(--paper); }
.opportunity-card > header { padding: 16px 17px; display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.opportunity-category { color: var(--green-2); font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.opportunity-card h4 { margin: 5px 0 3px; font: 400 19px/1.2 "DM Serif Display", serif; }
.opportunity-card header p { margin: 0; color: var(--muted); font-size: 10px; }
.opportunity-header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.candidate-count { padding: 6px 8px; border-radius: 999px; color: var(--green); background: #eaf1ed; font-size: 9px; font-weight: 700; white-space: nowrap; }
.manage-suppliers-button { min-height: 34px; padding: 0 11px; border: 1px solid var(--green); border-radius: 7px; color: #fff; background: var(--green); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.manage-suppliers-button:hover { background: var(--green-2); }
.manage-suppliers-button .material-symbols-outlined { font-size: 16px; }
.requested-supplier-summary { padding: 9px 17px; border-top: 1px solid var(--line); background: #f0f4f1; display: flex; align-items: center; gap: 12px; }
.requested-supplier-summary > span { flex: 0 0 auto; color: var(--green); font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.requested-supplier-summary > div { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.requested-supplier-summary b { padding: 4px 7px; border: 1px solid #cad8d1; border-radius: 999px; color: #315247; background: #fff; font-size: 9px; font-weight: 600; }
.candidate-list { border-top: 1px solid var(--line); }
.candidate-row { padding: 12px 17px; border-bottom: 1px solid #ebe9e2; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, .65fr) auto; gap: 15px; align-items: center; }
.candidate-row:last-child { border-bottom: 0; }
.candidate-row > div:first-child, .candidate-price { display: grid; gap: 2px; }
.candidate-row strong { font-size: 12px; }
.candidate-row span, .candidate-price small { color: var(--muted); font-size: 9px; }
.candidate-price b { color: #8b5b3c; font-size: 10px; }
.candidate-price .verified-price, .candidate-price .candidate-saving { color: var(--green); }
.candidate-row button { min-height: 34px; padding: 0 11px; border: 1px solid #b8c8c0; border-radius: 7px; color: var(--green); background: #fff; font-size: 10px; font-weight: 700; }
.candidate-row button:hover { background: #edf4f0; }
.candidate-empty { padding: 16px 17px; color: var(--muted); font-size: 11px; }
.opportunity-empty { min-height: 110px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; display: grid; place-items: center; align-content: center; gap: 6px; color: #fff; text-align: center; }
.opportunity-empty > span { color: #b6d2c3; font-size: 23px; }
.opportunity-empty p { max-width: 520px; margin: 0; color: #bcd0c6; font-size: 10px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th { padding: 0 12px 12px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-align: left; }
td { padding: 15px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.saving { color: var(--green); font-weight: 700; }
.comparison-product { display: grid; gap: 3px; }
.comparison-product small, .price-meta { color: var(--muted); font-size: 11px; }
.price-up { color: #bd5a23; font-weight: 700; }
.price-down { color: var(--green); font-weight: 700; }
.needs-data { color: var(--muted); }
.comparison-empty td { height: 150px; text-align: center; }
.comparison-empty strong, .comparison-empty span { display: block; }
.comparison-empty span { margin-top: 7px; color: var(--muted); }
.comparison-footer { margin-top: 18px; padding: 13px 16px; border-radius: 10px; color: var(--green); background: #f1efe7; display: flex; align-items: center; gap: 10px; }
.comparison-footer p { margin: 0; color: var(--ink); font-size: 12px; }

.network-heading { align-items: center; }
.network-stat { min-width: 150px; padding: 16px 18px; border-radius: 12px; color: #fff; background: var(--green); text-align: right; }
.network-stat strong { display: block; font: 400 31px/1 "DM Serif Display", serif; }
.network-stat span { color: #b9d1c5; font-size: 9px; letter-spacing: .11em; font-weight: 700; }
.network-controls { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #f8f7f2; display: grid; grid-template-columns: minmax(280px, 1.5fr) minmax(190px, .7fr) minmax(220px, .8fr); gap: 12px; }
.network-controls label { display: grid; gap: 7px; }
.network-controls label > span, .network-location > span { color: var(--muted); font-size: 9px; letter-spacing: .1em; font-weight: 700; text-transform: uppercase; }
.network-controls input, .network-controls select { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid #d5d6cf; border-radius: 9px; color: var(--ink); background: #fff; }
.network-location { padding: 0 7px; display: grid; align-content: center; gap: 3px; }
.network-location strong { font-size: 13px; }
.network-location small { color: var(--muted); font-size: 10px; }
.network-trust { margin: 14px 0 20px; padding: 12px 14px; border-radius: 10px; background: #eaf1ed; display: flex; align-items: center; gap: 10px; }
.network-trust > span { width: 21px; height: 21px; border-radius: 50%; color: #fff; background: var(--green); display: grid; place-items: center; font-size: 10px; }
.network-trust p { margin: 0; color: #44534c; font-size: 11px; line-height: 1.45; }
.supplier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.supplier-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; display: flex; flex-direction: column; }
.supplier-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.supplier-mark { width: 39px; height: 39px; border-radius: 11px; color: #fff; background: var(--green); display: grid; place-items: center; font: 400 16px/1 "DM Serif Display", serif; }
.pricing-badge { padding: 6px 8px; border-radius: 999px; color: #7a5a42; background: #f3eee5; font-size: 9px; font-weight: 700; }
.supplier-card h3 { margin: 18px 0 7px; font: 400 22px/1.2 "DM Serif Display", serif; }
.supplier-card > p { min-height: 62px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.supplier-categories { margin: 15px 0; display: flex; flex-wrap: wrap; gap: 5px; }
.supplier-categories span { padding: 5px 7px; border-radius: 6px; color: var(--green); background: #eef3f0; font-size: 9px; font-weight: 700; }
.supplier-card dl { margin: 0; display: grid; gap: 9px; }
.supplier-card dl > div { display: grid; grid-template-columns: 92px 1fr; gap: 9px; }
.supplier-card dt { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.supplier-card dd { margin: 0; font-size: 10px; line-height: 1.45; }
.supplier-card-actions { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 12px; }
.supplier-card-actions .primary { min-height: 37px; padding: 0 12px; font-size: 11px; box-shadow: none; }
.supplier-card-actions a { color: var(--green); font-size: 10px; font-weight: 700; text-decoration: none; }
.source-link { margin-top: 11px; color: #8a8e89; font-size: 9px; text-decoration: none; }
.source-link:hover, .supplier-card-actions a:hover { text-decoration: underline; }
.supplier-loading, .network-empty { grid-column: 1 / -1; min-height: 180px; border-radius: 12px; background: #f8f7f2; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }
.network-empty span { color: var(--green); font-size: 28px; }
.network-empty p { max-width: 440px; margin: 0; color: var(--muted); font-size: 12px; }

.reorder-list { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.reorder-row { min-height: 86px; padding: 14px 17px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 42px minmax(240px, 1.4fr) minmax(135px, .6fr) minmax(120px, .5fr) auto; align-items: center; gap: 15px; }
.reorder-row:last-child { border-bottom: 0; }
.reorder-row.done { opacity: .58; }
.reorder-row.snoozed .reorder-timing b { color: var(--muted); }
.reorder-status { width: 36px; height: 36px; border-radius: 50%; color: var(--green); background: #e8eee3; display: grid; place-items: center; }
.reorder-status.due { color: var(--orange); background: var(--orange-soft); }
.reorder-row > div { display: grid; gap: 5px; }
.reorder-row strong, .reorder-row b { font-size: 13px; }
.reorder-row small { color: var(--muted); font-size: 10px; }
.reorder-timing b { color: var(--orange); }
.reorder-actions { display: flex !important; grid-auto-flow: column; gap: 8px !important; }
.reorder-actions .primary, .reorder-actions .secondary-action { min-height: 38px; padding: 0 13px; box-shadow: none; font-size: 11px; }
.order-history-list { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.order-history-head,
.order-history-row { display: grid; grid-template-columns: 105px minmax(210px, 1.35fr) minmax(120px, .7fr) 90px 105px 82px; align-items: center; gap: 14px; }
.order-history-head { min-height: 42px; padding: 0 17px; color: var(--muted); background: #f2f1eb; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.order-history-row { min-height: 76px; padding: 12px 17px; border-top: 1px solid var(--line); }
.order-history-row:first-of-type { border-top: 0; }
.order-history-date, .order-history-reference, .order-history-items { color: var(--muted); font-size: 11px; }
.order-history-supplier { min-width: 0; display: grid; gap: 4px; }
.order-history-supplier strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.order-history-supplier small { color: var(--muted); font-size: 10px; }
.order-history-total { color: var(--green); font: 400 18px/1 "DM Serif Display", serif; text-align: right; }
.order-history-status { justify-self: end; min-height: 31px; padding: 0 10px; border: 1px solid #c9d7d0; border-radius: 7px; color: var(--green); background: #edf4f0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; text-decoration: none; }
.order-history-status:hover { background: #e3eee8; }
.secondary-action { min-height: 42px; padding: 0 15px; border: 1px solid #b9bcb5; border-radius: 9px; color: var(--green); background: #fff; font-weight: 700; font-size: 12px; }

.report-period-toolbar { min-height: 64px; margin: 16px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf6; display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.report-period-toolbar.loading { opacity: .68; }
.report-month-stepper { display: flex; align-items: end; gap: 6px; }
.report-period-field { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.report-period-field input, .report-period-field select { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #cfd0ca; border-radius: 8px; color: var(--ink); background: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.report-period-field input[type="month"] { width: 148px; }
.report-preset-field select { width: 150px; }
.report-month-button { width: 36px; height: 36px; padding: 0; border: 1px solid #cfd0ca; border-radius: 8px; color: var(--green); background: #fff; display: grid; place-items: center; }
.report-month-button:hover, .report-month-button:disabled { background: #edf4f0; }
.report-month-button:disabled { cursor: wait; opacity: .65; }
.report-custom-range { display: flex; align-items: end; gap: 8px; }
.report-custom-range[hidden] { display: none; }
.report-custom-range input { width: 132px; }
.report-custom-range .secondary-action { min-height: 36px; padding-inline: 12px; }
.report-period-status { flex: 1 1 190px; margin: 0 0 8px auto; color: var(--muted); text-align: right; font-size: 10px; line-height: 1.35; }
.report-period-status[data-state="empty"] { color: var(--orange); }
.report-period-status[data-state="error"] { color: #a33b2d; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.report-card { min-width: 0; min-height: 132px; padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf6; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: 1fr auto; column-gap: 14px; }
.report-card > .material-symbols-outlined { width: 42px; height: 42px; border-radius: 10px; color: var(--green); background: #e8eee3; display: grid; place-items: center; }
.report-card h3 { margin: 1px 0 5px; font: 400 18px/1.2 "DM Serif Display", serif; }
.report-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.report-actions { grid-column: 2; margin-top: 14px; display: flex; gap: 8px; }
.report-actions button { min-height: 34px; padding: 0 11px; border: 1px solid #c6cbc4; border-radius: 7px; color: var(--green); background: #fff; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; }
.report-actions button:hover { background: #edf4f0; }
.report-actions .material-symbols-outlined { font-size: 15px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; padding: 24px; background: rgba(4, 27, 22, .58); display: grid; place-items: center; }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(520px, 100%); padding: 34px; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.close-button { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #efeee8; display: grid; place-items: center; }
.close-button .material-symbols-outlined { font-size: 19px; }
.modal h2 { font-size: 31px; }
.modal-copy { margin: 10px 0 22px; color: var(--muted); line-height: 1.5; }
.file-picker { min-height: 150px; margin-bottom: 18px; border: 1.5px dashed #9eb4aa; border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.file-picker.is-dragging { border-color: var(--green); background: #edf5f0; box-shadow: inset 0 0 0 2px rgba(16, 72, 59, .08); }
.file-picker input { position: absolute; opacity: 0; pointer-events: none; }
.file-picker small { color: var(--muted); }
form > label:not(.file-picker) { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
form > label span { color: var(--muted); font-weight: 400; }
form input[type="text"] { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.status { min-height: 34px; padding: 9px 0; color: var(--muted); font-size: 12px; }
.status.error { color: #a33b2d; }
.privacy-note { margin: 16px 0 0; color: var(--muted); text-align: center; font-size: 11px; }
.full { width: 100%; }
.quote-modal { width: min(650px, 100%); }
.quote-modal form > label { margin-bottom: 13px; }
.quote-modal input, .quote-modal textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; resize: vertical; }
.quote-modal input[readonly] { color: var(--muted); background: #f2f1eb; }
.quote-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.quote-actions a { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; text-align: center; text-decoration: none; box-shadow: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.supplier-request-modal { width: min(680px, 100%); }
.supplier-request-modal .modal-copy strong { color: var(--ink); font-weight: 700; }
.supplier-request-options { max-height: min(430px, 55dvh); margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: auto; background: #fff; }
.supplier-request-option { min-height: 78px; padding: 14px 15px; border-bottom: 1px solid var(--line); cursor: pointer; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.supplier-request-option:last-child { border-bottom: 0; }
.supplier-request-option:hover { background: #f7f9f7; }
.supplier-request-option:has(input:checked) { background: #eef4f0; }
.supplier-request-option input { position: absolute; opacity: 0; pointer-events: none; }
.supplier-request-check { width: 22px; height: 22px; border: 1.5px solid #9eaaa4; border-radius: 6px; color: transparent; background: #fff; display: grid; place-items: center; }
.supplier-request-check .material-symbols-outlined { font-size: 16px; font-weight: 700; }
.supplier-request-option input:checked + .supplier-request-check { border-color: var(--green); color: #fff; background: var(--green); }
.supplier-request-option input:focus-visible + .supplier-request-check { outline: 3px solid rgba(16, 72, 59, .22); outline-offset: 2px; }
.supplier-request-option-copy { min-width: 0; display: grid; gap: 4px; }
.supplier-request-option-copy strong { font-size: 13px; }
.supplier-request-option-copy small { overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.supplier-request-price { padding: 6px 8px; border-radius: 999px; color: #835c3d; background: #f5eee5; font-size: 9px; font-weight: 700; white-space: nowrap; }
.supplier-request-empty { margin: 0; padding: 24px; color: var(--muted); text-align: center; font-size: 12px; }
.supplier-request-actions { display: flex; justify-content: flex-end; gap: 9px; }
.supplier-request-actions button { min-width: 122px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; box-shadow: none; font-size: 12px; white-space: nowrap; }
.supplier-request-actions button:disabled { cursor: default; opacity: .5; }
#report-modal { padding: 12px; place-items: stretch; }
.report-preview-modal { width: min(1660px, 100%); height: calc(100dvh - 24px); max-height: none; margin: auto; padding: 0; border: 1px solid rgba(255,255,255,.28); border-radius: 16px; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.report-detail-header { padding: 17px 22px 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.76); }
.report-back-button { margin-bottom: 12px; padding: 0; border: 0; color: var(--green); background: transparent; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; }
.report-back-button .material-symbols-outlined { font-size: 16px; }
.report-detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.report-detail-heading > div:first-child { min-width: 0; }
.report-detail-period { margin: 0 0 4px; color: var(--green); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.report-detail-heading h2 { margin: 0; font-size: clamp(27px, 2.2vw, 38px); line-height: 1; }
.report-detail-context { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.report-header-actions { flex: 0 0 auto; display: flex; gap: 8px; }
.report-header-actions button { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-shadow: none; font-size: 10px; }
.report-header-actions .material-symbols-outlined { font-size: 16px; }
.report-detail-layout { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 286px; }
.report-detail-main { min-width: 0; min-height: 0; padding: 16px 18px 20px; overflow: auto; }
.report-kpi-strip { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfaf6; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.report-kpi-strip article { min-width: 0; min-height: 79px; padding: 13px 15px; border-left: 1px solid var(--line); display: grid; align-content: center; gap: 5px; }
.report-kpi-strip article:first-child { border-left: 0; }
.report-kpi-strip span { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.report-kpi-strip strong { overflow: hidden; color: var(--ink); font: 400 clamp(18px, 1.55vw, 26px)/1.05 "DM Serif Display", serif; text-overflow: ellipsis; white-space: nowrap; }
.report-kpi-strip small { overflow: hidden; color: var(--green); font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.report-visual-grid { margin-bottom: 12px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .75fr); gap: 12px; }
.report-chart-panel, .report-table-panel { min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.report-chart-panel { min-height: 290px; padding: 15px 16px 12px; }
.report-chart-panel > header, .report-table-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.report-chart-panel > header span, .report-table-panel > header span { color: var(--green); font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.report-chart-panel h3, .report-table-panel h3 { margin: 4px 0 0; font: 400 19px/1.1 "DM Serif Display", serif; }
.report-chart-panel header p, .report-table-panel header p { max-width: 280px; margin: 2px 0 0; color: var(--muted); text-align: right; font-size: 9px; line-height: 1.4; }
.report-primary-canvas-wrap { height: 218px; margin-top: 8px; }
.report-primary-canvas-wrap canvas, .report-donut-wrap canvas { width: 100%; height: 100%; display: block; }
.report-chart-legend { min-height: 18px; margin-top: 6px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.report-legend-item { min-width: 0; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-size: 8px; }
.report-legend-item i { width: 7px; height: 7px; border-radius: 50%; background: var(--legend-color); flex: 0 0 auto; }
.report-legend-item strong { color: var(--ink); font-size: 8px; }
.report-empty-label { color: var(--muted); font-size: 9px; }
.report-secondary-visual { min-height: 225px; margin-top: 9px; display: grid; grid-template-columns: minmax(118px, .9fr) minmax(120px, 1.1fr); align-items: center; gap: 14px; }
.report-donut-wrap { position: relative; width: min(156px, 100%); height: 156px; justify-self: center; }
.report-donut-total { position: absolute; inset: 31%; display: grid; place-content: center; text-align: center; pointer-events: none; }
.report-donut-total strong { color: var(--green); font: 400 clamp(14px, 1.25vw, 21px)/1 "DM Serif Display", serif; }
.report-donut-total span { margin-top: 4px; color: var(--muted); font-size: 7px; line-height: 1.1; text-transform: uppercase; }
.report-secondary-legend { min-width: 0; margin: 0; justify-content: flex-start; align-content: center; flex-direction: column; flex-wrap: nowrap; gap: 9px; }
.report-secondary-legend .report-legend-item { width: 100%; display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; }
.report-secondary-legend .report-legend-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-table-panel { overflow: hidden; }
.report-table-panel > header { min-height: 61px; padding: 13px 15px 10px; border-bottom: 1px solid var(--line); }
.report-table-wrap { width: 100%; overflow: hidden; }
.report-detail-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.report-detail-table th { height: 34px; padding: 7px 10px; color: var(--muted); background: #f2f1eb; font-size: 7px; font-weight: 700; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.report-detail-table td { max-width: 220px; height: 38px; padding: 8px 10px; overflow: hidden; border-top: 1px solid var(--line); font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.report-detail-table th:first-child, .report-detail-table td:first-child { padding-left: 15px; font-weight: 700; }
.report-detail-table th:last-child, .report-detail-table td:last-child { padding-right: 15px; }
.report-detail-table tbody tr:hover { background: #fbfaf6; }
.report-detail-table tfoot td { color: var(--green); background: #edf4f0; font-weight: 700; }
.report-table-empty { height: 72px !important; color: var(--muted); text-align: center; font-weight: 400 !important; }
.report-findings-panel { min-height: 0; padding: 18px 17px; border-left: 1px solid var(--line); background: #f7f5ef; overflow: auto; display: flex; flex-direction: column; gap: 18px; }
.report-findings-panel h3 { margin: 0 0 11px; color: var(--green); display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.report-findings-panel h3 .material-symbols-outlined { font-size: 17px; }
.report-findings-list { display: grid; gap: 8px; }
.report-finding { padding: 10px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
.report-finding:first-child { padding-top: 0; border-top: 0; }
.report-finding > span { width: 20px; height: 20px; border-radius: 50%; color: var(--green); background: #e3ece6; display: grid; place-items: center; font-size: 8px; font-weight: 700; }
.report-finding.warning > span { color: #a7591d; background: #f5e7d7; }
.report-finding.positive > span { color: #fff; background: var(--green); }
.report-finding strong { font-size: 10px; line-height: 1.35; }
.report-finding p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.report-quality-section, .report-method-section { padding-top: 15px; border-top: 1px solid var(--line); }
.report-quality-section > strong { color: var(--green); font: 400 32px/1 "DM Serif Display", serif; }
.report-quality-section > strong[data-level="medium"] { color: #a7591d; }
.report-quality-section > strong[data-level="low"] { color: #a33b2d; }
.report-quality-section p, .report-method-section p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.report-quality-section ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.report-quality-section li { padding-left: 12px; color: #50544e; font-size: 8px; line-height: 1.35; }
.report-quality-section li::before { content: "✓"; margin-left: -12px; margin-right: 5px; color: var(--green); }
.report-method-section span { margin-top: 8px; color: var(--green); display: block; font-size: 8px; line-height: 1.4; }
.report-done-button { width: 100%; min-height: 36px; margin-top: auto; }

@media (max-width: 1250px) {
  .app-header-inner { gap: 14px; }
  .header-identity { gap: 0; }
  .top-navigation { gap: 18px; }
  .workspace-switcher { display: none; }
  .demo-workspace .workspace-switcher { display: flex; }
  .header-upload { min-width: 118px; padding-inline: 13px; }
  .attention-item { padding: 0 30px; gap: 17px; }
  .attention-item:first-child { padding-left: 18px; }
  .reorder-row { grid-template-columns: 42px minmax(220px, 1fr) 120px auto; }
  .reorder-quantity { display: none !important; }
}
@media (min-width: 1051px) and (max-height: 900px) {
  .pulse-heading { min-height: 88px; padding-bottom: 10px; }
  .pulse-heading h1 { font-size: 36px; }
  .pulse-heading p:last-child { margin-top: 6px; font-size: 13px; }
  .attention-strip { min-height: 78px; padding: 10px 24px; }
  .attention-icon { width: 50px; height: 50px; }
  .attention-icon .material-symbols-outlined { font-size: 24px; }
  .attention-item strong { font-size: 17px; }
  .attention-item > span:last-child { gap: 6px; }
  .pulse-grid { height: 360px; margin-top: 12px; }
  .pulse-panel { padding: 18px; }
  .hero-metric { font-size: 38px; }
  .spend-chart-frame { height: auto; min-height: 120px; margin-top: 7px; flex-basis: 205px; }
  .pulse-rail { grid-template-rows: minmax(0, 1.08fr) minmax(0, 1fr); }
  .donut-layout, .review-layout { height: calc(100% - 18px); gap: 10px; }
  .donut-layout { grid-template-columns: minmax(112px, .9fr) minmax(145px, 1.1fr); }
  .review-layout { grid-template-columns: minmax(104px, .85fr) minmax(145px, 1.15fr); }
  .donut-chart-frame { width: 112px; max-width: 100%; height: 112px; max-height: 100%; min-height: 0; }
  .review-chart-frame { width: 104px; max-width: 100%; height: 104px; max-height: 100%; min-height: 0; }
  .chart-legend { gap: 4px; }
  .legend-dot { margin-top: 2px; }
  .legend-item span { font-size: 10px; line-height: 1.1; }
  .legend-item strong { margin-top: 0; font-size: 17px; }
  .review-copy { gap: 5px; }
  .review-copy strong { font-size: 26px; }
  .review-copy span { font-size: 11px; line-height: 1.3; }
  .review-chart-value strong { font-size: 27px; }
  .review-chart-value span { margin-top: 4px; font-size: 9px; }
  .next-decisions { min-height: 116px; margin-top: 12px; padding: 8px 18px; }
  .decision-list .eyebrow { margin-bottom: 3px; }
  .decision-row { min-height: 30px; }
  .decision-row > .material-symbols-outlined:first-child { width: 22px; height: 22px; font-size: 15px; }
  .view-title-row { min-height: 68px; }
  .view-title-row h1 { font-size: 32px; }
  .panel { padding: 22px; }
  .report-card { min-height: 112px; padding: 15px; }
}
@media (min-width: 1051px) and (max-height: 760px) {
  .app-shell { padding-top: 10px; padding-bottom: 10px; }
  .pulse-heading { min-height: 68px; }
  .pulse-heading .eyebrow { margin-bottom: 5px; }
  .pulse-heading h1 { font-size: 31px; }
  .pulse-heading p:last-child { display: none; }
  .overview-period-toolbar { padding-block: 3px; }
  .overview-period-button, .overview-period-field { height: 36px; }
  .attention-strip { min-height: 66px; padding: 8px 20px; }
  .attention-icon { width: 43px; height: 43px; }
  .attention-item small { font-size: 11px; }
  .pulse-grid { height: 300px; margin-top: 10px; }
  .pulse-panel { padding: 14px 17px; }
  .pulse-panel .eyebrow { margin-bottom: 6px; }
  .hero-metric { font-size: 33px; }
  .metric-comparison { margin-top: 6px; font-size: 11px; }
  .average-reference { margin-top: 4px; font-size: 9px; }
  .supporting-metrics > div { padding: 4px 24px; }
  .spend-chart-frame { height: auto; min-height: 105px; margin-top: 4px; flex-basis: 165px; }
  .chart-note { margin-top: 2px; font-size: 9px; }
  .pulse-rail { grid-template-rows: minmax(0, 1.05fr) minmax(0, 1fr); }
  .donut-layout, .review-layout { height: calc(100% - 18px); gap: 10px; }
  .donut-layout { grid-template-columns: minmax(90px, .9fr) minmax(130px, 1.1fr); }
  .review-layout { grid-template-columns: minmax(86px, .85fr) minmax(130px, 1.15fr); }
  .donut-chart-frame { width: 90px; max-width: 100%; height: 90px; max-height: 100%; min-height: 0; }
  .review-chart-frame { width: 86px; max-width: 100%; height: 86px; max-height: 100%; min-height: 0; }
  .chart-legend { gap: 3px; }
  .legend-dot { margin-top: 2px; }
  .legend-item span { font-size: 10px; line-height: 1; }
  .legend-item strong { margin-top: 0; font-size: 16px; }
  .review-copy { gap: 5px; }
  .review-copy strong { font-size: 25px; }
  .review-copy span { font-size: 11px; line-height: 1.25; }
  .review-chart-value strong { font-size: 25px; }
  .review-chart-value span { margin-top: 4px; font-size: 9px; }
  .next-decisions { min-height: 110px; margin-top: 10px; padding: 7px 16px; }
  .decision-list .eyebrow { margin-bottom: 3px; }
  .decision-row { min-height: 27px; }
  .decision-row > .material-symbols-outlined:first-child { width: 20px; height: 20px; font-size: 14px; }
  .attention-queue-link { min-height: 38px; }
  .report-grid { gap: 8px; }
  .report-card { min-height: 94px; padding: 11px 14px; }
  .report-card p { display: none; }
  .report-actions { margin-top: 7px; }
}
@media (max-width: 1050px) {
  .app-header-inner { grid-template-columns: auto 1fr auto; }
  .top-navigation { position: absolute; top: 73px; left: 0; right: 0; height: auto; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); display: none; justify-content: center; }
  .app-header.menu-open .top-navigation { display: flex; }
  .menu-button { display: grid; place-items: center; justify-self: start; grid-column: 2; }
  .header-actions { grid-column: 3; }
  .pulse-grid { grid-template-columns: 1fr; }
  .pulse-grid { height: auto; }
  .pulse-grid { grid-template-rows: auto; }
  .pulse-rail { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .workspace-grid { grid-template-columns: 1fr; }
  .supplier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .network-controls { grid-template-columns: 1fr 1fr; }
  .network-location { grid-column: 1 / -1; padding: 5px 2px; }
  .app-view-overview, .app-view-suppliers, .app-view-reorder { overflow: auto; }
  .app-view-suppliers, .app-view-reorder { display: block; }
  .view-title-row { margin-bottom: 15px; }
  .order-history-head, .order-history-row { grid-template-columns: 95px minmax(190px, 1fr) 110px 82px; }
  .order-history-reference, .order-history-items { display: none; }
  .report-detail-layout { display: block; overflow: auto; }
  .report-detail-main { overflow: visible; }
  .report-findings-panel { border-top: 1px solid var(--line); border-left: 0; overflow: visible; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .report-done-button { grid-column: 1 / -1; }
  .report-detail-table .priority-low { display: none; }
}
@media (max-width: 760px) {
  .app-header { height: 68px; }
  .app-header-inner { padding: 0 17px; grid-template-columns: 1fr auto auto; }
  .brand span { display: none; }
  .brand img { width: 36px; height: 36px; }
  .demo-workspace .header-identity { gap: 8px; }
  .demo-workspace .workspace-name { display: none; }
  .demo-workspace .demo-data-control { margin-left: 0; padding-left: 7px; }
  .menu-button { grid-column: 2; }
  .header-actions { grid-column: 3; gap: 9px; }
  .header-upload { min-width: 0; min-height: 38px; padding: 0 13px; font-size: 12px; }
  .avatar { display: none; }
  .top-navigation { top: 67px; padding: 10px 17px; justify-content: flex-start; gap: 22px; overflow-x: auto; }
  .nav-item { height: 42px; font-size: 13px; }
  .app-shell { height: calc(100dvh - 68px); padding: 16px; }
  .app-view-invoices { overflow: auto; }
  .workspace-grid { height: auto; }
  .invoice-capture-panel { padding: 18px; grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 13px; }
  .invoice-capture-panel .panel-heading { grid-row: auto; }
  .invoice-capture-panel .dropzone { min-height: 116px; grid-template-columns: 34px minmax(0, 1fr); }
  .invoice-capture-panel .dropzone em { grid-column: 1 / -1; grid-row: auto; justify-self: stretch; text-align: center; }
  .recent-panel { min-height: 0; overflow: visible; }
  .invoice-list { overflow: visible; }
  .invoice-table-wrap { height: auto; }
  .invoice-table th:nth-child(2), .invoice-table td:nth-child(2),
  .invoice-table th:nth-child(3), .invoice-table td:nth-child(3) { display: none; }
  .invoice-table th:nth-child(1) { width: 45%; }
  .invoice-table th:nth-child(4) { width: 35%; }
  .invoice-table th:nth-child(5) { width: 20%; }
  .invoice-table th, .invoice-table td { padding-inline: 8px; }
  .invoice-table td:nth-child(4) .status-pill { padding: 6px 7px; font-size: 9px; }
  .invoice-file-icon { display: none; }
  .invoice-pagination { grid-template-columns: 90px 1fr 90px; }
  section[id] { scroll-margin-top: 82px; }
  .pulse-heading { min-height: 150px; padding-bottom: 18px; align-items: start; flex-direction: column; gap: 16px; }
  .pulse-heading h1 { font-size: 38px; }
  .overview-period-toolbar { min-width: 0; width: 100%; grid-template-columns: 34px minmax(130px, 1fr) 34px minmax(98px, .7fr); display: grid; }
  .overview-month-field, .overview-history-field { min-width: 0; }
  .overview-month-field input, .overview-history-field select { width: 100%; }
  .attention-strip { padding: 0; grid-template-columns: 1fr; }
  .attention-item, .attention-item:first-child { min-height: 90px; padding: 14px 20px; border-left: 0; border-top: 1px solid var(--line); }
  .attention-item:first-child { border-top: 0; }
  .attention-icon { width: 50px; height: 50px; }
  .attention-item strong { font-size: 18px; }
  .pulse-panel { padding: 19px; }
  .spend-panel { min-height: 440px; }
  .spend-panel-heading { align-items: start; flex-direction: column; }
  .hero-metric { font-size: 41px; }
  .supporting-metrics { width: 100%; }
  .supporting-metrics > div { padding: 7px 18px 7px 0; border-left: 0; border-right: 1px solid var(--line); }
  .supporting-metrics > div:last-child { padding-left: 18px; border-right: 0; }
  .spend-chart-frame { height: 230px; min-height: 230px; flex: 0 0 230px; }
  .pulse-rail { grid-template-columns: 1fr; }
  .next-decisions { padding: 17px; grid-template-columns: 1fr; gap: 20px; }
  .decision-list { padding-right: 0; }
  .decision-row { grid-template-columns: 40px minmax(120px, 1fr) auto 20px; }
  .attention-queue-link { width: 100%; }
  .workspace-summary { align-items: start; flex-direction: column; gap: 4px; }
  .panel { padding: 20px; }
  .view-title-row { min-height: 0; align-items: stretch; flex-direction: column; }
  .view-title-row h1 { font-size: 34px; }
  .supplier-tabs { width: 100%; }
  .supplier-tabs button { flex: 1; }
  .panel-heading, .matched-heading { align-items: start; flex-direction: column; }
  .matched-summary { white-space: normal; flex-wrap: wrap; }
  .opportunity-card > header { flex-direction: column; }
  .opportunity-header-actions { width: 100%; justify-content: space-between; }
  .requested-supplier-summary { align-items: flex-start; flex-direction: column; gap: 7px; }
  .candidate-row { grid-template-columns: 1fr; gap: 8px; }
  .candidate-row button { width: 100%; }
  .network-controls, .supplier-grid { grid-template-columns: 1fr; }
  .network-location { grid-column: auto; }
  .network-stat { width: 100%; text-align: left; }
  .supplier-card > p { min-height: 0; }
  .reorder-row { grid-template-columns: 38px 1fr; padding: 16px; }
  .reorder-timing { grid-column: 2; }
  .reorder-actions { grid-column: 1 / -1; }
  .reorder-actions button { flex: 1; }
  .order-history-head { display: none; }
  .order-history-row { grid-template-columns: 78px minmax(0, 1fr) auto; gap: 10px; }
  .order-history-total { text-align: left; }
  .order-history-status { grid-column: 2 / -1; justify-self: start; }
  .report-period-status { flex-basis: 100%; margin: 0; text-align: left; }
  .report-grid { grid-template-columns: 1fr; }
  .modal { padding: 28px 20px; }
  .supplier-request-option { grid-template-columns: 24px minmax(0, 1fr); }
  .supplier-request-price { grid-column: 2; justify-self: start; }
  .supplier-request-actions button { min-width: 0; flex: 1; }
  #report-modal { padding: 0; }
  .report-preview-modal { width: 100%; height: 100dvh; border: 0; border-radius: 0; padding: 0; }
  .report-detail-header { padding: 13px 15px 14px; }
  .report-back-button { margin-bottom: 9px; }
  .report-detail-heading { align-items: start; flex-direction: column; gap: 12px; }
  .report-header-actions { width: 100%; }
  .report-header-actions button { flex: 1; }
  .report-detail-main { padding: 12px; }
  .report-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-kpi-strip article { border-top: 1px solid var(--line); }
  .report-kpi-strip article:nth-child(-n+2) { border-top: 0; }
  .report-kpi-strip article:nth-child(odd) { border-left: 0; }
  .report-kpi-strip article:last-child { grid-column: 1 / -1; }
  .report-visual-grid { grid-template-columns: 1fr; }
  .report-chart-panel { min-height: 280px; }
  .report-primary-canvas-wrap { height: 210px; }
  .report-secondary-visual { min-height: 190px; }
  .report-detail-table .priority-medium { display: none; }
  .report-detail-table th, .report-detail-table td { padding-inline: 7px; font-size: 8px; }
  .report-findings-panel { padding: 16px 14px; grid-template-columns: 1fr; }
  .report-done-button { grid-column: auto; }
}
@media (max-width: 480px) {
  .notification-button { display: none; }
  .header-upload { padding: 0 11px; }
  .donut-layout, .review-layout { grid-template-columns: 1fr 1fr; gap: 10px; }
  .donut-chart-frame, .review-chart-frame { height: 150px; }
  .legend-item span { font-size: 11px; }
  .decision-row { grid-template-columns: 36px 1fr 18px; }
  .decision-row em { display: none; }
  .process { gap: 4px; }
  .process i { width: 14px; }
  .report-period-toolbar, .report-month-stepper, .report-custom-range { align-items: stretch; }
  .report-period-toolbar, .report-custom-range { flex-direction: column; }
  .report-month-stepper { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; }
  .report-period-field input[type="month"], .report-preset-field select, .report-custom-range input { width: 100%; }
  .report-kpi-strip { grid-template-columns: 1fr; }
  .report-kpi-strip article, .report-kpi-strip article:nth-child(-n+2) { border-top: 1px solid var(--line); border-left: 0; }
  .report-kpi-strip article:first-child { border-top: 0; }
  .report-kpi-strip article:last-child { grid-column: auto; }
  .report-chart-panel > header, .report-table-panel > header { display: block; }
  .report-chart-panel header p, .report-table-panel header p { margin-top: 6px; text-align: left; }
  .report-secondary-visual { grid-template-columns: 1fr 1fr; gap: 8px; }
}

@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body * { visibility: hidden; }
  #report-modal, #report-modal * { visibility: visible; }
  body { background: #fff; }
  #report-modal { position: absolute; inset: 0; padding: 0; background: #fff; }
  .report-preview-modal { width: 100%; height: auto; max-width: none; overflow: visible; border: 0; border-radius: 0; box-shadow: none; display: block; }
  .report-detail-header { padding: 0 0 9mm; }
  .report-back-button, .report-header-actions, .report-done-button { display: none; }
  .report-detail-layout { display: block; overflow: visible; }
  .report-detail-main { padding: 7mm 0 0; overflow: visible; }
  .report-kpi-strip { break-inside: avoid; }
  .report-visual-grid { grid-template-columns: 1.45fr .75fr; break-inside: avoid; }
  .report-chart-panel { min-height: 250px; }
  .report-primary-canvas-wrap { height: 184px; }
  .report-secondary-visual { min-height: 190px; }
  .report-table-panel { margin-top: 6mm; break-inside: avoid; }
  .report-detail-table .priority-low, .report-detail-table .priority-medium { display: table-cell; }
  .report-findings-panel { margin-top: 6mm; padding: 5mm; border: 1px solid var(--line); overflow: visible; display: grid; grid-template-columns: 1.35fr 1fr 1fr; break-inside: avoid; }
}

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