.accounting-lab { color: #20223f; padding: 1.25rem; border: 1px solid #e7e6f3; border-radius: 1rem; background: #f9f8ff; margin: 1.25rem 0; }
.accounting-lab-heading h3 { margin: 0 0 .5rem; font-size: 1.25rem; }
.accounting-lab p { line-height: 1.6; }
.accounting-lab-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.accounting-lab label { display: grid; gap: .4rem; font-weight: 650; font-size: .9rem; }
.accounting-lab-wide { grid-column: span 2; }
.accounting-lab input, .accounting-lab select { box-sizing: border-box; width: 100%; min-height: 2.6rem; border: 1px solid #d8d2e9; border-radius: .45rem; background: #fff; color: #20223f; font: inherit; font-weight: 400; padding: .55rem .65rem; }
.accounting-lab input[readonly] { background: #f3f0fa; }
.accounting-lab :is(input, select, button):focus-visible { outline: 3px solid #5840d7; outline-offset: 2px; }
.accounting-lab-hint { color: #62647c; font-size: .88rem; }
.accounting-lab-reference { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: #e6eef8; display: inline-block; padding: .45rem .8rem; border-radius: .4rem; }
.accounting-lab-table-scroll { width: 100%; overflow-x: auto; border: 1px solid #d7e0ea; border-radius: .5rem; background: #fff; }
.accounting-lab-table { width: 100%; border-collapse: collapse; margin: 0; font-size: .88rem; }
.accounting-lab-table caption { text-align: left; padding: .8rem; font-weight: 650; color: #253851; caption-side: top; }
.accounting-lab-table th, .accounting-lab-table td { text-align: left; padding: .6rem; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.accounting-lab-table thead th { background: #eef3f9; color: #334b68; white-space: nowrap; }
.accounting-lab-table [data-line-account] { min-width: 11rem; }
.accounting-lab-table [data-line-label] { min-width: 9rem; }
.accounting-lab-table :is([data-line-debit], [data-line-credit]) { min-width: 6.4rem; font-variant-numeric: tabular-nums; text-align: right; }
.accounting-lab-table [data-line-document] { min-width: 12rem; }
.accounting-lab-document-actions { display: flex; gap: .65rem; justify-content: space-between; align-items: center; margin-top: .3rem; }
.accounting-lab-document-actions button { border: 0; background: transparent; color: #174e91; padding: .3rem 0; text-decoration: underline; cursor: pointer; font: inherit; }
.accounting-lab-document-actions button:disabled { color: #718096; text-decoration: none; cursor: default; }
.accounting-lab-remove { border: 1px solid #dbb5b5; border-radius: .4rem; background: #fff5f5; color: #8e2828; width: 2.4rem; height: 2.6rem; font-size: 1.4rem; cursor: pointer; }
.accounting-lab-add { margin: .8rem 0 1rem; }
.accounting-lab-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: .5rem 0 1rem; }
.accounting-lab-totals > div { padding: .85rem; background: #eaf1f9; border-radius: .6rem; display: flex; flex-direction: column; gap: .4rem; }
.accounting-lab-totals strong { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.accounting-lab-totals small { font-size: .75rem; }
.accounting-lab [data-balanced="true"] { color: #146342; font-weight: 650; }
.accounting-lab [data-balanced="false"] { color: #8f3a13; font-weight: 650; }
.accounting-lab-errors { padding: 1rem 1rem 1rem 2rem; border: 1px solid #dfa5a5; border-radius: .6rem; background: #fff4f4; color: #8e2828; }
.accounting-lab-errors li + li { margin-top: .35rem; }
.accounting-lab-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.accounting-lab [data-accounting-status] { font-weight: 650; color: #245239; }
.accounting-lab-result { margin: 1rem 0; }
.accounting-lab-result h4 { font-size: 1.05rem; }
.accounting-lab [hidden] { display: none; }
.accounting-lab-dialog { width: min(90vw, 36rem); border: 1px solid #c5d0df; border-radius: 1rem; padding: 0; color: #24344a; }
.accounting-lab-dialog::backdrop { background: rgb(16 29 47 / 65%); }
.accounting-lab-document { padding: 1.75rem; }
.accounting-lab-document h3 { margin: .75rem 0; }
.accounting-lab-document-warning { color: #8f4312; background: #fff2da; border-radius: .5rem; padding: .75rem; font-size: .8rem; font-weight: 700; }
.accounting-lab-document dl { display: grid; grid-template-columns: 1fr auto; gap: .8rem; margin: 1.5rem 0; }
.accounting-lab-document dt { font-weight: 600; }
.accounting-lab-document dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.accounting-lab-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 800px) { .accounting-lab-fields, .accounting-lab-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .accounting-lab { padding: .8rem; } .accounting-lab-fields { grid-template-columns: 1fr; } .accounting-lab-wide { grid-column: auto; } .accounting-lab-totals { grid-template-columns: 1fr; } .accounting-lab-actions .btn { width: 100%; justify-content: center; } }
.dsi-site .accounting-lab { background:var(--module-tint);border-color:var(--module-line);color:var(--dsi-text);padding:24px;border-radius:20px; }
.dsi-site .accounting-lab :is(input,select) { color:var(--dsi-text);background:var(--dsi-surface);border-color:var(--dsi-border-strong);border-radius:8px; }
.dsi-site .accounting-lab input[readonly] { background:var(--dsi-surface-alt); }
.dsi-site .accounting-lab :is(input,select,button):focus-visible { outline-color:var(--module-accent); }
.dsi-site .accounting-lab-table-scroll,.dsi-site .accounting-lab-dialog { background:var(--dsi-surface);color:var(--dsi-text);border-color:var(--module-line); }
.dsi-site .accounting-lab-table caption { color:var(--dsi-text); }
.dsi-site .accounting-lab-table :is(th,td) { border-color:var(--dsi-border); }
.dsi-site .accounting-lab-table thead th { background:var(--module-deep);color:#fff; }
.dsi-site .accounting-lab-reference,.dsi-site .accounting-lab-totals>div { background:var(--dsi-surface);border:1px solid var(--module-line); }
.dsi-site .accounting-lab-document-actions button { color:var(--module-ink); }
