#office-demo { --bo-green: #2b4d39; --bo-ink: #273b2d; --bo-line: #d8ddd0; --bo-muted: #526353; color: var(--bo-ink); }
.bo-workspace { max-width: 100%; margin: 0 auto; overflow: hidden; border: 1px solid #cbd3c5; border-radius: 15px; background: #fffdf8; box-shadow: 0 7px 30px #2839230a; font-size: 14px; }
.bo-head, .bo-title-row, .bo-controls, .bo-tabs, .bo-next { display: flex; }
.bo-head, .bo-title-row { justify-content: space-between; align-items: center; gap: 16px; }
.bo-head { padding: 16px clamp(14px, 3vw, 32px); background: var(--bo-green); color: white; }
.bo-head > div { min-width: 0; }
.bo-head span, .bo-cadence small, .bo-title-row small, .bo-register-label small { display: block; }
.bo-head span { color: #cedecd; font-size: 12px; }
.bo-head strong { display: block; font: 400 clamp(22px, 3vw, 31px)/1.15 var(--serif); letter-spacing: -.025em; overflow-wrap: anywhere; }
.bo-cadence { text-align: right; font-weight: 650; }
.bo-cadence small { font-size: 12px; color: #d9e4d5; font-weight: 450; }
.bo-tabs { display: grid; grid-template-columns: repeat(4, 1fr); padding: 5px; gap: 4px; background: #e9ece2; border-bottom: 1px solid var(--bo-line); }
.bo-tabs button { padding: 10px 5px; min-height: 43px; font-size: 14px; line-height: 1.2; font-weight: 650; border-radius: 5px; color: var(--bo-muted); overflow-wrap: anywhere; }
.bo-tabs button[aria-pressed=true] { background: #fffdf8; box-shadow: 0 1px 3px #1c332321; color: var(--bo-ink); }
.bo-tabs button:hover, .bo-record:hover, .bo-reference button:hover { color: #1f422d; background: #f4f5ea; }
.bo-workspace :is(button, input, select):focus-visible { outline: 2px solid #9c542d; outline-offset: -2px; }
.bo-surface, .bo-pane, .bo-register, .bo-field, .bo-split, .bo-pair { min-width: 0; }
.bo-pane { padding: clamp(15px, 2.8vw, 32px); }
.bo-pane h3 { margin: 2px 0; font: 400 clamp(23px, 2.6vw, 34px)/1.14 var(--serif); letter-spacing: -.035em; overflow-wrap: anywhere; }
.bo-pane h4 { margin-top: 17px; font-size: 16px; }
.bo-title-row small, .bo-register-label small { color: var(--bo-muted); font-size: 12px; }
.bo-customer-name { font-weight: 600; overflow-wrap: anywhere; }
.bo-hint, .bo-fine { color: var(--bo-muted); line-height: 1.5; }
.bo-hint { margin: 7px 0 16px; max-width: 79ch; }
.bo-fine { font-size: 12px; margin-top: 8px; }
.bo-list { border-top: 1px solid var(--bo-line); margin: 14px 0; }
.bo-line { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--bo-line); }
.bo-line strong, .bo-table th, .bo-workspace td { overflow-wrap: anywhere; }
.bo-line span { color: var(--bo-muted); font-variant-numeric: tabular-nums; }
.bo-controls { flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 13px; }
.bo-action { display: inline-flex; justify-content: center; align-items: center; min-height: 38px; max-width: 100%; padding: 7px 12px; border: 1px solid #bdc8b9; border-radius: 6px; background: #fffefb; color: #304a35; font-size: 13px; font-weight: 650; line-height: 1.25; }
.bo-action:hover { background: #eef2e8; }
.bo-action.bo-primary { background: var(--bo-green); border-color: var(--bo-green); color: white; }
.bo-action.bo-primary:hover { background: #1d3927; }
.bo-form { padding: 15px; margin: 13px 0; background: #f3f3e9; border-radius: 7px; }
.bo-field { display: grid; gap: 5px; margin: 0 0 9px; }
.bo-field > span { font-size: 12px; color: var(--bo-muted); font-weight: 650; }
.bo-field input, .bo-field select, .bo-qty { width: 100%; min-width: 0; max-width: 100%; min-height: 38px; border: 1px solid #afbdab; border-radius: 5px; padding: 6px 9px; background: white; color: var(--bo-ink); font: inherit; }
.bo-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.bo-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.bo-table th, .bo-table td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--bo-line); }
.bo-table th:first-child, .bo-table td:first-child { text-align: left; padding-left: 0; }
.bo-table thead th { color: var(--bo-muted); font-size: 12px; font-weight: 650; }
.bo-qty { width: 5.5em; text-align: right; font-variant-numeric: tabular-nums; }
.bo-qty:disabled { opacity: .6; }
.bo-split { display: grid; grid-template-columns: minmax(175px, .53fr) minmax(0, 1.55fr); }
.bo-register { padding: 17px 12px; border-right: 1px solid var(--bo-line); background: #f2f3e9; }
.bo-register-label { margin: 0 5px 9px; overflow-wrap: anywhere; }
.bo-records { max-height: 285px; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; padding: 2px; }
.bo-record { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; padding: 8px 7px; text-align: left; font-size: 12px; width: 100%; border-radius: 4px; font-variant-numeric: tabular-nums; }
.bo-record > span:first-child { font-weight: 700; }
.bo-record > span:last-child { color: var(--bo-muted); }
.bo-record[aria-pressed=true] { background: #dbe5d7; color: #173b25; }
.bo-figures { display: grid; grid-template-columns: minmax(0,1fr) auto; margin: 15px 0 4px; align-items: baseline; }
.bo-figures span, .bo-figures small { color: var(--bo-muted); font-size: 12px; }
.bo-figures strong, .bo-sum strong { color: #284a32; font-variant-numeric: tabular-nums; }
.bo-figures small { grid-column: 2; text-align: right; }
.bo-next { justify-content: flex-end; padding: 10px clamp(15px, 2.8vw, 32px); border-top: 1px solid var(--bo-line); background: #f7f7ef; }
.bo-next .bo-action { background: transparent; border-color: transparent; }
.bo-filter { display: grid; grid-template-columns: minmax(140px,220px) minmax(0,1fr); align-items: end; gap: 10px; }
.bo-invoice { margin-top: 9px; border: 1px solid var(--bo-line); border-top: 3px solid #a26b45; border-radius: 5px; padding: clamp(13px, 2.2vw, 25px); background: #fff; }
.bo-invoice-period { font-size: 12px; color: var(--bo-muted); text-align: right; }
.bo-reference { margin: 12px 0; }
.bo-reference h4 { font-size: 13px; margin: 0 0 6px; }
.bo-reference button { display: flex; align-items: center; justify-content: space-between; gap: 5px; width: 100%; min-height: 35px; padding: 5px 1px; border-bottom: 1px solid #e8ebe2; text-align: left; font-variant-numeric: tabular-nums; }
.bo-reference small { margin-left: 6px; color: var(--bo-muted); }
.bo-reference strong { white-space: nowrap; }
.bo-reference strong span { margin-left: 6px; color: var(--bo-muted); }
.bo-sum { display: flex; justify-content: space-between; gap: 8px; padding: 10px; border-radius: 5px; background: #e8eee3; font-weight: 650; }
.bo-sum strong { font-size: 19px; }
.bo-bakery { margin-top: 19px; padding: clamp(12px,2vw,21px); border-radius: 8px; border: 1px solid #dbddcb; background: #f5f3e8; }
.bo-bakery h4 { margin: 0; font-size: 18px; }
.bo-bake-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 8px; align-items: end; margin-bottom: 9px; }
.bo-bake-fields .bo-field { margin: 0; }
.bo-bakery td:last-child { color: #23492d; }
.bo-empty { color: var(--bo-muted); padding: 16px 0; }
.bo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.bo-paper { display: none; }
@media (max-width: 660px) {
  .bo-bake-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bo-split, .bo-filter { grid-template-columns: minmax(0,1fr); }
  .bo-register { border-right: none; border-bottom: 1px solid var(--bo-line); padding: 13px; }
  .bo-records { max-height: 105px; }
  .bo-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 420px) {
  .bo-head { gap: 8px; }
  .bo-cadence, .bo-line, .bo-table { font-size: 13px; }
  .bo-pane { padding: 13px; }
  .bo-line { gap: 6px; }
  .bo-action { padding: 7px 8px; }
  .bo-title-row { align-items: flex-start; flex-wrap: wrap; gap: 5px 12px; }
  .bo-table th, .bo-table td { padding: 7px 3px; }
  .bo-qty { width: 4.1em; }
  .bo-pair { grid-template-columns: minmax(0,1fr); gap: 0; }
  .bo-filter { gap: 0; }
  .bo-reference small { display: block; margin: 0; }
  .bo-invoice-period { text-align: left; }
}
@media print {
  body.bo-printing > :not(.bo-paper), body.bo-printing > #print-area { display: none !important; }
  body.bo-printing > article.bo-paper { display: block !important; background: white; color: #1c281f; font: 11pt/1.45 Arial, sans-serif; padding: 8mm; }
  .bo-paper h1 { margin: 2mm 0 4mm; color: #203c2b; font: 23pt/1.1 Georgia, serif; letter-spacing: normal; }
  .bo-paper h2 { font: bold 12pt Arial, sans-serif; margin: 7mm 0 1mm; letter-spacing: normal; }
  .bo-paper p { margin: 3mm 0; overflow-wrap: anywhere; }
  .bo-paper header { margin: 0 0 5mm; padding: 0 0 4mm; border-bottom: 2pt solid #36503b; }
  .bo-paper table { width: 100%; border-collapse: collapse; }
  .bo-paper td, .bo-paper th { padding: 2mm 1mm; text-align: right; border-bottom: .5pt solid #c3c9bf; }
  .bo-paper td:first-child, .bo-paper th:first-child { text-align: left; overflow-wrap: anywhere; }
  .bo-paper-total { font-weight: bold; text-align: right; }
  .bo-paper tr { break-inside: avoid; }
}
