:root {
  --ink: #17242b;
  --muted: #68747d;
  --line: #d7e0e5;
  --panel: #ffffff;
  --canvas: #f4f6f3;
  --navy: #13324a;
  --teal: #0f4c5c;
  --gold: #f0b44c;
  --green: #337a56;
  --red: #b4443d;
  --blue-soft: #e8f0f5;
  --gold-soft: #fff3d7;
  --green-soft: #e8f4ee;
  --red-soft: #f8e7e5;
  --shadow: 0 10px 30px rgba(18, 32, 41, 0.08);
}

.quotation-list-panel .row-actions,
.quotation-table .row-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.quotation-convert-dialog {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(12, 35, 64, 0.24);
  max-width: min(920px, calc(100vw - 32px));
  width: 920px;
}

.quotation-convert-dialog::backdrop {
  background: rgba(8, 28, 50, 0.42);
}

.quotation-convert-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.compact-dialog-grid {
  grid-template-columns: minmax(220px, 320px);
  margin-bottom: 12px;
}

.quotation-convert-table input[type="number"] {
  max-width: 120px;
}

.purchase-alert-qty {
  min-width: 110px;
  width: 100%;
  max-width: 150px;
  text-align: right;
}

.no-fiscal-quotation-reference {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  display: flex;
  gap: 8px;
  margin: -2px 0 10px;
  padding: 7px 10px;
}

.quotation-print .quotation-title-card h2 {
  font-size: 26px;
}

.quotation-print .quotation-warning {
  background: #eef8f5;
  border-color: #8fc7bb;
  color: #0f4c5c;
}

.quotation-print .quotation-note {
  margin-top: 10px;
}

.quotation-print .quotation-signatures {
  margin-top: 34px;
}

.quotation-detail th:nth-child(1) {
  width: 39%;
}

.quotation-detail th:nth-child(2) {
  width: 7%;
}

.quotation-detail th:nth-child(3) {
  width: 9%;
}

.quotation-detail th:nth-child(4) {
  width: 13%;
}

.quotation-detail th:nth-child(5) {
  width: 9%;
}

.quotation-detail th:nth-child(6) {
  width: 9%;
}

.quotation-detail th:nth-child(7) {
  width: 14%;
}

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

  .quotation-convert-dialog {
    width: calc(100vw - 20px);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
}

button:hover {
  border-color: #aebbc2;
}

.link-button {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #0b5d72;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 0;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-button:hover,
.link-button:focus-visible {
  border-color: transparent;
  color: #073b4c;
}

.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  font-weight: 700;
}

.app-shell {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 18px 20px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 3px;
  text-transform: uppercase;
}

h1,
h2 {
  letter-spacing: 0;
  margin: 0;
}

h1 {
  color: var(--teal);
  font-size: 30px;
}

h2 {
  font-size: 17px;
}

.period-control {
  align-items: center;
  display: flex;
  gap: 10px;
}

.period-control label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.period-control input,
input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 0 10px;
  width: 100%;
}

input,
select {
  height: 38px;
}

textarea {
  line-height: 1.4;
  min-height: 110px;
  padding: 10px;
  resize: vertical;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab {
  background: #fff;
  min-width: 112px;
}

.tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 700;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.access-admin-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, .8fr) minmax(460px, 1.5fr);
}

.access-admin-grid .eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  margin: 0 0 4px;
}

.access-user-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.access-user-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.access-user-card.active {
  background: #eef4fb;
  border-color: var(--navy);
  box-shadow: inset 3px 0 0 var(--navy);
}

.access-user-card strong,
.access-user-card small { display: block; }
.access-user-card small { color: var(--muted); margin-top: 3px; }
.access-user-card .status-chip { margin-left: 10px; }

.access-editor {
  display: grid;
  gap: 14px;
}

.access-editor fieldset {
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 12px;
}

.access-editor legend {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  padding: 0 6px;
}

.access-toggle {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  display: flex;
  gap: 9px;
  padding: 10px;
}

.access-toggle input { margin-top: 3px; }
.access-toggle span, .access-toggle small { display: block; }
.access-toggle small { color: var(--muted); margin-top: 3px; }
.access-toggle-main { background: #eef8f1; border-color: #b9dcc3; }

@media (max-width: 900px) {
  .access-admin-grid { grid-template-columns: 1fr; }
  .access-editor fieldset { grid-template-columns: 1fr; }
}

.summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  margin-bottom: 14px;
}

#expenseSummary {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 74px;
  padding: 12px;
}

.metric .label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.metric .value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.metric.accent {
  background: var(--gold-soft);
  border-color: #efd187;
}

.metric.green {
  background: var(--green-soft);
  border-color: #b8d8c6;
}

.metric.red {
  background: var(--red-soft);
  border-color: #e5bdb9;
}

.workspace {
  display: grid;
  gap: 14px;
}

.two-column {
  grid-template-columns: minmax(390px, 0.9fr) minmax(620px, 1.3fr);
}

.report-grid {
  grid-template-columns: 0.9fr 1fr 1fr;
}

.wide-panel {
  grid-column: span 2;
}

.daily-grid {
  align-items: start;
  grid-template-columns: minmax(420px, 0.82fr) minmax(700px, 1.18fr);
}

.daily-movements-panel {
  grid-row: span 2;
}

.daily-movements-wrap {
  overflow-x: hidden;
}

.daily-movements-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.daily-movements-table .today-col-date {
  width: 10%;
}

.daily-movements-table .today-col-type {
  width: 12%;
}

.daily-movements-table .today-col-company {
  width: 13%;
}

.daily-movements-table .today-col-detail {
  width: 25%;
}

.daily-movements-table .today-col-money {
  width: 12%;
}

.daily-movements-table .today-col-actions {
  width: 14%;
}

.daily-movements-table th,
.daily-movements-table td {
  font-size: 12px;
  line-height: 1.25;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.daily-movements-table th:nth-child(5),
.daily-movements-table th:nth-child(6),
.daily-movements-table td:nth-child(5),
.daily-movements-table td:nth-child(6) {
  white-space: nowrap;
}

.daily-movements-table td.num {
  font-size: 11px;
}

.due-alert-panel {
  border-left: 5px solid var(--green);
}

.due-alert-panel.has-alerts {
  border-left-color: var(--gold);
}

.due-alert-panel.has-overdue {
  border-left-color: var(--red);
}

.expense-due-alert-panel {
  margin-bottom: 14px;
}

.due-alert-summary {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 28px;
  padding: 6px 10px;
}

.due-alert-summary.ok {
  background: var(--green-soft);
  border-color: #b8d8c6;
  color: var(--green);
}

.due-alert-summary.warn {
  background: var(--gold-soft);
  border-color: #efd187;
  color: #805a08;
}

.due-alert-summary.error {
  background: var(--red-soft);
  border-color: #e5bdb9;
  color: var(--red);
}

.due-alert-wrap {
  max-height: 260px;
}

.due-alert-table {
  min-width: 1060px;
}

.due-alert-table th,
.due-alert-table td {
  font-size: 12px;
  white-space: normal;
}

.due-alert-table td:nth-child(7) {
  white-space: nowrap;
}

.due-alert-row.due-overdue td {
  background: #fff7f6;
}

.due-alert-row.due-urgent td {
  background: #fffaf0;
}

.due-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  white-space: nowrap;
}

.due-status-overdue {
  background: var(--red-soft);
  color: var(--red);
}

.due-status-urgent,
.due-status-soon {
  background: var(--gold-soft);
  color: #805a08;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.backup-grid {
  grid-template-columns: repeat(4, minmax(250px, 1fr));
}

.backup-status {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 12px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
}

.backup-status ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.backup-status.ok {
  background: var(--green-soft);
  border-color: #b7e0c8;
}

.backup-status.warn {
  background: var(--gold-soft);
  border-color: #f3d28b;
}

.backup-status.error {
  background: var(--red-soft);
  border-color: #f4b9b9;
}

.backup-warning {
  margin-top: 8px;
}

.receipt-report-grid {
  grid-template-columns: 1fr;
}

.receipt-report-filters {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.receipt-report-filters .wide {
  grid-column: span 2;
}

.receipt-report-table {
  max-height: calc(100vh - 360px);
  min-height: 380px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.panel-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 14px;
  min-height: 40px;
  padding-bottom: 10px;
}

.icon-button {
  align-items: center;
  display: inline-flex;
  font-size: 18px;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.inline-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.inline-field {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}

.inline-actions select,
.inline-actions input {
  min-width: 180px;
}

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

.daily-entry-selector {
  display: grid;
  gap: 12px;
}

.register-form-panel {
  align-self: start;
}

.is-hidden {
  display: none !important;
}

.expense-filter-panel {
  margin-bottom: 14px;
}

.expense-filter-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.expense-filter-totals {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  margin-top: 12px;
}

.card-expense-report-panel {
  margin-bottom: 14px;
}

.card-expense-report-panel .panel-heading {
  align-items: center;
}

.card-report-controls {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 12px;
}

.card-expense-report-panel .expense-filter-totals {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.card-expense-report-table {
  min-width: 980px;
}

.card-report-group-row td {
  background: #e7f0f2;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
}

.card-report-destination-row td {
  background: #f2f6f7;
  border-top: 1px solid #cbd9de;
  color: #17384f;
  font-weight: 800;
  text-transform: uppercase;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
}

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

.file-box {
  border: 1px dashed #aebbc2;
  border-radius: 8px;
  padding: 11px;
}

.file-box input {
  height: auto;
  padding: 0;
}

.file-box span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.paste-box {
  align-items: center;
  background: #f8fafb;
  border: 1px dashed #9fb4bd;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 58px;
  outline: none;
  padding: 12px;
  text-align: center;
}

.paste-box:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.14);
  color: var(--ink);
}

.fiscal-quotation-paste-box {
  background: #eef5f7;
  border-color: #85aeb8;
  min-height: 74px;
}

.credit-payment-selector {
  background: #fff8ea;
  border: 1px solid #efd187;
  border-radius: 8px;
  padding: 11px;
}

.credit-payment-selector span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.reimbursement-selector {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.reimbursement-selector-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.reimbursement-selector-head div:first-child {
  display: grid;
  gap: 3px;
}

.reimbursement-selector-head strong {
  color: var(--ink);
  font-size: 14px;
}

.reimbursement-selector-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.reimbursement-selected-total {
  background: var(--green-soft);
  border: 1px solid #b8d8c6;
  border-radius: 8px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
  padding: 8px 10px;
  white-space: nowrap;
}

.reimbursement-selector-wrap {
  max-height: 280px;
}

.reimbursement-selector table {
  min-width: 760px;
}

.reimbursement-selector input[type="checkbox"] {
  height: 18px;
  min-height: 18px;
  width: 18px;
}

.reimbursement-amount-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
}

.reimbursement-amount-grid input {
  min-height: 34px;
  padding: 7px 8px;
}

.standalone {
  min-height: 104px;
}

.photo-preview {
  align-items: center;
  background: var(--blue-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  height: 170px;
  justify-content: center;
  margin-top: 12px;
  overflow: hidden;
}

.photo-preview.empty::after {
  color: var(--muted);
  content: "Vista previa";
  font-weight: 700;
}

.photo-preview img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.pdf-preview {
  align-items: center;
  color: var(--navy);
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 18px;
  text-align: center;
}

.pdf-preview strong {
  font-size: 18px;
}

.pdf-preview span {
  color: var(--muted);
  font-size: 13px;
  word-break: break-word;
}

.income-photo-preview {
  min-height: 170px;
}

.form-subpanel {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.compact-heading {
  margin-bottom: 10px;
}

.compact-heading h3 {
  color: var(--navy);
  font-size: 15px;
  margin: 0;
}

.form-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.product-entry-grid {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.product-entry-table {
  margin-top: 10px;
}

.income-subtabs,
.inventory-subtabs,
.purchase-subtabs {
  background: #eef4f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 6px;
  margin-bottom: 12px;
  padding: 6px;
  flex-wrap: wrap;
  width: 100%;
}

.income-subtab,
.inventory-subtab,
.purchase-subtab {
  background: transparent;
  border-color: transparent;
  color: var(--navy);
  font-weight: 800;
}

.income-subtab.active,
.inventory-subtab.active,
.purchase-subtab.active {
  background: var(--navy);
  color: #fff;
}

.table-note {
  display: block;
  margin-top: 4px;
  color: #52677a;
  font-size: 11px;
  font-weight: 600;
}

.field-note {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #0b6f67;
  background: #eef7f5;
  color: #294657;
}

.compact-action {
  align-self: flex-start;
  margin-top: 8px;
  padding: 7px 10px;
  font-size: 12px;
}

.income-panel,
.inventory-panel {
  display: none;
}

.purchase-module-panel {
  display: none;
}

.purchase-module-panel.active {
  display: grid;
}

.purchase-request-builder[hidden] {
  display: none !important;
}

.purchase-request-builder {
  border-top: 4px solid var(--navy);
  margin-top: 4px;
}

.purchase-request-history {
  margin-top: 4px;
}

.supplier-history-switch {
  align-items: center;
  flex-wrap: nowrap;
}

.supplier-quote-response-dialog {
  max-width: min(1400px, 96vw);
  width: 1200px;
}

.supplier-quote-entry-table input,
.supplier-quote-entry-table select {
  min-width: 92px;
  width: 100%;
}

.supplier-quote-entry-table td:first-child {
  min-width: 190px;
}

.purchase-panel-toolbar {
  align-items: center;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 14px 16px;
}

.purchase-panel-toolbar h2,
.purchase-panel-toolbar p { margin: 0; }

.supplier-browser { display: grid; gap: 18px; }
.supplier-browser-filter {
  align-items: end;
  background: linear-gradient(135deg, #f7fafc 0%, #eef4f7 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  padding: 20px;
}
.supplier-browser-filter h2,
.supplier-browser-filter p,
.supplier-browser-heading h3,
.supplier-browser-heading p { margin: 0; }
.supplier-browser-filter label { color: var(--navy); font-weight: 800; }
.supplier-browser-selectors {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
.supplier-browser-filter select {
  background: #fff;
  border-color: #9fb2bf;
  font-size: 15px;
  margin-top: 7px;
  min-height: 46px;
  width: 100%;
}
.supplier-browser-empty {
  align-items: center;
  background: #fff;
  border: 1px dashed #b8c7d0;
  border-radius: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  min-height: 180px;
  text-align: center;
}
.supplier-browser-empty strong { color: var(--navy); font-size: 18px; }
.supplier-browser-detail { display: grid; gap: 14px; }
.supplier-browser-detail[hidden],
.supplier-maintenance-legacy[hidden] { display: none !important; }
.supplier-browser-heading {
  align-items: center;
  border-left: 4px solid var(--navy);
  display: flex;
  justify-content: space-between;
  padding-left: 13px;
}
.supplier-browser-heading h3 { color: var(--navy); font-size: 21px; }
.supplier-purchases-table td,
.supplier-purchases-table th { vertical-align: top; }
.supplier-maintenance-legacy {
  border-top: 4px solid var(--navy);
  margin-top: 4px;
}
.supplier-maintenance-legacy .table-wrap { display: none; }

@media (max-width: 760px) {
  .supplier-browser-filter { grid-template-columns: 1fr; }
}

.purchases-executive-header {
  align-items: end;
  border-top: 4px solid var(--navy);
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.purchases-executive-header h2 {
  color: var(--navy);
  font-size: 28px;
  margin: 0 0 4px;
}

.purchases-executive-header p {
  margin: 0;
}

.purchases-executive-header label {
  min-width: 250px;
}

.section-kicker {
  color: #b66b00;
  font-size: 11px;
  font-weight: 900;
}

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

.purchase-kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 96px;
  padding: 16px;
}

.purchase-kpi span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.purchase-kpi strong {
  color: var(--navy);
  display: block;
  font-size: 22px;
}

@media (max-width: 900px) {
  .purchases-executive-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

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

.price-list-editor-table { table-layout: fixed; min-width: 1040px; }
.price-list-editor-table th:first-child,
.price-list-editor-table td:first-child { width: 44px; text-align: center; }
.price-list-editor-table th:nth-child(2),
.price-list-editor-table td:nth-child(2) { width: 245px; }
.price-list-editor-table input[type="number"] { min-width: 92px; width: 100%; }
.price-list-editor-table td small { display: block; margin-top: 3px; color: #667784; }
.price-list-visibility { border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0; padding: 14px; }
.price-list-visibility legend { color: var(--navy); font-weight: 900; padding: 0 6px; }
.price-list-visibility label { align-items: center; display: flex; flex-direction: row; gap: 8px; }
.price-list-visibility input { width: auto; }
.price-list-visibility p { color: var(--muted); grid-column: 1 / -1; margin: 0; }
.price-list-document { color: #10213d; page: customerPriceList; }

@page customerPriceList {
  size: letter landscape;
  margin: 7mm;
}
.price-list-document table { table-layout: fixed; width: 100%; }
.price-list-document th,
.price-list-document td { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.price-list-document .num {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  overflow: visible;
  overflow-wrap: normal;
  text-align: right;
  text-overflow: clip;
  white-space: nowrap;
  word-break: normal;
}
.price-list-client-band { background: #f6f8fb; border: 1px solid #cfd9e6; border-radius: 7px; display: grid; grid-template-columns: 1fr 270px; margin: 14px 0 8px; overflow: hidden; }
.price-list-client-band > div { display: flex; flex-direction: column; justify-content: center; min-height: 90px; padding: 16px 22px; }
.price-list-client-band span { color: #a56500; font-size: 11px; font-weight: 900; }
.price-list-client-band strong { color: #102a55; font-size: 20px; line-height: 1.15; margin: 5px 0; }
.price-list-client-band small { color: #617083; }
.price-list-client-band .price-list-validity { background: #09294d; color: white; text-align: center; }
.price-list-client-band .price-list-validity span { color: #f4b321; }
.price-list-client-band .price-list-validity strong { color: white; font-size: 18px; }
.price-list-client-band .price-list-validity small { color: white; }
.price-list-intro { color: #526276; font-size: 11px; font-style: italic; margin: 8px 0 12px; text-align: center; }
.price-list-commercial-table { border-collapse: separate; border-spacing: 0; font-size: 10px; }
.price-list-commercial-table th { background: #09294d; color: white; font-size: 9px; padding: 9px 6px; text-align: center; text-transform: uppercase; }
.price-list-commercial-table th small { color: #cbd7e4; display: block; font-size: 7px; margin-top: 2px; }
.price-list-commercial-table th:first-child { border-radius: 7px 0 0 0; }
.price-list-code-head { width: 8%; }
.price-list-photo-head { width: 9%; }
.price-list-product-head { width: 19%; }
.price-list-presentation-head { width: 9%; }
.price-list-regular-head { width: 12%; }
.price-list-discount-head { width: 10%; }
.price-list-special-head { width: 12%; }
.price-list-tax-head { width: 9%; }
.price-list-total-head { width: 12%; }
.price-list-commercial-table th:last-child { border-radius: 0 7px 0 0; }
.price-list-commercial-table td { border-bottom: 1px solid #d4dde8; border-right: 1px solid #d4dde8; padding: 7px 6px; vertical-align: middle; }
.price-list-commercial-table td:first-child { border-left: 1px solid #d4dde8; }
.price-list-photo { overflow: hidden; padding: 3px !important; text-align: center; }
.price-list-photo img { display: block; height: 60px; margin: 0 auto; max-height: 100%; max-width: 100%; object-fit: contain; width: 60px; }
.price-list-product strong { color: #10213d; display: block; line-height: 1.2; }
.price-list-product small, .price-list-commercial-table td small { color: #64748b; display: block; font-size: 8px; margin-top: 3px; }
.price-list-regular { color: #6b2430; text-decoration: line-through; }
.price-list-discount { color: #bf1f24; text-align: center !important; }
.price-list-discount strong { display: block; font-size: 17px; }
.price-list-discount small { color: #102a55 !important; font-size: 6px !important; }
.price-list-special { color: #102a55; font-weight: 900; }
.price-list-total-head { background: #b87900 !important; }
.price-list-total { background: #fff8e8; color: #102a55; font-size: 13px; font-weight: 900; }
.price-list-benefits { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0; }
.price-list-benefits > div { border: 1px solid #d4dde8; border-radius: 7px; display: flex; flex-direction: column; min-height: 72px; padding: 12px; }
.price-list-benefits span { color: #102a55; font-size: 10px; font-weight: 900; }
.price-list-benefits strong { color: #a56500; font-size: 18px; margin: 4px 0; }
.price-list-benefits small { color: #526276; }
.price-list-terms { background: #f7f9fc; border: 1px solid #d4dde8; border-radius: 7px; margin-bottom: 12px; padding: 12px 16px; }
.price-list-terms strong { color: #102a55; }
.price-list-terms p { color: #526276; margin: 5px 0 0; }

@media print {
  .price-list-document { font-size: 9px; }
  .price-list-document table { font-size: 8.5px; }
  .price-list-document th,
  .price-list-document td { padding: 5px 4px; }
  .price-list-document tr { break-inside: avoid; page-break-inside: avoid; }
  .price-list-client-band,
  .price-list-benefits,
  .price-list-terms { break-inside: avoid; page-break-inside: avoid; }
}

@media (max-width: 760px) {
  .price-list-visibility { grid-template-columns: 1fr; }
  .price-list-client-band { grid-template-columns: 1fr; }
  .price-list-benefits { grid-template-columns: 1fr; }
}

/* Print must keep the commercial layout wide even when the print viewport
   also matches the narrow-screen media query. */
@media print {
  .price-list-document {
    font-size: 7.8px;
    width: 100%;
  }

  .price-list-document .document-header {
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 250px;
    margin-bottom: 5px;
  }

  .price-list-document .document-brand strong {
    font-size: 27px;
  }

  .price-list-document .document-brand span {
    font-size: 7.5px;
    letter-spacing: 4px;
  }

  .price-list-document .document-brand::after,
  .price-list-document .document-title-block::after {
    margin-top: 4px;
  }

  .price-list-document .document-title-block h1 {
    font-size: 17px;
    margin-bottom: 3px;
  }

  .price-list-document .document-title-block h2 {
    font-size: 10px;
    margin: -1px 0 4px;
  }

  .price-list-document .document-title-block dl {
    gap: 1px 5px;
    grid-template-columns: 72px 1fr;
  }

  .price-list-document .document-title-block dt,
  .price-list-document .document-title-block dd {
    font-size: 7.3px;
  }

  .price-list-client-band {
    grid-template-columns: minmax(0, 1fr) 175px !important;
    margin: 5px 0 3px;
  }

  .price-list-client-band > div {
    min-height: 54px;
    padding: 7px 11px;
  }

  .price-list-client-band span { font-size: 7px; }
  .price-list-client-band strong { font-size: 13px; margin: 2px 0; }
  .price-list-client-band .price-list-validity strong {
    color: #14532d !important;
    font-size: 14px;
    font-weight: 900;
  }
  .price-list-client-band .price-list-validity small {
    color: #14532d !important;
    font-size: 7.5px;
    font-weight: 700;
  }
  .price-list-client-band small { font-size: 7.5px; }

  .price-list-intro {
    font-size: 7px;
    margin: 3px 0 5px;
  }

  .price-list-commercial-table {
    font-size: 8px !important;
  }

  .price-list-commercial-table th {
    background: #fff !important;
    border-bottom: 1.5px solid #10213d;
    color: #000 !important;
    font-size: 7px;
    font-weight: 900;
    line-height: 1.05;
    padding: 4px 2px !important;
  }

  .price-list-commercial-table th small {
    color: #000 !important;
    font-size: 5.8px;
  }

  .price-list-commercial-table td {
    line-height: 1.08;
    padding: 3px 2px !important;
  }

  .price-list-commercial-table .num {
    font-size: 9.2px;
    font-weight: 800;
    letter-spacing: 0;
  }

  .price-list-total {
    font-size: 9.6px;
  }

  .price-list-photo img {
    height: 48px;
    max-height: 48px;
    max-width: 100%;
    width: 48px;
  }

  .price-list-product small,
  .price-list-commercial-table td small {
    font-size: 5.5px;
    margin-top: 1px;
  }

  .price-list-discount strong { font-size: 11px; }
  .price-list-discount small { font-size: 4.8px !important; }

  .price-list-benefits {
    gap: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin: 5px 0;
  }

  .price-list-benefits > div {
    min-height: 42px;
    padding: 6px 8px;
  }

  .price-list-benefits span { font-size: 8.5px; }
  .price-list-benefits strong { font-size: 15px; line-height: 1.05; margin: 2px 0; }
  .price-list-benefits > div:first-child strong {
    color: #b42318;
    font-size: 20px;
    font-weight: 900;
  }
  .price-list-benefits small { font-size: 7.8px; line-height: 1.2; }

  .price-list-terms {
    margin-bottom: 4px;
    padding: 5px 8px;
  }

  .price-list-terms strong { font-size: 8.6px; }
  .price-list-terms p { font-size: 7.3px; line-height: 1.25; margin-top: 2px; }

  .price-list-document .document-footer {
    gap: 7px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    margin-top: 4px;
    padding-top: 4px;
  }

  .price-list-document .document-footer-company h2 {
    font-size: 10px;
    margin-bottom: 2px;
  }

  .price-list-document .document-footer-company p,
  .price-list-document .document-footer-note p {
    font-size: 7.2px;
    line-height: 1.2;
    margin: 1px 0;
  }

  .price-list-document .document-footer-note {
    align-items: start;
    gap: 9px;
    grid-template-columns: 26px minmax(0, 1fr);
    padding-left: 10px;
  }

  .price-list-document .document-footer-note .statement-note-icon {
    height: 22px;
    margin: 0;
    width: 22px;
  }

  .price-list-document .document-footer-note .statement-note-icon svg {
    height: 13px;
    width: 13px;
  }

  .price-list-document .document-footer-note > div:last-child {
    min-width: 0;
    padding-left: 1px;
  }
}

.income-panel.active,
.inventory-panel.active {
  display: grid;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 4px 0 0;
}

.inventory-catalog-panel {
  gap: 12px;
}

.inventory-catalog-toolbar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, .8fr) minmax(240px, 1.5fr) minmax(150px, .8fr) minmax(140px, .7fr) auto;
  margin-bottom: 12px;
}

.inventory-catalog-toolbar button {
  min-height: 38px;
}

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

.inventory-product-form-grid .wide {
  grid-column: 1 / -1;
}

.inventory-product-form-grid [hidden] {
  display: none !important;
}

.inventory-lot-summary {
  border: 1px solid #cbd9e2;
  background: #f4f8fa;
  padding: 12px;
  color: #17384d;
}

.inventory-catalog-table {
  min-width: 1120px;
  width: 100%;
}

.inventory-catalog-panel .inventory-catalog-table th:nth-child(1),
.inventory-catalog-panel .inventory-catalog-table td:nth-child(1) {
  min-width: 72px;
  width: 72px;
}

.inventory-catalog-panel .inventory-catalog-table th:nth-child(3),
.inventory-catalog-panel .inventory-catalog-table td:nth-child(3) {
  min-width: 190px;
}

.inventory-catalog-panel .inventory-catalog-table th:nth-child(4),
.inventory-catalog-panel .inventory-catalog-table td:nth-child(4) {
  min-width: 240px;
}

.inventory-detail-wrap {
  margin-top: 14px;
}

.product-thumb-cell {
  text-align: center;
}

.product-thumb-cell img,
.product-thumb-cell span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  font-size: 10px;
  height: 46px;
  justify-content: center;
  object-fit: contain;
  width: 54px;
}

.cell-clamp {
  display: block;
  max-width: 340px;
  white-space: normal;
}

.product-photo-preview {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #b9c8d5;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 120px;
  padding: 10px;
}

.product-photo-preview img {
  max-height: 140px;
  max-width: 100%;
  object-fit: contain;
}

.inventory-detail-dialog {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(15, 36, 54, .25);
  max-width: 780px;
  width: min(92vw, 780px);
}

.inventory-detail-body {
  padding: 0 18px 18px;
}

.inventory-detail-card {
  display: grid;
  gap: 18px;
  grid-template-columns: 220px 1fr;
}

.inventory-detail-photo {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 220px;
  padding: 12px;
}

.inventory-detail-photo img {
  max-height: 210px;
  max-width: 100%;
  object-fit: contain;
}

.inventory-detail-photo.empty span {
  color: var(--muted);
  font-weight: 700;
}

.inventory-detail-info {
  display: grid;
  gap: 10px;
}

.inventory-detail-info > strong {
  color: var(--navy);
  font-size: 22px;
}

.inventory-detail-info > span {
  color: var(--text);
  line-height: 1.45;
}

.inventory-detail-info dl {
  display: grid;
  gap: 8px 14px;
  grid-template-columns: 130px 1fr;
  margin: 0;
}

.inventory-detail-info dt {
  color: var(--muted);
  font-weight: 700;
}

.inventory-detail-info dd {
  margin: 0;
}

.line-code {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.line-description {
  color: var(--text);
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 2px;
  white-space: normal;
}

.line-item-note {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
  white-space: normal;
}

.line-item-note strong {
  color: var(--primary);
}

.sales-invoice-form {
  display: grid;
  gap: 14px;
}

.no-fiscal-form-panel {
  margin-bottom: 14px;
}

.invoice-settings-grid {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.invoice-info-grid {
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 1fr));
}

.no-fiscal-line-grid {
  grid-template-columns: 140px 90px 130px minmax(240px, 1fr) 150px 110px;
}

.sale-inventory-box select {
  margin-bottom: 6px;
}

.sale-non-inventory-box {
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.sale-non-inventory-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sale-non-inventory-grid .wide {
  grid-column: 1 / -1;
}

.inventory-history-heading {
  margin-top: 18px;
}

.no-fiscal-totals {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  margin-top: 12px;
}

.no-fiscal-totals .metric .value {
  font-size: 20px;
  white-space: nowrap;
}

.no-fiscal-discount-metric .value {
  align-items: center;
  display: flex;
  gap: 8px;
}

.no-fiscal-rate-chip,
.no-fiscal-discount-line small {
  background: #eef4f7;
  border: 1px solid #cfdbe3;
  border-radius: 6px;
  color: #1d314f;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 7px;
  white-space: nowrap;
}

.no-fiscal-client-box,
.no-fiscal-lines-box,
.no-fiscal-payment-box,
.no-fiscal-info-box,
.no-fiscal-settings-box {
  margin-top: 14px;
}

.sales-invoice-form .no-fiscal-settings-box {
  margin-top: 0;
}

.no-fiscal-payment-box .form-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.no-fiscal-statement-panel {
  margin-top: 14px;
}

.no-fiscal-statement-filters {
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(145px, 1fr));
  margin-bottom: 12px;
}

.no-fiscal-statement-panel .compact-summary {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.no-fiscal-statement-panel .income-table {
  min-width: 1160px;
  table-layout: auto;
}

.no-fiscal-statement-panel .income-table th,
.no-fiscal-statement-panel .income-table td {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.no-fiscal-statement-panel .income-table td.num {
  text-align: right;
  white-space: nowrap;
}

.no-fiscal-statement-panel .income-table td.center {
  text-align: center;
  white-space: nowrap;
}

.no-fiscal-statement-panel .income-table th:nth-child(1),
.no-fiscal-statement-panel .income-table th:nth-child(7),
.no-fiscal-statement-panel .income-table th:nth-child(8),
.no-fiscal-statement-panel .income-table th:nth-child(9) {
  text-align: center;
}

.statement-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  min-width: 82px;
  padding: 6px 10px;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.statement-status-paid {
  background: #dff1e3;
  color: #116229;
}

.statement-status-overdue {
  background: #f9d9d6;
  color: #b91c1c;
}

.statement-status-pending {
  background: #fff0cc;
  color: #d97706;
}

.statement-metric {
  align-items: center;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
  display: grid;
  gap: 8px;
  grid-template-columns: 40px 1fr;
  min-width: 0;
  padding: 12px 10px 13px;
  position: relative;
}

.statement-metric::after {
  border-radius: 999px;
  bottom: 8px;
  content: "";
  height: 2px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 40px;
}

.statement-metric-icon {
  color: var(--navy);
  height: 34px;
  width: 34px;
}

.statement-metric-icon svg {
  fill: none;
  height: 100%;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 100%;
}

.statement-metric-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.statement-metric-copy span {
  color: #111;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.statement-metric-copy strong {
  color: #111;
  font-size: 16px;
  line-height: 1.05;
  white-space: nowrap;
}

.statement-metric-orange,
.statement-metric-orange .statement-metric-icon {
  color: #f59e0b;
}

.statement-metric-green,
.statement-metric-green .statement-metric-icon {
  color: #15803d;
}

.statement-metric-blue,
.statement-metric-blue .statement-metric-icon {
  color: #1d5fa7;
}

.statement-metric-red,
.statement-metric-red .statement-metric-icon {
  color: #d21f1f;
}

.statement-metric-purple,
.statement-metric-purple .statement-metric-icon {
  color: #6b3fa0;
}

.statement-metric-orange::after {
  background: #f59e0b;
}

.statement-metric-green::after {
  background: #15803d;
}

.statement-metric-blue::after {
  background: #1d5fa7;
}

.statement-metric-red::after {
  background: #d21f1f;
}

.statement-metric-purple::after {
  background: #6b3fa0;
}

.no-fiscal-statement-panel .compact-summary .metric .value,
.print-sheet.no-fiscal-statement-print .statement-summary .metric .value {
  font-size: 18px;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
}

.compact-summary {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  margin: 0 0 12px;
}

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

.split-actions {
  gap: 10px;
  justify-content: space-between;
}

.form-actions .primary {
  min-width: 160px;
}

.checkbox-row {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  gap: 10px;
}

.checkbox-row input {
  height: 18px;
  width: 18px;
}

.cloud-panel {
  grid-column: span 2;
}

.status-chip {
  background: var(--blue-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.status-chip.ok {
  background: var(--green-soft);
  color: var(--green);
}

.status-chip.warn {
  background: var(--gold-soft);
  color: #805a08;
}

.status-chip.error {
  background: var(--red-soft);
  color: var(--red);
}

.table-panel {
  min-width: 0;
}

.table-wrap {
  overflow: auto;
  max-height: 640px;
}

.audit-panel {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.warning-row {
  background: #fff8e6;
}

table {
  border-collapse: collapse;
  min-width: 100%;
  table-layout: fixed;
}

.expenses-table {
  min-width: 1180px;
  width: 100%;
}

.income-table {
  min-width: 1300px;
}

.invoice-cell {
  display: grid;
  gap: 2px;
  line-height: 1.25;
  min-width: 180px;
}

.invoice-line {
  align-items: baseline;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.invoice-label {
  color: var(--ink);
  flex: 0 0 116px;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.invoice-value {
  color: var(--ink);
  font-size: inherit;
  font-weight: 400;
}

.invoice-line-ncf .invoice-value {
  color: var(--ink);
  font-size: inherit;
}

.production-table {
  min-width: 1120px;
}

.expenses-table .expense-col-date {
  width: 8%;
}

.expenses-table .expense-col-company {
  width: 11%;
}

.expenses-table .expense-col-supplier {
  width: 12%;
}

.quote-price-list,
.quote-selection-list {
  display: grid;
  gap: 6px;
}

.quote-price-option {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.quote-price-option.best {
  border-color: #8cc3a6;
  background: #f2fbf6;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e8eef4;
  color: #15344c;
}

.mini-badge.success {
  background: #dff5e8;
  color: #0f6b3a;
}

.expenses-table .expense-col-concept {
  width: 14%;
}

.expenses-table .expense-col-type {
  width: 12%;
}

.expenses-table .expense-col-paid {
  width: 11%;
}

.expenses-table .expense-col-money {
  width: 7%;
}

.expenses-table .expense-col-photo {
  width: 6%;
}

.expenses-table .expense-col-actions {
  width: 12%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expenses-table th,
.expenses-table td {
  padding-left: 6px;
  padding-right: 6px;
}

.expenses-table th:nth-child(4),
.expenses-table td:nth-child(4) {
  white-space: normal;
  word-break: break-word;
}

.expenses-table td:nth-child(4) {
  line-height: 1.25;
}

.cell-clamp {
  display: -webkit-box;
  line-height: 1.25;
  max-height: 34px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

td.num,
th.num {
  text-align: right;
}

.row-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  min-width: 118px;
}

.row-actions button,
.photo-chip {
  min-height: 30px;
  padding: 0 9px;
}

.photo-chip {
  background: var(--blue-soft);
  border-color: #bed0dc;
}

.reimbursement-chip {
  background: #eef8f4;
  border-color: #b7dcca;
  color: var(--teal);
  font-weight: 700;
}

.support-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.empty-row td {
  color: var(--muted);
  height: 58px;
  text-align: center;
}

.total-row td {
  background: #eef3f5;
  color: var(--ink);
  font-weight: 800;
}

.total-row td:first-child {
  text-transform: uppercase;
}

.group-row td {
  background: #dfe9ed;
  color: var(--navy);
  font-weight: 800;
  text-transform: uppercase;
}

.subtotal-row td {
  background: #f8fafb;
  color: var(--ink);
  font-weight: 800;
}

.compact {
  max-height: 420px;
}

.bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-label {
  align-items: center;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: space-between;
}

.bar-track {
  background: #e4e9ec;
  border-radius: 8px;
  height: 14px;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(90deg, var(--teal), var(--gold));
  height: 100%;
  min-width: 2px;
}

.button-grid {
  display: grid;
  gap: 10px;
}

.quick-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-action {
  align-items: flex-start;
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 12px;
  text-align: left;
}

.quick-action span {
  color: var(--ink);
  font-weight: 800;
}

.quick-action strong {
  color: var(--muted);
  font-size: 12px;
}

.report-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.expense-report-bottom-actions {
  align-items: end;
  justify-content: space-between;
  margin-bottom: 0;
  margin-top: 14px;
}

.expense-report-range-controls {
  align-items: end;
  display: grid;
  flex: 1 1 680px;
  gap: 10px;
  grid-template-columns: minmax(190px, 1.1fr) repeat(2, minmax(150px, 0.8fr));
}

.physical-count-history-filters {
  margin-bottom: 12px;
}

.audit-meta-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 12px;
}

.audit-meta-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.audit-meta-grid span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.audit-meta-grid strong {
  color: var(--ink);
  font-size: 13px;
}

.audit-detail-block {
  break-inside: avoid;
  margin-bottom: 18px;
  page-break-inside: avoid;
}

.physical-count-print-table-wrap {
  overflow: visible;
}

.physical-count-print-table {
  table-layout: fixed;
  width: 100%;
}

.physical-count-print-table th,
.physical-count-print-table td {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  vertical-align: top;
  white-space: normal;
}

.physical-count-print-table .num {
  overflow-wrap: normal;
  white-space: nowrap;
}

.physical-count-lot-detail-row td {
  background: #f8fafc;
  color: #314657;
  font-size: 10px;
  line-height: 1.35;
}

.physical-count-col-item {
  width: 25%;
}

.physical-count-col-qty {
  width: 12%;
}

.physical-count-col-money {
  width: 13%;
}

@media print {
  body.printing .physical-count-print {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 10px 12px;
  }

  body.printing .physical-count-print .table-wrap,
  body.printing .physical-count-print-table-wrap {
    max-height: none !important;
    overflow: visible !important;
  }

  body.printing .physical-count-print .audit-detail-block {
    break-inside: auto;
    page-break-inside: auto;
  }

  body.printing .physical-count-print .audit-meta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.printing .physical-count-print .audit-meta-grid article {
    padding: 6px;
  }

  body.printing .physical-count-print-table {
    font-size: 9px;
    table-layout: fixed;
    width: 100%;
  }

  body.printing .physical-count-print-table thead {
    display: table-header-group;
  }

  body.printing .physical-count-print-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.printing .physical-count-print-table th,
  body.printing .physical-count-print-table td {
    font-size: 8.5px;
    line-height: 1.25;
    padding: 4px;
    white-space: normal !important;
  }

  body.printing .physical-count-print-table .num {
    font-size: 8px;
    white-space: nowrap !important;
  }

  body.printing .physical-count-lot-detail-row td {
    font-size: 8px;
  }
}

.audit-notes {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 12px;
  padding: 10px;
}

.report-filter {
  margin-right: auto;
  min-width: 230px;
}

.report-filter select,
.report-filter input {
  min-width: 230px;
}

.enterprise-dashboard-shell {
  display: grid;
  gap: 18px;
}

.enterprise-dashboard-top {
  align-items: end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 1fr) minmax(560px, 1.7fr);
  padding: 20px;
}

.enterprise-dashboard-top h2 {
  color: #0b1f33;
  font-size: 26px;
  margin: 0 0 6px;
}

.enterprise-dashboard-top p {
  color: var(--muted);
  margin: 0;
}

.enterprise-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(210px, 1.1fr) repeat(2, minmax(145px, 0.8fr)) auto auto;
}

.enterprise-filters label {
  color: #52616c;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.enterprise-filters select,
.enterprise-filters input {
  background: #fff;
  border: 1px solid #cfdae3;
  border-radius: 8px;
  color: #0b1f33;
  font-size: 13px;
  min-height: 42px;
  padding: 0 12px;
}

.enterprise-filters button {
  min-height: 42px;
}

.enterprise-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.enterprise-kpi-card {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e1e8;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(20, 40, 56, 0.05);
  display: grid;
  gap: 12px;
  grid-template-columns: 44px 1fr;
  min-width: 0;
  padding: 15px;
}

.enterprise-kpi-icon {
  align-items: center;
  border-radius: 10px;
  color: #fff;
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.enterprise-kpi-icon svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 22px;
}

.enterprise-kpi-card span {
  color: #3c4b59;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.enterprise-kpi-card strong {
  color: #0b1f33;
  display: block;
  font-size: clamp(17px, 1.05vw, 21px);
  line-height: 1.1;
  white-space: nowrap;
}

.enterprise-kpi-card small {
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-top: 9px;
}

.enterprise-kpi-blue .enterprise-kpi-icon,
.enterprise-bar-income,
.enterprise-legend-income,
.enterprise-line-income {
  background: #2563eb;
  stroke: #2563eb;
}

.enterprise-kpi-green .enterprise-kpi-icon,
.enterprise-bar-profit,
.enterprise-legend-profit,
.enterprise-line-profit {
  background: #16a34a;
  stroke: #16a34a;
}

.enterprise-kpi-red .enterprise-kpi-icon,
.enterprise-bar-expense,
.enterprise-legend-expense,
.enterprise-line-expense {
  background: #dc3f45;
  stroke: #dc3f45;
}

.enterprise-kpi-amber .enterprise-kpi-icon {
  background: #f59e0b;
}

.enterprise-kpi-purple .enterprise-kpi-icon {
  background: #7c3aed;
}

.enterprise-kpi-teal .enterprise-kpi-icon {
  background: #0ea5a6;
}

.enterprise-bar-negative {
  fill: #b91c1c;
}

.enterprise-variation-up {
  color: #0b8f42;
}

.enterprise-variation-down {
  color: #b91c1c;
}

.enterprise-variation-neutral {
  color: #697381;
}

.enterprise-chart-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.enterprise-chart-card,
.enterprise-executive-summary,
.enterprise-detail-panel {
  background: #fff;
  border: 1px solid #d8e1e8;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(20, 40, 56, 0.05);
  min-width: 0;
  padding: 16px;
}

.enterprise-chart-wide {
  grid-column: span 2;
}

.enterprise-chart-title {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.enterprise-chart-title h3 {
  color: #0b1f33;
  font-size: 15px;
  margin: 0;
}

.enterprise-chart-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.enterprise-chart {
  min-height: 300px;
}

.enterprise-svg-chart {
  display: block;
  height: auto;
  max-height: 330px;
  overflow: visible;
  width: 100%;
}

.enterprise-grid-line {
  stroke: #e6edf2;
  stroke-width: 1;
}

.enterprise-axis-line {
  stroke: #aebbc6;
  stroke-width: 1;
}

.enterprise-axis-label,
.enterprise-value-label,
.enterprise-legend text {
  fill: #243545;
  font-size: 10px;
  font-weight: 800;
}

.enterprise-company-label {
  font-size: 9.5px;
}

.enterprise-value-label {
  fill: #0b1f33;
  font-size: 9.5px;
}

.enterprise-bar-income {
  fill: #2563eb;
}

.enterprise-bar-expense {
  fill: #dc3f45;
}

.enterprise-bar-profit {
  fill: #16a34a;
}

.enterprise-line {
  fill: none;
  stroke-width: 3;
}

.enterprise-line.enterprise-line-income {
  fill: none;
  stroke: #2563eb;
}

.enterprise-line.enterprise-line-expense {
  fill: none;
  stroke: #dc3f45;
}

.enterprise-line.enterprise-line-profit {
  fill: none;
  stroke: #16a34a;
}

.enterprise-legend-income {
  fill: #2563eb;
}

.enterprise-legend-expense {
  fill: #dc3f45;
}

.enterprise-legend-profit {
  fill: #16a34a;
}

circle.enterprise-line-income,
circle.enterprise-line-expense,
circle.enterprise-line-profit {
  fill: #fff;
}

circle.enterprise-line-income {
  stroke: #2563eb;
}

circle.enterprise-line-expense {
  stroke: #dc3f45;
}

circle.enterprise-line-profit {
  stroke: #16a34a;
}

.enterprise-pie-layout {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(160px, 0.9fr) minmax(160px, 1fr);
}

.enterprise-pie-chart {
  max-height: 280px;
  width: 100%;
}

.enterprise-pie-center {
  fill: #5e6a74;
  font-size: 12px;
  font-weight: 800;
}

.enterprise-pie-total {
  fill: #0b1f33;
  font-size: 12px;
  font-weight: 900;
}

.enterprise-pie-legend {
  display: grid;
  gap: 10px;
}

.enterprise-pie-legend div {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 10px 1fr auto;
}

.enterprise-pie-legend span {
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.enterprise-pie-legend strong,
.enterprise-pie-legend em {
  color: #0b1f33;
  font-size: 12px;
  font-style: normal;
}

.enterprise-chart-empty {
  align-items: center;
  color: #68747d;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 260px;
}

.enterprise-executive-summary {
  display: grid;
  grid-template-rows: auto 1fr;
}

#enterpriseExecutiveSummary {
  display: grid;
  gap: 8px;
}

.enterprise-summary-item {
  align-items: center;
  border-bottom: 1px solid #edf1f4;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  padding: 9px 0;
}

.enterprise-summary-item span {
  color: #5b6771;
  font-size: 12px;
  font-weight: 800;
}

.enterprise-summary-item strong {
  color: #0b1f33;
  font-size: 13px;
}

.enterprise-summary-item em {
  color: #0b1f33;
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
  grid-column: 2;
  grid-row: 1 / span 2;
}

.enterprise-operations-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.enterprise-company-bars {
  display: grid;
  gap: 10px;
}

.enterprise-company-bar {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e1e8;
  border-radius: 10px;
  color: #0b1f33;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(145px, 1fr) minmax(150px, 2fr) 58px 110px;
  padding: 10px 12px;
  text-align: left;
}

.enterprise-company-bar span,
.enterprise-company-bar strong,
.enterprise-company-bar em {
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.enterprise-company-bar div {
  background: #edf3f7;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.enterprise-company-bar i {
  background: linear-gradient(90deg, #0b355f, #0a7668);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.compact-chart {
  min-height: 220px;
}

.enterprise-status-layout {
  grid-template-columns: minmax(120px, 0.8fr) minmax(140px, 1fr);
}

.enterprise-project-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.enterprise-project-card {
  border: 1px solid #d8e1e8;
  border-left: 5px solid #16a34a;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.enterprise-project-red {
  border-left-color: #dc3f45;
}

.enterprise-project-amber {
  border-left-color: #f59e0b;
}

.enterprise-project-green {
  border-left-color: #16a34a;
}

.enterprise-project-card-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.enterprise-project-card-head span {
  color: #5f6d78;
  display: block;
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 4px;
}

.enterprise-project-card-head strong {
  color: #0b1f33;
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.enterprise-project-status {
  background: #edf7f2;
  border: 1px solid #c8e8d7;
  border-radius: 999px;
  color: #0b6f3a !important;
  padding: 5px 9px;
  white-space: nowrap;
}

.enterprise-project-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.enterprise-project-metrics div,
.enterprise-mini-metric {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px;
}

.enterprise-project-metrics span,
.enterprise-mini-metric span,
.enterprise-flow-step span {
  color: #5c6975;
  display: block;
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 5px;
}

.enterprise-project-metrics strong,
.enterprise-mini-metric strong,
.enterprise-flow-step strong {
  color: #0b1f33;
  display: block;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
}

.enterprise-project-progress {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
}

.enterprise-project-progress span,
.enterprise-project-progress strong {
  color: #0b1f33;
  font-size: 11px;
  font-weight: 900;
}

.enterprise-project-progress div {
  background: #edf3f7;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.enterprise-project-progress i {
  background: #0a7668;
  border-radius: inherit;
  display: block;
  height: 100%;
}

.enterprise-project-card button {
  justify-self: start;
}

.enterprise-ranking-list,
.enterprise-mini-metrics,
.enterprise-alert-list {
  display: grid;
  gap: 8px;
}

.enterprise-ranking-row {
  align-items: center;
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(130px, 1fr) repeat(4, auto);
  padding: 9px 10px;
}

.enterprise-ranking-row strong,
.enterprise-ranking-row span {
  display: block;
}

.enterprise-ranking-row strong,
.enterprise-ranking-row em,
.enterprise-ranking-row b {
  color: #0b1f33;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.enterprise-ranking-row span {
  color: #63717c;
  font-size: 10px;
  font-weight: 800;
}

.enterprise-money-flow {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.enterprise-flow-step {
  background: #f8fafc;
  border: 1px solid #d8e1e8;
  border-radius: 10px;
  min-width: 0;
  padding: 13px;
  position: relative;
}

.enterprise-flow-step i {
  border-right: 2px solid #0a7668;
  border-top: 2px solid #0a7668;
  height: 10px;
  position: absolute;
  right: -8px;
  top: calc(50% - 5px);
  transform: rotate(45deg);
  width: 10px;
}

.enterprise-alert {
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  grid-template-columns: 10px 1fr auto;
  padding: 9px 10px;
}

.enterprise-alert span {
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.enterprise-alert strong,
.enterprise-alert em {
  color: #0b1f33;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.enterprise-alert-green span {
  background: #16a34a;
}

.enterprise-alert-amber span {
  background: #f59e0b;
}

.enterprise-alert-red span {
  background: #dc3f45;
}

.enterprise-summary-table {
  width: 100%;
}

.enterprise-summary-table th,
.enterprise-summary-table td {
  white-space: nowrap;
}

.enterprise-print-operations,
.enterprise-print-section,
.enterprise-print-two-columns {
  display: grid;
  gap: 10px;
}

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

.enterprise-print-section {
  border: 1px solid #d8e1e8;
  border-radius: 10px;
  padding: 12px;
}

@media (max-width: 980px) {
  .enterprise-operations-grid,
  .enterprise-money-flow,
  .enterprise-print-two-columns {
    grid-template-columns: 1fr;
  }

  .enterprise-company-bar {
    grid-template-columns: 1fr;
  }
}

.enterprise-dashboard-actions {
  display: flex;
  justify-content: center;
  padding-bottom: 6px;
}

.enterprise-dashboard-actions button {
  min-width: 180px;
}

.enterprise-detail-panel {
  margin-top: 4px;
}

.enterprise-detail-panel table {
  min-width: 980px;
}

.enterprise-legacy-detail-panel {
  display: none;
}

.enterprise-raw-material-report {
  background: #fff;
  border: 1px solid #d8e2ea;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 35, 55, 0.05);
  margin-top: 18px;
  padding: 18px;
}

.enterprise-consumption-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  margin: 14px 0;
}

.enterprise-consumption-filters label {
  color: #43566a;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.enterprise-consumption-filters select,
.enterprise-consumption-filters input {
  background: #fff;
  border: 1px solid #cfdce6;
  border-radius: 7px;
  color: #0b1f33;
  min-height: 40px;
  padding: 8px 10px;
}

.enterprise-consumption-filters button {
  min-height: 40px;
}

.compact-kpi-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  margin-bottom: 12px;
}

.enterprise-consumption-table-wrap {
  max-height: 520px;
  overflow: auto;
}

.enterprise-consumption-table {
  min-width: 1700px;
}

.enterprise-consumption-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.enterprise-consumption-summary {
  margin-top: 16px;
}

.enterprise-consumption-summary h3 {
  color: #0b355f;
  font-size: 16px;
  margin: 0 0 8px;
}

.enterprise-consumption-details {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.enterprise-consumption-details details {
  background: #f8fafc;
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  padding: 10px 12px;
}

.enterprise-consumption-details summary {
  color: #0b355f;
  cursor: pointer;
  font-weight: 900;
}

.raw-material-consumption-print .enterprise-print-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.raw-material-consumption-print-table th,
.raw-material-consumption-print-table td {
  font-size: 7px;
  padding: 3px 4px;
}

.raw-material-consumption-print-table .num {
  font-size: 6.8px;
}

.enterprise-dashboard-print {
  background: #fff;
  color: #0b1f33;
  padding: 24px 28px;
}

.enterprise-print-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.enterprise-print-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.enterprise-dashboard-print .enterprise-chart-card,
.enterprise-dashboard-print .enterprise-executive-summary,
.enterprise-dashboard-print .enterprise-kpi-card {
  box-shadow: none;
}

.enterprise-dashboard-print .enterprise-chart {
  min-height: 0;
}

.enterprise-dashboard-print .enterprise-svg-chart {
  max-height: 250px;
}

.enterprise-dashboard-print .enterprise-pie-chart {
  max-height: 220px;
}

.enterprise-dashboard-print .enterprise-pie-layout {
  gap: 8px;
}

.enterprise-print-details {
  margin-top: 22px;
}

.enterprise-detail-heading {
  align-items: end;
  border-bottom: 2px solid #0b355f;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 9px;
}

.enterprise-detail-heading span {
  color: #0a7668;
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.enterprise-detail-heading h2 {
  color: #0b355f;
  font-size: 21px;
  margin: 2px 0 0;
}

.enterprise-detail-heading p {
  color: #526678;
  font-size: 10px;
  line-height: 1.35;
  margin: 0;
  max-width: 390px;
  text-align: right;
}

.enterprise-print-detail-block {
  margin-top: 16px;
}

.enterprise-print-detail-block h3 {
  color: #0b355f;
  font-size: 14px;
  margin: 0 0 7px;
}

.enterprise-print-detail-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.enterprise-print-detail-table th,
.enterprise-print-detail-table td {
  border: 1px solid #ccd8e2;
  font-size: 8.5px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  padding: 5px 6px;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}

.enterprise-print-detail-table thead th {
  background: #123b5a;
  color: #fff;
  font-weight: 800;
}

.enterprise-print-detail-table tbody tr:nth-child(even) td {
  background: #f5f8fa;
}

.enterprise-print-detail-table tfoot th {
  background: #e8f2ef;
  color: #083f38;
  font-weight: 900;
}

.enterprise-print-detail-table .enterprise-expense-group-row th {
  background: #dce9ef;
  color: #0b355f;
  font-size: 9px;
  font-weight: 900;
  padding: 7px 6px;
  text-transform: uppercase;
}

.enterprise-print-detail-table .enterprise-expense-subtotal-row th {
  background: #eef5f3;
  color: #075c50;
  font-weight: 900;
}

.enterprise-detail-note {
  color: #526678;
  font-size: 9px;
  line-height: 1.35;
  margin: -2px 0 7px;
}

.enterprise-print-detail-table .num {
  overflow-wrap: normal;
  text-align: right;
  white-space: nowrap;
}

.enterprise-project-detail-table .enterprise-project-summary-row th {
  background: #0f3a55;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 7px 8px;
  text-align: left;
}

.enterprise-project-detail-table .enterprise-project-summary-row span {
  color: #dbeafe;
  display: block;
  font-size: 8.5px;
  font-weight: 700;
  margin-top: 3px;
}

.enterprise-project-detail-table .enterprise-project-metric-row td {
  background: #f8fafc;
  color: #0f2537;
  font-size: 8.5px;
}

.enterprise-project-detail-table .enterprise-project-metric-row strong {
  color: #0f3a55;
  display: inline-block;
  font-size: 7.5px;
  text-transform: uppercase;
}

.enterprise-project-detail-table .enterprise-project-subhead-row th {
  background: #eaf3f8;
  color: #0f3a55;
  font-size: 9px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.enterprise-project-detail-table .enterprise-project-total-row th {
  background: #f1f8f4;
  color: #07543f;
  font-weight: 900;
}

.enterprise-income-detail-table th:nth-child(1) { width: 8%; }
.enterprise-income-detail-table th:nth-child(2) { width: 12%; }
.enterprise-income-detail-table th:nth-child(3) { width: 19%; }
.enterprise-income-detail-table th:nth-child(4) { width: 11%; }
.enterprise-income-detail-table th:nth-child(5) { width: 13%; }
.enterprise-income-detail-table th:nth-child(6),
.enterprise-income-detail-table th:nth-child(7),
.enterprise-income-detail-table th:nth-child(8) { width: 12.33%; }

.enterprise-expense-detail-table th:nth-child(1) { width: 8%; }
.enterprise-expense-detail-table th:nth-child(2) { width: 12%; }
.enterprise-expense-detail-table th:nth-child(3) { width: 14%; }
.enterprise-expense-detail-table th:nth-child(4) { width: 25%; }
.enterprise-expense-detail-table th:nth-child(5) { width: 15%; }
.enterprise-expense-detail-table th:nth-child(6) { width: 14%; }
.enterprise-expense-detail-table th:nth-child(7) { width: 12%; }

.enterprise-payer-summary-table th:nth-child(1) { width: 50%; }
.enterprise-payer-summary-table th:nth-child(2),
.enterprise-payer-summary-table th:nth-child(3) { width: 25%; }

.enterprise-reimbursement-detail-table th:nth-child(1) { width: 9%; }
.enterprise-reimbursement-detail-table th:nth-child(2) { width: 15%; }
.enterprise-reimbursement-detail-table th:nth-child(3) { width: 15%; }
.enterprise-reimbursement-detail-table th:nth-child(4) { width: 27%; }
.enterprise-reimbursement-detail-table th:nth-child(5) { width: 14%; }
.enterprise-reimbursement-detail-table th:nth-child(6),
.enterprise-reimbursement-detail-table th:nth-child(7) { width: 10%; }

.enterprise-print-result {
  align-items: center;
  background: #0b355f;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px 16px;
}

.enterprise-print-result span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.enterprise-print-result strong {
  font-size: 18px;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .enterprise-dashboard-top,
  .enterprise-chart-grid {
    grid-template-columns: 1fr;
  }

  .enterprise-chart-wide {
    grid-column: auto;
  }

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

  .enterprise-consumption-filters,
  .compact-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .enterprise-dashboard-top {
    padding: 14px;
  }

  .enterprise-dashboard-top h2 {
    font-size: 22px;
  }

  .enterprise-filters,
  .enterprise-consumption-filters,
  .enterprise-pie-layout,
  .enterprise-summary-item {
    grid-template-columns: 1fr;
  }

  .enterprise-filters button,
  .enterprise-consumption-filters button {
    width: 100%;
  }

  .enterprise-chart-title {
    display: grid;
  }

  .enterprise-summary-item em {
    grid-column: auto;
    grid-row: auto;
  }
}

.print-area {
  display: none;
}

.print-sheet {
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
}

.print-sheet h1 {
  color: #111;
  font-size: 22px;
  margin: 0 0 4px;
}

.print-sheet h2 {
  font-size: 15px;
  margin: 18px 0 8px;
}

.print-sheet .print-meta {
  color: #555;
  font-size: 12px;
  margin-bottom: 14px;
}

.print-sheet table {
  border-collapse: collapse;
  margin-bottom: 12px;
  table-layout: auto;
  width: 100%;
}

.print-sheet th,
.print-sheet td {
  border: 1px solid #bfc7cc;
  color: #111;
  font-size: 11px;
  padding: 6px;
  white-space: normal;
}

.print-sheet th {
  background: #17324d;
  color: #fff;
  position: static;
}

.print-sheet .num {
  text-align: right;
}

.print-sheet .total-row td {
  background: #eef3f5;
  font-weight: 800;
}

.print-sheet .group-row td {
  background: #dfe9ed;
  color: #17324d;
  font-weight: 800;
  text-transform: uppercase;
}

.print-sheet .card-report-destination-row td {
  background: #edf4f2 !important;
  color: #17384f !important;
  font-weight: 800;
  text-transform: uppercase;
}

.print-sheet .subtotal-row td {
  background: #f8fafb;
  font-weight: 800;
}

.print-sheet.inventory-count-print,
.print-sheet.inventory-count-print * {
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-sheet.inventory-count-print {
  background: #fff;
  color: #102033;
  font-family: Arial, Helvetica, sans-serif;
  padding: 12px;
}

.inventory-count-header {
  align-items: flex-start;
  border-bottom: 2px solid #0b355f;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.inventory-count-brand strong {
  color: #111;
  display: block;
  font-size: 26px;
  letter-spacing: 5px;
  line-height: 1;
}

.inventory-count-brand span {
  color: #111;
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  margin-top: 5px;
}

.inventory-count-title {
  text-align: right;
}

.inventory-count-title h1 {
  color: #0b355f;
  font-size: 20px;
  letter-spacing: 0;
  margin: 0;
}

.inventory-count-title p {
  color: #526273;
  font-size: 10px;
  margin: 3px 0 0;
}

.inventory-price-list-meta {
  grid-template-columns: 1.2fr 1.2fr 0.55fr 1fr;
}

.inventory-price-list-table th,
.inventory-price-list-table td {
  font-size: 8.2px;
  padding: 4px 5px;
  vertical-align: middle;
}

.inventory-price-list-table th:nth-child(1),
.inventory-price-list-table td:nth-child(1) { width: 26px; }
.inventory-price-list-table th:nth-child(2),
.inventory-price-list-table td:nth-child(2) { width: 28%; }
.inventory-price-list-table th:nth-child(3),
.inventory-price-list-table td:nth-child(3) { width: 13%; }
.inventory-price-list-table th:nth-child(4),
.inventory-price-list-table td:nth-child(4) { width: 13%; }
.inventory-price-list-table th:nth-child(5),
.inventory-price-list-table td:nth-child(5) { width: 17%; }
.inventory-price-list-table th:nth-child(6),
.inventory-price-list-table td:nth-child(6) { width: 9%; }
.inventory-price-list-table th:nth-child(7),
.inventory-price-list-table td:nth-child(7) { width: 12%; }
.inventory-price-list-table th:nth-child(8),
.inventory-price-list-table td:nth-child(8) { width: 9%; }

.inventory-price-list-footer {
  align-items: center;
  border-top: 1px solid #cbd7e2;
  color: #526273;
  display: flex;
  font-size: 8px;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 6px;
}

.inventory-count-meta {
  align-items: center;
  border: 1px solid #cbd7e2;
  border-radius: 6px;
  display: grid;
  font-size: 8.8px;
  gap: 4px;
  grid-template-columns: 1fr 1.7fr 0.7fr 0.8fr;
  margin: 8px 0 10px;
  padding: 6px;
}

.inventory-count-table {
  border-collapse: collapse;
  margin-bottom: 10px;
  table-layout: fixed;
  width: 100%;
}

.inventory-count-table th,
.inventory-count-table td {
  border: 1px solid #bfcbd7;
  color: #102033;
  font-size: 7.1px;
  line-height: 1.15;
  padding: 3px 4px;
  text-overflow: clip;
  vertical-align: top;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.inventory-count-table th {
  background: #123b5a;
  color: #fff;
  font-weight: 800;
  vertical-align: middle;
}

.inventory-count-table th:nth-child(1),
.inventory-count-table td:nth-child(1) {
  width: 24px;
}

.inventory-count-table th:nth-child(2),
.inventory-count-table td:nth-child(2) {
  width: 58px;
}

.inventory-count-table th:nth-child(3),
.inventory-count-table td:nth-child(3) {
  width: 168px;
}

.inventory-count-table th:nth-child(4),
.inventory-count-table td:nth-child(4) {
  width: 76px;
}

.inventory-count-table th:nth-child(5),
.inventory-count-table td:nth-child(5) {
  width: 50px;
}

.inventory-count-table th:nth-child(6),
.inventory-count-table td:nth-child(6) {
  width: 50px;
}

.inventory-count-table th:nth-child(7),
.inventory-count-table td:nth-child(7),
.inventory-count-table th:nth-child(8),
.inventory-count-table td:nth-child(8),
.inventory-count-table th:nth-child(9),
.inventory-count-table td:nth-child(9) {
  width: 68px;
}

.inventory-count-table .num {
  font-size: 7px;
  text-align: right;
  white-space: nowrap;
}

.inventory-count-table .center {
  text-align: center;
}

.inventory-count-write-cell {
  background: #fff;
  height: 22px;
}

.inventory-count-observation {
  min-width: 0;
}

.inventory-count-signatures {
  break-inside: avoid;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 26px;
  page-break-inside: avoid;
}

.inventory-count-signature {
  border-top: 1px solid #1f344a;
  color: #102033;
  font-size: 10px;
  padding-top: 6px;
  text-align: center;
}

@media print {
  .print-sheet.inventory-count-print {
    margin: 0;
    padding: 0;
  }

  .inventory-count-header,
  .inventory-count-meta,
  .inventory-count-signatures {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .inventory-count-table thead {
    display: table-header-group;
  }

  .inventory-count-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

.print-sheet.production-work-order-print,
.print-sheet.production-work-order-print * {
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-sheet.production-work-order-print {
  background: #fff;
  color: #102033;
  font-family: Arial, Helvetica, sans-serif;
  padding: 30px 36px;
}

.production-work-order-header {
  align-items: flex-start;
  border-bottom: 2px solid #f0a51a;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.production-work-order-brand strong {
  color: #111;
  display: block;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 5px;
  line-height: 1;
}

.production-work-order-brand span {
  color: #111;
  display: block;
  font-size: 12px;
  letter-spacing: 6px;
  margin-top: 8px;
}

.production-work-order-title {
  text-align: right;
}

.production-work-order-title h1 {
  color: #0e3153;
  font-size: 26px;
  margin: 0;
}

.production-work-order-title span {
  color: #5d6978;
  display: block;
  font-size: 12px;
  margin-top: 6px;
  text-transform: uppercase;
}

.production-work-order-title .production-work-order-number {
  display: block;
  color: #0e3153;
  font-size: 16px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.production-work-order-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
}

.production-work-order-meta article {
  border: 1px solid #d8e1ea;
  border-radius: 6px;
  min-height: 56px;
  padding: 9px 10px;
}

.production-work-order-meta span {
  color: #5d6978;
  display: block;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.production-work-order-meta strong {
  color: #102033;
  display: block;
  font-size: 13px;
}

.production-work-order-block {
  break-inside: avoid;
  margin-top: 14px;
  page-break-inside: avoid;
}

.production-work-order-block h2 {
  border-left: 5px solid #0b5b67;
  color: #0e3153;
  font-size: 15px;
  margin: 0 0 8px;
  padding-left: 8px;
}

.production-work-order-criteria {
  border: 1px solid #d8e1ea;
  border-radius: 6px;
  display: grid;
  gap: 8px 18px;
  grid-template-columns: repeat(2, 1fr);
  padding: 10px;
}

.production-work-order-criteria p {
  margin: 0;
}

.production-work-order-criteria .wide {
  grid-column: 1 / -1;
}

.production-work-order-print table {
  table-layout: fixed;
}

.production-work-order-print th,
.production-work-order-print td {
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.production-work-order-notes {
  background: #fff8e8;
  border: 1px solid #f0c36a;
  border-radius: 6px;
  break-inside: avoid;
  font-size: 11px;
  margin-top: 14px;
  padding: 10px 12px;
  page-break-inside: avoid;
}

.production-work-order-signatures {
  break-inside: avoid;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 34px;
  page-break-inside: avoid;
}

.production-work-order-signatures div {
  border-top: 1px solid #0e3153;
  padding-top: 7px;
  text-align: center;
}

.production-work-order-signatures span {
  color: #2b3e55;
  font-size: 11px;
  font-weight: 700;
}

.production-work-order-signatures small {
  color: #5d6978;
  display: block;
  font-size: 10px;
  margin-top: 4px;
}

.production-work-order-technician-signature {
  grid-template-columns: minmax(220px, 320px);
  justify-content: center;
  margin-top: auto;
  padding-top: 24px;
}

.production-work-order-required-components table {
  margin-bottom: 0;
}

.production-work-order-required-components th,
.production-work-order-required-components td {
  font-size: 8px;
  line-height: 1.15;
  padding: 3px 4px;
}

.production-work-order-required-components th:nth-child(1) { width: 7%; }
.production-work-order-required-components th:nth-child(2) { width: 31%; }
.production-work-order-required-components th:nth-child(3) { width: 13%; }
.production-work-order-required-components th:nth-child(4) { width: 13%; }
.production-work-order-required-components th:nth-child(5) { width: 36%; }

.production-work-order-supervisor-signature {
  grid-template-columns: minmax(240px, 340px);
  justify-content: center;
  margin-top: auto;
  padding-top: 36px;
}

.production-work-order-sheet-summary {
  align-items: center;
  background: #f3f7fa;
  border: 1px solid #d8e1ea;
  display: grid;
  gap: 8px 18px;
  grid-template-columns: auto 1fr auto;
  margin: 14px 0 18px;
  padding: 10px 12px;
}

.production-work-order-sheet-summary strong {
  color: #0e3153;
  font-size: 14px;
}

.production-work-order-sheet-summary span {
  color: #2b3e55;
  font-size: 11px;
}

.print-sheet.production-work-order-production-sheet {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
}

.production-work-order-production-sheet .production-work-order-header {
  margin-bottom: 8px;
  padding-bottom: 7px;
}

.production-work-order-production-sheet .production-work-order-brand strong {
  font-size: 30px;
}

.production-work-order-production-sheet .production-work-order-brand span {
  font-size: 8px;
  letter-spacing: 4px;
  margin-top: 5px;
}

.production-work-order-production-sheet .production-work-order-title h1 {
  font-size: 20px;
}

.production-work-order-production-sheet .production-work-order-title span {
  font-size: 9px;
  margin-top: 3px;
}

.production-work-order-production-sheet .production-work-order-sheet-summary {
  gap: 5px 10px;
  margin: 7px 0 9px;
  padding: 6px 8px;
}

.production-work-order-production-sheet .production-work-order-sheet-summary strong {
  font-size: 11px;
}

.production-work-order-production-sheet .production-work-order-sheet-summary span {
  font-size: 8px;
}

.production-work-order-production-sheet .production-work-order-block {
  margin-top: 7px;
}

.production-work-order-production-sheet .production-work-order-block h2 {
  font-size: 11px;
  margin-bottom: 4px;
}

.production-work-order-production-sheet table {
  margin: 0;
}

.production-work-order-production-sheet th,
.production-work-order-production-sheet td {
  font-size: 8px;
  line-height: 1.12;
  padding: 2.5px 3px;
}

.production-work-order-production-sheet .production-work-order-notes {
  font-size: 9px;
  margin-top: 6px;
  padding: 5px 7px;
}

.production-work-order-production-sheet .production-work-order-supervisor-signature {
  margin-top: auto;
  padding-top: 10px;
}

.production-work-order-production-sheet .production-work-order-signatures span {
  font-size: 10px;
}

.production-work-order-production-sheet .production-work-order-signatures small {
  font-size: 9px;
}

@media print {
  @page productionWorkOrder {
    size: A4 portrait;
    margin: 0;
  }

  .production-work-order-page {
    border: 0;
    box-shadow: none;
    margin: 0;
    min-height: 276mm;
    page: productionWorkOrder;
    width: 100%;
  }

  .production-work-order-cover {
    break-after: page;
    display: flex;
    flex-direction: column;
    page-break-after: always;
  }

  .production-work-order-production-sheet {
    break-before: page;
    page-break-before: always;
  }

  .production-work-order-production-sheet .production-work-order-block {
    break-inside: auto;
    page-break-inside: auto;
  }

  .production-work-order-production-sheet thead {
    display: table-header-group;
  }

  .production-work-order-production-sheet tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

.print-sheet.no-fiscal-print,
.print-sheet.no-fiscal-print * {
  box-sizing: border-box;
}

@page purchaseOrder {
  size: A4 portrait;
  margin: 12mm;
}

.purchase-order-document {
  background: #fff;
  box-sizing: border-box;
  color: #263342;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0 auto;
  max-width: 186mm;
  min-height: 273mm;
  padding: 8mm;
  page: purchaseOrder;
  width: 100%;
}

.purchase-order-document .document-header {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 40%);
}

.purchase-order-document .document-title-block {
  max-width: none;
  width: 100%;
}

.purchase-order-document .document-title-block h1 {
  overflow-wrap: normal;
  white-space: nowrap;
}

.purchase-order-document .document-panel,
.purchase-order-document .document-footer {
  break-inside: avoid;
  page-break-inside: avoid;
}

.purchase-order-document .purchase-order-item-note {
  color: #536273;
  display: block;
  font-size: 0.86em;
  line-height: 1.35;
  margin-top: 4px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.purchase-order-document .purchase-order-item-note strong {
  color: #263342;
}

@media print {
  body.printing .purchase-order-document {
    border: 0;
    box-shadow: none;
    margin: 0 auto;
    min-height: auto;
  }
}

.print-sheet.no-fiscal-print {
  background: #fff;
  color: #263342;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 0;
  padding: 30px 36px 24px;
  position: relative;
}

.document-header {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 42%);
  margin-bottom: 18px;
}

.document-brand {
  color: #050505;
  display: grid;
  gap: 7px;
  justify-items: start;
}

.document-brand strong {
  color: #050505;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 0.9;
}

.document-brand span {
  color: #050505;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 6px;
  line-height: 1;
  padding-left: 4px;
}

.document-brand::after,
.document-title-block::after {
  background: #f59e0b;
  content: "";
  display: block;
  height: 2px;
  margin-top: 10px;
  width: 72px;
}

.document-title-block {
  justify-self: end;
  max-width: 440px;
  text-align: left;
}

.document-title-block h1 {
  color: #050505;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.05;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.document-title-block h2 {
  color: #050505;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  margin: -5px 0 10px;
  text-transform: uppercase;
}

.document-title-block dl {
  display: grid;
  gap: 5px 14px;
  grid-template-columns: 110px 1fr;
  margin: 0;
}

.document-title-block dt,
.document-title-block dd {
  color: #111;
  font-size: 11.5px;
  line-height: 1.25;
  margin: 0;
}

.document-title-block dt {
  font-weight: 700;
}

.document-title-block dd {
  font-weight: 800;
}

.document-note {
  background: #f8fafc;
  border: 1px solid #d8e2ec;
  border-left: 4px solid #0f4f5f;
  color: #12263a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  margin: 12px 0;
  padding: 9px 11px;
  page-break-inside: avoid;
}

.document-footer {
  border-top: 1.5px solid #f59e0b;
  color: #111;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  margin-top: 18px;
  padding-top: 11px;
  page-break-inside: avoid;
}

.document-footer-company h2 {
  color: #111;
  display: inline-block;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.03em;
  margin: 0 0 7px;
  padding-bottom: 3px;
  position: relative;
}

.document-footer-company h2::after {
  background: #f59e0b;
  bottom: 0;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  width: 62px;
}

.document-footer-company p,
.document-footer-note p {
  color: #111;
  font-size: 10.5px;
  line-height: 1.35;
  margin: 2px 0;
  text-align: left;
}

.document-footer-company span {
  color: #111;
  margin: 0 8px;
}

.document-footer-note {
  align-items: center;
  border-left: 2px solid #f59e0b;
  display: grid;
  gap: 14px;
  grid-template-columns: 46px 1fr;
  padding-left: 22px;
}

.project-delivery-print .project-delivery-warning {
  margin-bottom: 18px;
}

.project-delivery-detail th:nth-child(2),
.project-delivery-detail td:nth-child(2) {
  text-align: right;
  width: 86px;
}

.project-delivery-detail th:nth-child(3),
.project-delivery-detail td:nth-child(3) {
  width: 82px;
}

.project-delivery-detail th:nth-child(4),
.project-delivery-detail td:nth-child(4),
.project-delivery-detail th:nth-child(5),
.project-delivery-detail td:nth-child(5) {
  width: 118px;
}

.project-delivery-note {
  background: #f8fafc;
  border: 1px solid #d7e0e5;
  border-radius: 8px;
  color: #263342;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 16px;
  padding: 12px 14px;
}

.project-delivery-note strong {
  color: #0f344d;
  margin-right: 5px;
}

.project-delivery-signatures {
  margin-top: 46px;
}

.project-dispatch-history-print .project-dispatch-history-title {
  background: transparent;
  color: #000;
  font-weight: 900;
  padding-left: 0;
}

.project-dispatch-history-print .project-delivery-detail th,
.project-dispatch-history-print .project-delivery-detail td {
  line-height: 1.2;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: normal;
}

.project-dispatch-history-print .project-delivery-detail th:nth-child(1),
.project-dispatch-history-print .project-delivery-detail td:nth-child(1) {
  text-align: left;
  width: 20%;
}

.project-dispatch-history-print .project-delivery-detail th:nth-child(2),
.project-dispatch-history-print .project-delivery-detail td:nth-child(2) {
  text-align: left;
  width: 60%;
}

.project-dispatch-history-print .project-delivery-detail th:nth-child(3),
.project-dispatch-history-print .project-delivery-detail td:nth-child(3) {
  text-align: right;
  width: 20%;
}

.project-shareholder-print {
  color: #162231;
}

.project-summary-intro {
  align-items: start;
  background: #f8fafc;
  border: 1px solid #d9e3ea;
  border-radius: 10px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  margin: 12px 0 14px;
  padding: 14px 16px;
  page-break-inside: avoid;
}

.project-summary-intro h2 {
  color: #0b3552;
  font-size: 22px;
  line-height: 1.1;
  margin: 0 0 5px;
  text-transform: uppercase;
}

.project-summary-intro p {
  color: #566575;
  font-size: 12px;
  margin: 0;
}

.project-summary-intro dl {
  display: grid;
  gap: 6px 14px;
  grid-template-columns: 120px 1fr;
  margin: 0;
}

.project-summary-intro div,
.project-summary-intro dt,
.project-summary-intro dd {
  min-width: 0;
}

.project-summary-intro dt,
.project-summary-intro dd {
  font-size: 11px;
  line-height: 1.28;
  margin: 0;
}

.project-summary-intro dt {
  color: #657383;
  font-weight: 700;
}

.project-summary-intro dd {
  color: #12263a;
  font-weight: 800;
}

.project-summary-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 14px;
  page-break-inside: avoid;
}

.project-summary-metric {
  align-items: center;
  background: #fff;
  border: 1px solid #d7e0e7;
  border-radius: 9px;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 78px;
  padding: 12px;
}

.project-summary-metric span,
.project-summary-metric small {
  color: #5c6b78;
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-summary-metric strong {
  color: #0b3552;
  display: block;
  font-size: 16px;
  line-height: 1.15;
  margin: 5px 0 3px;
  overflow-wrap: anywhere;
}

.project-summary-metric-blue .statement-metric-icon { color: #0b5db3; }
.project-summary-metric-red .statement-metric-icon { color: #bb2d2d; }
.project-summary-metric-green .statement-metric-icon { color: #16854c; }
.project-summary-metric-purple .statement-metric-icon { color: #6d3fb1; }
.project-summary-metric-orange .statement-metric-icon { color: #d66a00; }
.project-summary-metric-teal .statement-metric-icon { color: #087f83; }

.project-summary-two-columns {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  margin: 12px 0;
}

.project-summary-card,
.project-summary-section {
  background: #fff;
  border: 1px solid #d7e0e7;
  border-radius: 9px;
  padding: 12px 14px;
}

.project-summary-card {
  page-break-inside: avoid;
}

.project-summary-card h3,
.project-summary-section h3 {
  color: #0b3552;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.project-summary-section {
  margin-top: 12px;
}

.project-summary-note {
  color: #52616f;
  font-size: 10.5px;
  line-height: 1.35;
  margin: 10px 0 0;
}

.project-summary-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.project-summary-table + .project-summary-table {
  margin-top: 10px;
}

.project-summary-table th {
  background: #123850;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 6px 7px;
  text-align: left;
}

.project-summary-table td {
  border: 1px solid #d9e1e7;
  color: #132231;
  font-size: 9.6px;
  line-height: 1.25;
  padding: 6px 7px;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: anywhere;
}

.project-summary-table .num {
  text-align: right;
  white-space: nowrap;
}

.project-summary-table.compact td:first-child {
  font-weight: 700;
  width: 62%;
}

.project-summary-table .total-row td {
  background: #edf5f1;
  color: #0c5130;
  font-weight: 900;
}

.no-fiscal-top-bar,
.no-fiscal-bottom-bar {
  background: #1d314f;
  height: 16px;
  margin-left: -36px;
  margin-right: -36px;
}

.no-fiscal-bottom-bar {
  bottom: 0;
  left: 46px;
  position: absolute;
  right: 46px;
}

.no-fiscal-header {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 330px;
  padding: 24px 0 16px;
}

.no-fiscal-logo {
  background: #1d314f;
  border-radius: 7px;
  color: #fff;
  display: inline-grid;
  min-width: 198px;
  padding: 13px 18px 11px;
}

.no-fiscal-logo strong {
  font-size: 25px;
  letter-spacing: 3px;
  line-height: 1;
}

.no-fiscal-logo span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 5px;
}

.print-sheet.no-fiscal-print .no-fiscal-header h1 {
  color: #2b3038;
  font-size: 18px;
  margin: 10px 0 5px;
}

.no-fiscal-header p {
  color: #697381;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  margin: 3px 0;
}

.no-fiscal-title-card {
  align-self: start;
  background: #f8fafc;
  border: 1px solid #d3dde8;
  border-radius: 9px;
  padding: 13px 16px;
}

.no-fiscal-title-card h2,
.no-fiscal-title-card h3 {
  color: #1d314f;
  margin: 0;
  text-align: right;
}

.no-fiscal-title-card h2 {
  font-size: 27px;
  line-height: 1;
}

.no-fiscal-title-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.no-fiscal-title-card dl {
  display: grid;
  font-size: 11px;
  gap: 3px 10px;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.no-fiscal-title-card dt {
  font-weight: 900;
}

.no-fiscal-title-card dd {
  color: #667085;
  margin: 0;
  text-align: right;
}

.no-fiscal-warning {
  background: #fff8e8;
  border: 1px solid #efb84a;
  border-radius: 7px;
  color: #b83232;
  margin: 8px 0 14px;
  padding: 8px;
  text-align: center;
}

.no-fiscal-warning strong,
.no-fiscal-warning span {
  display: block;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.no-fiscal-warning strong {
  font-size: 16px;
}

.no-fiscal-warning span {
  font-size: 11px;
  margin-top: 2px;
}

.no-fiscal-section-title {
  background: #1d314f;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin: 9px 0 6px;
  padding: 6px 12px;
}

.no-fiscal-client {
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 8px;
  padding: 10px 14px;
}

.no-fiscal-client div {
  display: grid;
  font-size: 11px;
  gap: 3px 8px;
  grid-template-columns: 140px 1fr;
}

.no-fiscal-client strong {
  color: #667085;
}

.no-fiscal-client span {
  color: #3d4550;
  font-weight: 700;
}

.print-sheet.no-fiscal-print .no-fiscal-detail {
  border-collapse: collapse;
  margin-bottom: 14px;
  table-layout: fixed;
  width: 100%;
}

.print-sheet.no-fiscal-print .no-fiscal-detail th {
  background: #e9f1f8;
  border: 1px solid #d4dde8;
  color: #24364f;
  font-size: 10px;
  padding: 6px;
}

.print-sheet.no-fiscal-print .no-fiscal-detail td {
  border: 1px solid #e0e6ee;
  color: #263342;
  font-size: 10px;
  min-height: 22px;
  padding: 6px;
  vertical-align: top;
  white-space: normal;
}

.no-fiscal-detail th:nth-child(1) {
  width: 44%;
}

.no-fiscal-detail th:nth-child(2) {
  width: 8%;
}

.no-fiscal-detail th:nth-child(3) {
  width: 10%;
}

.no-fiscal-detail th:nth-child(4) {
  width: 14%;
}

.no-fiscal-detail th:nth-child(5) {
  width: 10%;
}

.no-fiscal-detail th:nth-child(6) {
  width: 16%;
}

.invoice-tax-detail th:nth-child(1) { width: 30%; }
.invoice-tax-detail th:nth-child(2) { width: 6%; }
.invoice-tax-detail th:nth-child(3) { width: 9%; }
.invoice-tax-detail th:nth-child(4) { width: 15%; }
.invoice-tax-detail th:nth-child(5) { width: 9%; }
.invoice-tax-detail th:nth-child(6) { width: 13%; }
.invoice-tax-detail th:nth-child(7) { width: 18%; }
.invoice-delivery-detail th:nth-child(1) { width: 6%; }
.invoice-delivery-detail th:nth-child(2) { width: 62%; }
.invoice-delivery-detail th:nth-child(3) { width: 14%; }
.invoice-delivery-detail th:nth-child(4) { width: 18%; }
.invoice-delivery-detail { width: 100%; table-layout: fixed; }
.invoice-delivery-detail tr { break-inside: avoid; }
.invoice-delivery-detail td { overflow-wrap: break-word; }

.no-fiscal-product {
  align-items: start;
  display: grid;
  gap: 7px;
  grid-template-columns: 52px 1fr;
}

.no-fiscal-product.no-image {
  grid-template-columns: 1fr;
}

.no-fiscal-product img {
  background: #f8fafc;
  border: 1px solid #d9e2ec;
  border-radius: 5px;
  height: 50px;
  object-fit: contain;
  width: 50px;
}

.no-fiscal-product span {
  display: block;
  min-width: 0;
}

.no-fiscal-product small {
  color: #516172;
  display: block;
  font-size: 8px;
  font-weight: 800;
  margin-bottom: 2px;
}

.no-fiscal-product strong {
  color: #1b2d48;
  display: block;
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.no-fiscal-product em {
  color: #465563;
  display: block;
  font-size: 9px;
  font-style: normal;
  line-height: 1.25;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.print-sheet.no-fiscal-print .num {
  text-align: right;
  white-space: nowrap;
}

.no-fiscal-bottom {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: 1.4fr 1fr;
}

.no-fiscal-payment,
.no-fiscal-summary {
  background: #f8fafc;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 10px 12px;
}

.no-fiscal-payment h4,
.no-fiscal-summary h4 {
  color: #1d314f;
  font-size: 12px;
  margin: 0 0 8px;
}

.no-fiscal-payment p {
  display: grid;
  font-size: 11px;
  grid-template-columns: 120px 1fr;
  margin: 4px 0;
}

.no-fiscal-payment small {
  color: #667085;
  display: block;
  font-size: 10px;
  line-height: 1.35;
  margin-top: 10px;
}

.no-fiscal-summary p {
  align-items: center;
  border-bottom: 1px solid #dce4ee;
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  margin: 0;
  padding: 5px 0;
}

.no-fiscal-discount-line span {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.no-fiscal-discount-line small {
  font-size: 10px;
  padding: 4px 6px;
}

.no-fiscal-summary div {
  align-items: center;
  background: #1d314f;
  color: #fff;
  display: flex;
  font-size: 15px;
  font-weight: 900;
  justify-content: space-between;
  margin: 8px -12px 0;
  padding: 9px 12px;
}

.no-fiscal-summary div span,
.no-fiscal-summary div strong {
  font-weight: 900;
}

.no-fiscal-summary em {
  align-items: center;
  background: #edf8f0;
  border: 1px solid #b9dfc3;
  border-radius: 7px;
  color: #2f8f48;
  display: flex;
  font-style: normal;
  font-weight: 900;
  justify-content: space-between;
  margin-top: 8px;
  padding: 8px 10px;
}

.no-fiscal-signatures {
  display: grid;
  gap: 90px;
  grid-template-columns: 1fr 1fr;
  margin: 24px 0 18px;
  text-align: center;
  align-items: end;
  break-inside: avoid;
  page-break-inside: avoid;
}

.sedeli-document-signature {
  break-inside: avoid;
  page-break-inside: avoid;
}

.sedeli-document-signature img {
  display: block;
  width: 42mm;
  height: 30mm;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto 2mm;
}

.no-fiscal-signatures span {
  border-top: 1px solid #333;
  display: block;
  margin-bottom: 10px;
}

.no-fiscal-signatures strong,
.no-fiscal-signatures small {
  color: #606977;
  display: block;
}

.no-fiscal-note {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 9px 12px;
}

.no-fiscal-note strong {
  color: #b83232;
}

.no-fiscal-note p {
  color: #667085;
  font-size: 10px;
  line-height: 1.3;
  margin: 5px 0 0;
}

.print-sheet.no-fiscal-print footer:not(.document-footer) {
  color: #dbe3ee;
  font-size: 10px;
  margin-top: 4px;
  text-align: center;
}

.print-sheet.no-fiscal-statement-print {
  background: #fff;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  page: noFiscalStatement;
  padding: 0;
}

@page noFiscalStatement {
  size: letter landscape;
  margin: 8mm;
}

.statement-page {
  background: #fff;
  break-after: page;
  display: flex;
  flex-direction: column;
  min-height: 7.75in;
  padding: 18px 24px 12px;
  page-break-after: always;
}

.statement-page:last-child {
  break-after: auto;
  page-break-after: auto;
}

.statement-header {
  align-items: start;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 1.18fr;
  margin-bottom: 20px;
}

.statement-brand {
  color: #050505;
  display: grid;
  gap: 8px;
  justify-items: start;
  padding-top: 2px;
}

.statement-brand strong {
  color: #050505;
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 0.9;
}

.statement-brand span {
  color: #050505;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 7px;
  line-height: 1;
  padding-left: 4px;
}

.statement-brand::after,
.statement-title-block::after {
  background: #f59e0b;
  content: "";
  display: block;
  height: 2px;
  margin-top: 12px;
  width: 76px;
}

.statement-title-block {
  justify-self: end;
  max-width: 560px;
  text-align: left;
}

.statement-header h1 {
  color: #050505;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.1;
  margin: 0 0 20px;
  text-transform: uppercase;
  white-space: nowrap;
}

.statement-title-block dl {
  display: grid;
  gap: 9px 22px;
  grid-template-columns: 110px 1fr;
  margin: 0;
}

.statement-title-block dt,
.statement-title-block dd {
  color: #111;
  font-size: 13px;
  line-height: 1.2;
  margin: 0;
  white-space: normal;
}

.statement-title-block dt {
  font-weight: 700;
}

.statement-title-block dd {
  font-weight: 800;
}

.statement-summary {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.statement-header-compact {
  align-items: center;
  gap: 18px;
  grid-template-columns: 220px 1fr;
  margin-bottom: 12px;
}

.statement-header-compact .statement-brand strong {
  font-size: 28px;
  letter-spacing: 2px;
}

.statement-header-compact .statement-brand span {
  font-size: 9px;
  letter-spacing: 4px;
}

.statement-header-compact .statement-brand::after,
.statement-header-compact .statement-title-block::after {
  margin-top: 6px;
  width: 46px;
}

.statement-header-compact .statement-header h1,
.statement-header-compact h1 {
  font-size: 17px;
  margin-bottom: 0;
}

.print-sheet.no-fiscal-statement-print .statement-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.print-sheet.no-fiscal-statement-print .statement-table th,
.print-sheet.no-fiscal-statement-print .statement-table td {
  border: 1px solid #e0e4e8;
  color: #050505;
  font-size: 9.4px;
  line-height: 1.25;
  padding: 6px 7px;
  overflow: visible;
  text-overflow: clip;
  vertical-align: middle;
  word-break: normal;
}

.print-sheet.no-fiscal-statement-print .statement-table th {
  background: #050505;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.02em;
  padding-bottom: 8px;
  padding-top: 8px;
  text-align: center;
  text-transform: uppercase;
}

.print-sheet.no-fiscal-statement-print .statement-table tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-sheet.no-fiscal-statement-print .statement-table thead {
  display: table-header-group;
}

.print-sheet.no-fiscal-statement-print .statement-table tfoot {
  display: table-footer-group;
}

.print-sheet.no-fiscal-statement-print .num {
  text-align: right;
  white-space: nowrap;
}

.print-sheet.no-fiscal-statement-print .center {
  text-align: center;
  white-space: nowrap;
}

.print-sheet.no-fiscal-statement-print .statement-status {
  font-size: 8.8px;
  min-width: 76px;
  padding: 5px 9px;
}

.print-sheet.no-fiscal-statement-print .statement-table th:nth-child(1) {
  width: 9.5%;
}

.print-sheet.no-fiscal-statement-print .statement-table th:nth-child(2) {
  width: 14%;
}

.print-sheet.no-fiscal-statement-print .statement-table th:nth-child(3) {
  width: 14%;
}

.print-sheet.no-fiscal-statement-print .statement-table th:nth-child(4) {
  width: 12.5%;
}

.print-sheet.no-fiscal-statement-print .statement-table th:nth-child(5),
.print-sheet.no-fiscal-statement-print .statement-table th:nth-child(6) {
  width: 12.5%;
}

.print-sheet.no-fiscal-statement-print .statement-table th:nth-child(7) {
  width: 10%;
}

.print-sheet.no-fiscal-statement-print .statement-table th:nth-child(8) {
  width: 7%;
}

.print-sheet.no-fiscal-statement-print .statement-table th:nth-child(9) {
  width: 8%;
}

.statement-footer {
  align-items: center;
  border-top: 1.5px solid #f59e0b;
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr 1.35fr;
  margin-top: auto;
  padding: 12px 24px 0;
}

.statement-footer-company h2 {
  color: #111;
  display: inline-block;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.03em;
  margin: 0 0 8px;
  padding-bottom: 3px;
  position: relative;
}

.statement-footer-company h2::after {
  background: #f59e0b;
  bottom: 0;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  width: 70px;
}

.statement-footer-company p,
.statement-footer-note p {
  color: #111;
  font-size: 12px;
  line-height: 1.35;
  margin: 3px 0;
}

.statement-footer-company span {
  color: #111;
  margin: 0 10px;
}

.statement-footer-note {
  align-items: center;
  border-left: 2px solid #f59e0b;
  display: grid;
  gap: 18px;
  grid-template-columns: 56px 1fr;
  min-height: 82px;
  padding-left: 32px;
}

.statement-note-icon {
  align-items: center;
  border: 1.5px solid #f59e0b;
  border-radius: 999px;
  color: #f59e0b;
  display: flex;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.statement-note-icon svg {
  fill: none;
  height: 28px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 28px;
}

.statement-footer-note strong {
  color: #111;
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.statement-page-number {
  color: #6b7280;
  font-size: 9px;
  margin-top: 8px;
  text-align: right;
}

.payment-receipt-table th:nth-child(1) {
  width: 5%;
}

.payment-receipt-edit-notice {
  background: #fff7e8;
  border: 1px solid #e9c889;
  border-radius: 8px;
  color: #754a00;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.payment-receipt-history-panel .compact-summary {
  margin-bottom: 14px;
}

.payment-receipt-history-table th:nth-child(6),
.payment-receipt-history-table td:nth-child(6) {
  white-space: nowrap;
}

.payment-receipt-table input[type="checkbox"] {
  height: 18px;
  width: 18px;
}

.payment-amount-input {
  max-width: 140px;
  text-align: right;
}

.print-sheet.payment-receipt-print {
  color: #1d314f;
  font-family: Arial, Helvetica, sans-serif;
  padding: 24px 28px;
}

.payment-receipt-header {
  align-items: center;
  border-bottom: 3px solid #1d314f;
  display: grid;
  gap: 24px;
  grid-template-columns: 260px 1fr;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.payment-receipt-header div {
  background: #1d314f;
  border-radius: 8px;
  color: #fff;
  display: grid;
  gap: 4px;
  padding: 16px 18px;
}

.payment-receipt-header div strong {
  font-size: 30px;
  letter-spacing: 3px;
}

.payment-receipt-header div span,
.payment-receipt-header div small {
  font-weight: 800;
}

.payment-receipt-header div small {
  color: #dbe6f0;
  font-size: 9px;
  line-height: 1.35;
}

.payment-receipt-header section {
  text-align: right;
}

.payment-receipt-header h1 {
  color: #1d314f;
  font-size: 30px;
  margin: 0 0 8px;
}

.payment-receipt-header p {
  color: #455466;
  font-size: 12px;
  margin: 4px 0;
}

.payment-receipt-alert {
  background: #eef7f1;
  border: 1px solid #b9dfc3;
  border-radius: 8px;
  color: #26683e;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 14px;
  padding: 10px 14px;
  text-align: center;
  text-transform: uppercase;
}

.payment-receipt-info {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}

.payment-receipt-info div {
  border: 1px solid #d2dce5;
  border-radius: 8px;
  padding: 12px 14px;
}

.payment-receipt-info h3 {
  color: #1d314f;
  font-size: 13px;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.payment-receipt-info p {
  display: grid;
  font-size: 11px;
  grid-template-columns: 110px 1fr;
  margin: 5px 0;
}

.payment-receipt-table-print {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.payment-receipt-table-print th,
.payment-receipt-table-print td {
  border: 1px solid #d2dce5;
  color: #1d314f;
  font-size: 10.5px;
  padding: 7px;
}

.payment-receipt-table-print th {
  background: #1d314f;
  color: #fff;
}

.payment-receipt-total {
  align-items: center;
  background: #1d314f;
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-size: 18px;
  font-weight: 900;
  justify-content: space-between;
  margin: 16px 0 12px;
  padding: 13px 16px;
}

.payment-receipt-note {
  border: 1px solid #d2dce5;
  border-radius: 8px;
  color: #455466;
  font-size: 11px;
  margin: 0;
  padding: 9px 12px;
}

.print-sheet.ety-print {
  color: #102c44;
  font-family: Arial, Helvetica, sans-serif;
  padding: 4px 2px 0;
}

.print-sheet.ety-print,
.print-sheet.ety-print * {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.ety-print-header {
  align-items: start;
  display: grid;
  gap: 34px;
  grid-template-columns: 1.45fr 0.9fr;
  margin-bottom: 22px;
}

.ety-report-label {
  color: #006251;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  margin-top: 0;
  text-transform: uppercase;
}

.print-sheet.ety-print h1 {
  color: #0e3459;
  font-size: 43px;
  line-height: 1;
  margin: 6px 0 0;
}

.ety-report-meta {
  border-left: 1px solid #c9d2d8;
  display: grid;
  gap: 15px;
  padding-left: 28px;
}

.ety-meta-item {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 28px 1fr;
}

.ety-meta-item strong {
  color: #566473;
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}

.ety-meta-item span {
  color: #24384d;
  font-size: 13px;
  line-height: 1.25;
}

.ety-icon {
  color: currentColor;
  height: 22px;
  width: 22px;
}

.ety-kpi-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0 24px;
}

.ety-kpi {
  align-items: center;
  border: 1px solid #cfdce2;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 78px 1fr;
  min-height: 132px;
  padding: 18px 20px;
}

.ety-kpi-green {
  background: linear-gradient(135deg, #f3fbf8, #edf6f4);
}

.ety-kpi-amber {
  background: linear-gradient(135deg, #fffaf0, #fff4de);
  border-color: #e8cf9f;
}

.ety-kpi-navy {
  background: linear-gradient(135deg, #f3f8fc, #e7f1f8);
  border-color: #c7d8e5;
}

.ety-kpi-icon {
  align-items: center;
  background: #fff;
  border: 1px solid #c8ded9;
  border-radius: 50%;
  color: #006b5a;
  display: flex;
  height: 70px;
  justify-content: center;
  width: 70px;
}

.ety-kpi-amber .ety-kpi-icon {
  border-color: #dba741;
  color: #b27700;
}

.ety-kpi-navy .ety-kpi-icon {
  background: #0e3459;
  border-color: #0e3459;
  color: #fff;
}

.ety-kpi-icon .ety-icon {
  height: 38px;
  width: 38px;
}

.ety-kpi-navy .ety-kpi-icon .ety-icon {
  height: 40px;
  width: 40px;
}

.ety-kpi-copy span {
  color: #0e2541;
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.ety-kpi-copy strong {
  color: #071d36;
  display: block;
  font-size: 24px;
  line-height: 1.15;
}

.ety-kpi-copy em {
  color: #006251;
  display: block;
  font-size: 18px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 7px;
}

.ety-kpi-amber .ety-kpi-copy em {
  color: #a66c00;
}

.ety-print-section {
  margin-top: 16px;
}

.print-sheet.ety-print .ety-print-section h2 {
  align-items: center;
  color: #0e3459;
  display: flex;
  font-size: 16px;
  gap: 8px;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.ety-print-section h2 .ety-icon {
  color: #0e3459;
}

.ety-type-block {
  border: 1px solid #cbdcdb;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.ety-type-title {
  align-items: center;
  background: #006b5a !important;
  color: #fff !important;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 0;
  padding: 7px 12px;
  text-transform: uppercase;
}

.ety-type-title .ety-icon {
  color: #fff;
  height: 17px;
  width: 17px;
}

.print-sheet.ety-print .ety-table {
  border-collapse: collapse;
  margin: 0;
  table-layout: fixed;
  width: 100%;
}

.print-sheet.ety-print .ety-table th,
.print-sheet.ety-print .ety-table td {
  border: 1px solid #d2dcde;
  color: #142332;
  font-size: 10.5px;
  line-height: 1.18;
  padding: 6px 8px;
  white-space: normal;
}

.print-sheet.ety-print .ety-table th {
  background: #edf7f5;
  color: #005447;
  font-weight: 800;
  position: static;
}

.ety-col-date {
  width: 9.5%;
}

.ety-col-desc {
  width: 17%;
}

.ety-col-concept {
  width: 33%;
}

.ety-col-method {
  width: 18%;
}

.ety-col-company {
  width: 17%;
}

.ety-col-detail {
  width: 30%;
}

.ety-col-money {
  width: 11.25%;
}

.print-sheet.ety-print .ety-table .num {
  text-align: right;
}

.ety-subtotal-row td {
  background: #eef8f5;
  color: #005447;
  font-weight: 800;
  text-transform: uppercase;
}

.ety-total-strip {
  align-items: center;
  background: #eef8f5;
  border: 1px solid #cbdcdb;
  border-radius: 6px;
  color: #005447;
  display: grid;
  font-size: 15px;
  font-weight: 800;
  grid-template-columns: 1fr 140px 120px;
  margin: 12px 0 14px;
  padding: 10px 12px;
  text-transform: uppercase;
}

.ety-total-strip strong {
  text-align: right;
}

.ety-reimbursement-table {
  border: 1px solid #ead19b;
  border-radius: 8px;
  overflow: hidden;
}

.print-sheet.ety-print .ety-reimbursement-table th {
  background: #fff5df;
  color: #9a6500;
}

.ety-reimbursement-total td {
  background: #fff9ea;
  color: #755000;
  font-weight: 800;
  text-transform: uppercase;
}

.ety-empty-state {
  background: #f3f8f7;
  border: 1px solid #cbdcdb;
  border-radius: 8px;
  color: #53706c;
  font-weight: 800;
  padding: 16px;
  text-align: center;
}

.ety-empty-amber {
  background: #fff9ea;
  border-color: #ead19b;
  color: #9a6500;
}

.ety-final-section {
  break-inside: avoid;
  page-break-inside: avoid;
}

.ety-final-balance {
  align-items: center;
  background: #0b3157;
  border-radius: 7px;
  color: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr auto 1px auto;
  padding: 17px 24px;
}

.ety-final-balance span {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.ety-final-balance strong {
  font-size: 24px;
}

.ety-final-balance i {
  background: rgba(255, 255, 255, 0.8);
  height: 28px;
}

.ety-print-footer {
  border-top: 1px solid #d7e0e5;
  color: #0e3459;
  display: grid;
  font-size: 12px;
  gap: 12px;
  grid-template-columns: 1fr 1.4fr 1.4fr;
  margin-top: 28px;
  padding-top: 15px;
  text-align: center;
}

.ety-print-footer strong {
  text-transform: uppercase;
}

.print-sheet.shareholder-print {
  background: #fff;
  border: 1px solid #d7e1ea;
  border-radius: 8px;
  color: #08264a;
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
  padding: 0;
}

.print-sheet.shareholder-print,
.print-sheet.shareholder-print * {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.shareholder-header {
  align-items: center;
  border-bottom: 1px solid #dfe7ee;
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr 1.2fr 1fr;
  padding: 24px 28px 20px;
}

.shareholder-brand {
  align-items: center;
  display: flex;
  min-height: 76px;
  justify-content: flex-start;
}

.shareholder-brand-text strong {
  color: #0a3160;
  display: block;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 8px;
  line-height: 1;
}

.shareholder-brand-text span {
  color: #007a68;
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 5px;
  margin-top: 8px;
}

.shareholder-title h1 {
  color: #0a3160;
  font-size: 35px;
  line-height: 1;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
}

.shareholder-title p {
  color: #0b1930;
  display: flex;
  flex-wrap: wrap;
  font-size: 12.5px;
  gap: 10px 18px;
  margin: 0;
}

.shareholder-title strong {
  color: #0a3160;
}

.shareholder-meta {
  color: #0b1930;
  display: grid;
  font-size: 12.5px;
  gap: 8px;
  justify-items: end;
  line-height: 1.25;
  text-align: right;
}

.shareholder-meta strong {
  color: #0a3160;
}

.shareholder-body {
  padding: 18px;
}

.shareholder-executive,
.shareholder-section {
  background: #fff;
  border: 1px solid #d7e1ea;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(12, 32, 56, 0.04);
  margin-bottom: 14px;
  padding: 14px;
}

.shareholder-executive {
  break-inside: avoid;
  page-break-inside: avoid;
}

.shareholder-executive h2 {
  border-bottom: 1px solid #d6dee6;
  color: #0a3160;
  font-size: 14px;
  margin: 0 0 10px;
  padding-bottom: 7px;
  text-transform: uppercase;
}

.shareholder-kpi-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shareholder-kpi {
  background: #f8fbff;
  border: 1px solid #cfdceb;
  border-radius: 7px;
  display: grid;
  justify-items: center;
  min-width: 0;
  min-height: 104px;
  padding: 10px 6px;
  text-align: center;
}

.shareholder-kpi-icon {
  align-items: center;
  border-radius: 50%;
  color: #fff;
  display: flex;
  height: 38px;
  justify-content: center;
  margin-bottom: 6px;
  width: 38px;
}

.shareholder-kpi-icon .shareholder-icon {
  height: 21px;
  width: 21px;
}

.shareholder-kpi span {
  color: #0a3160;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.18;
  min-height: 24px;
  text-transform: uppercase;
}

.shareholder-kpi strong {
  color: #0a3160;
  font-size: 14px;
  line-height: 1.1;
  margin-top: 6px;
  max-width: 100%;
  white-space: nowrap;
}

.shareholder-kpi-navy .shareholder-kpi-icon {
  background: #0a3160;
}

.shareholder-kpi-green {
  background: #f3fbf4;
  border-color: #cbdccf;
}

.shareholder-kpi-green .shareholder-kpi-icon {
  background: #188142;
}

.shareholder-kpi-green strong {
  color: #0a6e3b;
}

.shareholder-kpi-amber {
  background: #fff8ec;
  border-color: #edd2a5;
}

.shareholder-kpi-amber .shareholder-kpi-icon {
  background: #df7a00;
}

.shareholder-kpi-amber strong {
  color: #c76300;
}

.shareholder-kpi-purple {
  background: #f7f3fb;
  border-color: #dacbe8;
}

.shareholder-kpi-purple .shareholder-kpi-icon {
  background: #7040a0;
}

.shareholder-kpi-purple strong {
  color: #7040a0;
}

.shareholder-kpi-teal {
  background: #f0fbfa;
  border-color: #bfdcda;
}

.shareholder-kpi-teal .shareholder-kpi-icon {
  background: #078378;
}

.shareholder-kpi-teal strong {
  color: #007269;
}

.shareholder-kpi-red {
  background: #fff3f2;
  border-color: #efc8c4;
}

.shareholder-kpi-red .shareholder-kpi-icon {
  background: #bb3128;
}

.shareholder-kpi-red strong {
  color: #a42620;
}

.shareholder-two-col,
.shareholder-three-col {
  display: grid;
  gap: 14px;
}

.shareholder-two-col {
  grid-template-columns: 1fr;
}

.shareholder-three-col {
  grid-template-columns: 1fr;
}

.print-sheet.shareholder-print .shareholder-section {
  break-inside: auto;
  page-break-inside: auto;
  padding: 10px;
}

.print-sheet.shareholder-print .shareholder-section h2 {
  align-items: center;
  break-after: avoid;
  color: #0a3160;
  display: flex;
  font-size: 15px;
  gap: 8px;
  margin: 0 0 10px;
  page-break-after: avoid;
  text-transform: uppercase;
}

.shareholder-section-green h2 {
  color: #006b3e !important;
}

.shareholder-section-teal h2 {
  color: #007269 !important;
}

.shareholder-section-purple h2 {
  color: #5d378c !important;
}

.shareholder-section-amber h2 {
  color: #d06000 !important;
}

.shareholder-section .shareholder-icon {
  height: 22px;
  width: 22px;
}

.print-sheet.shareholder-print .shareholder-table {
  border-collapse: collapse;
  margin: 0;
  table-layout: fixed;
  width: 100%;
}

.print-sheet.shareholder-print .shareholder-table th,
.print-sheet.shareholder-print .shareholder-table td {
  border: 1px solid #d8e0e7;
  color: #0f2238;
  font-size: 9.5px;
  line-height: 1.15;
  overflow: visible;
  overflow-wrap: anywhere;
  padding: 6px 7px;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
}

.print-sheet.shareholder-print .shareholder-table th {
  background: #0a3160;
  color: #fff;
  font-weight: 800;
  position: static;
}

.print-sheet.shareholder-print .shareholder-table-green th {
  background: #006b3e;
}

.print-sheet.shareholder-print .shareholder-table-teal th {
  background: #007269;
}

.print-sheet.shareholder-print .shareholder-table-purple th {
  background: #5d378c;
}

.print-sheet.shareholder-print .shareholder-table-amber th {
  background: #d06000;
}

.print-sheet.shareholder-print .shareholder-table .num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.1px;
  overflow-wrap: normal;
  text-align: right;
  white-space: nowrap;
}

.shareholder-total-row td {
  background: #eef4fa;
  color: #0a3160;
  font-weight: 800;
  text-transform: uppercase;
}

.shareholder-note-row td {
  background: #f5f8fb;
  color: #263b50;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
  white-space: normal;
}

.shareholder-group-row td {
  background: #eaf2f7;
  color: #0a3160;
  font-weight: 850;
  text-transform: uppercase;
}

.shareholder-pnl-table td:first-child {
  font-weight: 800;
}

.shareholder-pnl-table .shareholder-pnl-cost td {
  color: #a52121;
}

.shareholder-pnl-table .shareholder-pnl-result td {
  background: #f4faf6;
  color: #00703c;
  font-weight: 850;
}

.shareholder-pnl-table .shareholder-pnl-final td {
  background: #0a3160;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.shareholder-grand-total {
  align-items: center;
  background: #f4faf6;
  border: 1px solid #b9d7c3;
  border-radius: 8px;
  color: #005d36;
  display: flex;
  font-weight: 850;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px 12px;
  text-transform: uppercase;
}

.shareholder-management-note {
  background: #f8fbfd;
  border: 1px solid #d8e0e7;
  border-radius: 8px;
  color: #23384f;
  font-size: 12px;
  line-height: 1.45;
  padding: 12px 14px;
}

.shareholder-management-note p {
  margin: 0 0 7px;
}

.shareholder-management-note p:last-child {
  margin-bottom: 0;
}

#shareholderView .group-row td,
.print-sheet.shareholder-print .shareholder-expense-table .group-row td {
  border-top: 9px solid #f4f7f8;
  padding-top: 9px;
}

#shareholderView .subtotal-row td,
.print-sheet.shareholder-print .shareholder-expense-table .subtotal-row td {
  border-bottom: 7px solid #f4f7f8;
}

.shareholder-table-green .shareholder-total-row td {
  background: #edf8f0;
  color: #006b3e;
}

.shareholder-table-teal .shareholder-total-row td {
  background: #ebf8f7;
  color: #007269;
}

.shareholder-table-purple .shareholder-total-row td {
  background: #f3edf8;
  color: #5d378c;
}

.shareholder-table-amber .shareholder-total-row td {
  background: #fff2dd;
  color: #d06000;
}

.shareholder-income-table th:nth-child(1) {
  width: 9%;
}

.shareholder-income-table th:nth-child(2) {
  width: 37%;
}

.shareholder-income-table th:nth-child(3),
.shareholder-income-table th:nth-child(4),
.shareholder-income-table th:nth-child(5) {
  width: 18%;
}

.shareholder-expense-table th:nth-child(1) {
  width: 8%;
}

.shareholder-expense-table th:nth-child(2) {
  width: 17%;
}

.shareholder-expense-table th:nth-child(3) {
  width: 22%;
}

.shareholder-expense-table th:nth-child(4),
.shareholder-expense-table th:nth-child(5) {
  width: 11%;
}

.shareholder-expense-table th:nth-child(6),
.shareholder-expense-table th:nth-child(7) {
  width: 15%;
}

.shareholder-reimbursement-table th:nth-child(1) {
  width: 10%;
}

.shareholder-reimbursement-table th:nth-child(2) {
  width: 16%;
}

.shareholder-reimbursement-table th:nth-child(3) {
  width: 34%;
}

.shareholder-reimbursement-table th:nth-child(4) {
  width: 14%;
}

.shareholder-reimbursement-table th:nth-child(5),
.shareholder-reimbursement-table th:nth-child(6) {
  width: 13%;
}

.shareholder-credit-table th:nth-child(1),
.shareholder-credit-table th:nth-child(2) {
  width: 12%;
}

.shareholder-credit-table th:nth-child(3) {
  width: 28%;
}

.shareholder-credit-table th:nth-child(4) {
  width: 24%;
}

.shareholder-credit-table th:nth-child(5),
.shareholder-credit-table th:nth-child(6) {
  width: 12%;
}

.shareholder-partner-table th:nth-child(1) {
  width: 50%;
}

.shareholder-partner-table th:nth-child(2),
.shareholder-partner-table th:nth-child(3) {
  width: 25%;
}

.shareholder-profit-summary-table th:nth-child(1) {
  width: 22%;
}

.shareholder-profit-summary-table th:nth-child(2) {
  width: 20%;
}

.shareholder-profit-summary-table th:nth-child(3) {
  width: 43%;
}

.shareholder-profit-summary-table th:nth-child(4) {
  width: 15%;
}

.shareholder-profit-summary-table th:nth-child(4),
.shareholder-profit-summary-table td:nth-child(4) {
  text-align: right;
  white-space: nowrap;
}

.shareholder-profit-card {
  align-items: center;
  background: #f7fbf8;
  border: 1px solid #d7e1ea;
  border-radius: 8px;
  display: grid;
  min-height: 160px;
  padding: 20px;
  text-align: center;
}

.shareholder-profit-card p {
  color: #0f2238;
  font-size: 12px;
  line-height: 1.35;
  margin: 0 0 10px;
}

.shareholder-profit-card strong {
  color: #007269;
  display: block;
  font-size: 26px;
  line-height: 1.1;
  margin: 6px 0;
}

.shareholder-profit-card span {
  color: #0f2238;
  font-size: 13px;
  margin-top: 4px;
}

.shareholder-profit-card span b {
  color: #007269;
}

.shareholder-profit-card small {
  color: #5d6875;
  display: block;
  font-size: 9.5px;
  line-height: 1.3;
  margin-top: 10px;
}

.shareholder-profit-red strong,
.shareholder-profit-red span b {
  color: #a42620;
}

.shareholder-product-analysis {
  border-color: #d4dde8;
}

.shareholder-final-page {
  break-inside: auto;
  page-break-inside: auto;
}

.print-sheet.shareholder-print .shareholder-product-analysis h2 {
  color: #0a3160;
  font-size: 21px;
  letter-spacing: 0;
  margin-bottom: 14px;
}

.shareholder-product-table {
  border: 1px solid #d7e1ea;
  border-collapse: separate;
  border-radius: 8px;
  border-spacing: 0;
  overflow: hidden;
  table-layout: fixed;
  width: 100%;
}

.shareholder-product-table th,
.shareholder-product-table td {
  border-bottom: 1px solid #d8e0e7;
  border-right: 1px solid #d8e0e7;
  color: #0f2238;
  font-size: 9px;
  line-height: 1.2;
  padding: 8px;
  text-align: center;
  vertical-align: middle;
}

.shareholder-product-table th {
  background: #0a3160;
  color: #fff;
  font-weight: 800;
}

.shareholder-product-table tr:last-child td {
  border-bottom: 0;
}

.shareholder-product-table th:last-child,
.shareholder-product-table td:last-child {
  border-right: 0;
}

.shareholder-product-table th:nth-child(1) {
  width: 17%;
}

.shareholder-product-table th:nth-child(2),
.shareholder-product-table th:nth-child(3),
.shareholder-product-table th:nth-child(4),
.shareholder-product-table th:nth-child(5) {
  width: 7.5%;
}

.shareholder-product-table th:nth-child(6),
.shareholder-product-table th:nth-child(7),
.shareholder-product-table th:nth-child(8) {
  width: 10.5%;
}

.shareholder-product-table th:nth-child(9) {
  width: 8%;
}

.shareholder-product-table th:nth-child(10) {
  width: 13.5%;
}

.shareholder-product-table .product-cell {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 56px 1fr;
  text-align: left;
}

.shareholder-product-table .product-cell img {
  display: block;
  height: 54px;
  object-fit: contain;
  width: 56px;
}

.shareholder-product-table .product-cell strong {
  color: #0b1930;
  display: block;
  font-size: 10.5px;
}

.shareholder-product-table .product-cell em {
  color: #5d6875;
  display: block;
  font-size: 8.5px;
  font-style: normal;
  margin-top: 2px;
}

.shareholder-product-table .num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.shareholder-product-table .margin-cell {
  color: #0a3160;
  font-weight: 800;
}

.shareholder-product-table .inventory-cell {
  color: #d65a00;
  font-weight: 800;
}

.shareholder-product-table .gifted-cell {
  color: #9b2f26;
  font-weight: 800;
}

.product-placeholder {
  align-items: center;
  background: #eef4f7;
  border: 1px solid #d7e1ea;
  border-radius: 6px;
  color: #6a7785;
  display: flex;
  font-weight: 800;
  height: 54px;
  justify-content: center;
  width: 56px;
}

.product-analysis-source {
  background: #fff8e8;
  border: 1px solid #ecd5a8;
  border-radius: 8px;
  color: #805a08;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
  padding: 8px 10px;
}

.product-analysis-panels {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.product-analysis-panel {
  border: 1px solid #d7e1ea;
  border-radius: 8px;
  padding: 12px;
}

.product-analysis-panel h3 {
  align-items: center;
  color: #0a3160;
  display: flex;
  font-size: 15px;
  gap: 8px;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.product-analysis-panel h3 .shareholder-icon {
  height: 24px;
  width: 24px;
}

.panel-pending {
  background: #fffaf5;
  border-color: #ecd5c3;
}

.panel-pending h3 {
  color: #d65a00;
}

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

.product-metric-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
}

.product-metric {
  background: #fff;
  border: 1px solid #d9e2eb;
  border-radius: 7px;
  min-width: 0;
  padding: 10px 8px;
  text-align: center;
}

.product-metric-icon {
  align-items: center;
  background: #0a3160;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  margin-bottom: 8px;
  width: 34px;
}

.product-metric-icon .shareholder-icon {
  height: 19px;
  width: 19px;
}

.product-metric span {
  color: #0a3160;
  display: block;
  font-size: 8.8px;
  font-weight: 800;
  line-height: 1.2;
  min-height: 30px;
}

.product-metric strong {
  color: #0a3160;
  display: block;
  font-size: 10.2px;
  line-height: 1.1;
  margin-top: 8px;
  max-width: 100%;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
}

.product-metric-orange {
  border-color: #f0d7c1;
}

.product-metric-orange .product-metric-icon {
  background: #d65a00;
}

.product-metric-orange span,
.product-metric-orange strong {
  color: #d65a00;
}

.product-metric-red {
  background: #fff7f6;
  border-color: #efc4bf;
}

.product-metric-red .product-metric-icon {
  background: #a42620;
}

.product-metric-red span,
.product-metric-red strong {
  color: #a42620;
}

.product-metric-green {
  background: #f3fbf7;
  border-color: #c5e3d1;
}

.product-metric-green .product-metric-icon {
  background: #16834f;
}

.product-metric-green span,
.product-metric-green strong {
  color: #0b6f45;
}

.product-analysis-note {
  align-items: center;
  background: #f6f8fa;
  border: 1px solid #d7e1ea;
  border-radius: 8px;
  color: #263b50;
  display: grid;
  font-size: 11px;
  gap: 10px;
  grid-template-columns: 30px 1fr;
  line-height: 1.35;
  margin-top: 12px;
  padding: 11px 14px;
}

.product-analysis-note .shareholder-icon {
  color: #0a3160;
  height: 24px;
  width: 24px;
}

.product-analysis-note p {
  margin: 0;
}

.shareholder-expense-chart-section {
  border-color: #cfdce8;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-sheet.shareholder-print .shareholder-expense-chart-section h2 {
  color: #0a3160;
  font-size: 18px;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.shareholder-expense-chart-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.shareholder-expense-chart-summary div {
  background: #f6f9fc;
  border: 1px solid #d4e0ea;
  border-radius: 7px;
  padding: 10px 12px;
}

.shareholder-expense-chart-summary span {
  color: #506174;
  display: block;
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.shareholder-expense-chart-summary strong {
  color: #0a3160;
  display: block;
  font-size: 17px;
  line-height: 1.1;
}

.shareholder-expense-chart {
  display: grid;
  align-items: stretch;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.shareholder-expense-chart-row {
  background: #fff;
  border: 1px solid #d8e2eb;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-rows: auto 1fr;
  min-height: 242px;
  padding: 12px;
}

.shareholder-expense-chart-label strong {
  color: #0a3160;
  display: block;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
}

.shareholder-expense-chart-label span {
  color: #667486;
  display: block;
  font-size: 8.5px;
  margin-top: 4px;
}

.shareholder-expense-chart-bars {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shareholder-expense-chart-metric {
  display: grid;
  gap: 7px;
  grid-template-rows: 142px auto;
  min-width: 0;
}

.shareholder-expense-chart-top {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 36px;
  text-align: center;
}

.shareholder-expense-chart-top span {
  color: #657284;
  font-size: 8.5px;
  font-weight: 800;
}

.shareholder-expense-chart-top strong {
  color: #0f2238;
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
}

.shareholder-expense-chart-track {
  align-items: end;
  background: #eaf0f5;
  border-radius: 8px 8px 4px 4px;
  display: flex;
  height: 142px;
  overflow: hidden;
  width: 100%;
}

.shareholder-expense-chart-track i {
  background: #0a3160;
  border-radius: 8px 8px 0 0;
  display: block;
  width: 100%;
}

.shareholder-expense-chart-green .shareholder-expense-chart-track i {
  background: #006b3e;
}

.shareholder-expense-chart-teal .shareholder-expense-chart-track i {
  background: #007269;
}

.shareholder-expense-chart-amber .shareholder-expense-chart-track i {
  background: #df7a00;
}

.shareholder-expense-chart-purple .shareholder-expense-chart-track i {
  background: #5d378c;
}

.shareholder-expense-chart-usd .shareholder-expense-chart-track i {
  opacity: 0.72;
}

.shareholder-expense-chart-note {
  color: #4f5e70;
  font-size: 9.5px;
  line-height: 1.35;
  margin: 10px 0 0;
}

.home-expense-chart-screen {
  padding: 4px 0;
}

.home-expense-chart {
  display: grid;
  gap: 14px;
}

.home-expense-chart-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-expense-chart-summary div {
  background: #f7fafc;
  border: 1px solid #d6e0e9;
  border-radius: 8px;
  padding: 12px 14px;
}

.home-expense-chart-summary span {
  color: #506174;
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.home-expense-chart-summary strong {
  color: #0a3160;
  display: block;
  font-size: 18px;
  line-height: 1.15;
}

.home-expense-chart-highlight {
  background: #f3fbf4 !important;
  border-color: #bdd9c7 !important;
}

.home-expense-chart-highlight strong {
  color: #0a6e3b;
}

.home-expense-bars {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.home-expense-bar {
  background: #fff;
  border: 1px solid #d8e2eb;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  grid-template-rows: 170px auto auto auto;
  min-width: 0;
  padding: 10px;
  text-align: center;
}

.home-expense-bar.is-highest {
  background: #f4fbf6;
  border-color: #9ecfb0;
  box-shadow: inset 0 0 0 1px rgba(10, 110, 59, 0.08);
}

.home-expense-bar-track {
  align-items: end;
  background: #eaf0f5;
  border-radius: 8px 8px 4px 4px;
  display: flex;
  height: 170px;
  overflow: hidden;
  width: 100%;
}

.home-expense-bar-track i {
  background: #0a3160;
  border-radius: 8px 8px 0 0;
  display: block;
  width: 100%;
}

.home-expense-bar.is-highest .home-expense-bar-track i {
  background: #0a6e3b;
}

.home-expense-bar strong {
  color: #0a3160;
  display: block;
  font-size: 10.5px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.home-expense-bar span {
  color: #0f2238;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.home-expense-bar small {
  color: #5d6d7e;
  font-size: 9.5px;
  line-height: 1.25;
}

.home-expense-chart-note,
.home-expense-chart-empty {
  color: #4f5e70;
  font-size: 10px;
  line-height: 1.35;
  margin: 0;
}

.home-expense-chart-empty {
  background: #f7fafc;
  border: 1px dashed #b9c8d6;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}

.home-expense-final-charts {
  display: grid;
  gap: 14px;
}

.home-expense-chart-block {
  background: #fff;
  border: 1px solid #d8e2eb;
  border-radius: 8px;
  break-inside: avoid;
  page-break-inside: avoid;
  padding: 12px;
}

.home-expense-chart-block h3 {
  align-items: center;
  color: #0a3160;
  display: flex;
  font-size: 13px;
  gap: 8px;
  line-height: 1.2;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.home-expense-chart-block h3 .shareholder-icon {
  height: 18px;
  width: 18px;
}

.home-expense-payer-chart-block h3 {
  color: #006b3e;
}

#shareholderView .home-expense-type-title td,
.print-sheet.shareholder-home-print .home-expense-type-title td {
  color: #a42620 !important;
  font-weight: 900;
}

.shareholder-footer {
  align-items: center;
  background: #0a3160;
  color: #fff;
  display: grid;
  font-size: 11px;
  gap: 12px;
  grid-template-columns: 1fr 1.4fr 1.4fr;
  padding: 12px 28px;
  text-align: center;
}

.shareholder-footer strong {
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .shareholder-header,
  .shareholder-kpi-grid,
  .shareholder-two-col,
  .shareholder-three-col,
  .shareholder-footer {
    grid-template-columns: 1fr;
  }

  .product-analysis-panels {
    grid-template-columns: 1fr;
  }

  .shareholder-expense-chart-summary,
  .shareholder-expense-chart {
    grid-template-columns: 1fr;
  }

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

  .shareholder-brand {
    border-right: 0;
    padding-right: 0;
  }
}

.production-module-header { border-top: 4px solid #0c5262; }
.production-module-tabs,
.production-order-detail-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0; border-bottom: 1px solid #cddbe2; }
.production-module-tabs button,
.production-order-detail-tabs button { border: 0; border-radius: 4px 4px 0 0; background: transparent; color: #284354; font-weight: 700; white-space: nowrap; padding: 10px 14px; }
.production-module-tabs button.active,
.production-order-detail-tabs button.active { background: #123b55; color: #fff; }
.production-module-view,
.production-order-tab-panel { display: none; }
.production-module-view.active,
.production-order-tab-panel.active { display: block; }
.production-order-editor { border: 1px solid #9ab7c5; box-shadow: 0 8px 28px rgba(19, 58, 77, .1); }
.production-order-editor[hidden] { display: none; }
.production-order-header-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.production-order-detail-tabs { margin: 18px 0 12px; }
.production-order-tab-panel { min-height: 150px; padding: 10px 0; }
.production-lot-allocation-list { display: grid; gap: 10px; }
.production-allocation-card { border: 1px solid #d5e0e5; border-radius: 6px; padding: 10px 12px; background: #fff; }
.production-allocation-card h4 { margin: 0 0 8px; color: #123b55; }
.production-allocation-card > div { display: grid; grid-template-columns: 1fr 2fr 1.1fr 1.1fr; gap: 12px; padding: 7px 0; border-top: 1px solid #e6edf0; }
.production-allocation-card footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #d5e0e5; color: #123b55; }
.production-order-actions { position: sticky; bottom: 0; z-index: 5; background: rgba(255,255,255,.96); border-top: 1px solid #d5e0e5; padding: 12px 0 4px; }
.production-order-actions .danger { color: #9b2828; border-color: #d6a4a4; }
.history-timeline { display: grid; gap: 8px; }
.history-timeline article { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 4px 16px; padding: 10px 12px; border-left: 3px solid #0c5262; background: #f5f9fa; }
.history-timeline article p { grid-column: 1 / -1; margin: 0; color: #516672; }
.document-drop-field { display: block; border: 1px dashed #89aab8; padding: 18px; background: #f5f9fa; }
.warning-text { color: #a33b2e; font-weight: 700; }

@media (max-width: 900px) {
  .production-order-header-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-allocation-card > div { grid-template-columns: 1fr; gap: 3px; }
}

@media (max-width: 560px) {
  .production-order-header-grid { grid-template-columns: 1fr; }
  .production-order-actions { position: static; }
}

@media print {
  .print-sheet.shareholder-print {
    border: 0;
    border-radius: 0;
  }

  .print-sheet.shareholder-print .shareholder-table {
    break-before: avoid;
    break-inside: auto;
    page-break-before: avoid;
    page-break-inside: auto;
  }

  .print-sheet.shareholder-print .shareholder-table thead {
    display: table-header-group;
  }

  .print-sheet.shareholder-print .shareholder-table tbody {
    break-inside: auto;
    page-break-inside: auto;
  }

  .print-sheet.shareholder-print .shareholder-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-sheet.shareholder-print .shareholder-table .group-row {
    break-after: avoid;
    page-break-after: avoid;
  }

  .print-sheet.shareholder-print .shareholder-table .subtotal-row,
  .print-sheet.shareholder-print .shareholder-table .shareholder-total-row {
    break-before: avoid;
    break-inside: avoid;
    page-break-before: avoid;
    page-break-inside: avoid;
  }

  .shareholder-final-page {
    break-before: auto;
    break-inside: auto;
    page-break-before: auto;
    page-break-inside: auto;
  }

  .shareholder-final-page .shareholder-section {
    break-inside: avoid;
    margin-bottom: 8px;
    page-break-inside: avoid;
    padding: 10px;
  }

  .shareholder-header {
    grid-template-columns: 1fr 1.2fr 1fr;
    padding: 18px 22px 16px;
  }

  .shareholder-brand-text strong {
    font-size: 34px;
  }

  .shareholder-title h1 {
    font-size: 31px;
  }

  .shareholder-meta {
    font-size: 11.5px;
  }

  .shareholder-body {
    padding: 14px;
  }

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

  .shareholder-two-col {
    grid-template-columns: 1fr;
  }

  .shareholder-three-col {
    grid-template-columns: 1fr;
  }

  .shareholder-kpi {
    min-height: 96px;
    padding: 9px 5px;
  }

  .shareholder-kpi-icon {
    height: 34px;
    width: 34px;
  }

  .shareholder-kpi-icon .shareholder-icon {
    height: 19px;
    width: 19px;
  }

  .shareholder-kpi span {
    font-size: 8.8px;
    min-height: 22px;
  }

  .shareholder-kpi strong {
    font-size: 13px;
  }

  .print-sheet.shareholder-print .shareholder-table th,
  .print-sheet.shareholder-print .shareholder-table td {
    font-size: 8.2px;
    padding: 4px 5px;
  }

  .print-sheet.shareholder-print .shareholder-table .num {
    font-size: 8px;
  }

  .print-sheet.shareholder-print .shareholder-profit-summary-table th,
  .print-sheet.shareholder-print .shareholder-profit-summary-table td {
    font-size: 8px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .print-sheet.shareholder-print .shareholder-profit-summary-table th:nth-child(4),
  .print-sheet.shareholder-print .shareholder-profit-summary-table td:nth-child(4) {
    min-width: 54px;
  }

  .print-sheet.shareholder-print .shareholder-product-analysis h2 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .print-sheet.shareholder-print .shareholder-expense-chart-section h2 {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .shareholder-expense-chart {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .shareholder-expense-chart-row {
    gap: 6px;
    min-height: 186px;
    padding: 7px;
  }

  .shareholder-expense-chart-metric {
    grid-template-rows: 96px auto;
  }

  .shareholder-expense-chart-track {
    height: 96px;
  }

  .shareholder-expense-chart-summary strong {
    font-size: 15px;
  }

  .shareholder-expense-chart-label strong {
    font-size: 9.5px;
  }

  .shareholder-expense-chart-top strong {
    font-size: 8.6px;
  }

  .shareholder-home-print .shareholder-section-green {
    break-before: page;
    break-inside: avoid;
    margin-bottom: 0;
    page-break-before: always;
    page-break-inside: avoid;
    padding: 8px;
  }

  .shareholder-home-print .shareholder-section-green .home-expense-chart {
    break-inside: avoid;
    gap: 8px;
    page-break-inside: avoid;
  }

  .shareholder-home-print .home-expense-final-charts {
    gap: 8px;
  }

  .shareholder-home-print .home-expense-chart-block {
    padding: 7px;
  }

  .shareholder-home-print .home-expense-chart-block h3 {
    font-size: 9.5px;
    margin-bottom: 6px;
  }

  .shareholder-home-print .home-expense-chart-block h3 .shareholder-icon {
    height: 14px;
    width: 14px;
  }

  .home-expense-chart-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .home-expense-chart-summary div {
    padding: 6px 8px;
  }

  .home-expense-chart-summary span {
    font-size: 7.4px;
  }

  .home-expense-chart-summary strong {
    font-size: 10.5px;
  }

  .home-expense-bars {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .home-expense-bar {
    gap: 4px;
    grid-template-rows: 76px auto auto auto;
    padding: 5px;
  }

  .home-expense-bar-track {
    height: 76px;
  }

  .home-expense-bar strong {
    font-size: 7px;
    line-height: 1.12;
  }

  .home-expense-bar span {
    font-size: 7.8px;
  }

  .home-expense-bar small,
  .home-expense-chart-note {
    font-size: 6.8px;
  }

  .shareholder-product-table th,
  .shareholder-product-table td {
    font-size: 7.5px;
    padding: 5px;
  }

  .shareholder-product-table .product-cell {
    gap: 6px;
    grid-template-columns: 42px 1fr;
  }

  .shareholder-product-table .product-cell img {
    height: 40px;
    width: 42px;
  }

  .shareholder-product-table .product-cell strong {
    font-size: 8.5px;
  }

  .shareholder-product-table .product-cell em {
    font-size: 7px;
  }

  .product-analysis-panels {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    margin-top: 8px;
  }

  .product-metric-grid {
    gap: 6px;
  }

  .product-metric-grid-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-analysis-panel {
    padding: 8px;
  }

  .product-analysis-panel h3 {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .product-metric {
    padding: 7px 5px;
  }

  .product-metric-icon {
    height: 28px;
    margin-bottom: 6px;
    width: 28px;
  }

  .product-metric-icon .shareholder-icon {
    height: 16px;
    width: 16px;
  }

  .product-metric span {
    font-size: 7.5px;
    min-height: 26px;
  }

  .product-metric strong {
    font-size: 8.2px;
    line-height: 1.15;
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: keep-all;
  }

  .product-analysis-note {
    font-size: 8.5px;
    margin-top: 8px;
    padding: 7px 9px;
  }
}

.danger-zone button {
  border-color: #dfb1ad;
  color: var(--red);
  font-weight: 700;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: min(920px, 94vw);
  padding: 0;
}

dialog::backdrop {
  background: rgba(15, 27, 35, 0.52);
}

.dialog-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

#receiptImage {
  display: block;
  max-height: 78vh;
  max-width: 100%;
  object-fit: contain;
}

#receiptFrame {
  border: 0;
  display: block;
  height: 78vh;
  width: min(900px, 92vw);
}

.reimbursement-detail-dialog {
  width: min(1080px, 96vw);
}

.reimbursement-detail-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.reimbursement-detail-summary {
  background: #eef3f5;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.reimbursement-detail-summary strong {
  font-size: 16px;
}

.reimbursement-detail-table {
  min-width: 980px;
}

.reimbursement-detail-table th,
.reimbursement-detail-table td {
  vertical-align: top;
}

#toast {
  background: var(--ink);
  border-radius: 8px;
  bottom: 18px;
  color: #fff;
  left: 50%;
  min-width: 240px;
  opacity: 0;
  padding: 11px 14px;
  pointer-events: none;
  position: fixed;
  text-align: center;
  transform: translate(-50%, 18px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 50;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1200px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .two-column,
  .report-grid,
  .daily-grid,
  .backup-grid {
    grid-template-columns: 1fr;
  }

  .wide-panel {
    grid-column: auto;
  }

  .daily-movements-panel {
    grid-row: auto;
  }

  .no-fiscal-line-grid,
  .no-fiscal-totals,
  .card-report-controls,
  .expense-report-range-controls,
  .no-fiscal-statement-filters,
  .no-fiscal-statement-panel .compact-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 10px;
  }

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

  .period-control {
    width: 100%;
  }

  #expenseSummary,
  .summary-grid,
  .expense-filter-grid,
  .expense-filter-totals,
  .card-report-controls,
  .expense-report-range-controls,
  .card-expense-report-panel .expense-filter-totals,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    gap: 6px;
  }

  .tab {
    min-width: 96px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 26px;
  }

  .metric .value {
    font-size: 18px;
  }

  .inventory-detail-card {
    grid-template-columns: 1fr;
  }

  .inventory-detail-photo {
    min-height: 180px;
  }

  .inventory-detail-info dl {
    grid-template-columns: 1fr;
  }

  .no-fiscal-line-grid,
  .no-fiscal-totals,
  .no-fiscal-statement-filters,
  .no-fiscal-statement-panel .compact-summary {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  html,
  body {
    height: auto !important;
  }

  body {
    background: #fff;
  }

  body.printing .topbar,
  body.printing .tabs,
  body.printing main,
  body.printing dialog,
  body.printing #toast {
    display: none !important;
  }

  body.printing .app-shell {
    margin: 0;
    padding: 0;
    width: 100%;
  }

  body.printing .print-area {
    display: block;
    height: auto;
    overflow: visible;
    width: 100%;
  }

  body.printing .print-area > * {
    box-sizing: border-box;
    max-width: 100%;
  }

  body.printing .corporate-document:not(.purchase-order-document):not(.price-list-document) {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
  }

  body.printing .corporate-document .document-panel {
    max-width: 100%;
    overflow: visible;
  }

  body.printing .corporate-document .document-panel table {
    border-collapse: collapse;
    font-size: 8.5px;
    table-layout: auto;
    width: 100%;
  }

  body.printing .corporate-document .document-panel th,
  body.printing .corporate-document .document-panel td {
    overflow: visible;
    overflow-wrap: anywhere;
    padding: 5px 4px;
    text-overflow: clip;
    white-space: normal;
    word-break: normal;
  }

  body.printing .corporate-document .document-panel tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.printing .purchase-account-document .document-panel table {
    font-size: 7.4px;
    table-layout: fixed;
  }

  body.printing .purchase-account-document .document-panel th,
  body.printing .purchase-account-document .document-panel td {
    font-size: 7.4px;
    line-height: 1.15;
    overflow-wrap: normal;
    padding: 3px 2px;
    word-break: normal;
  }

  body.printing .purchase-account-document .document-panel th:nth-child(1) { width: 12%; }
  body.printing .purchase-account-document .document-panel th:nth-child(2) { width: 9%; }
  body.printing .purchase-account-document .document-panel th:nth-child(3) { width: 8%; }
  body.printing .purchase-account-document .document-panel th:nth-child(4) { width: 10%; }
  body.printing .purchase-account-document .document-panel th:nth-child(5) { width: 13%; }
  body.printing .purchase-account-document .document-panel th:nth-child(6),
  body.printing .purchase-account-document .document-panel th:nth-child(7),
  body.printing .purchase-account-document .document-panel th:nth-child(8) { width: 10%; }
  body.printing .purchase-account-document .document-panel th:nth-child(9) { width: 9%; }
  body.printing .purchase-account-document .document-panel th:nth-child(10) { width: 4%; }
  body.printing .purchase-account-document .document-panel th:nth-child(11) { width: 5%; }

  body.printing .purchase-account-document .document-panel th:nth-child(2),
  body.printing .purchase-account-document .document-panel td:nth-child(2),
  body.printing .purchase-account-document .document-panel th:nth-child(3),
  body.printing .purchase-account-document .document-panel td:nth-child(3),
  body.printing .purchase-account-document .document-panel th:nth-child(4),
  body.printing .purchase-account-document .document-panel td:nth-child(4),
  body.printing .purchase-account-document .document-panel th:nth-child(6),
  body.printing .purchase-account-document .document-panel td:nth-child(6),
  body.printing .purchase-account-document .document-panel th:nth-child(7),
  body.printing .purchase-account-document .document-panel td:nth-child(7),
  body.printing .purchase-account-document .document-panel th:nth-child(8),
  body.printing .purchase-account-document .document-panel td:nth-child(8),
  body.printing .purchase-account-document .document-panel th:nth-child(9),
  body.printing .purchase-account-document .document-panel td:nth-child(9),
  body.printing .purchase-account-document .document-panel th:nth-child(10),
  body.printing .purchase-account-document .document-panel td:nth-child(10),
  body.printing .purchase-account-document .document-panel th:nth-child(11),
  body.printing .purchase-account-document .document-panel td:nth-child(11) {
    white-space: nowrap;
  }

  body.printing .purchase-account-document .purchase-account-filtered-table {
    font-size: 8.6px;
    table-layout: auto;
  }

  body.printing .purchase-account-document .purchase-account-filtered-table th,
  body.printing .purchase-account-document .purchase-account-filtered-table td {
    font-size: 8.6px;
    white-space: nowrap;
    width: auto !important;
  }

  .print-sheet.no-fiscal-print {
    border: 0;
    border-radius: 0;
    break-after: avoid;
    box-shadow: none;
    height: auto;
    margin: 0;
    min-height: auto;
    page-break-after: avoid;
    padding: 12px 20px 8px;
  }

  .document-header {
    gap: 18px;
    grid-template-columns: 1fr 310px;
    margin-bottom: 10px;
  }

  .document-brand strong {
    font-size: 34px;
    letter-spacing: 2.5px;
  }

  .document-brand span {
    font-size: 10px;
    letter-spacing: 5px;
  }

  .document-brand::after,
  .document-title-block::after {
    margin-top: 7px;
    width: 54px;
  }

  .document-title-block h1 {
    font-size: 21px;
    margin-bottom: 8px;
  }

  .document-title-block dl {
    gap: 3px 9px;
    grid-template-columns: 92px 1fr;
  }

  .document-title-block dt,
  .document-title-block dd {
    font-size: 9.6px;
  }

  .document-footer {
    margin-top: 10px;
    padding-top: 8px;
  }

  .document-footer-company h2 {
    font-size: 12px;
    margin-bottom: 5px;
  }

  .document-footer-company p,
  .document-footer-note p {
    font-size: 9px;
  }

  .no-fiscal-top-bar,
  .no-fiscal-bottom-bar {
    height: 9px;
    margin-left: -20px;
    margin-right: -20px;
  }

  .no-fiscal-bottom-bar {
    display: none;
  }

  .no-fiscal-header {
    gap: 16px;
    grid-template-columns: 1fr 300px;
    padding: 12px 0 9px;
  }

  .no-fiscal-logo {
    min-width: 180px;
    padding: 10px 14px 9px;
  }

  .no-fiscal-logo strong {
    font-size: 22px;
  }

  .print-sheet.no-fiscal-print .no-fiscal-header h1 {
    font-size: 16px;
    margin: 8px 0 4px;
  }

  .no-fiscal-title-card {
    padding: 10px 12px;
  }

  .no-fiscal-title-card h2 {
    font-size: 24px;
  }

  .no-fiscal-title-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .no-fiscal-warning {
    margin: 4px 0 8px;
    padding: 5px;
  }

  .no-fiscal-client {
    padding: 6px 8px;
  }

  .print-sheet.no-fiscal-print .no-fiscal-detail td {
    height: 20px;
    padding: 5px 6px;
  }

  .print-sheet.no-fiscal-print .no-fiscal-detail th {
    padding: 5px 6px;
  }

  .no-fiscal-signatures {
    margin: 14px 0 10px;
  }

  .no-fiscal-note {
    padding: 5px 7px;
  }

  .no-fiscal-note p {
    margin-top: 3px;
  }

  .print-sheet.no-fiscal-print footer {
    font-size: 9px;
    margin-top: 2px;
  }

  .print-sheet.no-fiscal-statement-print {
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }

  .statement-page {
    min-height: 7.55in;
    padding: 8px 0 10px;
  }

  .print-sheet.no-fiscal-statement-print .statement-header,
  .print-sheet.no-fiscal-statement-print .statement-summary,
  .print-sheet.no-fiscal-statement-print .statement-footer {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-sheet.no-fiscal-statement-print .statement-table {
    page-break-inside: auto;
  }

  .print-sheet.no-fiscal-statement-print .statement-table thead {
    display: table-header-group;
  }

  .print-sheet.no-fiscal-statement-print .statement-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-sheet.enterprise-dashboard-print {
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 10px 14px;
  }

  .enterprise-dashboard-print .document-header,
  .enterprise-dashboard-print .document-footer,
  .enterprise-dashboard-print .enterprise-print-kpis,
  .enterprise-dashboard-print .enterprise-chart-card,
  .enterprise-dashboard-print .enterprise-executive-summary {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .enterprise-dashboard-print .enterprise-print-kpis {
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 10px 0;
  }

  .enterprise-dashboard-print .enterprise-kpi-card {
    gap: 8px;
    grid-template-columns: 30px 1fr;
    padding: 8px;
  }

  .enterprise-dashboard-print .enterprise-kpi-icon {
    height: 28px;
    width: 28px;
  }

  .enterprise-dashboard-print .enterprise-kpi-icon svg {
    height: 16px;
    width: 16px;
  }

  .enterprise-dashboard-print .enterprise-kpi-card span {
    font-size: 8.5px;
    margin-bottom: 3px;
  }

  .enterprise-dashboard-print .enterprise-kpi-card strong {
    font-size: 13px;
  }

  .enterprise-dashboard-print .enterprise-kpi-card small {
    font-size: 7.8px;
    margin-top: 4px;
  }

  .enterprise-dashboard-print .enterprise-print-grid {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enterprise-dashboard-print .enterprise-chart-card,
  .enterprise-dashboard-print .enterprise-executive-summary {
    padding: 9px;
  }

  .enterprise-dashboard-print .enterprise-chart-title {
    margin-bottom: 5px;
  }

  .enterprise-dashboard-print .enterprise-chart-title h3 {
    font-size: 10.5px;
  }

  .enterprise-dashboard-print .enterprise-chart-title span {
    font-size: 8px;
  }

  .enterprise-dashboard-print .enterprise-svg-chart {
    max-height: 190px;
  }

  .enterprise-dashboard-print .enterprise-pie-layout {
    gap: 5px;
    grid-template-columns: minmax(120px, 0.9fr) minmax(120px, 1fr);
  }

  .enterprise-dashboard-print .enterprise-pie-chart {
    max-height: 165px;
  }

  .enterprise-dashboard-print .enterprise-pie-legend {
    gap: 5px;
  }

  .enterprise-dashboard-print .enterprise-pie-legend strong,
  .enterprise-dashboard-print .enterprise-pie-legend em,
  .enterprise-dashboard-print .enterprise-summary-item strong,
  .enterprise-dashboard-print .enterprise-summary-item span {
    font-size: 8.5px;
  }

  .enterprise-dashboard-print .enterprise-summary-item {
    gap: 4px;
    padding: 5px 0;
  }

  .enterprise-dashboard-print .enterprise-summary-item em {
    font-size: 10.5px;
  }

  .enterprise-dashboard-print .enterprise-print-operations {
    gap: 7px;
    margin-top: 8px;
  }

  .enterprise-dashboard-print .enterprise-print-section,
  .enterprise-dashboard-print .enterprise-print-two-columns,
  .enterprise-dashboard-print .enterprise-project-card,
  .enterprise-dashboard-print .enterprise-ranking-row,
  .enterprise-dashboard-print .enterprise-mini-metric,
  .enterprise-dashboard-print .enterprise-flow-step,
  .enterprise-dashboard-print .enterprise-alert {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .enterprise-dashboard-print .enterprise-print-section {
    padding: 7px;
  }

  .enterprise-dashboard-print .enterprise-print-two-columns {
    gap: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enterprise-dashboard-print .enterprise-company-bar {
    gap: 6px;
    grid-template-columns: minmax(100px, 1fr) minmax(95px, 1.5fr) 42px 80px;
    padding: 5px 7px;
  }

  .enterprise-dashboard-print .enterprise-company-bar span,
  .enterprise-dashboard-print .enterprise-company-bar strong,
  .enterprise-dashboard-print .enterprise-company-bar em,
  .enterprise-dashboard-print .enterprise-mini-metric span,
  .enterprise-dashboard-print .enterprise-flow-step span,
  .enterprise-dashboard-print .enterprise-alert strong,
  .enterprise-dashboard-print .enterprise-alert em,
  .enterprise-dashboard-print .enterprise-ranking-row strong,
  .enterprise-dashboard-print .enterprise-ranking-row em,
  .enterprise-dashboard-print .enterprise-ranking-row b {
    font-size: 7.4px;
  }

  .enterprise-dashboard-print .enterprise-project-cards {
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enterprise-dashboard-print .enterprise-project-card {
    gap: 6px;
    padding: 7px;
  }

  .enterprise-dashboard-print .enterprise-project-card button {
    display: none;
  }

  .enterprise-dashboard-print .enterprise-project-card-head strong {
    font-size: 8.8px;
  }

  .enterprise-dashboard-print .enterprise-project-card-head span,
  .enterprise-dashboard-print .enterprise-project-status,
  .enterprise-dashboard-print .enterprise-project-metrics span,
  .enterprise-dashboard-print .enterprise-project-progress span,
  .enterprise-dashboard-print .enterprise-project-progress strong {
    font-size: 6.8px;
  }

  .enterprise-dashboard-print .enterprise-project-metrics {
    gap: 4px;
  }

  .enterprise-dashboard-print .enterprise-project-metrics div,
  .enterprise-dashboard-print .enterprise-mini-metric,
  .enterprise-dashboard-print .enterprise-flow-step,
  .enterprise-dashboard-print .enterprise-alert,
  .enterprise-dashboard-print .enterprise-ranking-row {
    padding: 5px;
  }

  .enterprise-dashboard-print .enterprise-project-metrics strong,
  .enterprise-dashboard-print .enterprise-mini-metric strong,
  .enterprise-dashboard-print .enterprise-flow-step strong {
    font-size: 8px;
  }

  .enterprise-dashboard-print .enterprise-money-flow {
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enterprise-dashboard-print .enterprise-ranking-row {
    gap: 4px;
    grid-template-columns: minmax(88px, 1fr) repeat(4, auto);
  }

  .enterprise-dashboard-print .enterprise-summary-table th,
  .enterprise-dashboard-print .enterprise-summary-table td {
    font-size: 7.4px;
    padding: 4px 5px;
  }

  .enterprise-dashboard-print .enterprise-print-details {
    break-before: page;
    page-break-before: always;
    margin-top: 0;
  }

  .enterprise-dashboard-print .enterprise-detail-heading,
  .enterprise-dashboard-print .enterprise-print-detail-block h3,
  .enterprise-dashboard-print .enterprise-print-detail-table thead,
  .enterprise-dashboard-print .enterprise-print-detail-table tfoot,
  .enterprise-dashboard-print .enterprise-print-result {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .enterprise-dashboard-print .enterprise-print-detail-table thead {
    display: table-header-group;
  }

  .enterprise-dashboard-print .enterprise-print-detail-table tfoot {
    display: table-footer-group;
  }

  .enterprise-dashboard-print .enterprise-print-detail-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .enterprise-dashboard-print .enterprise-expense-group-row,
  .enterprise-dashboard-print .enterprise-expense-subtotal-row,
  .enterprise-dashboard-print .enterprise-project-summary-row,
  .enterprise-dashboard-print .enterprise-project-metric-row,
  .enterprise-dashboard-print .enterprise-project-subhead-row,
  .enterprise-dashboard-print .enterprise-project-total-row,
  .enterprise-dashboard-print .enterprise-payer-summary-block,
  .enterprise-dashboard-print .enterprise-reimbursement-summary-block {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .enterprise-dashboard-print .enterprise-print-detail-table th,
  .enterprise-dashboard-print .enterprise-print-detail-table td {
    font-size: 7.8px;
    padding: 4px 5px;
  }

  .enterprise-dashboard-print .enterprise-print-detail-block {
    margin-top: 12px;
  }

  .enterprise-dashboard-print .enterprise-print-result {
    padding: 9px 12px;
  }

  .project-shareholder-print {
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 10px 14px;
  }

  .project-shareholder-print .document-header,
  .project-shareholder-print .document-footer,
  .project-summary-intro,
  .project-summary-metrics,
  .project-summary-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .project-summary-intro {
    gap: 12px;
    grid-template-columns: 1fr 330px;
    margin: 8px 0 9px;
    padding: 9px 11px;
  }

  .project-summary-intro h2 {
    font-size: 16px;
  }

  .project-summary-intro dt,
  .project-summary-intro dd,
  .project-summary-intro p {
    font-size: 8.8px;
  }

  .project-summary-metrics {
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 8px 0 9px;
  }

  .project-summary-metric {
    gap: 7px;
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 56px;
    padding: 7px;
  }

  .project-summary-metric .statement-metric-icon {
    height: 28px;
    width: 28px;
  }

  .project-summary-metric .statement-metric-icon svg {
    height: 16px;
    width: 16px;
  }

  .project-summary-metric span,
  .project-summary-metric small {
    font-size: 7.5px;
  }

  .project-summary-metric strong {
    font-size: 11.6px;
    margin: 3px 0 2px;
  }

  .project-summary-two-columns {
    gap: 8px;
    grid-template-columns: minmax(0, 1.15fr) minmax(230px, 0.85fr);
    margin: 8px 0;
  }

  .project-summary-card,
  .project-summary-section {
    padding: 8px 9px;
  }

  .project-summary-card h3,
  .project-summary-section h3 {
    font-size: 10.4px;
    margin-bottom: 6px;
  }

  .project-shareholder-print .project-chart-legend {
    font-size: 8px;
    gap: 10px;
  }

  .project-shareholder-print .project-evolution-svg {
    max-height: 165px;
  }

  .project-summary-section {
    break-inside: auto;
    margin-top: 8px;
    page-break-inside: auto;
  }

  .project-summary-table thead {
    display: table-header-group;
  }

  .project-summary-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .project-summary-table th,
  .project-summary-table td {
    font-size: 7.4px;
    padding: 3.8px 4.5px;
  }

  .project-summary-note {
    font-size: 8px;
    margin-top: 6px;
  }

  .statement-page-number {
    display: block;
    position: static;
  }
}
.project-module-header,
.project-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.project-module-header h2,
.project-detail-heading h2 { margin: 0; color: #102a43; }

.project-filter-heading { align-items: end; }

.project-check-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.project-check-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d8e2ea;
  background: #f8fafc;
}

.project-check-list input { width: auto; }

.project-settlement-summary {
  margin-top: 14px;
  padding: 14px;
  border-left: 4px solid #0f766e;
  background: #f0fdfa;
  line-height: 1.8;
}

.project-dispatch-footer { margin-top: 14px; }

.project-title-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.project-title-row h2 { font-size: 28px; }
.project-header-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; color: #52606d; font-size: 13px; }
.project-header-meta span { display: inline-flex; gap: 5px; }
.project-executive-card { min-height: 112px; border-top: 3px solid #0f4c5c; }
.summary-card { display: grid; align-content: center; gap: 7px; min-width: 0; padding: 15px; border: 1px solid #d7e0e5; border-radius: 7px; background: #fff; box-shadow: 0 3px 12px rgba(15,50,74,.05); }
.summary-card > span { color: #52606d; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.summary-card > strong { color: #102a43; line-height: 1.15; overflow-wrap: normal; }
#openProjectDetailSummary { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.project-executive-card strong { font-size: 16px; white-space: nowrap; }
.project-executive-card small { color: #68747d; font-size: 11px; }

.project-detail-tabs { display: flex; gap: 4px; margin: 20px 0 14px; overflow-x: auto; border-bottom: 1px solid #d7e0e5; }
.project-detail-tab { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #34495e; padding: 12px 18px; white-space: nowrap; }
.project-detail-tab.active { border-bottom-color: #0f7c8c; color: #0f4c5c; font-weight: 800; }
.project-detail-panel { display: none; }
.project-detail-panel.active { display: block; }

.project-summary-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .9fr) minmax(240px, .65fr); gap: 14px; }
.project-chart-card { grid-column: span 1; }
.project-recent-card { grid-column: 1 / span 2; }
.project-finance-card { grid-column: 3; }
.project-chart-card, .project-payment-card, .project-progress-card, .project-recent-card, .project-finance-card { margin: 0; }

.project-evolution-svg { display: block; width: 100%; min-height: 245px; }
.project-chart-axis { stroke: #cbd5df; stroke-width: 1; }
.project-line-sale, .project-line-cost, .project-line-profit { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.project-line-sale { stroke: #1677e8; }
.project-line-cost { stroke: #d64545; }
.project-line-profit { stroke: #16854c; }
.project-point-sale { fill: #1677e8; }.project-point-cost { fill: #d64545; }.project-point-profit { fill: #16854c; }
.project-chart-date { fill: #68747d; font-size: 11px; }
.project-chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 4px; font-size: 11px; }
.project-chart-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.project-chart-legend .sale::before { background: #1677e8; }
.project-chart-legend .cost::before { background: #d64545; }
.project-chart-legend .profit::before { background: #16854c; }

.project-payment-visual { display: grid; justify-items: center; gap: 18px; }
.project-payment-donut { width: 190px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(#1677e8 0 var(--credit), #14a9b8 var(--credit) 360deg); display: grid; place-items: center; }
.project-payment-donut > div { width: 58%; aspect-ratio: 1; border-radius: 50%; background: white; display: grid; align-content: center; text-align: center; padding: 8px; }
.project-payment-donut strong { font-size: 12px; }
.project-payment-donut span { color: #68747d; font-size: 10px; }
.project-payment-legend { width: 100%; }
.project-payment-legend p { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; font-size: 11px; }
.project-payment-legend.service-payment-legend { display: grid; gap: 0; }
.project-payment-legend.service-payment-legend p { grid-template-columns: minmax(0, 1fr) auto; margin: 0; padding: 10px 0; border-bottom: 1px solid #e5ebef; font-size: 12px; }
.project-payment-legend.service-payment-legend p:last-child { border-bottom: 0; }
.project-payment-legend.service-payment-legend b { min-width: 0; line-height: 1.25; }
.project-payment-legend.service-payment-legend strong { white-space: nowrap; text-align: right; }
.credit-dot, .barter-dot { width: 9px; height: 9px; border-radius: 50%; }
.credit-dot { background: #1677e8; }.barter-dot { background: #14a9b8; }

.project-progress-line { display: flex; justify-content: space-between; font-size: 12px; }
.project-progress-track { height: 9px; margin: 10px 0 18px; border-radius: 999px; background: #e6edf2; overflow: hidden; }
.project-progress-track i { display: block; height: 100%; border-radius: inherit; background: #0f7c8c; }
.project-facts, .project-finance-list { margin: 0; }
.project-facts div, .project-finance-list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e5ebef; }
.project-facts dt, .project-finance-list dt { color: #52606d; font-size: 12px; }
.project-facts dd, .project-finance-list dd { margin: 0; font-size: 12px; font-weight: 700; text-align: right; }
.project-finance-highlight dd { color: #16854c; font-size: 16px; }
.positive-text { color: #16854c; font-weight: 800; }

.project-document-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.project-document-card { display: grid; gap: 8px; padding: 16px; border: 1px solid #d7e0e5; border-radius: 6px; background: #fff; }
.project-document-card > span { color: #0f7c8c; font-size: 10px; font-weight: 800; }
.project-document-card small { color: #68747d; }

.project-timeline { position: relative; padding-left: 22px; }
.project-timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: #d7e0e5; }
.project-timeline article { position: relative; padding: 0 0 22px 18px; }
.project-timeline article > i { position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #0f7c8c; box-shadow: 0 0 0 4px #e9f6f7; }
.project-timeline time { display: block; color: #68747d; font-size: 10px; }
.project-timeline strong { display: block; margin: 3px 0; color: #17324d; }
.project-timeline p { margin: 0 0 3px; }
.project-timeline small { color: #68747d; }

@media (max-width: 760px) {
  .project-module-header,
  .project-detail-heading { align-items: stretch; flex-direction: column; }
  .project-module-header > button { width: 100%; }
  .project-summary-layout { grid-template-columns: 1fr; }
  .project-recent-card, .project-finance-card { grid-column: auto; }
  .project-title-row { align-items: flex-start; flex-direction: column; }
  .project-header-meta { display: grid; grid-template-columns: 1fr; }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .project-summary-layout { grid-template-columns: 1fr 1fr; }
  .project-chart-card, .project-recent-card { grid-column: 1 / -1; }
  .project-finance-card { grid-column: auto; }
}

.formula-header-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.formula-component-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.formula-component-grid .wide { grid-column: 1 / -1; }
.formula-component-editor { margin-top: 18px; }
.formula-variable-row { background: #fff8e8; border-left: 4px solid #d99a12; }
.formula-editor-panel.is-readonly,
#productionFormulaForm.is-readonly { background: #f8fafb; }
#productionFormulaForm.is-readonly input:disabled,
#productionFormulaForm.is-readonly select:disabled { color: #23384a; opacity: 1; background: #eef2f4; }
.formula-scaling-panel .panel-heading > label { min-width: 190px; }
.formula-comparison-result { margin-top: 18px; }
.formula-comparison-result:empty { display: none; }
.formula-comparison-result h3 { color: #13324a; }

.formula-technical-sheet { color: #17242b; }
.formula-technical-sheet > header { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: start; border-bottom: 2px solid #e5a31a; padding-bottom: 16px; }
.formula-technical-sheet > header div:first-child { display: grid; gap: 2px; }
.formula-technical-sheet > header div:first-child strong { font-size: 34px; letter-spacing: 6px; }
.formula-technical-sheet > header div:first-child span { font-size: 12px; letter-spacing: 4px; }
.formula-technical-sheet h1 { margin: 0; color: #13324a; font-size: 24px; text-align: right; }
.formula-technical-sheet header p { text-align: right; }
.formula-print-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 20px; margin: 18px 0; }
.formula-print-meta p { margin: 0; }
.formula-print-notes { margin-top: 16px; padding: 12px; border-top: 1px solid #d7e0e5; }

@media (max-width: 900px) {
  .formula-header-grid, .formula-component-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .formula-header-grid, .formula-component-grid { grid-template-columns: 1fr; }
}

@media print {
  .formula-technical-sheet { break-inside: avoid; page-break-inside: avoid; }
  .formula-technical-sheet table { table-layout: fixed; width: 100%; }
  .formula-technical-sheet th, .formula-technical-sheet td { white-space: normal; overflow-wrap: break-word; }
  .raw-material-consumption-print .enterprise-print-detail-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .raw-material-consumption-print .enterprise-kpi-card {
    padding: 8px;
  }
}

.enterprise-management-report { display: grid; gap: 18px; color: #12263a; }
.enterprise-management-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 18px; align-items: stretch; padding: 18px; border: 1px solid #d7e0e5; border-radius: 8px; background: #fff; }
.enterprise-management-hero span { color: #0f7c8c; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.enterprise-management-hero h1 { margin: 5px 0 8px; color: #0d3356; font-size: 26px; }
.enterprise-management-hero p { margin: 0; color: #52606d; max-width: 760px; }
.enterprise-management-result-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.enterprise-management-result-cards article { padding: 16px; border: 1px solid #d7e0e5; border-radius: 8px; background: #f8fafb; }
.enterprise-management-result-cards strong { display: block; margin: 8px 0 4px; color: #0d3356; font-size: 22px; }
.enterprise-management-result-cards small { color: #68747d; }

.enterprise-management-indicators { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.enterprise-management-indicator { padding: 12px; border: 1px solid #d7e0e5; border-radius: 8px; background: #fff; }
.enterprise-management-indicator span { display: block; color: #52606d; font-size: 11px; font-weight: 700; }
.enterprise-management-indicator strong { display: block; margin: 5px 0; color: #0d3356; font-size: 18px; line-height: 1.1; }
.enterprise-management-indicator small { color: #68747d; font-size: 10px; }

.enterprise-management-block { padding: 16px; border: 1px solid #d7e0e5; border-radius: 8px; background: #fff; break-inside: avoid; page-break-inside: avoid; }
.enterprise-management-block h2 { margin: 0 0 12px; padding-bottom: 9px; border-bottom: 1px solid #d7e0e5; color: #0d3356; font-size: 18px; }
.enterprise-statement-block,
.enterprise-expense-analysis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); gap: 18px; align-items: start; }
.enterprise-management-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.enterprise-management-table th { padding: 8px; background: #14384f; color: #fff; text-align: left; }
.enterprise-management-table td { padding: 8px; border-bottom: 1px solid #d7e0e5; vertical-align: top; overflow-wrap: break-word; }
.enterprise-management-table .num { text-align: right; white-space: nowrap; }
.enterprise-management-table tfoot th { padding: 8px; background: #f6ead7; color: #0d3356; }
.enterprise-statement-table { font-size: 13px; }
.enterprise-statement-table td { padding: 9px 10px; }
.enterprise-statement-total td,
.enterprise-statement-result td { background: #eef6f1; font-weight: 800; }
.enterprise-statement-final td { background: #0d3356; color: #fff; font-weight: 900; font-size: 15px; }
.enterprise-statement-cost td:last-child { color: #b42318; font-weight: 800; }
.enterprise-statement-income td:last-child { color: #0f7c8c; font-weight: 800; }

.enterprise-management-pie { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; align-items: center; }
.enterprise-management-pie svg { width: 184px; height: 184px; }
.enterprise-management-pie div div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid #edf1f3; font-size: 11px; }
.enterprise-management-pie span { width: 10px; height: 10px; border-radius: 50%; }
.enterprise-management-pie em { font-style: normal; font-weight: 800; color: #0d3356; }
.enterprise-management-empty { display: grid; place-items: center; min-height: 160px; border: 1px dashed #cbd5df; border-radius: 8px; color: #68747d; }

.enterprise-project-management-table th,
.enterprise-project-management-table td { font-size: 10px; }
.enterprise-cash-flow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.enterprise-cash-flow-grid article { padding: 12px; border: 1px solid #d7e0e5; border-radius: 8px; background: #f8fafb; }
.enterprise-cash-flow-grid span { display: block; color: #52606d; font-size: 11px; font-weight: 700; }
.enterprise-cash-flow-grid strong { display: block; margin-top: 6px; color: #0d3356; font-size: 18px; }
.enterprise-cash-flow-block p,
.enterprise-reimbursements-block p { margin: 10px 0 0; color: #52606d; font-size: 11px; }
.enterprise-management-chart-annex { margin-top: 18px; }

@media print {
  .enterprise-management-report { gap: 12px; }
  .enterprise-management-hero,
  .enterprise-management-block,
  .enterprise-management-indicator { box-shadow: none; }
  .enterprise-management-indicators { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .enterprise-management-indicator { padding: 8px; }
  .enterprise-management-indicator strong { font-size: 13px; }
  .enterprise-management-hero h1 { font-size: 21px; }
  .enterprise-management-table { font-size: 9px; }
  .enterprise-management-table th,
  .enterprise-management-table td { padding: 5px; }
  .enterprise-project-management-table th,
  .enterprise-project-management-table td { font-size: 8px; }
  .enterprise-management-pie { grid-template-columns: 145px minmax(0, 1fr); }
  .enterprise-management-pie svg { width: 138px; height: 138px; }
  .enterprise-management-chart-annex { break-before: page; page-break-before: always; }
}

@media (max-width: 900px) {
  .enterprise-management-hero,
  .enterprise-statement-block,
  .enterprise-expense-analysis { grid-template-columns: 1fr; }
  .enterprise-management-indicators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enterprise-cash-flow-grid { grid-template-columns: 1fr 1fr; }
}

.service-project-fields {
  border-top: 1px solid #d8e2ea;
  margin-top: 4px;
  padding-top: 14px;
}

.service-budget-progress {
  background: #e9eef2;
  border-radius: 3px;
  height: 8px;
  min-width: 110px;
  overflow: hidden;
}

.service-budget-progress > i {
  background: #0d6672;
  display: block;
  height: 100%;
}
.finance-module-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #eef3f6;
}

.finance-module-tabs button { min-height: 44px; font-weight: 700; }
.finance-module-tabs button.active { color: #fff; background: #12364d; border-color: #12364d; }
.finance-module-view { display: none; }
.finance-module-view.active { display: block; }
.finance-section-actions { align-items: center; margin-bottom: 14px; }
.finance-status { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #fff1cf; color: #725000; }
.finance-status.paid { background: #e2f3e8; color: #176438; }
.finance-status.partial { background: #e8f1fb; color: #174f80; }
.finance-status.overdue { background: #fde4e1; color: #a12720; }

@media (max-width: 1050px) {
  .finance-module-tabs { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 650px) {
  .finance-module-tabs { grid-template-columns: 1fr 1fr; }
  .finance-section-actions .inline-actions { width: 100%; }
  .finance-section-actions .inline-actions button { flex: 1 1 180px; }
}
.purchase-bulk-receipt {
  background: #f7f9fc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin-bottom: 20px;
  padding: 18px;
}

.purchase-bulk-receipt table input {
  min-width: 100px;
  width: 100%;
}
.labor-statement-table {
  table-layout: fixed;
  width: 100%;
  font-size: 7.5pt;
}

.labor-statement-table th,
.labor-statement-table td {
  padding: 5px 4px;
  overflow-wrap: anywhere;
  color: #000;
}

.labor-statement-table th:nth-child(1) { width: 12%; }
.labor-statement-table th:nth-child(2) { width: 12%; }
.labor-statement-table th:nth-child(3) { width: 20%; }
.labor-statement-table th:nth-child(4) { width: 10%; }
.labor-statement-table th:nth-child(5) { width: 14%; }
.labor-statement-table th:nth-child(6),
.labor-statement-table th:nth-child(7),
.labor-statement-table th:nth-child(8) { width: 10.66%; }

.labor-statement-table .labor-paid {
  color: #087a46;
  font-weight: 700;
}

.labor-statement-table .labor-pending {
  color: #b42318;
  font-weight: 700;
}
.auth-pending .app-shell,
.auth-signed-out .app-shell { display: none; }
.auth-signed-in .auth-gate { display: none; }
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(circle at 12% 18%, rgba(24,73,99,.13), transparent 34%), linear-gradient(145deg, #eef2f5, #fff 58%, #e7edf1); }
.auth-card { width: min(440px, 100%); padding: 38px; border: 1px solid #d7e0e6; border-radius: 18px; background: #fff; box-shadow: 0 22px 60px rgba(15,42,58,.14); }
.auth-brand { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 14px; background: #102f45; color: #fff; font: 700 1.45rem/1 system-ui,sans-serif; }
.auth-card h1 { margin: 4px 0 8px; color: #102f45; font-size: clamp(1.65rem,4vw,2.1rem); }
.auth-intro,.auth-help { color: #5b6b76; }
.auth-form { display: grid; gap: 16px; margin-top: 26px; }
.auth-form[hidden] { display: none; }
.permission-hidden { display: none !important; }
.auth-form label { display: grid; gap: 7px; color: #263f50; font-weight: 650; }
.auth-form input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #bac8d1; border-radius: 9px; background: #fff; color: #152a38; }
.auth-form input:focus { outline: 3px solid rgba(34,99,138,.18); border-color: #22638a; }
.auth-form button { min-height: 46px; border: 0; border-radius: 9px; background: #102f45; color: #fff; font-weight: 750; cursor: pointer; }
.auth-form button:disabled { cursor: wait; opacity: .65; }
.auth-message { min-height: 22px; margin: 16px 0 0; color: #9a3412; font-weight: 650; }
.auth-message.success { color: #24734a; }
.auth-help { margin: 14px 0 0; font-size: .88rem; }
.session-control { display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 12px; margin-left: auto; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.24); }
.session-control span { font-weight: 750; }
.session-control small { opacity: .78; }
.session-control button { grid-column: 2; grid-row: 1 / span 2; white-space: nowrap; }
@media (max-width: 760px) { .auth-card { padding: 28px 22px; } .session-control { width: 100%; margin-left: 0; padding: 12px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.24); } }
