/* Scoped presentation: preserve the existing accounting services and access rules. */
.deposit-workspace {min-width:0}
.deposit-card {border:1px solid #dce4ee;border-radius:8px;padding:18px;margin:16px 0;min-width:0}
.deposit-card h3 {background:#153b69;color:white;padding:10px;margin:0 0 16px;border-radius:5px}
.deposit-search {display:grid;grid-template-columns:minmax(180px,1.4fr) minmax(140px,1fr) minmax(120px,1fr) minmax(160px,1fr) auto;gap:12px;align-items:end}
.deposit-workspace label {display:flex;flex-direction:column;gap:6px;margin-bottom:10px;min-width:0}
.deposit-workspace label input,.deposit-workspace label select {width:100%;box-sizing:border-box}
.deposit-workspace [hidden] {display:none!important}
.deposit-workspace .deposit-invoices {min-width:1080px;table-layout:fixed}
.deposit-workspace .deposit-invoices td {white-space:normal;overflow-wrap:anywhere;vertical-align:top}
.deposit-invoices th:nth-child(1) {width:60px}
.deposit-invoices th:nth-child(2) {width:220px}
.deposit-invoices input:not([type=checkbox]) {width:100%}
.deposit-totals {padding:16px;background:#edf3fb;border-radius:6px;margin:16px 0;font-size:16px;font-weight:600}
@media(max-width:1100px){.deposit-search {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.deposit-search {grid-template-columns:1fr}.deposit-card {padding:12px}.deposit-workspace {padding:12px}}
.accounting-workspace { padding:20px; color:#142d4f; background:#fff; border:0; box-shadow:none; }
.accounting-workspace > .module-preview__header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:8px; }
.accounting-workspace > .module-preview__header h2 { font-size:24px; margin:0; }
.accounting-workspace.finanzas-module .filter-bar.accounting-toolbar { display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; gap:10px; margin:0; padding:0; border:0; box-shadow:none; background:transparent; }
.accounting-workspace.finanzas-module .filter-bar.accounting-toolbar label { display:flex; align-items:center; gap:8px; }
.accounting-workspace input,.accounting-workspace select,.accounting-dialog input,.accounting-dialog select { font:inherit; font-size:14px; border:1px solid #bdcce0; border-radius:5px; min-height:36px; padding:6px 10px; min-width:0; box-sizing:border-box; background:white; color:#142d4f; }
.accounting-workspace button,.accounting-dialog button { font-size:14px; line-height:1.3; min-height:36px; padding:7px 12px; border:1px solid #c4d0e0; border-radius:5px; background:white; color:#064a94; cursor:pointer; }
.accounting-workspace button.btn-secondary,.accounting-dialog button.btn-secondary { background:#0759c8; border-color:#0759c8; color:white; box-shadow:none; }
.accounting-workspace button:disabled,.accounting-dialog button:disabled { opacity:.55; cursor:default; }
.accounting-workspace .finanzas-screen { font-size:14px; line-height:1.5; gap:0; }
.accounting-workspace .finanzas-screen > p { margin:6px 0 10px; color:#52647a; }
.accounting-workspace h3 { font-size:18px; margin:18px 0 10px; }
.accounting-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:8px 0 14px; padding:12px 0; border-top:1px solid #dce4ee; border-bottom:1px solid #dce4ee; gap:16px; }
.accounting-metrics > div { padding:0 16px; border-right:1px solid #dce4ee; }
.accounting-metrics > div:first-child { padding-left:0; }
.accounting-metrics > div:last-child { border:0; }
.accounting-metrics dt { font-size:14px; }
.accounting-metrics dd { margin:3px 0 0; font-size:23px; font-weight:700; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.accounting-metric--warning dd,.accounting-status--warning { color:#975600; }
.accounting-status--ok { color:#17613a; }
.accounting-pending { border:1px solid #f0dfbf; border-radius:6px; background:#fff8ed; margin:10px 0; padding:9px 12px; overflow-wrap:anywhere; }
.accounting-pending summary { cursor:pointer; font-weight:600; }
.accounting-pending p { margin:8px 0; }
.accounting-crossed { padding:6px 10px; background:#f1f5fa; border-radius:4px; font-size:14px; }
.accounting-workspace.finanzas-module .filter-bar.accounting-filters { display:grid; grid-template-columns:minmax(105px,220px) minmax(145px,260px) minmax(145px,180px) minmax(140px,1fr); align-items:end; gap:12px; padding:0; margin:10px 0 14px; border:0; background:transparent; box-shadow:none; }
.accounting-filters label { display:flex; flex-direction:column; gap:5px; min-width:0; }
.accounting-filters input,.accounting-filters select { width:100%; }
.accounting-workspace .table-container { border:1px solid #dce4ee; border-radius:6px; overflow-x:auto; }
.accounting-workspace .demo-table { width:100%; min-width:700px; border-collapse:collapse; font-size:14px; }
.accounting-workspace .demo-table th { font-size:13px; text-transform:none; letter-spacing:normal; background:#edf2f8; padding:10px 12px; }
.accounting-workspace .demo-table td { padding:9px 12px; vertical-align:middle; }
.accounting-workspace .demo-table tbody tr:nth-child(even) { background:#f6f8fb; }
.accounting-movements .demo-table { table-layout:fixed; min-width:1120px; }
.accounting-movements .demo-table th:nth-child(1) { width:110px; }
.accounting-movements .demo-table th:nth-child(2) { width:220px; }
.accounting-movements .demo-table th:nth-child(4) { width:140px; text-align:right; }
.accounting-movements .demo-table th:nth-child(5) { width:160px; }
.accounting-movements .demo-table th:nth-child(6) { width:140px; }
.accounting-movements .demo-table td { vertical-align:top; }
.accounting-movements .accounting-movement-account { display:block; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.accounting-movements .demo-table td:nth-child(2),
.accounting-movements .demo-table td:nth-child(3),
.accounting-movements .demo-table td:nth-child(5) { white-space:normal; overflow-wrap:anywhere; }
.accounting-movements .demo-table td:nth-child(6) button { white-space:nowrap; }
.accounting-movements .demo-table td:nth-child(4),.accounting-bank-table .demo-table td:nth-child(n+3):nth-child(-n+5) { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.accounting-movements > p { margin:8px 12px; }
.accounting-account-detail { border-bottom:1px solid #dce4ee; padding-bottom:10px; }
.accounting-account-detail:empty { display:none; }
.accounting-account-detail p { margin:6px 0; }
.accounting-breakdown dd { font-size:19px; }
.accounting-links { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:10px 0; color:#52647a; font-size:13px; }
.accounting-dialog { color:#142d4f; border:1px solid #dce4ee; border-radius:10px; padding:24px; width:min(760px,calc(100vw - 32px)); max-height:90dvh; box-sizing:border-box; font-size:14px; overflow-y:auto; }
.accounting-dialog::backdrop { background:#142d4f55; }
.accounting-dialog__heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.accounting-dialog__heading h2 { margin:0; font-size:22px; }
.accounting-dialog label { display:flex; flex-direction:column; gap:5px; margin:10px 0; }
.accounting-dialog input:not([type=checkbox]),.accounting-dialog select { width:100%; }
.accounting-dialog label:has([type=checkbox]) { flex-direction:row; align-items:center; }
.accounting-dialog input[type=checkbox] { min-height:auto; }
.accounting-dialog p { overflow-wrap:anywhere; }
.accounting-drawer { margin:0 0 0 auto; height:100dvh; max-height:100dvh; width:min(420px,100vw); border-radius:0; border-right:0; }
.accounting-drawer::backdrop { background:#142d4f18; }
.accounting-upload-fields { border:0; border-bottom:1px solid #dce4ee; padding:10px 0 16px; margin:14px 0; min-width:0; }
.accounting-upload-fields legend { font-weight:700; }
.accounting-workspace :focus-visible,.accounting-dialog :focus-visible { outline:2px solid #0759c8; outline-offset:3px; }
@media (max-width:700px) {
  .accounting-workspace { padding:12px; }
  .accounting-workspace > .module-preview__header h2 { font-size:22px; }
  .accounting-workspace.finanzas-module .filter-bar.accounting-toolbar { width:100%; }
  .accounting-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .accounting-metrics > div { padding:0; border:0; }
  .accounting-metrics dd { font-size:20px; }
  .accounting-workspace.finanzas-module .filter-bar.accounting-filters { grid-template-columns:minmax(0,1fr); gap:8px; }
  .accounting-dialog { padding:16px; }
}

.accounting-workspace.finanzas-module .filter-bar.accounting-toolbar button { width:auto; flex:none; }
.accounting-workspace .accounting-toolbar a { font-size:14px; }
.accounting-workspace .accounting-toolbar { text-align:left; }
.accounting-dialog__heading { position:sticky; top:-24px; background:white; z-index:1; padding:8px 0; }

/* Keep the comparison readable beside the upload drawer on wide displays. */
@media (min-width:1400px) {
  .main-content [data-role="main-view"] > .accounting-workspace:has(.accounting-drawer[open]) { width:calc(100% - 420px); margin-right:420px; }
  .accounting-workspace:has(.accounting-drawer[open]) .accounting-metrics dd { font-size:20px; }
}
.accounting-upload-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 12px; }
.accounting-upload-fields > label:nth-of-type(1),
.accounting-upload-fields > label:nth-of-type(2),
.accounting-upload-fields > label:nth-of-type(5) { grid-column:1 / -1; }
.accounting-upload-fields > button { justify-self:start; }
.accounting-drawer input[type=file] { border-style:dashed; padding:18px 10px; min-height:65px; }
.accounting-drawer > button { margin:4px 4px 4px 0; }
.accounting-drawer::backdrop { background:#142d4f08; }
/* The remaining accounting screens follow the approved bank workspace. */
.accounting-secondary .accounting-settings-section {border-top:1px solid #dce4ee;padding:12px 0;margin:0 0 16px}
.accounting-secondary summary {font-size:16px;font-weight:600;padding:10px 0;cursor:pointer}
.accounting-secondary .accounting-settings-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start;margin:12px 0}
.accounting-secondary label {display:grid;gap:6px;font-size:14px;min-width:0}
.accounting-secondary input:not([type=checkbox]),.accounting-secondary select {width:100%}
.accounting-secondary label:has([type=checkbox]) {display:flex;align-items:center;min-height:44px}
.accounting-secondary fieldset {border:0;border-top:1px solid #dce4ee;padding:12px 0;min-width:0}
.accounting-secondary legend {font-size:16px;font-weight:600;padding:10px 0}
.accounting-secondary .accounting-catalog-row {display:grid;grid-template-columns:minmax(100px,.7fr) minmax(0,2fr) minmax(120px,1fr) auto;gap:12px;align-items:end;padding:12px 0;border-bottom:1px solid #edf2f8}
.accounting-secondary .accounting-metrics {grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
.accounting-secondary .accounting-metrics dd {font-size:20px;overflow-wrap:anywhere}
.accounting-secondary .accounting-toolbar button {flex:0 0 auto;width:auto}
.accounting-secondary .accounting-toolbar input[type=date] {width:auto}
.accounting-secondary .btn-secondary {background:var(--company-accent,#06346b);color:var(--color-primary-contrast,white);box-shadow:none}
.accounting-secondary p {line-height:1.5}
@media(max-width:700px){
 .accounting-secondary .accounting-settings-grid,.accounting-secondary .accounting-catalog-row {grid-template-columns:1fr}
 .accounting-secondary input,.accounting-secondary select,.accounting-secondary button {min-height:44px;font-size:16px}
 .accounting-secondary .accounting-toolbar {align-items:stretch!important}
 .accounting-secondary .accounting-toolbar button {flex:1 1 auto}
 .accounting-secondary .accounting-catalog-row {padding:16px 0}
}
.accounting-document-filters {display:grid;grid-template-columns:minmax(170px,1fr) minmax(150px,1fr) minmax(200px,2fr);gap:10px;margin:12px 0}
.accounting-pagination {display:flex;gap:12px;align-items:center;justify-content:flex-end;margin:14px 0}
.accounting-documents td small {display:block;overflow-wrap:anywhere;color:#52647a;margin-top:4px}
.accounting-documents td:nth-child(4) {white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}
.accounting-documents td {white-space:normal;overflow-wrap:anywhere}
.accounting-workspace .accounting-xml-open {border:0;background:transparent;padding:0;min-height:32px;font-weight:700;text-decoration:underline;text-align:left;overflow-wrap:anywhere}
.accounting-xml-dialog {width:min(1100px,calc(100vw - 32px))}
.accounting-xml-dialog p {overflow-wrap:anywhere}
.accounting-xml-scroll {max-width:100%;overflow-x:auto}
.accounting-xml-scroll table {min-width:860px;width:100%;border-collapse:collapse}
.accounting-xml-scroll th,.accounting-xml-scroll td {padding:10px;vertical-align:top;white-space:normal;overflow-wrap:anywhere;border-bottom:1px solid #dce4ee}
.accounting-xml-scroll td:nth-child(2) {min-width:220px;max-width:340px}
.accounting-sat-coverage {margin:16px 0}
@media(max-width:700px){
 .accounting-document-filters {grid-template-columns:1fr}
 .accounting-documents .demo-table {min-width:0}
 .accounting-documents thead {display:none}
 .accounting-documents tr {display:block;padding:12px;border-bottom:1px solid #dce4ee}
 .accounting-documents td {display:grid;grid-template-columns:90px minmax(0,1fr);gap:6px;padding:6px 0!important;border:0!important;overflow-wrap:anywhere;text-align:left!important;white-space:normal!important}
 .accounting-documents td::before {content:attr(data-label);font-weight:600;color:#52647a}
 .accounting-documents td small {grid-column:2}
 .accounting-pagination {justify-content:space-between}
}
.accounting-workspace.accounting-secondary button.btn-secondary {background:var(--company-accent,#06346b);border-color:var(--company-accent,#06346b);color:var(--color-primary-contrast,white)}
.accounting-secondary .accounting-metrics > div:last-child dd {font-size:18px}

.accounting-rfc-scope { border:1px solid var(--border-color,#d4deea); border-radius:10px; padding:14px; margin-bottom:16px; background:var(--brand-soft,#f4f7fa); }
.accounting-rfc-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.accounting-rfc-filters[hidden], .accounting-rfc-scope[hidden] { display:none; }
.accounting-rfc-filters label { display:grid; gap:6px; }
.accounting-rfc-filters select { width:100%; min-width:0; min-height:44px; }
.accounting-multi-upload { width:min(1000px,calc(100vw - 24px)); }
.accounting-multi-account { border:1px solid var(--border-color,#d4deea); border-radius:8px; padding:12px; margin:12px 0; overflow-wrap:anywhere; }
.accounting-multi-account input[type=checkbox] { width:22px; height:22px; margin-right:8px; }
.accounting-workspace .accounting-catalog-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media(max-width:600px) { .accounting-rfc-filters, .accounting-workspace .accounting-catalog-row { grid-template-columns:1fr; } .accounting-multi-upload { max-height:100dvh; } }

.accounting-reparto-seleccion { margin-block: .75rem; padding: .75rem; border: 1px solid #b8c9e0; border-radius: .5rem; }
.accounting-reparto-seleccion h4 { margin-block: 0 .5rem; }
.accounting-reparto-fila { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-block: .4rem; }
.accounting-reparto-fila span { flex: 1 0 100%; overflow-wrap: anywhere; }
.accounting-reparto-fila input { max-width: 12rem; }
.accounting-review__readable { overflow-wrap: anywhere; }
.accounting-review__section { margin-block: 0.75rem; padding: 0.75rem; border: 1px solid #dce4ee; border-radius: 6px; }
.accounting-review__section > h3 { margin: 0; font-size: 1rem; }
.accounting-review__section > summary { font-weight: 600; cursor: pointer; }
.accounting-review__section > p { margin-block: 0.45rem; }

.accounting-payroll-controls { border:0; padding:0; margin:12px 0 0; min-width:0; }
.accounting-payroll-totals { position:sticky; top:40px; z-index:1; background:#f2f7ff; padding:8px 12px; border:1px solid #b8c9e0; border-radius:6px; font-weight:600; }
.accounting-payroll-totals p { margin:4px 0; font-variant-numeric:tabular-nums; }
.accounting-payroll-list { max-height:320px; overflow:auto; overscroll-behavior:contain; margin:12px 0; border-block:1px solid #dce4ee; }
.accounting-payroll-row { padding:10px 4px; border-bottom:1px solid #dce4ee; gap:10px!important; }
.accounting-payroll-row input { flex:none; width:20px; height:20px; }
.accounting-payroll-row span { min-width:0; overflow-wrap:anywhere; }
.accounting-payroll-row small { display:block; color:#52647a; margin-top:4px; }
.accounting-payroll-controls > button { margin:6px 6px 6px 0; }
.accounting-payroll-controls > select,.accounting-payroll-controls > input { margin-top:10px; }
.accounting-fees { margin: 24px 0; padding: 20px; border: 1px solid #cbd8e8; border-radius: 10px; background: #f8fbff; }
.accounting-fee-rule { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin: 16px 0; padding: 16px; }
.accounting-fees label { display: grid; gap: 6px; margin: 12px 0; }
.accounting-fees input, .accounting-fees textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.accounting-fee-group { padding: 16px; margin-top: 16px; border: 1px solid #cbd8e8; border-radius: 8px; background: white; overflow-wrap: anywhere; }
.accounting-fee-group details { overflow-x: auto; }
.accounting-fee-group td { white-space: normal; overflow-wrap: anywhere; }
@media(max-width: 640px) { .accounting-fee-rule { grid-template-columns: 1fr; } }

.accounting-associated-form,
.accounting-isr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: .65rem .85rem;
  max-width: 72rem;
  margin-block: .65rem;
}

.accounting-associated-form label,
.accounting-isr-grid label {
  min-width: 0;
  margin: 0;
}

.accounting-associated-form label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.accounting-associated-form button {
  justify-self: start;
}

@media (max-width: 900px) {
  .accounting-associated-form, .accounting-isr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .accounting-associated-form, .accounting-isr-grid { grid-template-columns: minmax(0, 1fr); }
}
