/* =========================================================
   NOVASYSTEMS · Facturación electrónica (e-CF)
   Portal de los negocios, pestaña del panel y representación impresa.
   El comprobante se muestra siempre como papel blanco, en carta o ticket de 80 mm.
   ========================================================= */
.mono { font-family: var(--mono); letter-spacing: .02em; }
.sr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.env-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.env-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.env-badge.test { color: var(--late); background: rgb(var(--orange-rgb) / .12); border: 1px solid rgb(var(--orange-rgb) / .3); }
.env-badge.prod { color: var(--turq-2); background: rgb(var(--turq-rgb) / .1); border: 1px solid rgb(var(--turq-rgb) / .28); }
.ecf-env-note { margin-bottom: 18px; border-color: rgb(var(--orange-rgb) / .3); background: rgb(var(--orange-rgb) / .07); }
#content > section + section, #cuenta-tab > .card + .card { margin-top: 18px; }

/* ---------- Formulario ---------- */
.ecf-form { display: grid; gap: 26px; }
.ecf-form .page-title { margin-bottom: 0; }
.ecf-form .page-title h1 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 34px); }
.ecf-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.ecf-types legend { margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ecf-type { position: relative; cursor: pointer; }
.ecf-type input { position: absolute; inset: 0; opacity: 0; margin: 0; min-height: 0; cursor: pointer; }
.ecf-type span { display: grid; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: rgb(var(--fg-rgb) / .03); transition: border-color .2s, background-color .2s, box-shadow .2s; }
.ecf-type strong { font-size: 15px; color: var(--text); }
.ecf-type small { font-size: 12.5px; font-weight: 400; line-height: 1.4; color: var(--text-3); }
.ecf-type input:checked + span { border-color: rgb(var(--turq-rgb) / .7); background: rgb(var(--turq-rgb) / .09); box-shadow: 0 0 0 3px rgb(var(--turq-rgb) / .14); }
.ecf-type input:focus-visible + span { outline: 2px solid var(--turq); outline-offset: 2px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: 20px; min-height: 20px; height: 20px; margin: 0; accent-color: var(--turq-2); }
.ecf-lines-head, .ecf-line { display: grid; grid-template-columns: minmax(0, 3fr) 126px 80px 128px 116px 118px 36px; gap: 10px; align-items: center; }
.ecf-line select { padding-right: 32px; background-position: right 10px center; }
.ecf-lines-head { padding: 0 2px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ecf-lines-head span:nth-child(6) { text-align: right; }
#lines { display: grid; gap: 10px; }
.ecf-line label { margin: 0; }
.ecf-line input, .ecf-line select { margin-top: 0; }
.ecf-l-amount { font-family: var(--mono); font-size: 13.5px; color: var(--text); text-align: right; white-space: nowrap; }
.ecf-l-remove { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; }
.ecf-form-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.ecf-summary { position: sticky; top: 90px; display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line-2); border-radius: 16px; background: rgb(var(--fg-rgb) / .03); }
.ecf-summary .totals { margin-top: 0; }
.ecf-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--turq-2); }
.ecf-more[open] summary { margin-bottom: 12px; }
.ecf-confirm, .ecf-facts { display: grid; gap: 0; margin: 0; }
.ecf-confirm div, .ecf-facts div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ecf-confirm dt, .ecf-facts dt { color: var(--text-3); font-size: 13px; }
.ecf-confirm dd, .ecf-facts dd { margin: 0; text-align: right; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
#confirm-dialog { max-width: 520px; }

/* ---------- Listas ---------- */
.ecf-docs tbody tr { cursor: pointer; transition: background-color .15s; }
.ecf-docs tbody tr:hover, .ecf-docs tbody tr:focus-visible { background: rgb(var(--fg-rgb) / .035); outline: none; }
.ecf-state { display: grid; gap: 8px; margin-bottom: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgb(var(--fg-rgb) / .03); }
.ecf-state p { margin: 0; font-size: 14px; color: var(--text-2); }
.ecf-state small { display: block; margin-top: 4px; color: var(--text-3); }
.ecf-state .badge { justify-self: start; }
.ecf-state.void { border-color: rgba(255, 107, 95, .3); background: rgba(255, 107, 95, .06); }
.ecf-state.late { border-color: rgb(var(--orange-rgb) / .3); background: rgb(var(--orange-rgb) / .06); }
.ecf-state.paid { border-color: rgb(var(--turq-rgb) / .3); background: rgb(var(--turq-rgb) / .06); }
.ecf-msgs { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.ecf-doc-actions { flex-wrap: wrap; margin-bottom: 14px; }
.button.disabled { pointer-events: none; opacity: .45; }
.ecf-meter { height: 10px; margin-top: 10px; border-radius: 999px; background: rgb(var(--fg-rgb) / .07); overflow: hidden; }
.ecf-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--turq-2), var(--turq)); }
.ecf-meter.warn span { background: linear-gradient(90deg, var(--orange), #ff6b5f); }

/* ---------- Representación impresa (papel blanco) ---------- */
.ecf-doc { --ink: #1d2530; --ink-2: #3b4653; --ink-3: #5b6674; --rule: #e3e8ee; position: relative; max-width: 860px; margin: 0 auto; padding: 40px 42px 30px; border-radius: 16px; background: #fff; color: var(--ink); font-size: 14px; box-shadow: 0 30px 80px -40px rgb(0 0 0 / .5); color-scheme: light; overflow: hidden; }
.ecf-doc::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #1FCB7E, #0A8F52); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ecf-test { margin: 0 0 18px; padding: 9px 12px; border-radius: 10px; border: 1px dashed #e8650c; background: #fff4ea; color: #a4480a; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-align: center; text-transform: uppercase; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ecf-head { display: flex; justify-content: space-between; gap: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.ecf-issuer { display: grid; gap: 3px; min-width: 0; color: var(--ink-3); font-size: 13px; }
.ecf-issuer strong { font-family: var(--display); font-size: 20px; line-height: 1.25; color: var(--ink); }
.ecf-title { display: grid; gap: 6px; align-content: start; text-align: right; }
.ecf-title span { max-width: 230px; margin-left: auto; font-size: 13px; font-weight: 700; line-height: 1.35; color: #087a88; text-transform: uppercase; letter-spacing: .03em; }
.ecf-title strong { font-family: var(--mono); font-size: 19px; color: var(--ink); }
.ecf-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 18px 0; }
.ecf-meta dl { display: grid; gap: 6px; margin: 0; }
.ecf-meta dl div { display: flex; gap: 10px; font-size: 13px; }
.ecf-meta dt { min-width: 118px; color: var(--ink-3); }
.ecf-meta dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.ecf-buyer { display: grid; gap: 3px; align-content: start; padding: 12px 14px; border-radius: 12px; background: #f4f7f9; color: var(--ink-3); font-size: 13px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ecf-buyer .eyebrow { margin: 0 0 4px; color: #087a88; }
.ecf-buyer strong { color: var(--ink); font-size: 15px; }
.ecf-doc .table-wrap { margin: 0; padding: 0; }
.ecf-lines th { padding: 10px 8px; color: #087a88; border-bottom: 1px solid var(--rule); background: #f4f7f9; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ecf-lines td { padding: 11px 8px; color: var(--ink-2); border-bottom: 1px solid var(--rule); font-size: 13.5px; vertical-align: top; }
.ecf-lines td.right, .ecf-lines th.right { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ecf-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; margin-top: 20px; }
.ecf-fiscal { display: flex; gap: 16px; align-items: flex-start; }
.ecf-fiscal p { display: grid; gap: 2px; margin: 0 0 10px; font-size: 12.5px; color: var(--ink-3); }
.ecf-fiscal strong { color: var(--ink); font-size: 15px; }
.ecf-fiscal .ecf-verify { display: block; max-width: 220px; line-height: 1.45; }
.ecf-fiscal.pending p { max-width: 300px; color: #a4480a; }
.ecf-qr { flex-shrink: 0; display: block; width: 132px; height: 132px; }
.ecf-qr svg { display: block; width: 100%; height: 100%; }
.ecf-totals { display: grid; gap: 8px; }
.ecf-totals div { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ecf-totals div span:last-child { font-family: var(--mono); color: var(--ink); }
.ecf-totals .total { margin-top: 4px; padding-top: 12px; border-top: 2px solid #087a88; font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--ink); }
.ecf-totals .total span:last-child { font-family: var(--display); font-size: 20px; }
.ecf-notes { margin: 20px 0 0; padding: 12px 14px; border-left: 3px solid #12B76A; background: #f4f7f9; color: var(--ink-2); font-size: 13px; white-space: pre-wrap; }
.ecf-foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 11.5px; text-align: center; }
.ecf-doc-wrap { padding: 4px; }

/* Página pública */
body.ecf-public { min-height: 100vh; background: #e9eef2; color: #1d2530; }
body.ecf-public::before { display: none; }
.ecf-public-wrap { max-width: 900px; margin: 0 auto; padding: 24px 16px 56px; }
.ecf-public-actions { justify-content: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
body.ecf-public .button { background: #fff; color: #1d2530; border-color: #d3dbe3; }
body.ecf-public .button.primary { background: #12B76A; color: #fff; border-color: #12B76A; }

/* Ticket de 80 mm (impresoras térmicas) */
body.ticket .ecf-public-wrap { max-width: 340px; }
body.ticket .ecf-doc { padding: 22px 16px 16px; border-radius: 6px; font-size: 12px; }
body.ticket .ecf-head, body.ticket .ecf-meta, body.ticket .ecf-bottom { display: block; }
body.ticket .ecf-title { margin-top: 12px; text-align: left; }
body.ticket .ecf-title span { margin-left: 0; max-width: none; }
body.ticket .ecf-meta dl { margin-bottom: 12px; }
body.ticket .ecf-meta dt { min-width: 112px; }
body.ticket .ecf-lines thead { display: none; }
body.ticket .ecf-lines, body.ticket .ecf-lines tbody, body.ticket .ecf-lines td { display: block; width: 100%; }
body.ticket .ecf-lines tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
body.ticket .ecf-lines td { padding: 0; border: 0; font-size: 12px; }
body.ticket .ecf-lines td:nth-child(1) { grid-row: 1; color: var(--ink-3); }
body.ticket .ecf-lines td:nth-child(2) { grid-column: 2; grid-row: 1; color: var(--ink); font-weight: 600; }
body.ticket .ecf-lines td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: left; color: var(--ink-3); }
body.ticket .ecf-lines td:nth-child(4) { grid-column: 2; grid-row: 3; text-align: left; color: var(--ink-3); }
body.ticket .ecf-lines td:nth-child(3)::before { content: "Precio "; }
body.ticket .ecf-lines td:nth-child(4)::before { content: "ITBIS "; }
body.ticket .ecf-lines td:nth-child(5) { grid-column: 3; grid-row: 1; color: var(--ink); }
body.ticket .ecf-totals { margin-top: 14px; }
body.ticket .ecf-fiscal { flex-direction: column; align-items: center; margin-top: 16px; text-align: center; }
body.ticket .ecf-fiscal .ecf-verify { margin: 0 auto; }

/* ---------- Panel de NOVASYSTEMS ---------- */
#ecf-tab .page-title > .actions { flex-shrink: 0; }
.ecf-admin-grid { display: grid; gap: 14px; }
.ecf-tenant { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line-2); border-radius: 16px; background: rgb(var(--fg-rgb) / .025); }
.ecf-tenant-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ecf-tenant-head h3 { margin: 0 0 4px; }
.ecf-tenant-head p { margin: 0; color: var(--text-3); font-size: 13px; }
.ecf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ecf-chip { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2); }
.ecf-chip.warn { color: var(--late); border-color: rgb(var(--orange-rgb) / .35); }
.ecf-chip.ok { color: var(--turq-2); border-color: rgb(var(--turq-rgb) / .35); }
.ecf-link-box { display: grid; gap: 8px; padding: 12px; border-radius: 12px; border: 1px dashed rgb(var(--turq-rgb) / .5); background: rgb(var(--turq-rgb) / .06); }
.ecf-link-box input { font-family: var(--mono); font-size: 13px; }
.ecf-secret-note { margin: 0; font-size: 12.5px; color: var(--text-3); }

@media (max-width: 1023px) {
  .ecf-form-bottom { grid-template-columns: minmax(0, 1fr); }
  .ecf-summary { position: static; }
}
@media (max-width: 900px) {
  .ecf-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ecf-lines-head { display: none; }
  .ecf-line { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 10px; padding: 12px; border: 1px solid var(--line-2); border-radius: 14px; background: rgb(var(--fg-rgb) / .02); }
  .ecf-line .sr-label { position: static; width: auto; height: auto; clip: auto; display: block; margin-bottom: 5px; font-size: 12px; color: var(--text-3); }
  .ecf-l-name { grid-column: 1 / -1; }
  .ecf-l-kind, .ecf-l-tax { grid-column: span 3; }
  .ecf-l-qty { grid-column: span 2; }
  .ecf-l-price { grid-column: span 4; }
  .ecf-l-amount { grid-column: 1 / 6; align-self: center; text-align: left; font-size: 15px; }
  .ecf-l-remove { grid-column: 6; justify-self: end; }
}
@media (max-width: 760px) {
  .ecf-docs thead, #buyers thead, #sequences thead { display: none; }
  .ecf-docs, .ecf-docs tbody, .ecf-docs tr, .ecf-docs td, #buyers table, #buyers tbody, #buyers tr, #buyers td, #sequences table, #sequences tbody, #sequences tr, #sequences td { display: block; width: 100%; }
  .ecf-docs tr, #buyers tr, #sequences tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ecf-docs td, #buyers td, #sequences td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 5px 0; border: 0; text-align: right; }
  .ecf-docs td::before, #buyers td[data-label]::before, #sequences td::before { content: attr(data-label); flex-shrink: 0; padding-top: 2px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); text-align: left; }
  .ecf-docs td strong, .ecf-docs td small { display: inline; margin: 0 0 0 6px; }
  .ecf-doc { padding: 26px 18px 20px; }
  .ecf-head, .ecf-meta, .ecf-bottom { display: block; }
  .ecf-title { margin-top: 14px; text-align: left; }
  .ecf-title span { margin-left: 0; max-width: none; }
  .ecf-meta dl { margin-bottom: 14px; }
  .ecf-fiscal { margin-bottom: 18px; }
  .ecf-lines thead { display: none; }
  .ecf-lines, .ecf-lines tbody, .ecf-lines tr, .ecf-lines td { display: block; width: 100%; }
  .ecf-lines tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .ecf-lines td { padding: 0; border: 0; }
  .ecf-lines td:nth-child(1) { grid-row: 1; color: var(--ink-3); }
  .ecf-lines td:nth-child(2) { grid-column: 2; grid-row: 1; color: var(--ink); font-weight: 600; }
  .ecf-lines td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: left; color: var(--ink-3); font-size: 12.5px; }
  .ecf-lines td:nth-child(4) { grid-column: 2; grid-row: 3; text-align: left; color: var(--ink-3); font-size: 12.5px; }
  .ecf-lines td:nth-child(3)::before { content: "Precio "; }
  .ecf-lines td:nth-child(4)::before { content: "ITBIS "; }
  .ecf-lines td:nth-child(5) { grid-column: 3; grid-row: 1; color: var(--ink); }
}
@media (max-width: 440px) {
  .ecf-app .top-right .env-badge { display: none; } /* el aviso de ambiente ya está en la página */
}
@media (max-width: 520px) {
  .ecf-types { grid-template-columns: minmax(0, 1fr); }
  .ecf-qr { width: 120px; height: 120px; }
}
@media print {
  @page { margin: 10mm; }
  body.ecf-public, body.ticket { background: #fff !important; }
  body.ecf-public > main.ecf-public-wrap { display: block !important; max-width: none; padding: 0; }
  body.ticket > main.ecf-public-wrap { max-width: 72mm; }
  .ecf-doc { max-width: none; padding: 0; border-radius: 0; box-shadow: none; }
  .ecf-doc::before { display: none; }
  .ecf-bottom, .ecf-fiscal, .ecf-lines tr { break-inside: avoid; }
  .no-print { display: none !important; }
}
@media print { body.ticket { width: 72mm; } }
.ecf-included { margin: 8px 0 0; color: var(--ink-3, #5b6674); font-size: 12px; }
.caja-report .caja-facts { margin: 12px 0; display: grid; gap: 4px; }
.caja-report .caja-facts div { display: flex; justify-content: space-between; gap: 8px; }
.caja-report .caja-facts dt { color: var(--ink-3, #5b6674); }
.caja-report .ecf-totals { margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--rule, #d3dbe3); }
.caja-report .eyebrow { margin: 14px 0 0; }

/* ---------- Caja y productos (portal) ---------- */
#caja-tab > .card + .card { margin-top: 18px; }
.ecf-caja-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ecf-caja-intro h2 { margin: 0 0 6px; }
.ecf-caja-intro p { margin: 0; max-width: 640px; }
.ecf-products tr { cursor: pointer; }
.ecf-products tr.off td { opacity: .55; }
#caja-tab .card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; }
#caja-tab .card-head h2 { margin: 0 0 6px; }
#caja-tab .card-head p { margin: 0; max-width: 560px; }
#shifts tr { cursor: pointer; }
@media (max-width: 720px) { .ecf-caja-intro { flex-direction: column; align-items: stretch; } }
#caja-tab .toolbar .search { min-width: 240px; }
.caja-report .ecf-totals .total { font-size: 15px; }
.caja-report .ecf-totals .total span:last-child { font-size: 15px; }
.caja-report .ecf-totals div span:last-child { white-space: nowrap; }
.caja-report .ecf-totals div span:first-child { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  #caja-tab .toolbar .search { min-width: 0; }
  #products thead, #shifts thead { display: none; }
  #products table, #products tbody, #products tr, #products td, #shifts table, #shifts tbody, #shifts tr, #shifts td { display: block; width: 100%; }
  #products tr, #shifts tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  #products td, #shifts td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 4px 0; border: 0; text-align: right; }
  #products td::before, #shifts td::before { content: attr(data-label); flex-shrink: 0; padding-top: 2px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); text-align: left; }
  #products td strong, #products td small, #shifts td small { display: block; }
}

/* ---------- Servicios: precios con ITBIS, repetir cada mes, por cobrar ---------- */
.ecf-included-toggle { margin: -4px 0 12px; }
.ecf-repeat #repeat-fields { margin-top: 12px; }
.ecf-rec-editing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; border-color: rgb(var(--orange-rgb) / .35); background: rgb(var(--orange-rgb) / .08); }
#clientes-tab > .card + .card { margin-top: 18px; }
.ecf-ar-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ecf-ar-summary:empty { display: none; }
.ecf-ar-summary div { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgb(var(--fg-rgb) / .03); }
.ecf-ar-summary span { color: var(--text-2); font-size: 13px; font-weight: 600; }
.ecf-ar-summary strong { font-family: var(--display); font-size: 24px; }
.ecf-ar-summary small { color: var(--text-3); font-size: 12.5px; }
.ecf-ar-summary .late { border-color: rgb(var(--orange-rgb) / .35); background: rgb(var(--orange-rgb) / .07); }
.ecf-ar-summary .late strong { color: var(--late); }
#receivables td small, #recurring td small, #products td.right small { display: block; margin-top: 2px; color: var(--text-3); font-size: 12px; }
small.late, #receivables td small.late, #recurring td small.late { color: var(--late); }
.ecf-row-actions { text-align: right; white-space: nowrap; }
.ecf-row-actions .button + .button, .ecf-row-actions .button + .light-link { margin-left: 6px; }
#recurring tr.off td { opacity: .6; }
#recurring td small.late { max-width: 260px; white-space: normal; }
@media (max-width: 760px) {
  .ecf-ar-summary { grid-template-columns: minmax(0, 1fr); }
  #receivables thead, #recurring thead { display: none; }
  #receivables table, #receivables tbody, #receivables tr, #receivables td, #recurring table, #recurring tbody, #recurring tr, #recurring td { display: block; width: 100%; }
  #receivables tr, #recurring tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  #receivables td, #recurring td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 4px 0; border: 0; text-align: right; }
  #receivables td[data-label]::before, #recurring td[data-label]::before { content: attr(data-label); flex-shrink: 0; padding-top: 2px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); text-align: left; }
  #receivables td > *, #recurring td > * { text-align: right; }
  .ecf-row-actions { justify-content: flex-end !important; flex-wrap: wrap; gap: 8px; padding-top: 8px !important; }
  .ecf-row-actions .button + .button, .ecf-row-actions .button + .light-link { margin-left: 0; }
}

/* Billzy (v26): los comprobantes y la caja usan el verde de la marca. */
body.ecf-public, body.ecf-light { --turq: #12B76A; --turq-2: #0A8F52; --turq-rgb: 18 183 106; }
