.closing-detail{margin-top:24px;padding:28px;border:1px solid #d8d6ce;border-radius:19px;background:#f8faf7}.closing-entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.closing-entry-card,.bank-deposit-card{padding:18px;border:1px solid #dcded9;border-radius:15px;background:#fff}.bank-deposit-card{margin-top:15px}.closing-entry-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.closing-entry-head h3{margin:0 0 4px;font-size:16px}.closing-entry-head span{color:#7a8580;font-size:10px}.closing-entry-head button{border:0;border-radius:8px;padding:8px 10px;background:#e8f8c6;color:#234b39;font-size:10px;font-weight:800;cursor:pointer}.closing-row-list{display:grid;gap:9px;margin-top:14px}.closing-data-row{display:grid;gap:7px;align-items:center}.cash-closing-row{grid-template-columns:22px 1fr 1fr .8fr 26px}.bank-account-row{grid-template-columns:22px .8fr 1fr 1fr .8fr 26px}.bank-deposit-row{grid-template-columns:22px .8fr 1fr .75fr 1fr 1fr 26px}.closing-row-index{color:#8c9591;font-size:9px;font-weight:800}.closing-data-row input{min-width:0;width:100%;padding:9px 8px;border:1px solid #dcddd8;border-radius:8px;background:#fbfaf8;color:var(--ink);font-size:10px}.closing-data-row .closing-amount{font-weight:800}.remove-closing-row{width:26px;height:26px;border:0;border-radius:50%;background:#f3e3e0;color:#a64a40;cursor:pointer}.closing-subtotal{margin-top:14px;padding-top:13px;display:flex;justify-content:space-between;gap:12px;border-top:1px solid #e5e6e2}.closing-subtotal span{font-size:10px;font-weight:800}.closing-subtotal strong{font-size:17px}.cash-handover{display:grid;grid-template-columns:1fr 1fr .55fr;gap:12px;margin-top:15px}.cash-handover label{padding:14px;border:1px solid #dcded9;border-radius:12px;background:#fff}.cash-handover span{display:block;margin-bottom:8px;color:#747f7a;font-size:9px;font-weight:800;letter-spacing:.1em}.cash-handover input{width:100%;border:0;outline:0;background:transparent;color:var(--ink);font-weight:700}.closing-reconcile{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;margin-top:16px;overflow:hidden;border-radius:14px;background:#dce1dd}.closing-reconcile>div{padding:19px;background:#edf1ed}.closing-reconcile span{display:block;color:#68756f;font-size:9px;font-weight:800;letter-spacing:.12em}.closing-reconcile strong{display:block;margin:7px 0 4px;font-size:22px}.closing-reconcile small{color:#7a8580;font-size:9px}.closing-reconcile .matched strong{color:#397552}.closing-reconcile .unmatched strong{color:#b04e44}.print-only,.print-value{display:none}@media(max-width:1000px){.closing-entry-grid{grid-template-columns:1fr}.bank-account-row,.bank-deposit-row{grid-template-columns:22px 1fr 1fr 26px}.bank-account-row .closing-amount,.bank-deposit-row .closing-amount,.bank-deposit-row .closing-note{grid-column:2/4}}@media(max-width:700px){.closing-detail{padding:20px}.cash-closing-row{grid-template-columns:20px 1fr 26px}.cash-closing-row .closing-amount{grid-column:2/3}.cash-handover,.closing-reconcile{grid-template-columns:1fr}}
@media print {
  @page { size: A4 portrait; margin: 7mm; }

  html,body { width:100%; margin:0!important; padding:0!important; background:#fff!important; color:#111!important; }
  body { font-size:9px!important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .topbar,.intro,.footer-note,.formula,.download-button,.drive-button,.signout-button,
  .history-button,.history-panel,.history-backdrop,.add-deposit,.remove-deposit,
  #add-owner-transfer,.remove-owner-transfer,.add-account-entry,.remove-account-entry,
  .add-cost-entry,.remove-cost-entry,.add-opening-cash,.add-opening-bank,
  .add-opening-other,.remove-opening-row,.add-cash-closing,.add-bank-account,
  .add-bank-deposit,.add-closing-other,.remove-closing-row,#load-previous,
  .reconcile-bar,.closing-reconcile,.fund-reconciliation { display:none!important; }

  #dashboard { display:block!important; }
  .workspace { width:100%!important; padding:0!important; }
  .report-shell {
    width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    zoom:1;
  }

  .report-head { padding:0 3px 8px!important; border-bottom-width:1px!important; }
  .report-head label span { margin-bottom:2px!important; font-size:8px!important; }
  .report-head input,.report-head .print-value { border:0!important; padding:0!important; background:transparent!important; font-size:13px!important; font-weight:700; }

  .metrics { grid-template-columns:repeat(4,1fr)!important; gap:6px!important; padding:7px 0 0!important; }
  .metric-card { min-height:74px!important; padding:9px!important; border-radius:7px!important; }
  .metric-card .metric-icon { width:18px!important; height:18px!important; font-size:9px!important; }
  .metric-card .metric-label { font-size:11px!important; }
  .metric-hint { display:none!important; }
  .money-input { margin-top:7px!important; }
  .money-input input,.money-input strong,.money-input .print-value { font-size:19px!important; font-weight:800; }
  .money-input small { font-size:7px!important; }

  .opening-detail,.revenue-detail,.accounts-detail,.transfer-detail,.cost-detail,.closing-detail {
    margin-top:7px!important;
    padding:9px!important;
    border:0!important;
    border-radius:8px!important;
    break-inside:auto;
  }
  .section-heading { margin-bottom:7px!important; }
  .section-heading h2 { margin-top:1px!important; font-size:14px!important; }
  .section-heading>p,.opening-actions p,.opening-entry-head span,.cost-category-head span,
  .closing-entry-head>div>span { display:none!important; }
  .section-kicker { font-size:7px!important; letter-spacing:.11em!important; }

  .opening-detail { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; grid-auto-rows:max-content!important; align-content:start!important; align-items:start!important; column-gap:6px!important; row-gap:4px!important; }
  .opening-detail>.section-heading { grid-column:1/-1; align-self:start!important; min-height:0!important; margin:0!important; padding:0!important; }
  .opening-entry-grid { display:contents!important; }
  .opening-entry-grid>.opening-entry-card:first-child { grid-column:1/-1; }
  .opening-entry-card,.cashier-card,.account-entry-card,.cost-category-card,
  .closing-entry-card,.bank-deposit-card { padding:8px!important; border-radius:6px!important; break-inside:avoid-page; }
  .opening-other-card,.bank-deposit-card { margin-top:0!important; }
  .opening-entry-head h3,.cashier-head h3,.account-entry-head h3,
  .cost-category-head h3,.closing-entry-head h3 { font-size:10px!important; }
  .opening-row-list,.deposit-list,.account-entry-list,.cost-entry-list,.closing-row-list { gap:3px!important; margin:5px 0!important; }
  .opening-data-row,.deposit-row,.account-entry-row,.cost-entry-row,.closing-data-row { gap:3px!important; }
  .opening-cash-row { grid-template-columns:14px 1fr 1fr .72fr!important; }
  .opening-bank-row { grid-template-columns:14px .7fr 1.15fr .72fr!important; }
  .liquid-balance-row { grid-template-columns:14px .75fr 1.2fr .72fr!important; }
  .deposit-row { grid-template-columns:16px 1fr 1fr!important; }
  .account-entry-row,.account-entry-row.has-channel { grid-template-columns:16px minmax(62px,.65fr) minmax(70px,.8fr) minmax(90px,1.2fr)!important; }
  .cost-entry-row { grid-template-columns:16px minmax(92px,1fr) minmax(84px,.85fr) minmax(76px,.72fr) minmax(100px,1.1fr)!important; }
  .cash-closing-row { grid-template-columns:14px 1fr 1fr .72fr!important; }
  .bank-account-row { grid-template-columns:14px .7fr 1fr 1fr .72fr!important; }
  .bank-deposit-row { grid-template-columns:14px .7fr 1fr .7fr .85fr 1fr!important; }
  .opening-row-index,.deposit-index,.account-entry-index,.cost-entry-index,.closing-row-index { font-size:8px!important; }
  .opening-data-row input,.opening-data-row select,.liquid-balance-row input,.liquid-balance-row select,
  .deposit-field input,.account-entry-row input,.account-entry-row select,.cost-entry-row input,
  .cost-entry-row select,.closing-data-row input,.closing-data-row select {
    border:0!important;
    border-radius:0!important;
    padding:2px!important;
    background:transparent!important;
    font-size:9px!important;
    line-height:1.25!important;
  }
  select {
    appearance:none!important;
    -webkit-appearance:none!important;
    background-image:none!important;
    padding-right:2px!important;
  }
  .report-shell input:not([type="hidden"]),.report-shell select { display:none!important; }
  .print-value { display:block!important; min-width:0; overflow:hidden; padding:2px!important; color:inherit; font-size:9px!important; line-height:1.25!important; text-overflow:ellipsis; white-space:nowrap; }
  .print-value-amount { font-weight:800; }
  .deposit-field { gap:1px!important; }
  .deposit-field span { font-size:7px!important; }
  .opening-subtotal,.closing-subtotal { margin-top:4px!important; padding-top:4px!important; }
  .opening-subtotal span,.closing-subtotal span { font-size:7px!important; }
  .opening-subtotal strong,.closing-subtotal strong,.cost-subtotal { font-size:11px!important; }

  .cashier-grid { grid-template-columns:repeat(3,1fr)!important; gap:6px!important; }
  .cashier-number { width:18px!important; height:18px!important; font-size:7px!important; }
  .collection-totals { grid-template-columns:repeat(3,1fr)!important; gap:5px!important; margin-top:6px!important; }
  .collection-totals>div { padding:7px!important; border-radius:5px!important; }
  .collection-totals span { margin-bottom:3px!important; font-size:7px!important; }
  .collection-totals strong { font-size:12px!important; }

  .embedded-accounts { margin-top:7px!important; padding:7px 0 0!important; }
  .accounts-grid { grid-template-columns:repeat(5,minmax(0,1fr))!important; gap:5px!important; margin-top:0!important; }
  .accounts-grid>label { padding:7px!important; border-radius:5px!important; }
  .accounts-grid>label>span:first-child { min-height:0!important; margin-bottom:3px!important; font-size:7px!important; }
  .account-input input,.account-input .print-value { font-size:11px!important; font-weight:800; }
  .account-input small { font-size:6px!important; }
  .account-entry-grid { grid-template-columns:repeat(2,1fr)!important; gap:5px!important; margin-top:6px!important; }
  .account-entry-card:has(.account-entry-list:empty),.cost-category-card:has(.cost-entry-list:empty) { display:none!important; }

  .transfer-detail .owner-transfer-list,.transfer-detail>.transfer-totals { display:none!important; }
  .print-only { display:grid!important; }
  .transfer-channel-totals { grid-template-columns:repeat(4,minmax(0,1fr))!important; gap:4px!important; margin-top:0!important; }
  .transfer-channel-totals>div.transfer-net { display:none!important; }
  .transfer-channel-totals>div { padding:7px!important; border-radius:5px!important; background:#f4f7f9!important; }
  .transfer-channel-totals>div.transfer-net { color:#fff!important; background:#244255!important; }
  .transfer-channel-totals span { display:block; margin-bottom:3px!important; color:#687780; font-size:6.5px!important; font-weight:800; letter-spacing:.05em; }
  .transfer-channel-totals .transfer-net span { color:#cde0ea!important; }
  .transfer-channel-totals strong { font-size:10px!important; }

  .cost-detail { break-before:page; }
  .cost-category-grid { grid-template-columns:1fr!important; gap:6px!important; align-items:start; }
  .cost-category-card { break-inside:avoid-page; }
  .cost-grand-total { margin-top:6px!important; padding:7px 9px!important; border-radius:5px!important; }
  .cost-grand-total span { font-size:7px!important; }
  .cost-grand-total strong { font-size:13px!important; }

  .closing-detail { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:6px!important; }
  .closing-detail>.section-heading { grid-column:1/-1; }
  .closing-entry-grid { display:contents!important; }
  .signature-area { grid-column:1/-1; grid-template-columns:repeat(2,1fr)!important; gap:42px!important; margin-top:14px!important; break-inside:avoid; }
  .signature-area>div { min-height:48px!important; text-align:center; }
  .signature-area span { display:block; font-size:8px!important; font-weight:800; }
  .signature-area b { display:block; height:29px!important; border-bottom:1px solid #555; }
  .signature-area small { display:block; margin-top:3px!important; font-size:7px!important; }

  /* Spreadsheet-style report: plain cells, ruled rows and consistent hierarchy. */
  .metric-card,.opening-detail,.revenue-detail,.accounts-detail,.transfer-detail,
  .cost-detail,.closing-detail,.opening-entry-card,.cashier-card,.account-entry-card,
  .cost-category-card,.closing-entry-card,.bank-deposit-card,.collection-totals>div,
  .accounts-grid>label,.transfer-channel-totals>div,.cost-grand-total {
    border-radius:0!important;
    box-shadow:none!important;
  }
  .opening-detail,.revenue-detail,.transfer-detail,.cost-detail,.closing-detail {
    border:1px solid #9facaa!important;
    background:#fff!important;
  }
  .section-heading {
    height:36px!important;
    min-height:0!important;
    box-sizing:border-box!important;
    align-items:center!important;
    padding:5px 6px!important;
    border-bottom:1px solid #9facaa!important;
    background:#e8eeeb!important;
  }
  .section-heading h2 { color:#173c31!important; }
  .opening-entry-card,.cashier-card,.account-entry-card,.cost-category-card,
  .closing-entry-card,.bank-deposit-card {
    border:1px solid #b9c3c0!important;
    background:#fff!important;
  }
  .opening-data-row,.deposit-row,.account-entry-row,.cost-entry-row,.closing-data-row {
    padding:3px 0!important;
    border-top:1px solid #d7ddda!important;
  }
  .opening-row-list>:first-child,.deposit-list>:first-child,.account-entry-list>:first-child,
  .cost-entry-list>:first-child,.closing-row-list>:first-child { border-top:0!important; }
  .opening-subtotal,.closing-subtotal {
    padding:5px 2px 0!important;
    border-top:1px solid #9facaa!important;
  }
  .collection-totals,.accounts-grid,.transfer-channel-totals { gap:0!important; }
  .collection-totals>div,.accounts-grid>label,.transfer-channel-totals>div {
    border:1px solid #b9c3c0!important;
    border-right:0!important;
    background:#fff!important;
  }
  .collection-totals>:last-child,.accounts-grid>:last-child,.transfer-channel-totals>:last-child { border-right:1px solid #b9c3c0!important; }
  .collection-totals .grand-total,.transfer-channel-totals>div.transfer-net,.cost-grand-total {
    color:#fff!important;
    background:#173c31!important;
  }
  .transfer-channel-totals .transfer-net span { color:#dce9e4!important; }
  .cost-grand-total { border:1px solid #173c31!important; }
  .signature-area { padding-top:8px!important; border-top:1px solid #9facaa!important; }

  /* Toner-friendly monochrome output for black-and-white office printers. */
  html,body,.report-shell { color:#000!important; background:#fff!important; }
  .metric-card,.opening-detail,.revenue-detail,.accounts-detail,.transfer-detail,
  .cost-detail,.closing-detail,.opening-entry-card,.cashier-card,.account-entry-card,
  .cost-category-card,.closing-entry-card,.bank-deposit-card,.collection-totals>div,
  .accounts-grid>label,.transfer-channel-totals>div {
    color:#000!important;
    border-color:#c9c9c9!important;
    background:#fff!important;
  }
  .metric-card { border:.7px solid #c9c9c9!important; }
  .metric-card .money-input strong,.cost-subtotal { color:#000!important; }
  .metric-card .metric-icon { color:#000!important; border:.7px solid #c9c9c9!important; background:#fff!important; }
  .section-heading { color:#000!important; border-color:#c4c4c4!important; background:#f1f1f1!important; }
  .section-heading h2,.section-kicker { color:#000!important; }
  .collection-totals .grand-total,.transfer-channel-totals>div.transfer-net,.cost-grand-total {
    color:#000!important;
    border:.7px solid #bdbdbd!important;
    border-top:1px solid #999!important;
    background:#f3f3f3!important;
  }
  .collection-totals .grand-total span,.transfer-channel-totals .transfer-net span,
  .cost-grand-total span { color:#000!important; }
  .opening-data-row,.deposit-row,.account-entry-row,.cost-entry-row,.closing-data-row { border-color:#e4e4e4!important; }
  .opening-subtotal,.closing-subtotal,.signature-area { border-color:#d0d0d0!important; }
  .signature-area { color:#000!important; background:#fff!important; }
  .signature-area b { border-color:#aaa!important; }

  /* Readable A4 typography and clearer separation between major report blocks. */
  body { font-size:11px!important; }
  .report-head label span { font-size:9px!important; }
  .report-head input,.report-head .print-value { font-size:14px!important; }
  .metrics { gap:7px!important; padding-top:9px!important; }
  .metric-card { min-height:84px!important; padding:11px!important; }
  .metric-card .metric-label { font-size:12px!important; }
  .money-input input,.money-input strong,.money-input .print-value { font-size:22px!important; }
  .money-input small { font-size:8px!important; }
  .opening-detail,.revenue-detail,.transfer-detail,.cost-detail,.closing-detail { margin-top:16px!important; padding:11px!important; }
  .section-heading { height:44px!important; padding:6px 8px!important; }
  .section-heading h2 { font-size:16px!important; }
  .section-kicker { font-size:9px!important; }
  .opening-entry-card,.cashier-card,.account-entry-card,.cost-category-card,
  .closing-entry-card,.bank-deposit-card { padding:10px!important; }
  .opening-entry-head h3,.cashier-head h3,.account-entry-head h3,
  .cost-category-head h3,.closing-entry-head h3 { font-size:12px!important; }
  .opening-row-list,.deposit-list,.account-entry-list,.cost-entry-list,.closing-row-list { gap:4px!important; margin:7px 0!important; }
  .opening-data-row,.deposit-row,.account-entry-row,.cost-entry-row,.closing-data-row { padding:5px 0!important; }
  .opening-row-index,.deposit-index,.account-entry-index,.cost-entry-index,.closing-row-index { font-size:9px!important; }
  .print-value { font-size:11px!important; line-height:1.35!important; }
  .deposit-field span { font-size:9px!important; }
  .opening-subtotal,.closing-subtotal { margin-top:6px!important; padding-top:6px!important; }
  .opening-subtotal span,.closing-subtotal span { font-size:9px!important; }
  .opening-subtotal strong,.closing-subtotal strong,.cost-subtotal { font-size:13px!important; }
  .cashier-number { width:21px!important; height:21px!important; font-size:9px!important; }
  .collection-totals { margin-top:9px!important; }
  .collection-totals>div,.accounts-grid>label,.transfer-channel-totals>div { padding:9px!important; }
  .collection-totals span,.accounts-grid>label>span:first-child { font-size:9px!important; }
  .collection-totals strong { font-size:14px!important; }
  .embedded-accounts { margin-top:12px!important; padding-top:10px!important; }
  .account-input input,.account-input .print-value { font-size:13px!important; }
  .account-input small { font-size:7px!important; }
  .account-entry-grid { margin-top:8px!important; gap:7px!important; }
  .transfer-channel-totals span { font-size:8px!important; }
  .transfer-channel-totals strong { font-size:12px!important; }
  .cost-category-grid { gap:9px!important; }
  .cost-grand-total { margin-top:9px!important; padding:9px 11px!important; }
  .cost-grand-total span { font-size:9px!important; }
  .cost-grand-total strong { font-size:15px!important; }
  .closing-detail { gap:9px!important; }
  .signature-area { margin-top:18px!important; }
  .signature-area span { font-size:10px!important; }
  .signature-area small { font-size:9px!important; }

  /* Two-page fit: keep the larger type, tighten only vertical rhythm. */
  body { line-height:1.18!important; }
  .metrics { margin-bottom:0!important; }
  .metric-card { min-height:78px!important; padding:9px!important; }
  .opening-detail,.revenue-detail,.transfer-detail,.cost-detail,.closing-detail { margin-top:12px!important; padding:9px!important; }
  .section-heading { height:40px!important; padding:5px 7px!important; }
  .section-heading h2 { line-height:1.08!important; }
  .opening-entry-card,.cashier-card,.account-entry-card,.cost-category-card,
  .closing-entry-card,.bank-deposit-card { padding:8px!important; }
  .opening-row-list,.deposit-list,.account-entry-list,.cost-entry-list,.closing-row-list { gap:2px!important; margin:5px 0!important; }
  .opening-data-row,.deposit-row,.account-entry-row,.cost-entry-row,.closing-data-row { padding:3px 0!important; }
  .print-value { line-height:1.15!important; }
  .opening-subtotal,.closing-subtotal { margin-top:4px!important; padding-top:4px!important; }
  .collection-totals { margin-top:6px!important; }
  .collection-totals>div,.accounts-grid>label,.transfer-channel-totals>div { padding:7px!important; }
  .embedded-accounts { margin-top:8px!important; padding-top:7px!important; }
  .account-entry-grid { margin-top:6px!important; gap:5px!important; }
  .cost-category-grid { gap:6px!important; }
  .cost-grand-total { margin-top:6px!important; padding:7px 9px!important; }
  .closing-detail { gap:6px!important; }
  .signature-area { margin-top:12px!important; }
  .cost-detail { break-before:page!important; }
  .closing-detail { break-inside:avoid-page; }
}
