:root {
  --background: #fafaf7;
  --surface: #ffffff;
  --text: #24231f;
  --muted: #68655e;
  --line: #e8e3da;
  --primary: #526348;
  --primary-dark: #35402f;
  --selected: #eef3ea;
  --soft: #f6f4ee;
  --cream: #f3efe6;
  --mustard: #c6a24a;
  --steel: #4f6f82;
  --green: #3f7a5b;
  --violet: #73618a;
  --danger: #b75145;
  --shadow-low: 0 1px 2px rgba(36, 35, 31, 0.05);
  --shadow-card: 0 10px 26px rgba(36, 35, 31, 0.05);
  --shadow-menu: 0 16px 40px rgba(36, 35, 31, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(232, 227, 218, 0.85);
  padding: 28px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 44px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--surface);
  font-size: 20px;
  font-weight: 650;
  overflow: hidden;
}

.logo-slot {
  position: relative;
}

.logo-slot img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-slot img[src]:not([src=""]) {
  display: block;
}

.logo-slot img[src]:not([src=""]) + .logo-fallback {
  display: none;
}

.logo-slot img[hidden] + .logo-fallback {
  display: grid !important;
}

.logo-fallback {
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--surface);
  line-height: 1;
}

.logo-slot::after {
  position: absolute;
  inset: -4px;
  border: 1px solid transparent;
  border-radius: 10px;
  content: "";
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 16px;
  line-height: 20px;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.main-nav,
.admin-nav,
.subnav {
  display: grid;
}

.main-nav {
  gap: 9px;
}

.admin-nav {
  gap: 10px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 620;
}

.nav-item svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: currentColor;
}

.nav-item.active {
  background: var(--selected);
  color: var(--primary-dark);
}

.nav-item:hover,
.subnav a:hover {
  background: var(--soft);
}

.nav-button {
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.nav-button[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.subnav {
  gap: 6px;
  padding: 4px 0 2px 44px;
}

.subnav a {
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 14px;
}

.subnav a.active {
  background: var(--selected);
  color: var(--primary-dark);
  font-weight: 650;
}

.dashboard {
  min-width: 0;
  width: 100%;
  max-width: 1280px;
  padding: 44px 44px 120px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  font-weight: 650;
  line-height: 36px;
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 34px;
  font-weight: 650;
  line-height: 42px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 7px;
  font-size: 20px;
  font-weight: 650;
  line-height: 26px;
}

.today-panel {
  display: grid;
  justify-items: end;
  gap: 1px;
  margin-top: 2px;
  color: rgba(104, 101, 94, 0.74);
  font-size: 13px;
}

.today-panel strong {
  color: rgba(36, 35, 31, 0.82);
  font-size: 16px;
  line-height: 22px;
}

.hero-row {
  margin-bottom: 30px;
}

.floating-action {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 10;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 13px 18px;
  background: var(--primary);
  color: var(--surface);
  font-weight: 650;
  cursor: pointer;
  box-shadow: var(--shadow-menu);
}

.primary-action svg {
  width: 19px;
  height: 19px;
}

.primary-action:hover,
.primary-action:focus-visible {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.primary-action:focus-visible,
.action-menu button:focus-visible,
.nav-item:focus-visible,
.subnav a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(82, 99, 72, 0.18);
}

.action-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 11;
  display: none;
  width: 236px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}

.action-menu.open {
  display: grid;
}

.action-menu button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.action-menu button:hover {
  background: var(--soft);
}

.priority-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.priority-card,
.summary-card {
  border: 1px solid rgba(232, 227, 218, 0.78);
  border-radius: 8px;
  background: var(--surface);
}

.priority-card {
  display: grid;
  align-content: space-between;
  gap: 22px;
  min-height: 232px;
  padding: 26px 26px 25px;
  box-shadow: var(--shadow-card);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--selected);
  color: var(--primary-dark);
}

.card-icon svg {
  width: 25px;
  height: 25px;
}

.priority-card p,
.summary-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
}

.status {
  align-self: end;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.status.pending {
  background: #f8f1d9;
  color: #6e5718;
}

.status.info {
  background: #e7eff3;
  color: var(--steel);
}

.status.review {
  background: #e3f0e8;
  color: var(--green);
}

.status.billing {
  background: #eee9f3;
  color: var(--violet);
}

.status.partial {
  background: #f6e8dd;
  color: #8b4f2d;
}

.status.danger {
  background: #f5e1dd;
  color: var(--danger);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.16fr 1.16fr repeat(3, 0.88fr);
  gap: 16px;
  align-items: stretch;
}

.summary-card {
  min-height: 132px;
  padding: 20px;
  box-shadow: var(--shadow-low);
}

.summary-card span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.summary-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 24px;
  font-weight: 650;
  line-height: 30px;
}

.summary-card.operational {
  background: var(--surface);
}

.summary-card.quiet {
  background: rgba(255, 255, 255, 0.72);
  color: rgba(36, 35, 31, 0.82);
}

.summary-card.quiet strong {
  font-size: 21px;
  line-height: 28px;
}

.summary-card.quiet span,
.summary-card.quiet p {
  color: rgba(104, 101, 94, 0.86);
}

.summary-card.emphasis {
  background: rgba(243, 239, 230, 0.68);
}

.dashboard-link-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.dashboard-link-card:hover,
.dashboard-link-card:focus-visible {
  outline: none;
  border-color: #cbd5c3;
  box-shadow: 0 0 0 3px rgba(82, 99, 72, 0.18);
}

.app-footer {
  margin-top: 52px;
  color: rgba(104, 101, 94, 0.58);
  font-size: 12px;
  line-height: 16px;
}

.module-page .topbar {
  margin-bottom: 40px;
}

.products-topbar {
  align-items: flex-start;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
}

.topbar-actions {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.module-intro {
  max-width: 820px;
}

.module-intro p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
}

.product-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.products-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.product-list-panel,
.product-detail-panel {
  border: 1px solid rgba(232, 227, 218, 0.78);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.product-list-panel {
  min-width: 0;
  padding: 24px;
}

.product-detail-panel {
  padding: 24px;
}

.panel-heading,
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.panel-heading {
  margin-bottom: 22px;
}

.panel-heading h3,
.detail-header h3 {
  margin-bottom: 0;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid #cbd5c3;
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.secondary-action svg {
  width: 18px;
  height: 18px;
}

.secondary-action:hover,
.secondary-action:focus-visible,
.filter-tabs button:hover,
.filter-tabs button:focus-visible,
.products-row:focus-visible,
.search-field:focus-within,
.inline-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(82, 99, 72, 0.18);
}

.products-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(250, 250, 247, 0.72);
  color: var(--muted);
}

.search-field svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.filter-tabs {
  display: inline-flex;
  gap: 2px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: rgba(246, 244, 238, 0.52);
}

.filter-tabs button {
  border: 0;
  border-radius: 7px;
  padding: 8px 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.filter-tabs button.active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-low);
}

.product-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 560px;
}

.products-page {
  max-width: 1220px;
}

.products-page .topbar {
  margin-bottom: 34px;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.catalog-heading h2 {
  font-size: 30px;
  line-height: 38px;
}

.catalog-heading p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
}

.catalog-panel {
  padding: 20px;
  box-shadow: var(--shadow-low);
}

.catalog-toolbar {
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, auto);
  margin-bottom: 14px;
}

.catalog-toolbar .search-field {
  background: var(--surface);
}

.catalog-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(130px, 1fr) minmax(100px, 0.65fr) minmax(100px, 0.65fr) minmax(82px, 0.45fr);
  gap: 20px;
  align-items: center;
  min-height: 66px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.catalog-row:last-child {
  border-bottom: 0;
}

.catalog-head {
  min-height: 42px;
  background: rgba(246, 244, 238, 0.42);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.product-row {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.product-row:hover {
  background: rgba(250, 250, 247, 0.72);
}

.product-row strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 22px;
}

.view-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #cbd5c3;
  border-radius: 8px;
  padding: 8px 13px;
  background: rgba(250, 250, 247, 0.72);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.view-action:hover,
.view-action:focus-visible {
  outline: none;
  background: var(--selected);
  box-shadow: 0 0 0 3px rgba(82, 99, 72, 0.18);
}

.product-sheet {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.sheet-top-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.secondary-action:disabled {
  opacity: 0.58;
  cursor: default;
}

.secondary-action:disabled:hover {
  background: var(--surface);
  box-shadow: none;
}

.product-sheet-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  border: 1px solid rgba(232, 227, 218, 0.78);
  border-radius: 8px;
  padding: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-low);
}

.product-sheet-hero h2 {
  max-width: none;
  margin-bottom: 6px;
  font-size: 30px;
  line-height: 38px;
}

.product-sheet-hero p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
}

.sheet-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sheet-section {
  min-width: 0;
  border: 1px solid rgba(232, 227, 218, 0.78);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-low);
}

.sheet-section-wide {
  grid-column: 1 / -1;
}

.sheet-section h3 {
  margin-bottom: 16px;
  font-size: 18px;
  line-height: 24px;
}

.sheet-section h4 {
  margin: 0 0 10px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 650;
  line-height: 20px;
}

.sheet-definition-list,
.price-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.sheet-definition-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sheet-definition-list div,
.price-list div {
  min-height: 66px;
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(246, 244, 238, 0.58);
}

.wide-definition {
  grid-column: 1 / -1;
}

.sheet-definition-list dt,
.price-list dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.sheet-definition-list dd,
.price-list dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.price-list dd {
  font-weight: 650;
}

.price-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.price-mode-list {
  margin-bottom: 10px;
}

.sheet-subsection {
  margin-top: 18px;
}

.quiet-copy {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 23px;
}

.micro-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 19px;
}

.product-cards {
  display: grid;
  gap: 14px;
}

.product-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
}

.product-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.product-card h3 {
  margin-bottom: 0;
}

.product-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.product-facts div {
  min-height: 70px;
  border-radius: 8px;
  padding: 12px;
  background: rgba(246, 244, 238, 0.72);
}

.product-facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.product-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 620;
  line-height: 22px;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.product-actions button:hover,
.product-actions button:focus-visible {
  outline: none;
  background: var(--soft);
  box-shadow: 0 0 0 3px rgba(82, 99, 72, 0.18);
}

.products-table {
  display: grid;
  border-top: 1px solid var(--line);
}

.products-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(150px, 0.9fr) minmax(170px, 1fr) minmax(104px, 0.5fr);
  gap: 18px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 14px 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.products-row.table-head {
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: default;
}

.products-row.selected,
.products-row:not(.table-head):hover {
  background: rgba(238, 243, 234, 0.72);
}

.products-row strong,
.products-row small {
  display: block;
}

.products-row strong {
  font-size: 15px;
  line-height: 20px;
}

.products-row small,
.products-row span {
  font-size: 14px;
  line-height: 20px;
}

.products-row small {
  margin-top: 3px;
  color: var(--muted);
}

.detail-header {
  justify-content: flex-start;
  margin-bottom: 24px;
}

.detail-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--selected);
  color: var(--primary-dark);
}

.detail-list {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
}

.detail-list div {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.detail-list dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 21px;
}

.detail-section {
  margin-bottom: 24px;
}

.use-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.use-chips span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 620;
}

.use-chips svg {
  width: 15px;
  height: 15px;
}

.inline-action {
  box-shadow: none;
}

.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;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 42px 22px;
  background: rgba(36, 35, 31, 0.22);
  overflow: auto;
}

.product-modal {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  font-size: 26px;
  line-height: 32px;
}

.icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary-dark);
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button:hover,
.icon-button:focus-visible {
  outline: none;
  background: var(--soft);
  box-shadow: 0 0 0 3px rgba(82, 99, 72, 0.18);
}

.product-form {
  padding: 24px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-section {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.form-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.form-section h3 {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 23px;
}

.form-section-grid,
.price-input-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product-form label {
  display: grid;
  gap: 7px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 650;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px 12px;
  background: rgba(250, 250, 247, 0.74);
}

.choice-group legend {
  padding: 0 6px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 650;
}

.choice-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.choice-group input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.product-form input,
.product-form textarea,
.product-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(250, 250, 247, 0.74);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 22px;
}

.product-form textarea {
  resize: vertical;
}

.product-form input:focus,
.product-form textarea:focus,
.product-form select:focus {
  outline: none;
  border-color: #cbd5c3;
  box-shadow: 0 0 0 3px rgba(82, 99, 72, 0.18);
}

.calculation-note {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 19px;
}

.wide-field {
  grid-column: 1 / -1;
}

.form-note {
  margin-top: 16px;
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--selected);
  color: var(--primary-dark);
  font-size: 14px;
  line-height: 20px;
}

.field-error,
.field-help {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 16px;
}

.field-error {
  color: #9b2c22;
}

.field-help {
  color: var(--muted);
}

.print-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: auto;
  padding: 24px;
  background: rgba(36, 35, 31, 0.42);
}

.print-preview-panel {
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--background);
  box-shadow: var(--shadow);
}

.print-preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding: 16px;
  background: var(--background);
}

.print-preview-toolbar h2,
.print-preview-toolbar p {
  margin: 0;
}

.print-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

#print-root {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #fff;
}

#print-root:empty {
  display: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.clients-page {
  max-width: 1220px;
}

.client-list-panel {
  border: 1px solid rgba(232, 227, 218, 0.78);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-low);
}

.consumer-panel {
  margin-bottom: 16px;
  background: rgba(243, 239, 230, 0.52);
}

.client-list-panel {
  padding: 16px;
}

.client-list {
  display: grid;
  gap: 10px;
}

.client-card {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) minmax(130px, 0.65fr) minmax(96px, 0.45fr) minmax(150px, 0.7fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 16px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.client-card:hover {
  background: rgba(250, 250, 247, 0.72);
}

.client-card strong,
.client-card span {
  display: block;
}

.client-card strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 22px;
}

.client-card div > span {
  margin-top: 2px;
  color: var(--muted);
}

.fixed-client-action {
  flex: 0 0 auto;
}

.client-sheet {
  max-width: 980px;
}

.client-modal {
  width: min(860px, 100%);
}

.client-form input[name="kind"] {
  display: none;
}

.client-kind-selector {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 6px;
  width: min(100%, 380px);
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(243, 239, 230, 0.52);
}

.client-kind-option {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.client-kind-option.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-low);
}

.client-kind-option:disabled {
  cursor: default;
  opacity: 0.72;
}

.deliveries-page {
  max-width: 1220px;
}

.delivery-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.delivery-alert {
  display: block;
  min-height: 94px;
  border: 1px solid rgba(232, 227, 218, 0.78);
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.delivery-alert span {
  margin-bottom: 7px;
  font-size: 12px;
  line-height: 16px;
}

.delivery-alert strong {
  margin-bottom: 2px;
  font-size: 20px;
  line-height: 25px;
}

.delivery-alert p {
  font-size: 13px;
  line-height: 18px;
}

.delivery-alert.active,
.delivery-alert:focus-visible,
.delivery-alert:hover {
  outline: none;
  border-color: #cbd5c3;
  box-shadow: 0 0 0 3px rgba(82, 99, 72, 0.18);
}

.delivery-list-panel {
  border: 1px solid rgba(232, 227, 218, 0.78);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-low);
}

.delivery-list {
  display: grid;
  gap: 10px;
}

.delivery-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.delivery-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.delivery-toolbar input,
.delivery-toolbar select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(250, 250, 247, 0.74);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.delivery-toolbar input:focus,
.delivery-toolbar select:focus {
  outline: none;
  border-color: #cbd5c3;
  box-shadow: 0 0 0 3px rgba(82, 99, 72, 0.18);
}

.delivery-table {
  display: grid;
  gap: 10px;
}

.order-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.section-heading-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading-inline h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 18px;
  line-height: 24px;
}

.section-heading-inline p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.orders-vouchers-panel {
  margin-top: 16px;
}

.orders-table-header,
.order-row {
  display: grid;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.orders-table-header {
  min-height: 42px;
  background: rgba(246, 244, 238, 0.42);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.order-row strong {
  color: var(--text);
  font-size: 15px;
  line-height: 21px;
}

.order-row strong small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.order-row {
  grid-template-columns: minmax(210px, 1fr) minmax(130px, 0.55fr) minmax(220px, 1.15fr) minmax(96px, 0.4fr) minmax(180px, 0.9fr);
}

.orders-table {
  overflow-x: auto;
}

.order-list-row {
  grid-template-columns: minmax(110px, 0.7fr) minmax(110px, 0.7fr) minmax(190px, 1.2fr) minmax(132px, 0.82fr) minmax(150px, 0.88fr) minmax(72px, 0.42fr);
  min-width: 800px;
}

.sales-table {
  overflow-x: auto;
}

.sales-table-header,
.sales-row {
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(132px, 0.78fr) minmax(116px, 0.62fr) minmax(190px, 0.9fr) minmax(78px, 0.4fr);
  min-width: 880px;
}

.sales-state-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sales-searchbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.sales-searchbar label {
  display: grid;
  gap: 6px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.sales-searchbar input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(250, 250, 247, 0.74);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.order-filter-toolbar {
  grid-template-columns: repeat(4, minmax(126px, 1fr)) auto;
}

.partial-orders-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  border: 1px solid #ead7c4;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbf4ed;
  color: #7b4d2f;
}

.partial-orders-alert p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}

.order-sheet {
  max-width: 1060px;
}

.order-hero-status,
.order-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.order-detail-actions {
  justify-content: flex-start;
}

.more-actions-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.compact-notes {
  grid-column: 1 / -1;
  padding: 16px 18px;
}

.compact-notes p,
.fixed-client-value {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
}

.fixed-client-value {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(246, 244, 238, 0.58);
  font-weight: 650;
}

.order-lines-table,
.order-lines-editor,
.order-history-list {
  display: grid;
  gap: 8px;
}

.compact-delivery-table,
.account-remits-table {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(140px, 0.9fr) minmax(220px, 1.4fr) minmax(110px, 0.75fr) minmax(128px, 0.8fr);
  gap: 12px;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.compact-delivery-head,
.account-remits-head {
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.compact-delivery-table strong,
.account-remits-table strong {
  color: var(--text);
}

.hero-total {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 18px;
  line-height: 24px;
}

.order-lines-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(88px, 0.6fr));
  gap: 12px;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.order-lines-row:last-child {
  border-bottom: 0;
}

.order-lines-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.order-lines-row strong {
  color: var(--text);
}

.delivery-confirm-row {
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(88px, 0.6fr));
}

.order-lines-row input,
.order-edit-line input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(250, 250, 247, 0.74);
  color: var(--text);
  font: inherit;
}

.order-product-picker,
.order-edit-line {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(100px, 0.35fr) auto;
  gap: 12px;
  align-items: end;
}

.quick-create-client {
  display: grid;
  grid-template-columns: auto minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: end;
}

.quick-create-client[hidden],
.quick-client-direct-field[hidden] {
  display: none;
}

.order-edit-line {
  grid-template-columns: minmax(190px, 1fr) minmax(110px, 0.4fr) minmax(96px, 0.35fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.order-product-picker label,
.order-edit-line label {
  display: grid;
  gap: 6px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 650;
}

.order-product-picker select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(250, 250, 247, 0.74);
  color: var(--text);
  font: inherit;
}

.order-history-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.order-history-list strong {
  color: var(--text);
}

.order-delivery-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(250, 250, 247, 0.74);
}

.order-delivery-card > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.danger-action {
  border-color: rgba(183, 81, 69, 0.38);
  color: var(--danger);
}

.order-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
}

.order-check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.order-check small,
.order-assignment {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.sales-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.sales-tab {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.sales-tab.active,
.sales-tab:hover,
.sales-tab:focus-visible {
  outline: none;
  border-color: #cbd5c3;
  background: var(--selected);
  color: var(--primary-dark);
}

.sales-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sales-links a {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.sales-links a:hover {
  text-decoration: underline;
}

.delivery-card {
  display: grid;
  grid-template-columns: minmax(190px, 0.95fr) minmax(130px, 0.6fr) minmax(260px, 1.35fr) minmax(106px, 0.45fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 16px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.delivery-card:hover {
  background: rgba(250, 250, 247, 0.72);
}

.delivery-card strong,
.delivery-card span {
  display: block;
}

.delivery-card strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 22px;
}

.delivery-card div > span {
  margin-top: 2px;
  color: var(--muted);
}

.delivery-sheet {
  max-width: 980px;
}

.delivery-status-stack {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.pending-order-card {
  background: rgba(243, 239, 230, 0.42);
}

.delivery-detail-actions,
.delivery-document-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.delivery-detail-actions .primary-action {
  min-height: 44px;
  padding: 11px 14px;
  font-size: 14px;
}

.delivery-integrity-note {
  border: 1px solid #cbd5c3;
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--selected);
  color: var(--primary-dark);
  font-size: 14px;
  line-height: 20px;
}

.delivery-linked-list,
.delivery-lines {
  display: grid;
  gap: 10px;
}

.linked-item {
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(246, 244, 238, 0.58);
}

.linked-item strong,
.linked-item span {
  display: block;
}

.linked-item strong {
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
}

.linked-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.delivery-line-head,
.delivery-line-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.65fr) minmax(180px, 1.3fr) minmax(80px, 0.4fr) minmax(100px, 0.6fr);
  gap: 12px;
  align-items: center;
}

.delivery-line-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.delivery-line-row {
  min-height: 46px;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(246, 244, 238, 0.58);
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.delivery-line-row strong {
  color: var(--text);
}

.delivery-doc-list {
  margin-top: 12px;
}

.compact-action {
  min-height: 42px;
  padding: 9px 12px;
  white-space: nowrap;
}

.delivery-modal {
  width: min(920px, 100%);
}

#payment-modal {
  z-index: 110;
  align-items: center;
  padding: 24px;
  background: rgba(36, 35, 31, 0.62);
}

#payment-modal .delivery-modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}

#payment-form {
  padding: 22px 24px 24px;
}

#payment-form .form-section-grid label {
  display: grid;
  gap: 7px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 650;
}

#payment-form input,
#payment-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

#payment-form input[readonly] {
  background: rgba(250, 250, 247, 0.9);
  font-weight: 700;
}

.form-helper {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.form-note-error {
  background: #f5e1dd;
  color: #8c342b;
}

.order-choice-list {
  display: grid;
  gap: 10px;
}

.order-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(250, 250, 247, 0.74);
  color: var(--text);
  cursor: pointer;
}

.order-choice input {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: var(--primary);
}

.order-choice strong,
.order-choice small {
  display: block;
}

.order-choice strong {
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}

.order-choice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}

.delivery-voucher-preview {
  display: grid;
  gap: 16px;
}

.voucher-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.voucher-page {
  display: grid;
  gap: 14px;
  max-width: 820px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow-low);
}

.voucher-copy {
  min-height: 360px;
  border: 1px solid #d9d4ca;
  padding: 16px;
}

.account-print-copy {
  min-height: 0;
}

.voucher-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.voucher-head strong,
.voucher-head span {
  display: block;
}

.voucher-head strong {
  color: var(--text);
  font-size: 15px;
  line-height: 20px;
}

.voucher-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.voucher-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0 0 12px;
}

.voucher-data div {
  display: grid;
  gap: 2px;
}

.voucher-data dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 14px;
}

.voucher-data dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}

.voucher-copy table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  font-size: 12px;
}

.voucher-copy th,
.voucher-copy td {
  border-bottom: 1px solid #e6e1d8;
  padding: 6px 4px;
  text-align: left;
}

.voucher-total {
  margin: 0 0 8px;
  text-align: right;
  font-size: 13px;
  font-weight: 650;
}

.voucher-note {
  min-height: 20px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.signature-grid span {
  border-top: 1px solid #cfc8bc;
  padding-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1180px) {
  .dashboard {
    padding-right: 34px;
    padding-left: 34px;
  }

  .priority-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products-workspace {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .product-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .catalog-row {
    grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 0.9fr) minmax(90px, 0.55fr) minmax(92px, 0.55fr) minmax(72px, 0.4fr);
  }

  .sheet-section-grid {
    grid-template-columns: 1fr;
  }

  .client-card {
    grid-template-columns: minmax(180px, 1.15fr) minmax(120px, 0.6fr) minmax(92px, 0.45fr) minmax(120px, 0.7fr) auto;
  }

  .delivery-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-card {
    grid-template-columns: minmax(180px, 0.9fr) minmax(112px, 0.55fr) minmax(210px, 1.1fr) minmax(98px, 0.45fr) auto;
  }

  .order-filter-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-lines-row {
    grid-template-columns: minmax(160px, 1fr) repeat(4, minmax(72px, 0.55fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    margin-bottom: 24px;
  }

  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
  }

  .dashboard {
    padding: 30px 22px 118px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 34px;
  }

  .today-panel {
    justify-items: start;
    font-size: 12px;
  }

  .today-panel strong {
    font-size: 15px;
  }

  h2 {
    font-size: 29px;
    line-height: 36px;
  }

  .priority-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .product-summary,
  .products-toolbar {
    grid-template-columns: 1fr;
  }

  .client-card {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    min-height: 0;
  }

  .client-card div {
    grid-column: 1 / -1;
  }

  .client-card .view-action {
    justify-self: end;
  }

  .delivery-summary {
    grid-template-columns: 1fr;
  }

  .delivery-toolbar {
    grid-template-columns: 1fr;
  }

  .delivery-card {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    min-height: 0;
  }

  .delivery-card div,
  .delivery-card > span:nth-of-type(2) {
    grid-column: 1 / -1;
  }

  .delivery-card .view-action {
    justify-self: end;
  }

  .sales-searchbar,
  .sales-row,
  .sales-table-header {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .sales-table-header {
    display: none;
  }

  .sales-row {
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 15px;
    background: var(--surface);
  }

  .order-filter-toolbar,
  .order-list-row,
  .order-lines-row,
  .order-product-picker,
  .compact-delivery-table,
  .account-remits-table,
  .order-edit-line {
    grid-template-columns: 1fr;
  }

  .compact-delivery-head,
  .account-remits-head {
    display: none;
  }

  .partial-orders-alert {
    align-items: stretch;
    flex-direction: column;
  }

  .order-list-row {
    min-width: 0;
    gap: 8px;
  }

  .order-list-row.catalog-head {
    display: none;
  }

  .order-hero-status,
  .order-detail-actions {
    justify-content: flex-start;
  }

  .delivery-detail-actions,
  .delivery-document-actions,
  .voucher-toolbar {
    width: 100%;
    flex-direction: column;
  }

  .delivery-detail-actions .secondary-action,
  .delivery-detail-actions .primary-action,
  .delivery-document-actions .secondary-action,
  .voucher-toolbar .secondary-action,
  .voucher-toolbar .primary-action {
    width: 100%;
  }

  .delivery-line-head {
    display: none;
  }

  .delivery-line-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .voucher-data,
  .signature-grid {
    grid-template-columns: 1fr;
  }

  .client-kind-selector {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .filter-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .products-topbar,
  .topbar-actions {
    align-items: stretch;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .today-panel {
    order: 2;
  }

  .topbar-actions .inline-action {
    order: 1;
    justify-content: center;
    width: 100%;
  }

  .panel-heading {
    flex-direction: column;
  }

  .sheet-top-actions,
  .product-sheet-hero {
    flex-direction: column;
  }

  .sheet-top-actions .secondary-action {
    width: 100%;
  }

  .sheet-definition-list {
    grid-template-columns: 1fr;
  }

  .secondary-action {
    width: 100%;
  }

  .products-table {
    gap: 10px;
    border-top: 0;
  }

  .products-row,
  .products-row.table-head {
    grid-template-columns: 1fr;
  }

  .products-row.table-head {
    display: none;
  }

  .products-row {
    gap: 8px;
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 15px;
  }

  .catalog-table {
    display: grid;
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .catalog-head {
    display: none;
  }

  .catalog-row {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 15px;
    background: var(--surface);
  }

  .product-row strong {
    grid-column: 1 / -1;
    font-size: 16px;
  }

  .product-row span:nth-child(2),
  .product-row span:nth-child(3) {
    color: var(--muted);
  }

  .product-row span:nth-child(4) {
    justify-self: start;
  }

  .product-row span:nth-child(5) {
    justify-self: end;
  }

  .product-facts,
  .form-section-grid,
  .price-input-group,
  .choice-group {
    grid-template-columns: 1fr;
  }

  .product-card-main,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .primary-action,
  .form-actions .secondary-action {
    width: 100%;
  }

  .floating-action {
    right: 18px;
    bottom: 18px;
    left: 18px;
  }

  .primary-action {
    justify-content: center;
    width: 100%;
  }

  .action-menu {
    left: 0;
    right: 0;
    width: 100%;
  }
}

@media (max-width: 460px) {
  body {
    font-size: 16px;
  }

  .main-nav,
  .subnav {
    grid-template-columns: 1fr;
  }

  .priority-card {
    min-height: 210px;
  }
}

@media (min-width: 1500px) {
  .dashboard {
    max-width: 1320px;
    padding-top: 52px;
    padding-left: 56px;
  }
}

/* Modulo 09 - Consignacion */
.consignment-board,
.count-editor {
  display: grid;
  gap: 10px;
}

.consignment-card {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(150px, .7fr) minmax(390px, 1.6fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface);
}

.consignment-card strong,
.consignment-card span,
.consignment-card small { display: block; }
.consignment-card small { margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 650; }
.consignment-card > div:first-child { display: grid; gap: 7px; justify-items: start; }
.consignment-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.consignment-actions .secondary-action { width: auto; }
.consignment-sheet { max-width: 1120px; }
.consignment-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 18px 0; }
.consignment-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.consignment-metrics article,
.consignment-summary article { display: grid; align-content: center; gap: 7px; min-height: 92px; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: var(--surface); }
.consignment-metrics span,
.consignment-summary span { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }
.consignment-metrics strong,
.consignment-summary strong { display: block; color: var(--text); font-size: 22px; line-height: 28px; }
.consignment-table { display: grid; overflow-x: auto; }
.consignment-table-row { display: grid; grid-template-columns: minmax(190px, 1.2fr) repeat(3, minmax(120px, .7fr)); gap: 12px; align-items: center; min-width: 620px; border-bottom: 1px solid var(--line); padding: 10px 0; color: var(--muted); font-size: 14px; }
.consignment-table-head { color: var(--muted); font-size: 12px; font-weight: 650; }
.consignment-table-row strong { color: var(--text); }
.count-line { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.count-line legend { padding: 0 6px; color: var(--primary-dark); font-weight: 700; }
.count-line label { display: grid; gap: 6px; color: var(--primary-dark); font-size: 12px; font-weight: 650; }
.count-line input,.count-line select,.form-section-grid input { min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: rgba(250,250,247,.74); color: var(--text); font: inherit; }
.calculated-sale { align-self: end; min-height: 42px; padding: 10px; border-radius: 8px; background: var(--selected); color: var(--primary-dark); }
.consignment-recent-history { margin-top: 16px; }
.recent-history-row { display: grid; grid-template-columns: minmax(120px,.65fr) minmax(130px,.7fr) minmax(220px,1.4fr) minmax(120px,.65fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 13px; }
.recent-history-row:last-child { border-bottom: 0; }
.modal-open { overflow: hidden; }
.consignment-modal-backdrop { z-index: 100; align-items: center; padding: 24px; background: rgba(36,35,31,.62); overflow: hidden; }
.consignment-modal-panel { display: flex; flex-direction: column; width: min(920px,100%); max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 24px 70px rgba(20,20,18,.28); overflow: hidden; }
.consignment-modal-body { overflow-y: auto; padding: 24px; background: var(--surface); }

@media (max-width: 1180px) {
  .consignment-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .consignment-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .count-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .consignment-card,.count-line { grid-template-columns: 1fr; }
  .consignment-actions { flex-direction: column; }
  .consignment-actions .secondary-action,.consignment-actions .view-action { width: 100%; }
  .consignment-metrics,.consignment-summary { grid-template-columns: 1fr; }
  .recent-history-row { grid-template-columns: 1fr; gap: 5px; }
  .consignment-modal-backdrop { align-items: stretch; padding: 10px; }
  .consignment-modal-panel { max-height: calc(100vh - 20px); }
  .consignment-modal-body { padding: 18px; }
}

/* Identidad visual Tempero OS v1.0 */
:root {
  --background: #f7f8fa;
  --surface: #ffffff;
  --text: #1d2a33;
  --muted: #65727c;
  --line: #dde3e8;
  --primary: #005187;
  --primary-dark: #003d67;
  --selected: #e9f3f9;
  --soft: #f3f6f8;
  --cream: #faf9f3;
  --mustard: #988737;
  --steel: #426b84;
  --green: #39745a;
  --violet: #6c6280;
  --danger: #a9433a;
  --gold: #988737;
  --focus-ring: 0 0 0 3px rgba(0, 81, 135, 0.2);
  --radius-control: 8px;
  --radius-panel: 10px;
  --control-height: 44px;
  --shadow-low: 0 1px 2px rgba(23, 48, 65, 0.05);
  --shadow-card: 0 8px 24px rgba(23, 48, 65, 0.06);
  --shadow-menu: 0 18px 44px rgba(23, 48, 65, 0.12);
}

body {
  background: var(--background);
  color: var(--text);
  font-size: 16px;
}

img,
.logo-slot,
.brand-mark {
  background: #ffffff;
}

img {
  color-scheme: light;
}

.app-shell {
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: #ffffff;
  border-right-color: var(--line);
  padding: 24px 20px;
}

.brand {
  min-height: 52px;
  margin-bottom: 32px;
}

.brand-mark {
  width: 196px;
  height: 58px;
  border: 0;
  border-radius: 0;
  color: var(--primary);
}

.brand > div {
  display: none;
}

.brand .logo-slot img {
  object-fit: contain;
  object-position: left center;
}

.logo-fallback {
  background: #ffffff;
  color: var(--primary);
}

.brand strong {
  color: var(--primary);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.brand span {
  color: var(--muted);
}

.main-nav {
  gap: 6px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 18px 10px 4px;
  border-top: 1px solid var(--line);
}

.sidebar-user-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
}

.sidebar-user strong { color: var(--text); font-size: 14px; }
.sidebar-user small { color: var(--muted); font-size: 12px; }

.nav-item {
  min-height: 44px;
  border-radius: var(--radius-control);
  color: #304653;
  font-size: 14px;
  font-weight: 620;
}

.nav-item.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(0, 81, 135, 0.16);
}

.nav-item:hover:not(.active),
.subnav a:hover {
  background: var(--selected);
  color: var(--primary-dark);
}

.admin-nav {
  border-top-color: var(--line);
}

.subnav a {
  border-radius: 7px;
  color: #4b5e69;
}

.subnav a.active {
  background: var(--selected);
  color: var(--primary-dark);
  font-weight: 700;
}

a[href="./etiquetas.html"] {
  display: none !important;
}

.main-content,
.page-content,
.content-shell {
  max-width: 1480px;
}

.topbar {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.topbar h1,
.page-heading h1,
.detail-heading h1,
.sheet-header h1 {
  color: var(--primary);
  letter-spacing: -0.025em;
}

.eyebrow {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-subtitle,
.quiet-copy,
.form-helper,
.micro-note {
  color: var(--muted);
}

.today-panel {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding-block: 2px;
}

.dashboard-card,
.metric-card,
.summary-card,
.panel,
.list-panel,
.catalog-panel,
.client-list-panel,
.detail-panel,
.sheet-section,
.pending-panel,
.quick-actions,
.sales-board,
.consignment-card {
  background: #ffffff;
  border-color: var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-low);
}

.metric-card,
.summary-card {
  border-top: 3px solid var(--primary);
}

.metric-card:nth-child(2n),
.summary-card:nth-child(2n) {
  border-top-color: var(--gold);
}

.metric-card strong,
.summary-card strong,
.dashboard-card strong {
  color: var(--primary);
}

.catalog-row,
.client-row,
.delivery-row,
.sales-row,
.consignment-table-row,
.recent-history-row {
  border-color: var(--line);
}

.catalog-row:hover,
.client-row:hover,
.delivery-row:hover,
.sales-row:hover {
  background: #f8fbfd;
}

button,
input,
select,
textarea {
  border-radius: var(--radius-control);
}

input,
select,
textarea {
  background: #ffffff;
  border-color: #cfd9df;
  color: var(--text);
}

input:not([type="checkbox"]):not([type="radio"]),
select,
button {
  min-height: var(--control-height);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  outline: none;
}

.primary-action,
button.primary-action {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(0, 81, 135, 0.14);
}

.primary-action:hover,
button.primary-action:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.secondary-action,
.view-action {
  background: #ffffff;
  border-color: #bfcdd6;
  color: var(--primary);
}

.view-action {
  font-weight: 650;
}

.danger-action {
  color: var(--danger);
}

button[disabled],
button[aria-disabled="true"] {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.58;
}

[data-tempero-busy="true"]::after {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: tempero-spin 700ms linear infinite;
}

@keyframes tempero-spin {
  to { transform: rotate(360deg); }
}

.status {
  border: 1px solid currentColor;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.status.pending { color: #746517; background: #faf6df; }
.status.info { color: #285d78; background: #eaf3f7; }
.status.partial { color: #8a4d2e; background: #f8ece4; }
.status.review { color: #2f684e; background: #e6f2eb; }
.status.billing { color: #66557a; background: #f0ebf4; }
.status.danger { color: #923b34; background: #f8e8e6; }

.modal-backdrop,
.modal-layer {
  background: rgba(18, 37, 49, 0.42);
  backdrop-filter: blur(2px);
}

.modal,
.product-modal,
.client-modal,
.delivery-modal,
.sales-modal,
.consignment-modal {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 26px 70px rgba(18, 37, 49, 0.2);
}

.form-section {
  border-color: var(--line);
}

.form-note-error,
.field-error,
[aria-invalid="true"] {
  color: var(--danger);
}

.empty-state {
  background: #ffffff;
  border: 1px dashed #bdcbd4;
  border-radius: var(--radius-panel);
  color: var(--muted);
}

#data-error-notice {
  background: #923b34 !important;
  border: 1px solid #7d302a;
  box-shadow: var(--shadow-menu);
}

.print-preview,
.account-preview {
  background: #eef1f3;
}

.voucher-copy,
.print-shell,
.account-page {
  background: #ffffff;
  color: #1d252a;
}

.voucher-head,
.document-header {
  border-bottom: 2px solid #1d252a;
}

.print-brand-logo {
  display: block;
  width: 112px;
  height: 32px;
  margin-bottom: 5px;
  object-fit: contain;
  object-position: left center;
  filter: grayscale(1);
}

.voucher-copy table,
.print-shell table,
.account-page table {
  border-color: #cfd4d7;
}

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 232px minmax(0, 1fr); }
  .sidebar { padding-inline: 16px; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-user { display: none; }
  .main-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-item { justify-content: center; text-align: center; }
  .topbar { align-items: flex-start; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .sidebar { padding: 14px; }
  .brand { margin-bottom: 14px; }
  .brand-mark { width: 178px; height: 52px; }
  .main-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-item { min-height: 42px; padding: 8px 10px; }
  .topbar { display: grid; gap: 14px; }
  .today-panel { width: 100%; }
  .form-actions { display: grid; grid-template-columns: 1fr; }
  .form-actions button { width: 100%; }
  .catalog-row,
  .client-row,
  .delivery-row,
  .sales-row { border-radius: 8px; }
}

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

.import-panel { display: grid; gap: 18px; }
.import-file-row { display: grid; grid-template-columns: minmax(240px, 1fr) auto auto; gap: 16px; align-items: end; }
.import-file-control { display: grid; gap: 8px; font-weight: 650; }
.import-file-control input { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.import-scope { display: flex; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.import-scope legend { padding: 0 5px; color: var(--muted); font-size: 12px; }
.import-scope label { display: flex; gap: 6px; align-items: center; }
.import-success { color: #356348; font-weight: 700; }
.import-file-meta { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7fafc; }
.import-file-meta span { display: grid; gap: 4px; min-width: 0; }
.import-file-meta small { color: var(--muted); }
.import-file-meta strong { overflow-wrap: anywhere; }
.import-file-meta code { overflow-wrap: anywhere; font-size: 11px; }
.import-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.import-summary-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: #fff; }
.import-summary-card > strong { grid-column: 1 / -1; color: var(--primary); }
.import-summary-card span { display: grid; gap: 2px; }
.import-summary-card small { color: var(--muted); }
.import-summary-card b { font-size: 20px; }
.import-summary-card.muted { opacity: .5; }
.import-preview-section { display: grid; gap: 10px; margin-top: 18px; }
.import-result-table, .import-issues-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.import-result-row, .import-issue-row { display: grid; grid-template-columns: 95px minmax(170px, .9fr) 135px minmax(250px, 1.15fr) minmax(230px, 1fr) 75px; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.import-issue-row { grid-template-columns: 110px 170px 160px 140px minmax(300px, 1fr); align-items: start; }
.import-result-row:last-child, .import-issue-row:last-child { border-bottom: 0; }
.import-result-head { background: #edf5fa; color: var(--primary); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.import-issue-row.error { border-left: 4px solid var(--danger); }
.import-issue-row.warning { border-left: 4px solid var(--accent); }
.import-issue-row b { display: block; margin-top: 4px; }

@media (max-width: 850px) {
  .import-file-row, .import-summary-grid, .import-file-meta { grid-template-columns: 1fr; }
  .import-file-row .primary-action { width: 100%; }
}

@media print {
  html,
  body {
    background: #fff;
    margin: 0;
  }

  body * {
    visibility: hidden !important;
  }

  #print-root,
  #print-root * {
    visibility: visible !important;
  }

  #print-preview {
    position: static !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .print-preview-panel,
  #print-root {
    position: static !important;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .print-preview-toolbar {
    display: none !important;
  }

  #print-root {
    display: block !important;
  }

  #print-root .print-page,
  #print-root .voucher-copy {
    min-height: 270mm;
    page-break-after: always;
    break-after: page;
    page-break-inside: auto;
    break-inside: auto;
    border: 0;
    padding: 14mm;
  }

  #print-root .print-page:last-child,
  #print-root .voucher-copy:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  #print-root tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
