/* Honorarios SOL. The Buzones SOL design system (tokens, Geist, Phosphor), one accent: cobalto.
   Shape rule: controls 8px; containers 12px; pills fully round. Light by default; dark when <html data-theme="dark">. */
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f5f6f8; --surface: #fcfcfd; --surface-2: #f0f2f5; --border: #e2e5ea; --border-strong: #cfd4dc;
  --text: #14181e; --muted: #5a6371; --accent: #1d4ed8; --accent-hover: #1e40af; --accent-ink: #ffffff; --accent-soft: #e8eefc;
  --danger: #b42318; --danger-soft: #fdeceb; --warn: #9a5800; --warn-soft: #fff3df; --ok: #17803d; --ok-soft: #e6f4ea;
  --shadow: 0 1px 2px rgb(20 30 45 / .05), 0 2px 6px rgb(20 30 45 / .04);
  --r-control: 8px; --r-box: 12px; --skeleton: #e9ecf0;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1115; --surface: #151a20; --surface-2: #1c222a; --border: #283039; --border-strong: #36404b;
  --text: #e7eaee; --muted: #98a2af; --accent: #7ea6ff; --accent-hover: #97b8ff; --accent-ink: #0b1a40; --accent-soft: #16223d;
  --danger: #f2766b; --danger-soft: #3a1b19; --warn: #f0ad4e; --warn-soft: #382910; --ok: #4cc97a; --ok-soft: #12301e;
  --shadow: 0 1px 2px rgb(0 0 0 / .35); --skeleton: #222932;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; }
::selection { background: var(--accent-soft); color: var(--text); }
* { scrollbar-color: var(--border-strong) transparent; }
[hidden] { display: none !important; }
h1 { font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; margin: 0 0 4px; text-wrap: balance; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 12px; }
p { margin: 0 0 8px; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
.muted { color: var(--muted); }
small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand strong { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand > div { min-width: 0; }
.logo { width: 32px; height: 32px; border-radius: var(--r-control); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.logo .mark { width: 62%; height: 62%; fill: currentColor; }
.brand-lg .logo { width: 42px; height: 42px; }
.brand-lg strong { font-size: 20px; }

/* Buttons and links */
.btn { appearance: none; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: var(--r-control); padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .12s var(--ease-out); }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .65; cursor: progress; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.block { width: 100%; }
.icon-btn { appearance: none; border: 0; background: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: var(--r-control); cursor: pointer; display: inline-grid; place-items: center; transition: background-color .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.96); }
.link { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.link-accent { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.link-accent .i { width: 15px; height: 15px; }
.link-accent:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Forms */
input, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-control); padding: 9px 11px; min-width: 0; width: 100%; }
input::placeholder { color: var(--muted); opacity: 1; }
:is(input, select, .btn, .icon-btn, .seg button, .link, .tabs a, .row-toggle, .months a, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 13px; margin-bottom: 14px; }
.field input { font-weight: 400; font-size: 15px; }
.field .hint { margin: 0; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.form-error { color: var(--danger); min-height: 1.2em; margin: 0 0 12px; font-size: 13px; }

/* Login (also the "no RUC" card) */
.login { min-height: 100dvh; display: grid; place-items: start center; padding: clamp(48px, 12vh, 120px) 16px 32px; position: relative; }
.login-theme { position: absolute; top: 16px; right: 16px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-box); padding: 32px 28px 28px; box-shadow: var(--shadow); }
.login-lead { margin: 16px 0 22px; text-wrap: balance; }
.login .btn.block { min-height: 44px; }
.btn-google { background: #fff; border-color: #747775; color: #1f1f1f; }
.btn-google img { width: 18px; height: 18px; flex: none; }
:root[data-theme="dark"] .btn-google { background: #131314; border-color: #8e918f; color: #e3e3e3; }
@media (hover: hover) and (pointer: fine) {
  .btn-google:hover { background: #f3f4f6; }
  :root[data-theme="dark"] .btn-google:hover { background: #1f2023; }
}
.or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-head .link-accent { font-weight: 500; font-size: 13px; }
.login .form-error:empty { min-height: 0; margin-bottom: 6px; }
.login-alt { margin: 14px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.login-alt .link { color: var(--accent); font-weight: 500; }
.form-lead { margin: 0 0 16px; font-size: 14px; color: var(--muted); }

/* Shell: top bar, section tabs (sticky under it), content */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 64px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-right { display: flex; align-items: center; gap: 2px; }
.tabs { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 64px; z-index: 9; }
.tabs-inner { max-width: 1240px; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 12px 10px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; transition: color .15s; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--accent); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 24px 40px; }

/* Containers */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-box); box-shadow: var(--shadow); padding: 20px; }
.panel + .panel, .sum + .panel, .table-wrap + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 0; max-width: 70ch; }
.cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.cols .panel + .panel, .sum > .panel + .panel { margin-top: 0; }
.note { color: var(--muted); font-size: 12.5px; margin: 12px 2px 0; max-width: 80ch; }
.spaced { margin-top: 16px; }

/* Segmented control (years) */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-control); padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { appearance: none; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap; transition: color .15s, background-color .15s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Pills: state of a month, a return or a receipt */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; white-space: nowrap; line-height: 20px; background: var(--surface-2); color: var(--muted); }
.pill[data-tone="ok"] { background: var(--ok-soft); color: var(--ok); }
.pill[data-tone="danger"] { background: var(--danger-soft); color: var(--danger); }
.pill[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); }
.pill[data-tone="accent"] { background: var(--accent-soft); color: var(--accent); }

/* Resumen: what you owe (a ledger, not a stat card) next to the dates that come */
.sum { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.sum-main h1 { font-size: 30px; letter-spacing: -.03em; margin: 2px 0 6px; }
.sum-main .lead { margin-bottom: 16px; max-width: 60ch; }
.ledger { width: 100%; border-collapse: collapse; }
.ledger th, .ledger td { padding: 9px 0; text-align: left; border-top: 1px solid var(--border); vertical-align: top; }
.ledger thead th { border-top: 0; padding-top: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.ledger tbody th { font-weight: 600; }
.ledger tbody th a { text-decoration: none; }
.ledger tbody th a:hover { color: var(--accent); }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger td.num { padding-left: 16px; }
.strong { font-weight: 650; }
.dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dates li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.dates li:first-child { border-top: 0; padding-top: 0; }
.dates time { font-weight: 650; color: var(--accent); font-size: 13px; padding-top: 1px; }
.dates strong { display: block; font-weight: 600; }
.dates span { color: var(--muted); font-size: 13px; }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-control); background: var(--surface-2); line-height: 1.45; }
.alerts li .i { margin-top: 1px; }
.alerts li[data-tone="warn"] { background: var(--warn-soft); }
.alerts li[data-tone="warn"] .i { color: var(--warn); }
.alerts li[data-tone="danger"] { background: var(--danger-soft); }
.alerts li[data-tone="danger"] .i { color: var(--danger); }
.alerts li[data-tone="info"] .i { color: var(--accent); }
.alerts a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.alerts a:hover { text-decoration: underline; text-underline-offset: 3px; }
.calm { display: flex; gap: 8px; align-items: center; color: var(--ok); font-weight: 600; margin: 0; }
.months { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.months a { display: grid; gap: 2px; padding: 10px 8px; border-radius: var(--r-control); text-decoration: none; background: var(--surface-2); border: 1px solid transparent; min-height: 74px; transition: border-color .15s; }
.months a:hover { border-color: var(--border-strong); }
.m-future { display: grid; gap: 2px; padding: 10px 8px; min-height: 74px; border-radius: var(--r-control); border: 1px dashed var(--border); color: var(--muted); }
.m-name { font-weight: 650; }
.m-state { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.m-amt { font-size: 12px; color: var(--muted); }
.months a[data-tone="ok"] { background: var(--ok-soft); } .months a[data-tone="ok"] .m-state { color: var(--ok); }
.months a[data-tone="danger"] { background: var(--danger-soft); } .months a[data-tone="danger"] .m-state { color: var(--danger); }
.months a[data-tone="warn"] { background: var(--warn-soft); } .months a[data-tone="warn"] .m-state { color: var(--warn); }
.months a[data-tone="accent"] { background: var(--accent-soft); } .months a[data-tone="accent"] .m-state { color: var(--accent); }

/* Data tables */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-box); overflow-x: auto; box-shadow: var(--shadow); }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.grid thead th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tfoot th, table.grid tfoot td { border-top: 1px solid var(--border-strong); border-bottom: 0; font-weight: 650; background: var(--surface-2); }
table.grid tr.void td { color: var(--muted); }
table.grid tr.void .mono { text-decoration: line-through; }
.client { font-weight: 500; }
.moved { color: var(--accent); font-weight: 500; }
.pay-today { display: flex; gap: 8px; align-items: flex-start; }
.pay-today .i { color: var(--accent); margin-top: 1px; }
.detail p > .i { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; color: var(--accent); }
.differ { text-decoration: underline dotted var(--warn); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: help; }
.empty { text-align: center; color: var(--muted); padding: 28px 14px !important; }
.row-toggle { appearance: none; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; border-radius: 4px; }
.row-toggle .i { width: 14px; height: 14px; color: var(--muted); transform: rotate(-90deg); transition: transform .2s var(--ease-out); }
.open .row-toggle .i { transform: none; }
tr.main-row.open td { border-bottom-color: transparent; background: var(--accent-soft); }
tr.detail-row td { background: var(--surface-2); padding-top: 4px; }
.detail { display: grid; gap: 6px; padding: 8px 0; max-width: 90ch; }
.detail p { margin: 0; }
.differ-text { display: flex; gap: 8px; align-items: flex-start; color: var(--warn); }
.differ-text .i { margin-top: 1px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.facts li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.facts .i { color: var(--muted); width: 16px; height: 16px; }
.search { position: relative; display: block; max-width: 360px; margin-bottom: 12px; }
.search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { padding-left: 34px; }

/* Annual: the calculation as a statement */
.calc th, .calc td { padding: 8px 0; }
.calc tbody tr:first-child th, .calc tbody tr:first-child td { border-top: 0; }
.calc tr.sub th, .calc tr.sub td { font-weight: 650; }
.calc tr.total th, .calc tr.total td { font-weight: 700; font-size: 16px; border-top: 1px solid var(--border-strong); padding-top: 12px; }
.calc small { margin-top: 1px; }
.deductions { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.deductions summary { cursor: pointer; font-weight: 600; border-radius: 4px; list-style: none; display: flex; align-items: center; gap: 6px; }
.deductions summary::-webkit-details-marker { display: none; }
.deductions summary .i { width: 14px; height: 14px; color: var(--muted); transform: rotate(-90deg); transition: transform .2s var(--ease-out); }
.deductions[open] summary .i { transform: none; }
.deductions ul { list-style: none; margin: 10px 0 0; padding: 0; max-height: 360px; overflow-y: auto; }
.deductions li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); }
.deductions li b { font-weight: 600; white-space: nowrap; }

/* Buzón */
.inbox { list-style: none; margin: 0; padding: 4px 20px; }
.inbox li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.inbox li:first-child { border-top: 0; }
.inbox li .i { color: var(--muted); }
.inbox li.unread strong { font-weight: 700; }
.inbox li.unread .i { color: var(--accent); }
.inbox strong { font-weight: 500; }

/* Footer, loading */
.foot { color: var(--muted); font-size: 12.5px; padding-top: 0; }
.foot p { margin: 0 0 4px; }
.skeleton { display: grid; gap: 16px; }
.skeleton span { display: block; height: 120px; border-radius: var(--r-box); background: var(--skeleton); }
.skeleton span:first-child { height: 200px; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton span { animation: pulse 1.4s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .55; } }
}

/* Tablet: Resumen and Anual stack, the month strip goes to 6 a row */
@media (max-width: 1024px) {
  .sum, .cols { grid-template-columns: 1fr; }
  .cols .panel + .panel { margin-top: 0; }
  .months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Phone: every table is a stack of cards, label left, value right (data-label), explicit per table */
@media (max-width: 767px) {
  .topbar { padding: 0 16px; height: 58px; }
  .tabs { top: 58px; }
  .tabs-inner { padding: 0 8px; }
  .wrap { padding: 16px 16px 32px; }
  .panel { padding: 16px; }
  .sum-main h1 { font-size: 25px; }
  h1 { font-size: 21px; }
  .page-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .months a, .m-future { min-height: 64px; padding: 8px; }
  .search { max-width: none; }

  .table-wrap { background: none; border: 0; box-shadow: none; overflow: visible; }
  table.grid, table.grid tbody, table.grid tfoot, table.grid tr, table.grid td, table.grid th { display: block; }
  table.grid thead { display: none; }
  table.grid tbody tr, table.grid tfoot tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-box); box-shadow: var(--shadow); margin-bottom: 10px; padding: 6px 14px; }
  table.grid td, table.grid tfoot th { border: 0; padding: 6px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: right; }
  table.grid td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: left; flex: none; }
  table.grid td:empty { display: none; }
  table.grid tfoot tr { background: var(--surface-2); }
  table.grid tfoot th { font-weight: 700; }
  /* 616: the month is the card's title; its detail joins the card above it */
  .t-616 tbody tr.main-row { display: grid !important; grid-template-columns: 1fr auto; column-gap: 12px; padding: 10px 14px !important; }
  .t-616 tbody tr.main-row td { padding: 2px 0 !important; }
  .t-616 tbody tr.main-row td::before { content: none !important; }
  .t-616 tbody td[data-label="Mes"] { grid-area: 1 / 1; justify-content: flex-start; }
  .t-616 tbody td[data-label="Estado"] { grid-area: 1 / 2; }
  .t-616 tbody td[data-label="Vence"] { grid-area: 2 / 1; justify-content: flex-start; color: var(--muted); }
  .t-616 tbody tr.main-row td[data-label="Vence"]::before { content: "Vence" !important; margin-right: 6px; }
  .t-616 tbody td[data-label="Declarado"] { grid-area: 3 / 1; justify-content: flex-start; }
  .t-616 tbody tr.main-row td[data-label="Declarado"]::before { content: "Declarado" !important; margin-right: 6px; }
  .t-616 tbody td[data-label="Saldo hoy"] { grid-area: 2 / 2 / 4 / 3; align-self: center; font-size: 15px; }
  .t-616 tbody td[data-label="RHE del mes"], .t-616 tbody td[data-label="8% según RHE"], .t-616 tbody td[data-label="Pagado"] { display: none !important; }
  .t-616 tr.main-row.open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0; border-bottom: 0; }
  .t-616 tr.main-row.open td { background: none; }
  .t-616 tr.detail-row { border-top-left-radius: 0; border-top-right-radius: 0; background: var(--surface-2); }
  .t-616 tr.detail-row td { display: block; text-align: left; background: none; }
  /* Recibos: number and status on top */
  .t-rhe td[data-label="Cliente"] { display: block; text-align: left; }
  .t-rhe td[data-label="Cliente"]::before { display: block; }
  /* Recibos: a compact card. Number and status, client, then date and amount */
  .t-rhe tr { display: grid !important; grid-template-columns: 1fr auto; column-gap: 12px; padding: 10px 14px !important; }
  .t-rhe td { padding: 2px 0 !important; }
  .t-rhe td::before { content: none !important; }
  .t-rhe td[data-label="Número"] { grid-area: 1 / 1; justify-content: flex-start; font-weight: 600; }
  .t-rhe td[data-label="Estado"] { grid-area: 1 / 2; }
  .t-rhe td[data-label="Cliente"] { grid-area: 2 / 1 / 3 / 3; display: block; text-align: left; }
  .t-rhe td[data-label="Emisión"] { grid-area: 3 / 1; justify-content: flex-start; color: var(--muted); }
  .t-rhe td[data-label="Monto"] { grid-area: 3 / 2; font-weight: 600; }
  .t-rhe td[data-label="En soles"] { grid-area: 4 / 2; color: var(--muted); justify-content: flex-end; gap: 4px; }
  .t-rhe td[data-label="En soles"]::before { content: "S/ " !important; color: var(--muted); font-size: inherit; font-weight: inherit; }
  /* Declaraciones y pagos: form and amount, then periodo and date, then the order number */
  .t-decl tr { display: grid !important; grid-template-columns: 1fr auto; column-gap: 12px; padding: 10px 14px !important; }
  .t-decl td { padding: 2px 0 !important; }
  .t-decl td::before { content: none !important; }
  .t-decl td[data-label="Formulario"] { grid-area: 1 / 1; display: block; text-align: left; font-weight: 600; }
  .t-decl td[data-label="Formulario"] small { display: none; }
  .t-decl td[data-label="Declarado"], .t-decl td[data-label="Pagado"] { grid-area: 1 / 2; font-weight: 650; justify-content: flex-end; }
  .t-decl td[data-label="Pagado"]::before { content: "pagado" !important; color: var(--muted); font-size: 12px; font-weight: 500; }
  .t-decl td[data-label="Declarado"]::before { content: "declarado" !important; color: var(--muted); font-size: 12px; font-weight: 500; }
  .t-decl td[data-label="Periodo"] { grid-area: 2 / 1; justify-content: flex-start; }
  .t-decl td[data-label="Fecha"] { grid-area: 2 / 2; color: var(--muted); }
  .t-decl td[data-label="N° orden"] { grid-area: 3 / 1 / 4 / 3; justify-content: flex-start; color: var(--muted); }
  .t-decl td[data-label="N° orden"]::before { content: "Orden" !important; margin-right: 6px; }
  .ledger thead { display: none; }
  .ledger tbody tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-top: 1px solid var(--border); }
  .ledger tbody th, .ledger tbody td { border: 0; padding: 0; }
  .ledger tbody th { grid-row: span 3; }
  .ledger tbody td.num { padding-left: 12px; font-size: 13px; }
  .ledger tbody td.num::before { content: attr(data-label) " "; color: var(--muted); font-size: 12px; }
  .calc tbody tr { grid-template-columns: 1fr auto; }
  .calc tbody th { grid-row: auto; }
  .calc tbody td.num::before { content: none; }
  .calc tr.total { border-top: 0; }
  .inbox { padding: 2px 16px; }
  .inbox li { grid-template-columns: auto 1fr; }
  .inbox li .pill { grid-column: 2; justify-self: start; }
}
