/* Shared action buttons and the compact document journal. */
html body .button, html body .button.primary-link, html body button.primary,
html body .sidebar-toggle, html body .sidebar-close, html body .invoice-lookup-create {
  background: #fff;
  border: 1px solid #cfe1d7;
  color: #215f4d;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
html body .button:not(:disabled):hover,
html body .button.primary-link:not(:disabled):hover,
html body button.primary:not(:disabled):hover,
html body .sidebar-toggle:hover, html body .sidebar-close:hover, html body .invoice-lookup-create:hover {
  background: #0e8068;
  border-color: #0e8068;
  color: #fff;
}
html body .button:focus-visible, html body button.primary:focus-visible,
html body .sidebar-toggle:focus-visible, html body .sidebar-close:focus-visible,
html body .invoice-lookup-create:focus-visible {
  outline: 3px solid #8ad3b2;
  outline-offset: 2px;
}
html body .button:disabled, html body button.primary:disabled { opacity: .55; cursor: not-allowed; }
.doc-journal-table .doc-table { min-width: 1000px; }
.doc-journal-table .journal-sort { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; color: #54776a; }
.journal-scroll-hint { display: none; }
.doc-journal-table .journal-sort:hover { color: #0e8068; text-decoration: none; }
.journal-sort span { color: #7b998a; }
.journal-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-journal-table .doc-row-draft { background: #f1f3f2; color: #718078; }
.doc-journal-table .doc-row-draft:hover { background: #e9eeeb; }
.doc-journal-table .doc-row-draft a { color: #647c70; }
.doc-status.doc-status-draft { color: #586b62; background: #dfe5e1; }
.doc-journal-table .doc-table td { padding: 5px 8px; }
.doc-journal-table .doc-table td:nth-child(2) strong { white-space: nowrap; }
.doc-journal-table .doc-table td small { max-width: 205px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 721px) {
  .doc-journal-table th:last-child, .doc-journal-table td:last-child { position: sticky; right: 0; background: #fff; }
  .doc-journal-table th:last-child { z-index: 3; background: #f6faf7; }
  .doc-journal-table td:last-child { z-index: 1; }
  .doc-journal-table .doc-row-draft td:last-child { background: #f1f3f2; }
  .doc-journal-table .doc-row-draft:hover td:last-child { background: #e9eeeb; }
}
@media (max-width: 720px) { .journal-scroll-hint { display: block; color: #6c8277; font-size: 11px; margin: 0 0 8px; } }
.catalog-layout { display: grid; grid-template-columns: minmax(210px, 260px) minmax(0, 1fr); gap: 16px; align-items: start; }
.catalog-groups { padding: 14px; background: #fff; border: 1px solid #dbe9df; border-radius: 12px; }
.catalog-groups-heading { display: grid; gap: 8px; margin-bottom: 10px; }
.catalog-groups-heading .button { min-height: 34px; padding: 6px 8px; font-size: 12px; }
.catalog-tree { max-height: 60vh; overflow: auto; }
.catalog-tree a { display: block; padding: 7px 10px; color: #365b4d; font-size: 12px; border-radius: 6px; text-decoration: none; overflow-wrap: anywhere; }
.catalog-tree a:hover, .catalog-tree a[aria-current=page] { background: #e5f4eb; color: #0e7257; }
.catalog-content { min-width: 0; }
@media (max-width: 800px) { .catalog-layout { grid-template-columns: 1fr; } .catalog-tree { max-height: 190px; } }
.doc-table [data-optional-column][hidden] { display: none !important; }
.warehouse-columns { position: relative; display: inline-block; margin: 6px 0 10px; }
.warehouse-columns summary { cursor: pointer; list-style: none; }
.warehouse-columns-panel { position: absolute; z-index: 5; min-width: 210px; background: #fff; border: 1px solid #dbe9df; border-radius: 8px; padding: 10px; box-shadow: 0 8px 20px #1c463b22; }
.warehouse-columns-panel label { display: flex; gap: 7px; align-items: center; padding: 5px; font-size: 12px; }
.warehouse-columns-panel input { accent-color: #0e8068; }
.document-table-input { min-width: 100px; width: 100%; max-width: 210px; padding: 5px; border: 1px solid #cfe1d7; border-radius: 5px; font: inherit; }
.document-table-note { min-width: 150px; min-height: 32px; }
.balance-table .doc-table { min-width: 680px; }
.balance-table .doc-table td { padding: 5px 8px; vertical-align: middle; }
.balance-table .doc-table th { padding: 9px 8px; background: #f6faf7; }
.balance-table .journal-sort { color: #54776a; white-space: nowrap; }
.balance-batches { border-top: 1px solid #e2eee8; margin-top: 16px; padding-top: 12px; }
.balance-batches > summary { color: #215f4d; font-weight: 700; cursor: pointer; font-size: 13px; }
.balance-batches > p { font-size: 12px; }
.stock-tabs { display: flex; gap: 4px; overflow-x: auto; flex-wrap: nowrap; align-items: end; border-bottom: 1px solid #cfe1d7; margin: -8px 0 20px; scrollbar-width: thin; }
.stock-tabs a { flex: 0 0 auto; padding: 10px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: #668477; font-size: 12px; font-weight: 650; text-decoration: none; }
.stock-tabs a:hover { background: #eff8f2; color: #0e7257; }
.stock-tabs a[aria-current=page] { background: #fff; color: #0e7257; border-color: #cfe1d7; box-shadow: inset 0 -2px #0e8068; }
.doc-table td { padding: 5px 8px; vertical-align: middle; }
.doc-table th { padding: 9px 8px; background: #f6faf7; }
.compact-stock-table .doc-table td { white-space: nowrap; }
.compact-catalog .data-table td { padding: 5px 8px; }
.compact-catalog .data-table th { padding: 9px 8px; background: #f6faf7; }
.compact-catalog .data-table small { display: inline; margin-left: 5px; }
.compact-catalog .table-tag { padding: 3px 8px; }
.compact-catalog .catalog-pack-add { margin-left: 8px; white-space: nowrap; }
@media (max-width: 720px) { .stock-tabs { margin-top: -8px; } }
@media print { .stock-tabs { display: none; } }
.report-actions{align-items:center;gap:8px;margin:12px 0}
.report-actions .warehouse-columns{margin:0}
.report-actions>.button,.report-actions .warehouse-columns>summary{height:40px;min-height:40px;padding:7px 12px;font-size:12px}
.inventory-workbench>.back{margin-bottom:0;min-height:30px}
.inventory-heading{display:flex;justify-content:space-between;align-items:end;gap:12px;flex-wrap:wrap;margin:6px 0 12px}
.inventory-heading h1{font-size:22px;margin:3px 0}
.inventory-heading .muted{font-size:12px}
.inventory-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.inventory-actions form{margin:0}
.inventory-actions .button,.inventory-table-toolbar .button,.inventory-found-form .button{min-height:36px;padding:6px 10px;font-size:12px}
.inventory-notice{background:#fff8ec;border:1px solid #f2dfba;border-radius:8px;padding:8px 10px;color:#79572e;font-size:12px}
.inventory-table-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.inventory-table-toolbar h2{margin:0;font-size:14px}
.inventory-table-toolbar .warehouse-columns{margin:0 0 0 auto}
.inventory-hint{color:#678277;font-size:12px;margin:8px 0}
.inventory-table .doc-table td{padding:4px 7px;white-space:nowrap}
.inventory-table .doc-table .inventory-quantity,.inventory-table .doc-table .inventory-line-note{height:32px;min-height:32px;padding:5px 7px;border-radius:5px;font-size:12px}
.inventory-table .doc-table .inventory-quantity{width:105px;min-width:105px}
.inventory-table .doc-table .inventory-line-note{width:160px;min-width:160px;resize:vertical}
.inventory-table .doc-table .inventory-exclude{width:16px;height:16px;min-width:16px;min-height:16px;padding:0;margin:0;accent-color:#0e8068}
.inventory-table .inventory-save{height:32px;min-height:32px;padding:4px 8px;font-size:12px}
.inventory-found>summary{cursor:pointer;font-weight:700;color:#215f4d;font-size:13px}
.inventory-found-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-top:8px}
.inventory-found-form .form-field{min-width:180px;flex:1}
.inventory-found-form .form-field label{font-size:12px}
.inventory-found-form input,.inventory-found-form select{height:36px;min-height:36px;width:100%;border:1px solid #ccddd3;border-radius:6px;padding:5px 8px;background:#fff;font:inherit;font-size:12px}
.inventory-found-form details{align-self:center;font-size:12px}
@media(max-width:720px){.inventory-actions{width:100%}.inventory-table-toolbar .warehouse-columns{margin-left:0}.inventory-found-form{display:grid;grid-template-columns:1fr}.inventory-found-form .form-field{min-width:0}}
.compact-item-form{max-width:930px;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin-top:12px;padding:16px}
.compact-item-form .field-name,.compact-item-form .checkbox-field,.compact-item-form .errorlist.nonfield{grid-column:1/-1}
.compact-item-form .form-field{min-width:0}
.compact-item-form .form-field label{font-size:11px;margin:0 0 3px}
.compact-item-form input:not([type=checkbox]),.compact-item-form select{height:36px;min-height:36px;padding:6px 8px;font-size:13px}
.compact-item-form textarea{height:60px;min-height:60px;padding:7px 8px;font-size:13px}
.compact-item-form .button{min-height:36px;padding:6px 12px;font-size:12px}
.compact-item-form .checkbox-field input{width:16px;min-width:16px;height:16px;min-height:16px}
.compact-item-form .checkbox-field label{min-height:0;font-size:12px}
.compact-catalog .catalog-filters{gap:8px;padding:12px;margin:0 0 12px}
.compact-catalog .catalog-filters label{font-size:11px;margin:0 0 3px}
.compact-catalog .catalog-filters input,.compact-catalog .catalog-filters select{height:36px;min-height:36px;padding:6px 8px;font-size:13px}
.compact-catalog .catalog-filters .button{height:36px;min-height:36px;padding:6px 12px;font-size:12px}
.inventory-start{display:flex;align-items:end;gap:10px;flex-wrap:wrap;max-width:100%;padding:14px 16px;margin:12px 0}
.inventory-start .form-field{width:min(100%,330px)}
.inventory-start label{font-size:11px;margin:0 0 3px}
.inventory-start select{width:100%;height:36px;min-height:36px;padding:6px 8px;border:1px solid #cfe1d7;border-radius:7px;background:#fff;font:inherit;font-size:13px}
.inventory-start .button{height:36px;min-height:36px;padding:6px 12px;font-size:12px}
@media(max-width:720px){.compact-item-form{grid-template-columns:1fr}.compact-item-form .field-name,.compact-item-form .checkbox-field{grid-column:auto}.inventory-start .form-field{width:100%}}
.catalog-bulk{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px;padding:9px 12px;background:rgba(255,255,255,.82);border:1px solid #d4e6dc;border-radius:10px}
.catalog-bulk label,.catalog-bulk-count{font-size:12px;color:#527367}
.catalog-bulk select{width:auto;max-width:100%;min-width:200px;height:36px;min-height:36px;padding:5px 8px;border:1px solid #cfe1d7;border-radius:7px;background:white;font:inherit;font-size:12px}
.catalog-bulk .button{height:36px;min-height:36px;padding:6px 12px;font-size:12px}
.catalog-bulk .button:disabled{opacity:.5;cursor:not-allowed}
.data-table .catalog-select{width:36px;padding:6px 10px;text-align:center}
.catalog-select input[type=checkbox]{width:16px;height:16px;min-width:16px;min-height:16px;margin:0;padding:0;accent-color:#0e8068}
@media(max-width:720px){.catalog-bulk select{flex:1 1 200px}.catalog-bulk-count{flex-basis:100%}}
