:root {
  --red: #e30613;
  --red-dark: #b9000b;
  --red-soft: #fff1f2;
  --ink: #16181b;
  --graphite: #272a2f;
  --slate: #5f6672;
  --muted: #7a828e;
  --line: #e6e8ec;
  --line-strong: #d5d9df;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --canvas: #f2f3f5;
  --success: #087a55;
  --success-soft: #eaf8f2;
  --warning: #9a6200;
  --warning-soft: #fff6df;
  --danger: #b42318;
  --danger-soft: #fff0ef;
  --sidebar: 260px;
  --shadow-sm: 0 3px 14px rgba(20, 24, 30, .06);
  --shadow-md: 0 16px 42px rgba(20, 24, 30, .10);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: var(--red-dark); }

svg { fill: currentColor; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  overflow-y: auto;
  background: #111316;
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-brand {
  display: grid;
  gap: 10px;
  padding: 4px 10px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.sidebar-brand img {
  width: 190px;
  height: 74px;
  object-fit: contain;
  object-position: left center;
  padding: 6px;
  background: #fff;
  border-radius: 12px;
}

.sidebar-brand span {
  color: #cfd2d7;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 5px;
  margin-top: 18px;
}

.nav-label {
  margin: 18px 12px 7px;
  color: #6f757e;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.side-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #c8cbd1;
  border-radius: 11px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.side-nav a svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: #858b94;
}

.side-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.side-nav a.is-active {
  color: #fff;
  background: linear-gradient(105deg, rgba(227, 6, 19, .96), rgba(185, 0, 11, .92));
  box-shadow: 0 8px 24px rgba(227, 6, 19, .20);
}

.side-nav a.is-active svg { color: #fff; }

.copilot-launch {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 13px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: linear-gradient(145deg, #25292f, #1a1d21);
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}

.copilot-launch:hover { border-color: rgba(227, 6, 19, .72); }

.copilot-launch > span:last-child { display: grid; gap: 1px; }
.copilot-launch strong { font-size: 14px; }
.copilot-launch small { color: #979ca4; font-size: 14px; }

.copilot-orb {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #f21a27, #b9000b);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: 0 7px 18px rgba(227, 6, 19, .28);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 8px 0;
  color: #747a83;
  font-size: 14px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #24b47e;
  box-shadow: 0 0 0 4px rgba(36, 180, 126, .10);
}

.stage {
  min-width: 0;
  grid-column: 2;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(222, 225, 230, .92);
  backdrop-filter: blur(16px);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 9px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.menu-toggle svg { width: 20px; }

.topbar-title {
  display: grid;
  gap: 1px;
}

.topbar-product {
  font-size: 14px;
  font-weight: 800;
}

.topbar-title small {
  color: var(--muted);
  font-size: 14px;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.account-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--graphite);
  color: #fff;
  font-weight: 800;
}

.account-copy { display: grid; gap: 0; }
.account-copy strong { font-size: 14px; }
.account-copy small { color: var(--muted); font-size: 14px; text-transform: capitalize; }
.account form { margin: 0 0 0 7px; }

.link-button {
  padding: 8px 10px;
  color: var(--slate);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.link-button:hover { color: var(--red); }

.container {
  width: min(1380px, calc(100% - 56px));
  margin: 0 auto;
  padding: 26px 0 58px;
}

footer {
  margin-top: auto;
  padding: 24px 32px;
  color: #9096a0;
  font-size: 14px;
  text-align: center;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.page-head > div:first-child { min-width: 0; }

h1 {
  margin: 4px 0 7px;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

h2 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: -.01em;
}

.eyebrow {
  margin: 0;
  color: var(--red);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.muted { color: var(--muted); }
p.muted { margin: 0; }

.panel,
.stats article,
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.panel {
  min-width: 0;
  margin-bottom: 20px;
  padding: 22px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stats-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stats article {
  position: relative;
  min-width: 0;
  padding: 18px 20px;
  overflow: hidden;
}

.stats article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--red);
}

.stats strong {
  display: block;
  margin-bottom: 2px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -.04em;
}

.stats span { color: var(--muted); font-size: 14px; }
.stats .stat-danger::before { background: var(--danger); }
.stats .stat-danger strong { color: var(--danger); }
.stats small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.bi-kpis article { min-height: 132px; }
.trend.is-positive { color: var(--success); }
.trend.is-negative { color: var(--danger); }

.bi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 20px;
}

.bi-grid > *,
.bi-grid-lower > * { min-width: 0; }

.bi-grid-lower { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bi-card { min-height: 350px; }

.bi-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.bi-card-head h2 { margin: 4px 0 0; }

.data-state {
  padding: 5px 9px;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.horizontal-chart { display: grid; gap: 18px; }

.chart-row {
  display: grid;
  grid-template-columns: 94px minmax(100px, 1fr) 112px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.chart-row > span { color: var(--slate); }
.chart-row > strong { text-align: right; font-variant-numeric: tabular-nums; }

.chart-track {
  height: 9px;
  overflow: hidden;
  background: #eceef1;
  border-radius: 999px;
}

.chart-track i {
  min-width: 2px;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--red), #f15a64);
  border-radius: inherit;
}

.column-chart {
  height: 255px;
  display: grid;
  grid-template-columns: repeat(6, minmax(36px, 1fr));
  align-items: end;
  gap: 10px;
}

.column-item {
  height: 100%;
  display: grid;
  grid-template-rows: 28px 1fr 22px;
  gap: 6px;
  text-align: center;
}

.column-item > strong {
  overflow: hidden;
  color: var(--slate);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-item > div {
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 7px;
  border-bottom: 1px solid var(--line-strong);
}

.column-item i {
  width: 100%;
  min-height: 2px;
  display: block;
  background: linear-gradient(180deg, var(--graphite), #555c65);
  border-radius: 6px 6px 0 0;
}

.column-item > span { color: var(--muted); font-size: 14px; }
.bi-note { margin: 4px 0 0; color: var(--muted); font-size: 14px; text-align: right; }

.customer-picker-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 20px;
}

.customer-picker-list {
  display: grid;
  gap: 10px;
}

.customer-picker-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.customer-picker-copy { min-width: 0; display: grid; gap: 3px; }
.customer-picker-copy strong { overflow-wrap: anywhere; }
.customer-picker-copy span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

.primary,
.secondary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 17px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.primary {
  color: #fff;
  background: linear-gradient(115deg, var(--red), #c9000c);
  border: 1px solid var(--red);
  box-shadow: 0 7px 18px rgba(227, 6, 19, .17);
}

.primary:hover {
  color: #fff;
  background: linear-gradient(115deg, #f20a18, var(--red-dark));
  transform: translateY(-1px);
}

.secondary {
  color: var(--graphite);
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 2px 7px rgba(20, 24, 30, .04);
}

.secondary:hover { color: var(--red-dark); border-color: #ef9aa1; }
.button { text-decoration: none; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.page-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.actions a:not(.button) {
  color: var(--slate);
  font-size: 14px;
  font-weight: 700;
}

.alert {
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 650;
}

.alert.error { color: var(--danger); background: var(--danger-soft); border-color: #f5c7c3; }
.alert.ok { color: var(--success); background: var(--success-soft); border-color: #bde8d6; }

.table-wrap { width: 100%; overflow: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #fafbfc;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #fcfcfd; }
tbody tr:last-child td { border-bottom: 0; }
td a { color: var(--red-dark); font-weight: 750; }
td small { display: block; margin-top: 3px; color: var(--muted); }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--slate);
  font-size: 14px;
  font-weight: 800;
}

.badge.fiscal-ready,
.status-pill.is-active {
  color: var(--success);
  background: var(--success-soft);
}

.badge.fiscal-pending,
.status-pill.is-inactive {
  color: var(--muted);
  background: #eef0f2;
}

.badge.tax-object {
  color: var(--red-dark);
  background: var(--red-soft);
}

.error-badge { color: var(--danger); background: var(--danger-soft); }

label {
  display: grid;
  gap: 7px;
  color: #3c4148;
  font-size: 14px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  border-color: #e8646d;
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .09);
}

input[type="checkbox"],
input[type="radio"] { min-height: auto; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.wide { grid-column: 1 / -1; }
.stack { display: grid; gap: 16px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0 15px;
  border-bottom: 1px solid var(--line);
}

.form-section h2 { margin: 3px 0 0; }
.form-section .muted { margin-top: 4px; font-size: 14px; }
.required-note,
.help { color: var(--muted); font-size: 14px; font-weight: 450; }

.switch-line {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
}

.switch-line input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--red);
}

.switch-line span { display: grid; gap: 2px; }
.switch-line strong { color: var(--ink); }
.switch-line small { color: var(--muted); font-weight: 450; }
.active-switch { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }

.billing-choice {
  padding: 17px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.fiscal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 21px;
  background: #fffafa;
  border: 1px solid #f0d9dc;
  border-radius: 14px;
}

.fiscal-fields[hidden] { display: none; }
.address-title { margin-top: 8px; }

.fiscal-summary dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.fiscal-summary dl div {
  padding: 13px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.fiscal-summary dt { color: var(--muted); font-size: 14px; font-weight: 800; text-transform: uppercase; }
.fiscal-summary dd { margin: 3px 0 0; font-weight: 800; }
.fiscal-default-note { margin: 15px 0 0; font-size: 14px; }

.catalog-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px auto;
  align-items: end;
  gap: 13px;
}

.catalog-table td small { display: block; }

.tax-rule-list { display: grid; gap: 12px; }

.tax-rule-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  align-items: end;
  gap: 12px;
  padding: 15px;
  background: #fffafa;
  border: 1px solid #efdadd;
  border-radius: 12px;
}

.tax-section-head { align-items: center; }

.remove-tax {
  min-height: 43px;
  padding: 8px 12px;
  color: var(--danger);
  background: #fff;
  border: 1px solid #efb4b0;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 800;
}

.fiscal-rule {
  margin: 0;
  padding: 13px 15px;
  color: #5a4548;
  background: var(--red-soft);
  border-left: 3px solid var(--red);
  border-radius: 0 9px 9px 0;
  font-size: 14px;
}

.import-form { display: grid; gap: 22px; }
.import-hero { padding: 0; overflow: hidden; }
.import-hero .import-form { padding: 26px; }

.import-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 22px;
  padding: 13px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.import-hero > .import-steps {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.import-steps span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.import-steps span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  width: 1px;
  height: 18px;
  background: var(--line);
}

.import-steps b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #eff1f3;
  border-radius: 50%;
  font-size: 14px;
}

.import-steps .is-current { color: var(--ink); }
.import-steps .is-current b { color: #fff; background: var(--red); }

.source-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.source-card { display: flex; align-items: flex-start; gap: 11px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.source-card:has(input:checked) { border-color: #ef8d94; background: var(--red-soft); }
.source-card input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red); }
.source-card span { display: grid; gap: 3px; }
.source-card small { color: var(--muted); font-weight: 450; }

.import-file,
.drop-zone {
  position: relative;
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 25px;
  background: #fafbfc;
  border: 1.5px dashed #c7cbd2;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
}

.import-file[hidden] { display: none; }
.drop-zone input[type="file"] { max-width: 430px; margin-top: 9px; background: #fff; }
.drop-icon { width: 39px; height: 39px; display: grid; place-items: center; color: #fff; background: var(--graphite); border-radius: 12px; font-size: 20px; }
.drop-zone small { color: var(--muted); font-weight: 450; }

.import-defaults,
.import-global { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.import-global { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.import-global > div { grid-column: 1 / -1; }

.fiscal-intelligence {
  display: flex;
  gap: 13px;
  padding: 16px;
  background: #f8f8f9;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 11px;
}

.intelligence-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--graphite);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

.fiscal-intelligence strong { font-size: 14px; }
.fiscal-intelligence p { margin: 4px 0 0; color: var(--slate); font-size: 14px; }
.fiscal-intelligence .fiscal-alert { color: var(--red-dark); font-weight: 650; }

.import-preview { padding: 0; }
.import-preview table { min-width: 1050px; }
.import-preview th,
.import-preview td { vertical-align: top; }
.identity-cell { min-width: 240px; display: grid; gap: 4px; }
.identity-cell span { color: var(--muted); font-size: 14px; }
.short-input { min-width: 82px; width: 82px; }
.payment-defaults { display: grid; gap: 7px; min-width: 210px; }
.validation-list { margin: 7px 0 0; padding-left: 17px; color: var(--danger); font-size: 14px; }
.warning { display: block; margin-top: 6px; color: var(--warning); }
.import-row.import-pending,
.import-row.import-error { background: #fffbf4; }
.import-actions { margin-top: 20px; }

.clean-list { margin: 0; padding: 0; list-style: none; }
.clean-list li { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
.clean-list span { color: var(--muted); font-size: 14px; }
.compact { padding-top: 18px; border-top: 1px solid var(--line); }

.company-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.company-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.company-meta span { padding: 6px 9px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.company-meta strong { color: var(--ink); }
.company-back { flex: 0 0 auto; }
.company-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.company-stats article { padding: 18px; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 13px; box-shadow: var(--shadow-sm); }
.company-stats strong { display: block; font-size: 28px; line-height: 1; }
.company-stats span { color: var(--muted); font-size: 14px; }
.company-section { padding: 0; overflow: visible; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 3px 0 0; }

.create-box,
.edit-user { position: relative; }
.create-box > summary,
.edit-user > summary { list-style: none; user-select: none; }
.create-box > summary::-webkit-details-marker,
.edit-user > summary::-webkit-details-marker { display: none; }
.company-form,
.edit-user-form {
  position: absolute;
  z-index: 20;
  top: calc(100% + 9px);
  right: 0;
  width: min(640px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 15px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.branch-form { width: min(520px, calc(100vw - 48px)); }
.edit-user-form { width: min(420px, 80vw); grid-template-columns: 1fr; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; grid-column: 1 / -1; }
.edit-button { min-height: 38px; padding: 8px 13px; color: var(--red-dark); background: #fff; border: 1px solid #e8a8ad; border-radius: 9px; cursor: pointer; font-weight: 800; }
.empty-state { padding: 25px; color: var(--muted); text-align: center; }

.receipt-actions { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 18px; }
.receipt-preview-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 850px;
  margin: 0 auto 18px;
  padding: 18px 20px;
  color: #143c2a;
  background: #edf8f2;
  border: 1px solid #b9dfca;
  border-radius: 14px;
}
.receipt-preview-notice h1,
.receipt-preview-notice p { margin: 0; }
.receipt-preview-notice .eyebrow { color: #25734e; }
.receipt-preview-notice > div { display: grid; gap: 3px; }
.receipt-preview-notice > div > p:last-child { color: #47705d; font-size: 14px; }
.receipt-preview-check {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: #27875a;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 900;
}
.receipt-preview-heading { max-width: 850px; margin: 0 auto 12px; }
.receipt-preview-heading h1 { margin: 0; }
.receipt { max-width: 850px; margin: 0 auto; padding: 44px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.receipt-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding-bottom: 25px; border-bottom: 3px solid var(--red); }
.receipt-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.receipt-brand img { width: 172px; max-height: 54px; object-fit: contain; object-position: left center; }
.receipt-brand div,
.receipt-folio,
.receipt-payment-detail > div,
.receipt-customer,
.receipt-concept,
.receipt-notes { display: grid; gap: 3px; }
.receipt-brand span,
.receipt-folio span,
.receipt-payment-detail span,
.receipt-concept > span,
.receipt-notes > span,
.receipt-balances span { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.receipt-folio { flex: 0 0 auto; justify-items: end; text-align: right; }
.receipt-folio p { margin: 0; color: var(--red-dark); font-size: 14px; font-weight: 900; letter-spacing: .12em; }
.receipt-folio h1 { margin: 1px 0; font-size: 28px; }
.receipt-customer { margin: 28px 0 18px; }
.receipt-customer h2 { margin: 0; font-size: 21px; }
.receipt-customer > div { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 14px; }
.receipt-payment-detail { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.receipt-payment-detail > div { padding: 13px 15px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.receipt-concept { margin-top: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.receipt-amount { margin: 24px 0 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.receipt-amount > div { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.receipt-amount span { color: var(--muted); font-size: 14px; text-transform: uppercase; }
.receipt-amount strong { font-size: 34px; line-height: 1; }
.receipt-amount p { margin: 10px 0 0; font-size: 14px; font-weight: 800; letter-spacing: .02em; }
.receipt-balances { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.receipt-balances > div { display: grid; gap: 3px; padding: 13px 15px; background: var(--surface-soft); border-radius: 10px; }
.receipt-balances strong { font-size: 17px; }
.receipt-notes { margin-top: 14px; padding: 14px; background: #fff9ef; border-radius: 10px; }
.receipt-notes p { margin: 0; }
.receipt-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin: 60px 0 24px; }
.receipt-signatures > div { display: grid; gap: 5px; padding-top: 8px; border-top: 1px solid var(--ink); text-align: center; }
.receipt-signatures span { min-height: 17px; font-size: 14px; }
.receipt-signatures strong { color: var(--muted); font-size: 14px; text-transform: uppercase; }
.receipt-legal { padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }

.customer-stats { margin-top: 18px; }
.fiscal-incomplete { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-left: 4px solid var(--warning); }
.fiscal-incomplete h2 { margin-bottom: 5px; }
.fiscal-incomplete p:last-child { margin-bottom: 0; }

.report-tabs {
  display: flex;
  gap: 6px;
  margin: -5px 0 18px;
  padding: 5px;
  background: #e8eaed;
  border-radius: 12px;
}

.report-tabs a {
  padding: 9px 15px;
  color: var(--slate);
  border-radius: 9px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
}

.report-tabs a.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.receipt-report-filters {
  display: grid;
  grid-template-columns:
    minmax(240px, 1.25fr)
    minmax(220px, 1fr)
    repeat(3, minmax(140px, .7fr))
    auto;
  align-items: end;
  gap: 14px;
  padding: 18px;
}

.receipt-report-filters label { display: grid; gap: 6px; }
.receipt-report-filters label > small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.receipt-filter-actions { display: flex; align-items: center; gap: 12px; min-height: 43px; }
.receipt-filter-actions a { font-size: 14px; font-weight: 700; }
.receipt-report-stats { margin-top: 18px; }
.receipt-report-panel { padding: 0; overflow: hidden; }

.report-print-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.report-print-heading h2,
.report-print-heading p { margin: 0; }
.report-print-heading > p { color: var(--muted); font-size: 14px; }
.receipts-table { min-width: 1040px; }
.receipts-table td { vertical-align: middle; }
.receipts-table tfoot td { color: var(--ink); background: var(--surface-soft); font-weight: 800; }
.receipts-table tfoot td:first-child { text-align: right; }
.table-action-secondary { display: block; margin-top: 4px; font-size: 14px; }

.payment-method {
  display: inline-flex;
  padding: 5px 8px;
  color: var(--slate);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.receipt-open { white-space: nowrap; font-size: 14px; font-weight: 750; }
.report-empty { display: grid; justify-items: center; gap: 5px; padding: 42px 20px; text-align: center; }
.report-empty span { color: var(--muted); font-size: 14px; }
.report-empty a { margin-top: 5px; font-weight: 750; }

.income-period-filter { display: flex; align-items: end; gap: 14px; padding: 18px; }
.income-period-filter label { display: grid; gap: 6px; min-width: 170px; }
.report-print-title { display: none; }
.income-report-stats { margin-top: 18px; }
.income-report-panel { padding: 0; overflow: hidden; }
.income-table { min-width: 980px; }
.income-table tfoot td { color: var(--ink); background: var(--surface-soft); font-weight: 800; }
.income-table tfoot td:first-child { text-align: right; }
.income-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.income-report-grid > .panel { padding: 0; overflow: hidden; }

.cxc-primary-actions .report-button {
  display: grid;
  align-content: center;
  gap: 1px;
  padding-top: 7px;
  padding-bottom: 7px;
  text-align: left;
}
.cxc-primary-actions .report-button small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}
.payment-entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .75fr);
  align-items: start;
  gap: 20px;
}
.payment-entry-form { margin: 0; }
.payment-preview-card { position: sticky; top: 92px; }
.payment-preview-card dl { display: grid; gap: 0; margin: 0; }
.payment-preview-card dl > div {
  display: grid;
  gap: 4px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.payment-preview-card dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.payment-preview-card dd { margin: 0; font-weight: 800; }
.preview-assurance {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 15px;
  color: #143c2a;
  background: #edf8f2;
  border: 1px solid #c9e6d5;
  border-radius: 11px;
}
.preview-assurance span { color: #47705d; font-size: 14px; line-height: 1.5; }

.portfolio-report-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) repeat(3, minmax(150px, .75fr)) auto;
  align-items: end;
  gap: 14px;
  padding: 18px;
}
.portfolio-report-filters label { display: grid; gap: 6px; }
.portfolio-report-stats { margin-top: 18px; }
.portfolio-aging { margin-top: 20px; padding: 0; overflow: hidden; }
.aging-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.aging-grid article {
  display: grid;
  gap: 5px;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}
.aging-grid article:last-child { border-right: 0; }
.aging-grid span { color: var(--muted); font-size: 14px; }
.aging-grid strong { font-size: 22px; }
.portfolio-report-panel { margin-top: 20px; padding: 0; overflow: hidden; }
.portfolio-table { min-width: 1120px; }
.portfolio-table td { vertical-align: middle; }
.portfolio-table tfoot td {
  color: var(--ink);
  background: var(--surface-soft);
  font-weight: 800;
}
.portfolio-table tfoot td:first-child { text-align: right; }
.portfolio-row-actions { min-width: 110px; }
.portfolio-row-actions a { display: block; margin: 3px 0; white-space: nowrap; font-size: 14px; font-weight: 750; }
.portfolio-status-vencido { color: #9f111d; background: #ffe8ea; }
.portfolio-status-pagado { color: #23714d; background: #eaf7ef; }
.portfolio-status-parcial { color: #7a5a0b; background: #fff5d8; }
.portfolio-status-pendiente { color: #374151; background: #edf0f3; }

.company-history { margin-top: 22px; padding: 0; overflow: hidden; }
.activity-list { display: grid; }

.activity-list > article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
}

.activity-list > article:first-child { border-top: 0; }
.activity-list > article > div:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.activity-list > article > div:nth-child(2) span { color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-list small { color: var(--muted); font-size: 14px; }

.activity-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 900;
}

.activity-charge { color: var(--red-dark); background: var(--red-soft); }
.activity-payment { color: var(--success); background: var(--success-soft); }
.activity-amount { display: grid; justify-items: end; gap: 1px; }
.activity-amount > strong { font-size: 16px; }
.activity-amount > span,
.activity-amount > a { color: var(--muted); font-size: 14px; }
.bi-recent-charges { margin-top: 20px; padding: 0; overflow: hidden; }
.bi-recent-charges .bi-card-head { padding: 20px 22px; }

.login-container {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 16px;
  background:
    radial-gradient(circle at 8% 15%, rgba(227, 6, 19, .09), transparent 29rem),
    radial-gradient(circle at 92% 84%, rgba(22, 24, 27, .08), transparent 30rem),
    #f4f4f5;
}

.login-container > .alert { position: fixed; top: 20px; width: min(480px, calc(100% - 32px)); }

.factura-login {
  width: min(470px, 100%);
  margin: 0;
  padding: clamp(30px, 6vw, 46px);
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--red);
  box-shadow: 0 28px 80px rgba(20, 24, 30, .13);
}

.login-logo {
  display: block;
  width: min(310px, 88%);
  height: auto;
  margin: 0 0 30px;
}

.factura-login h1 { font-size: clamp(36px, 7vw, 50px); }
.login-copy { margin-top: 12px !important; }
.factura-login .stack { margin-top: 26px; }
.factura-login .primary { margin-top: 4px; }
.login-footer { margin: 28px 0 0; padding-top: 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: 14px; text-align: center; }

.copilot-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 17, 20, .42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  backdrop-filter: blur(2px);
}

.copilot-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 80;
  width: min(430px, 100vw);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background: #fff;
  box-shadow: -22px 0 60px rgba(20, 24, 30, .18);
  transform: translateX(104%);
  transition: transform .25s ease;
}

.copilot-open .copilot-backdrop { opacity: 1; pointer-events: auto; }
.copilot-open .copilot-panel { transform: translateX(0); }

.copilot-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: #121417;
  color: #fff;
}

.copilot-heading { display: flex; align-items: center; gap: 11px; }
.copilot-heading > div { display: grid; }
.copilot-heading small { color: #9da2aa; font-size: 14px; }
.icon-button { width: 34px; height: 34px; padding: 0; color: #c5c8cd; background: rgba(255,255,255,.07); border: 0; border-radius: 9px; cursor: pointer; font-size: 23px; }

.copilot-body {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow-y: auto;
  background: #f5f6f7;
}

.copilot-message {
  max-width: 88%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px 14px 14px 14px;
  box-shadow: 0 3px 12px rgba(20, 24, 30, .04);
}

.copilot-message.user {
  align-self: flex-end;
  color: #fff;
  background: var(--graphite);
  border-color: var(--graphite);
  border-radius: 14px 6px 14px 14px;
}

.copilot-message strong { font-size: 14px; }
.copilot-message p { margin: 3px 0 0; font-size: 14px; white-space: pre-wrap; }
.copilot-message.loading { color: var(--muted); }
.copilot-message.error { color: var(--danger); background: var(--danger-soft); }

.copilot-suggestions { display: flex; flex-wrap: wrap; gap: 7px; }
.copilot-suggestions button { padding: 7px 10px; color: var(--red-dark); background: #fff; border: 1px solid #edc4c7; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 750; }

.copilot-form { display: grid; gap: 8px; padding: 15px 18px; border-top: 1px solid var(--line); }
.copilot-form textarea { min-height: 82px; }
.copilot-form > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.copilot-form small { max-width: 210px; color: var(--muted); font-size: 14px; }
.copilot-form .primary { min-height: 37px; }
.copilot-disclaimer { margin: 0; padding: 0 18px 13px; color: var(--muted); font-size: 14px; text-align: center; }

/* Registro de cargos */
.charge-page-head {
  align-items: center;
  margin-bottom: 20px;
}

.charge-page-head h1 { margin-bottom: 5px; }

.charge-status {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--slate);
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.charge-status > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(227, 6, 19, .09);
}

.charge-form {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.charge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 20px;
}

.charge-layout > .panel {
  margin-bottom: 0;
}

.charge-editor {
  display: grid;
  gap: 25px;
  padding: 0 28px 30px;
  overflow: hidden;
}

.charge-customer {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin: 0 -28px;
  padding: 20px 28px;
  background:
    linear-gradient(110deg, rgba(255, 241, 242, .92), rgba(255, 255, 255, .96) 58%),
    #fff;
  border-bottom: 1px solid #f0d9dc;
}

.charge-customer-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--red), var(--red-dark));
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(227, 6, 19, .18);
  font-size: 18px;
  font-weight: 850;
  text-transform: uppercase;
}

.charge-customer-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.charge-customer-copy > span {
  color: var(--red-dark);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.charge-customer-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.charge-customer-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.charge-change-customer {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 14px;
}

.charge-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.charge-section-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.charge-section-head > span {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.field-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.field-counter {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.field-counter b {
  color: var(--slate);
  font-weight: 750;
}

.charge-catalog-picker {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, #fbfbfc, #fff);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.charge-catalog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
}

.charge-catalog-heading > div {
  display: grid;
  gap: 2px;
}

.catalog-optional {
  padding: 4px 8px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
}

.charge-catalog-combobox {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.charge-catalog-combobox:focus-within {
  border-color: #e8646d;
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .09);
}

.charge-catalog-combobox > svg {
  width: 19px;
  height: 19px;
  color: var(--muted);
  fill: currentColor;
}

.charge-catalog-combobox > input {
  min-height: 46px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.charge-catalog-combobox > input:focus { box-shadow: none; }

.charge-catalog-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #f0c8cb;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: charge-catalog-spin .7s linear infinite;
}

@keyframes charge-catalog-spin {
  to { transform: rotate(360deg); }
}

.charge-catalog-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: -1px;
  left: -1px;
  max-height: 310px;
  padding: 6px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  box-shadow: 0 18px 40px rgba(24, 29, 36, .16);
}

.charge-catalog-option {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  color: var(--graphite);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.charge-catalog-option:hover,
.charge-catalog-option.is-active {
  background: var(--red-soft);
}

.charge-catalog-option-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.charge-catalog-option-main strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.charge-catalog-option-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.charge-catalog-option-price {
  color: var(--red-dark);
  font-size: 14px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.charge-catalog-status {
  min-height: 14px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.charge-catalog-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  color: #22543d;
  background: #f0faf5;
  border: 1px solid #c8ead8;
  border-radius: 9px;
}

.charge-catalog-selection[hidden] { display: none; }

.charge-catalog-selection > span {
  min-width: 0;
  display: grid;
}

.charge-catalog-selection small {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.charge-catalog-selection strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.charge-catalog-selection button {
  padding: 4px 7px;
  color: #22543d;
  background: #fff;
  border: 1px solid #abd8bf;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
}

.charge-concept textarea {
  min-height: 94px;
  padding: 13px 14px;
  line-height: 1.45;
}

.charge-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.charge-pricing {
  display: grid;
  gap: 17px;
  padding: 19px;
  background: linear-gradient(145deg, #fafbfc, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.charge-pricing-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.charge-pricing-head h3 {
  margin: 3px 0 0;
  font-size: 17px;
}

.charge-pricing-head > span {
  padding: 5px 9px;
  color: var(--red-dark);
  background: var(--red-soft);
  border: 1px solid #f2c7ca;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.charge-pricing-grid {
  display: grid;
  grid-template-columns: minmax(100px, .55fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 13px;
}

.charge-pricing-grid > label,
.charge-manual-rates > label {
  min-width: 0;
}

.money-input.compact > span:first-child {
  font-size: 15px;
}

.money-input.compact input {
  font-size: 14px;
}

.charge-price-mode {
  min-width: 0;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.charge-price-mode[hidden] { display: none; }

.charge-price-mode legend {
  padding: 0 5px;
  color: var(--slate);
  font-size: 14px;
  font-weight: 800;
}

.charge-price-mode > div:first-of-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.charge-price-mode > div:first-of-type > label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 11px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.charge-price-mode input[type="radio"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--red);
}

.charge-price-mode label > span {
  display: grid;
  gap: 2px;
}

.charge-price-mode label strong {
  font-size: 14px;
}

.charge-price-mode label small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.charge-manual-rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.percent-input {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0 11px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.percent-input:focus-within {
  border-color: #e8646d;
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .09);
}

.percent-input input {
  min-height: 40px;
  padding: 7px 0;
  border: 0;
  box-shadow: none;
}

.percent-input input:focus { box-shadow: none; }

.percent-input span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.charge-catalog-tax-summary {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  color: #22543d;
  background: #f0faf5;
  border: 1px solid #c8ead8;
  border-radius: 10px;
}

.charge-catalog-tax-summary[hidden] { display: none; }

.charge-catalog-tax-summary > strong {
  font-size: 14px;
}

.charge-catalog-tax-summary > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.charge-catalog-tax-summary > div span {
  padding: 5px 8px;
  background: #fff;
  border: 1px solid #abd8bf;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
}

.charge-catalog-tax-summary > small {
  font-size: 14px;
  line-height: 1.4;
}

.charge-taxpayer-note {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 11px 13px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.charge-taxpayer-note > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.charge-taxpayer-note strong {
  color: var(--graphite);
  font-size: 14px;
}

.charge-taxpayer-note small {
  color: var(--muted);
  font-size: 14px;
}

.money-input {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.money-input:focus-within {
  border-color: #e8646d;
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .09);
}

.money-input > span:first-child {
  color: var(--red-dark);
  font-size: 18px;
  font-weight: 850;
}

.money-input > span:last-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .08em;
}

.money-input input {
  min-height: 46px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.money-input input:focus { box-shadow: none; }

.due-date-shortcuts {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.due-date-shortcuts legend {
  margin-bottom: 8px;
  color: #3c4148;
  font-size: 14px;
  font-weight: 750;
}

.due-date-shortcuts > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.due-date-shortcuts button {
  min-height: 32px;
  padding: 6px 12px;
  color: var(--slate);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.due-date-shortcuts button:hover,
.due-date-shortcuts button[aria-pressed="true"] {
  color: var(--red-dark);
  background: var(--red-soft);
  border-color: #efb5ba;
}

.charge-summary {
  position: sticky;
  top: 92px;
  padding: 25px;
  background:
    radial-gradient(circle at 100% 0, rgba(227, 6, 19, .06), transparent 34%),
    var(--surface);
}

.charge-summary-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #f4d4d7;
  border-radius: 13px;
}

.charge-summary-icon svg {
  width: 22px;
  height: 22px;
}

.charge-summary h2 {
  margin: 3px 0 20px;
  font-size: 21px;
}

.charge-summary-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.charge-summary-list > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.charge-summary-list dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.charge-summary-list dd {
  min-width: 0;
  margin: 0;
  color: var(--graphite);
  font-size: 14px;
  font-weight: 750;
  overflow-wrap: anywhere;
  text-align: right;
}

.charge-tax-breakdown {
  display: grid;
  gap: 7px;
  margin: 17px 0 0;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.charge-tax-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.charge-tax-breakdown dt,
.charge-tax-breakdown dd {
  margin: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.charge-tax-breakdown dt { color: var(--muted); }
.charge-tax-breakdown dd { color: var(--graphite); font-weight: 800; }
.charge-tax-breakdown .discount,
.charge-tax-breakdown .withholding { color: #8c4b16; }
.charge-tax-breakdown .transfer { color: #22543d; }

.charge-summary-total {
  display: grid;
  gap: 0;
  margin: 18px 0;
  padding: 17px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.charge-summary-total span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.charge-summary-total strong {
  color: var(--ink);
  font-size: clamp(25px, 3vw, 32px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.charge-summary-total small {
  color: var(--muted);
  font-size: 14px;
}

.charge-summary-note {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  margin: 0 0 19px;
  color: var(--slate);
  font-size: 14px;
  line-height: 1.45;
}

.charge-summary-note > span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--red-dark);
  background: var(--red-soft);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-weight: 800;
}

.charge-submit-actions {
  display: grid;
  gap: 11px;
}

.charge-submit-actions .primary {
  width: 100%;
  min-height: 48px;
}

.charge-submit-actions .primary svg {
  width: 18px;
  height: 18px;
}

.charge-submit-actions > a {
  color: var(--slate);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* Experiencia moderna y flujo continuo de cobranza */
.dashboard-hero {
  position: relative;
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 16px;
  padding: 24px 28px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 88% 10%, rgba(227, 6, 19, .34), transparent 31%),
    linear-gradient(120deg, #171a1f 0%, #282c33 72%, #15171b 100%);
  border: 1px solid #30343a;
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px rgba(20, 24, 30, .16);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.dashboard-hero-copy { position: relative; z-index: 1; min-width: 0; }
.dashboard-hero .eyebrow { color: #ff8d95; }
.dashboard-hero h1 {
  margin: 5px 0 3px;
  color: #fff;
  font-size: clamp(25px, 2.6vw, 34px);
}
.dashboard-hero-copy > p:last-child {
  margin: 0;
  color: #b9bec6;
  font-size: 14px;
}
.dashboard-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.dashboard-hero .secondary {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: none;
}
.dashboard-hero .secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .28);
}

.dashboard-stats { gap: 12px; margin-bottom: 16px; }
.dashboard-stats article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
}
.dashboard-stats article::before { display: none; }
.dashboard-stats .stat-icon,
.catalog-card-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--red-dark);
  background: var(--red-soft);
  border: 1px solid #f3d0d3;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
}
.dashboard-stats .stat-danger .stat-icon {
  color: var(--danger);
  background: var(--danger-soft);
}
.dashboard-stats strong {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 28px);
}
.dashboard-stats article > div { min-width: 0; }
.dashboard-stats article > div > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 16px;
}
.dashboard-workspace > .panel { margin-bottom: 16px; }
.dashboard-operations .section-head { margin-bottom: 14px; }
.dashboard-operations h2,
.dashboard-intelligence h2,
.dashboard-catalogs h2,
.dashboard-history h2 { margin: 3px 0 0; }
.workspace-tag {
  padding: 5px 9px;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid #c5e7d7;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
}
.quick-action-grid { display: grid; gap: 8px; }
.quick-action-grid > a {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.quick-action-grid > a:hover {
  background: #fff;
  border-color: #efafb4;
  transform: translateX(2px);
}
.quick-action-grid > a > span:nth-child(2) { min-width: 0; display: grid; }
.quick-action-grid strong { font-size: 14px; }
.quick-action-grid small {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-action-grid b { color: var(--red); font-size: 18px; }
.quick-action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--graphite);
  border-radius: 11px;
  font-size: 14px;
  font-weight: 900;
}
.quick-action-grid > a:first-child .quick-action-icon { background: var(--red); }

.dashboard-intelligence {
  display: grid;
  align-content: start;
  gap: 17px;
  background:
    linear-gradient(145deg, rgba(255, 241, 242, .66), rgba(255, 255, 255, .35)),
    #fff;
}
.dashboard-intelligence p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.dashboard-intelligence .button { width: 100%; }
.dashboard-intelligence-mark {
  height: 55px;
  display: flex;
  align-items: end;
  gap: 7px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.dashboard-intelligence-mark span {
  flex: 1;
  min-height: 9px;
  background: linear-gradient(180deg, #ed2733, var(--red-dark));
  border-radius: 4px 4px 2px 2px;
}
.dashboard-intelligence-mark span:nth-child(1) { height: 32%; }
.dashboard-intelligence-mark span:nth-child(2) { height: 55%; }
.dashboard-intelligence-mark span:nth-child(3) { height: 76%; }
.dashboard-intelligence-mark span:nth-child(4) { height: 100%; }

.dashboard-catalogs { gap: 16px; }
.dashboard-catalogs > article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 17px 18px;
}
.dashboard-catalogs p.muted { font-size: 14px; }
.text-action { font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.dashboard-history { margin-top: 0; }

.flow-stepper {
  max-width: 760px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 18px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 2px 10px rgba(20, 24, 30, .035);
}
.flow-stepper > span {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.flow-stepper > span:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 40px;
  right: 10px;
  height: 1px;
  background: var(--line-strong);
}
.flow-stepper b {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  background: #eef0f2;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 14px;
}
.flow-stepper small {
  position: relative;
  z-index: 1;
  padding-right: 7px;
  background: rgba(255, 255, 255, .94);
  font-size: 14px;
  font-weight: 800;
}
.flow-stepper .is-complete { color: var(--success); }
.flow-stepper .is-complete b {
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}
.flow-stepper .is-active { color: var(--red-dark); }
.flow-stepper .is-active b {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}
.picker-panel { padding: 18px; }
.receipt-flow-stepper { max-width: 850px; margin-inline: auto; }

.payment-form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 19px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.payment-form-heading h2 { margin: 3px 0 0; }
.payment-balance-pill {
  padding: 7px 11px;
  color: var(--red-dark);
  background: var(--red-soft);
  border: 1px solid #f2c7ca;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}
.payment-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.payment-amount-field { grid-row: span 2; align-content: start; }
.payment-amount-field .money-input { min-height: 58px; }
.payment-amount-field .money-input input { min-height: 56px; font-size: 23px; }
.payment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.payment-actions > a { color: var(--slate); font-size: 14px; font-weight: 750; }
.payment-preview-card dd { overflow-wrap: anywhere; }

.cxc-list-panel { padding: 0; overflow: hidden; }
.cxc-list-head { margin: 0; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cxc-list-head > span {
  padding: 5px 9px;
  color: var(--slate);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}
.table-primary-action {
  display: inline-flex;
  padding: 7px 10px;
  color: #fff;
  background: var(--red);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.table-primary-action:hover { color: #fff; background: var(--red-dark); }

@media print {
  .sidebar,
  .topbar,
  .receipt-actions,
  .receipt-preview-notice,
  .receipt-preview-heading,
  .flow-stepper,
  .reports-page-head,
  .report-tabs,
  .report-screen-only,
  .stage > footer { display: none !important; }
  .app-shell { display: block; }
  .stage { display: block; }
  .container { width: 100%; padding: 0; }
  .receipt,
  .receipt-report-panel,
  .portfolio-report-panel,
  .portfolio-aging { border: 0; box-shadow: none; }
  .receipt { max-width: none; padding: 14mm; }
  .receipt-legal { display: block !important; }
  .report-print-title { display: block; margin-bottom: 12px; }
  .report-print-title h2 { margin: 0; }
  .receipt-report-stats { grid-template-columns: repeat(4, 1fr); }
  .income-report-stats { grid-template-columns: repeat(4, 1fr); }
  .portfolio-report-stats { grid-template-columns: repeat(4, 1fr); }
  .receipt-report-stats article { box-shadow: none; }
  .income-report-stats article { box-shadow: none; }
  .receipts-table { min-width: 0; font-size: 14px; }
  .income-table { min-width: 0; font-size: 14px; }
  .portfolio-table { min-width: 0; font-size: 8.5px; }
  .receipts-table th,
  .receipts-table td,
  .income-table th,
  .income-table td,
  .portfolio-table th,
  .portfolio-table td { padding: 8px 6px; }
  .income-report-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .aging-grid article { padding: 12px; }
  .aging-grid strong { font-size: 16px; }
}

@media (max-width: 1180px) {
  .app-shell { display: block; }
  .stage { margin-left: 0; }
  .sidebar { transform: translateX(-104%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(20, 24, 30, .22); }
  .menu-open .sidebar { transform: translateX(0); }
  .menu-toggle { display: grid; place-items: center; }
  .container { width: min(100% - 40px, 1180px); }
  .tax-rule-row { grid-template-columns: 1fr 1fr; }
  .catalog-filters { grid-template-columns: 1fr 180px; }
  .catalog-filters button { grid-column: 1 / -1; }
  .import-global { grid-template-columns: 1fr 1fr; }
  .receipt-report-filters { grid-template-columns: 1fr 1fr; }
  .receipt-customer-filter,
  .receipt-search { grid-column: 1 / -1; }
  .receipt-filter-actions { justify-content: flex-end; }
  .portfolio-report-filters { grid-template-columns: 1fr 1fr; }
  .portfolio-search { grid-column: 1 / -1; }
  .bi-grid,
  .bi-grid-lower,
  .income-report-grid { grid-template-columns: 1fr; }
  .dashboard-workspace { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); }
  .stats strong { font-size: clamp(22px, 3vw, 30px); overflow-wrap: anywhere; }
}

@media (max-width: 900px) {
  .dashboard-workspace { grid-template-columns: 1fr; }
  .dashboard-intelligence { grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; }
  .dashboard-intelligence-mark { width: 70px; }
  .dashboard-intelligence .button { width: auto; }
  .dashboard-catalogs { grid-template-columns: 1fr; }
  .charge-form { width: 100%; }
  .charge-layout { grid-template-columns: 1fr; }
  .charge-summary { position: static; }
  .charge-summary-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .charge-summary-list > div {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  .payment-entry-layout { grid-template-columns: 1fr; }
  .payment-preview-card { position: static; }
  .aging-grid { grid-template-columns: 1fr 1fr; }
  .aging-grid article:nth-child(2) { border-right: 0; }
  .aging-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .charge-summary-list dd { margin-top: 3px; text-align: left; }
}

@media (max-width: 720px) {
  .topbar { min-height: 64px; padding: 0 16px; }
  .topbar-title small,
  .account-copy { display: none; }
  .account form { margin-left: 0; }
  .container { width: calc(100% - 28px); padding-top: 26px; }
  .dashboard-hero { display: grid; padding: 21px; }
  .dashboard-hero-actions { justify-content: stretch; }
  .dashboard-hero-actions .button { flex: 1 1 auto; }
  .dashboard-intelligence { grid-template-columns: 1fr; }
  .dashboard-intelligence-mark { width: 100%; }
  .dashboard-intelligence .button { width: 100%; }
  .dashboard-catalogs > article { grid-template-columns: 42px minmax(0, 1fr); }
  .dashboard-catalogs .text-action { grid-column: 2; }
  .page-head { display: grid; align-items: start; }
  .page-actions { justify-content: flex-start; }
  .page-actions .button,
  .page-head > .button { flex: 1 1 auto; text-align: center; }
  .stats,
  .stats-three,
  .company-stats { grid-template-columns: 1fr 1fr; }
  .form-grid,
  .two-columns,
  .fiscal-fields,
  .source-options,
  .import-defaults,
  .import-global,
  .receipt-grid,
  .receipt-payment-detail { grid-template-columns: 1fr; }
  .receipt-report-filters { grid-template-columns: 1fr; }
  .receipt-customer-filter,
  .receipt-search { grid-column: auto; }
  .receipt-filter-actions { justify-content: space-between; }
  .portfolio-report-filters { grid-template-columns: 1fr; }
  .portfolio-search { grid-column: auto; }
  .report-tabs { overflow-x: auto; }
  .report-tabs a { flex: 1 0 auto; text-align: center; }
  .activity-list > article { grid-template-columns: 38px minmax(0, 1fr); padding-inline: 17px; }
  .activity-amount { grid-column: 2; justify-items: start; }
  .receipt > header { display: grid; align-items: start; }
  .receipt-balance-grid,
  .receipt-balances { grid-template-columns: 1fr; }
  .receipt-header,
  .fiscal-incomplete { display: grid; }
  .receipt-folio { justify-items: start; text-align: left; }
  .receipt-brand { display: grid; }
  .receipt-signatures { gap: 24px; }
  .income-period-filter { display: grid; grid-template-columns: 1fr 1fr; }
  .wide,
  .import-global > div { grid-column: auto; }
  .form-section { display: grid; }
  .catalog-filters,
  .tax-rule-row { grid-template-columns: 1fr; }
  .fiscal-summary dl { grid-template-columns: 1fr 1fr; }
  .company-head { display: grid; }
  .company-form,
  .edit-user-form { position: static; width: 100%; grid-template-columns: 1fr; margin-top: 10px; box-shadow: none; }
  .form-actions { grid-column: auto; }
  .import-steps { padding-inline: 8px; }
  .import-steps span { font-size: 14px; }
  .import-steps b { width: 21px; height: 21px; }
  .chart-row { grid-template-columns: 82px minmax(70px, 1fr) 96px; gap: 8px; }
  .column-chart { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
  .column-item { min-width: 0; }
  .column-item > div { padding-inline: 3px; }
  .customer-picker-search,
  .customer-picker-item { grid-template-columns: 1fr; }
  .customer-picker-search .button,
  .customer-picker-item .button { width: 100%; }
  .charge-page-head { display: grid; justify-items: start; }
  .flow-stepper { max-width: none; padding-inline: 10px; }
  .flow-stepper > span { display: grid; justify-items: center; gap: 4px; }
  .flow-stepper > span:not(:last-child)::after {
    top: 14px;
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
  }
  .flow-stepper small { padding: 0; background: transparent; font-size: 14px; }
  .payment-form-grid { grid-template-columns: 1fr; }
  .payment-amount-field { grid-row: auto; }
  .payment-actions { align-items: stretch; flex-direction: column-reverse; }
  .payment-actions .primary { width: 100%; }
  .payment-actions > a { text-align: center; }
  .charge-editor { padding: 0 20px 23px; }
  .charge-customer {
    grid-template-columns: 42px minmax(0, 1fr);
    margin-inline: -20px;
    padding: 17px 20px;
  }
  .charge-customer-avatar { width: 42px; height: 42px; }
  .charge-change-customer { grid-column: 1 / -1; width: 100%; }
  .charge-section-head { display: grid; gap: 4px; }
  .charge-section-head > span { white-space: normal; }
  .charge-catalog-heading { display: grid; }
  .catalog-optional { width: max-content; }
  .charge-catalog-option { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .charge-pricing-head { display: grid; align-items: start; }
  .charge-pricing-head > span { width: max-content; white-space: normal; }
  .charge-pricing-grid { grid-template-columns: 1fr; }
  .charge-price-mode > div:first-of-type,
  .charge-manual-rates { grid-template-columns: 1fr; }
  .charge-fields { grid-template-columns: 1fr; }
  .charge-summary { padding: 22px 20px; }
  .charge-summary-list { grid-template-columns: 1fr; }
  .due-date-shortcuts > div { display: grid; grid-template-columns: repeat(4, 1fr); }
  .due-date-shortcuts button { padding-inline: 5px; }
}

/* Identidad comercial y recibo premium · build 015 */
.table-secondary {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.company-brand-section { overflow: hidden; }
.company-brand-manager {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(320px, 1.5fr);
  gap: 24px;
  align-items: stretch;
  padding: 22px;
}
.company-logo-preview {
  display: grid;
  min-height: 174px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(247,248,250,.96)),
    repeating-linear-gradient(45deg, #f3f4f6 0 9px, #fff 9px 18px);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.company-logo-preview img {
  width: min(220px, 100%);
  max-height: 92px;
  object-fit: contain;
}
.company-logo-preview small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.company-logo-form {
  display: grid;
  gap: 15px;
  align-content: center;
}
.company-logo-form label { margin: 0; }
.company-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.receipt-document {
  position: relative;
  overflow: hidden;
  padding: 46px 48px 36px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(22, 26, 31, .12);
}
.receipt-accent {
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--red-dark), var(--red) 55%, #24282e);
}
.receipt-header {
  align-items: center;
  padding-bottom: 27px;
  border-bottom: 1px solid #dfe2e6;
}
.receipt-brand { align-items: center; gap: 18px; }
.receipt-logo-frame {
  display: grid;
  flex: 0 0 190px;
  width: 190px;
  height: 76px;
  place-items: center;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e5e7ea;
  border-radius: 12px;
}
.receipt-brand .receipt-logo-frame img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
}
.receipt-brand > div:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.receipt-brand > div:last-child strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.12;
}
.receipt-folio p { color: var(--red); }
.receipt-folio h1 {
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -.03em;
}
.receipt-status {
  margin-top: 7px;
  padding: 5px 9px;
  color: #176a47;
  background: #eaf7f0;
  border: 1px solid #bce0cb;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: .08em;
}
.receipt-customer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 24px 0 17px;
  padding: 18px;
  background: linear-gradient(120deg, #fafafa, #f4f5f7);
  border: 1px solid #e3e5e8;
  border-radius: 13px;
}
.receipt-section-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 11px;
  font-size: 14px;
  font-weight: 900;
}
.receipt-customer-copy { display: grid; gap: 2px; }
.receipt-customer-copy .eyebrow { margin: 0; }
.receipt-customer-copy h2 { margin: 0; font-size: 20px; }
.receipt-customer-copy > div {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: var(--muted);
  font-size: 14px;
}
.receipt-payment-detail > div {
  position: relative;
  min-height: 70px;
  padding: 15px 15px 14px 39px;
  overflow: hidden;
  background: #fff;
}
.receipt-payment-detail > div > small {
  position: absolute;
  top: 15px;
  left: 13px;
  color: var(--red);
  font-size: 14px;
  font-weight: 900;
}
.receipt-payment-detail strong { overflow-wrap: anywhere; }
.receipt-concept {
  margin-top: 13px;
  padding: 16px 17px;
  background: #fff;
  border-left: 3px solid var(--red);
}
.receipt-amount {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(250px, 1fr);
  gap: 16px 28px;
  align-items: center;
  margin-top: 20px;
  padding: 23px 25px;
  color: #fff;
  background:
    radial-gradient(circle at 95% 10%, rgba(255,255,255,.13), transparent 180px),
    linear-gradient(120deg, #20242a, #343940);
  border: 0;
  border-radius: 14px;
}
.receipt-amount > .receipt-amount-label {
  display: grid;
  gap: 5px;
  align-items: start;
  justify-content: start;
}
.receipt-amount-label span { color: #fff; font-size: 14px; font-weight: 900; }
.receipt-amount-label small { color: #bfc4ca; font-size: 14px; }
.receipt-amount > .receipt-amount-value {
  display: grid;
  gap: 6px;
  justify-items: end;
}
.receipt-amount-value strong {
  color: #fff;
  font-size: 37px;
  line-height: 1;
  letter-spacing: -.04em;
}
.receipt-amount-value sup {
  margin-right: 4px;
  color: #e4e6e9;
  font-size: 17px;
}
.receipt-amount-value b {
  padding: 4px 7px;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: .08em;
}
.receipt-amount > p {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 13px;
  color: #eef0f2;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: 14px;
}
.receipt-balances > div { border: 1px solid #e5e7ea; }
.receipt-balances > div:last-child {
  background: #f7f8fa;
  border-left: 3px solid var(--red);
}
.receipt-balances small { color: var(--muted); font-size: 14px; }
.receipt-signatures { margin-top: 54px; }
.receipt-legal {
  display: grid;
  gap: 4px;
  justify-items: center;
}
.receipt-legal strong {
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .04em;
}
.receipt-legal span { max-width: 670px; }

@media print {
  @page { size: A4; margin: 10mm; }
  body {
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .receipt-document {
    max-width: none;
    padding: 9mm 10mm 7mm;
    border-radius: 0;
    box-shadow: none;
  }
  .receipt-accent { height: 2mm; }
  .receipt-logo-frame { border-color: #ddd; }
  .receipt-signatures { margin-top: 14mm; }
}

@media (max-width: 720px) {
  .company-brand-manager { grid-template-columns: 1fr; padding: 17px; }
  .company-logo-preview { min-height: 140px; }
  .company-logo-actions > * { flex: 1 1 auto; }
  .receipt-document { padding: 35px 20px 26px; }
  .receipt-logo-frame {
    width: min(230px, 100%);
    height: 78px;
    flex-basis: auto;
  }
  .receipt-customer { grid-template-columns: 36px minmax(0, 1fr); padding: 15px; }
  .receipt-amount { grid-template-columns: 1fr; padding: 20px; }
  .receipt-amount > .receipt-amount-value { justify-items: start; }
  .receipt-amount > p { grid-column: auto; }
  .receipt-amount-value strong { font-size: 32px; }
}

@media (max-width: 460px) {
  .stats,
  .stats-three,
  .company-stats,
  .fiscal-summary dl { grid-template-columns: 1fr; }
  .account-avatar { display: none; }
  .receipt { padding: 25px; }
  .aging-grid { grid-template-columns: 1fr; }
  .aging-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .aging-grid article:last-child { border-bottom: 0; }
  .import-steps span { gap: 4px; }
  .import-steps span:not(:last-child)::after { display: none; }
  .chart-row {
    grid-template-columns: 1fr auto;
  }
  .chart-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .column-item > strong { display: none; }
  .column-item { grid-template-rows: 1fr 22px; }
  .charge-status { display: none; }
  .dashboard-hero-actions { display: grid; }
  .dashboard-stats article { grid-template-columns: 38px minmax(0, 1fr); }
  .flow-stepper { padding-inline: 5px; }
  .flow-stepper small { font-size: 14px; }
  .due-date-shortcuts > div { grid-template-columns: 1fr 1fr; }
}

/* Cierre seguro por empresa */
.company-maintenance { margin-top: 22px; }
.company-maintenance .section-head { align-items: center; }
.company-maintenance .section-head p:not(.eyebrow) {
  max-width: 680px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.cleanup-head { margin-bottom: 22px; }
.cleanup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.cleanup-grid article {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}
.cleanup-grid span,
.cleanup-grid strong { display: block; }
.cleanup-grid span { color: var(--muted); font-size: 14px; }
.cleanup-grid strong { margin-top: 5px; font-size: 27px; }
.cleanup-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 24px;
}
.cleanup-panel > form { display: grid; justify-items: end; gap: 7px; }
.cleanup-refresh-note {
  max-width: 260px;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}
.cleanup-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}
.cleanup-step-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--graphite);
  border-radius: 12px;
  font-size: 18px;
  font-weight: 850;
}
.cleanup-step h2,
.cleanup-step p { margin: 0; }
.cleanup-step p:last-child {
  max-width: 720px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}
.cleanup-danger {
  grid-template-columns: 1fr;
  border-color: #edc4c7;
  background: linear-gradient(135deg, #fff 0%, #fff8f7 100%);
}
.cleanup-danger .cleanup-step-number { background: var(--danger); }
.cleanup-ready,
.cleanup-locked,
.cleanup-blocked {
  display: grid;
  gap: 4px;
  padding: 15px 17px;
  border-radius: 11px;
}
.cleanup-ready {
  color: #17603a;
  background: var(--success-soft);
  border: 1px solid #b9e1cb;
}
.cleanup-ready span,
.cleanup-ready code,
.cleanup-locked span,
.cleanup-blocked p { font-size: 14px; }
.cleanup-ready code {
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.cleanup-locked {
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px solid #efdba0;
}
.cleanup-blocked {
  margin-bottom: 18px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f5c7c3;
}
.cleanup-blocked p { margin: 0; }
.cleanup-confirm-form {
  max-width: 620px;
  display: grid;
  gap: 14px;
}
.cleanup-confirm-form > label:first-of-type {
  display: grid;
  gap: 7px;
}
.cleanup-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--slate);
  font-size: 14px;
}
.cleanup-checkbox input { width: 17px; height: 17px; margin: 0; }
.danger-button {
  width: max-content;
  min-height: 43px;
  padding: 10px 16px;
  color: #fff;
  background: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.danger-button:hover { background: #8d1d15; }
.cleanup-preserved {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}
.cleanup-preserved h2 { margin-bottom: 13px; font-size: 16px; }
.cleanup-preserved > div { display: flex; flex-wrap: wrap; gap: 8px; }
.cleanup-preserved span {
  padding: 7px 10px;
  color: var(--slate);
  background: var(--surface-soft);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .cleanup-grid { grid-template-columns: 1fr 1fr; }
  .cleanup-panel { grid-template-columns: 1fr; }
  .cleanup-panel > form { justify-items: stretch; }
  .cleanup-refresh-note { max-width: none; text-align: left; }
  .cleanup-panel form > .primary { width: 100%; }
  .danger-button { width: 100%; }
}

@media (max-width: 460px) {
  .cleanup-grid { grid-template-columns: 1fr; }
  .cleanup-step { grid-template-columns: 36px minmax(0, 1fr); }
  .cleanup-step-number { width: 36px; height: 36px; }
}

/* Sistema visual homogéneo 014
   Una sola jerarquía para Back Office, operación, catálogos y reportes. */
:root {
  --canvas: #f4f5f7;
  --surface-soft: #f7f8fa;
  --line: #e2e5e9;
  --line-strong: #cfd4da;
  --sidebar: 272px;
  --shadow-xs: 0 1px 2px rgba(18, 22, 28, .035);
  --shadow-sm: 0 5px 18px rgba(18, 22, 28, .055);
  --shadow-md: 0 22px 55px rgba(18, 22, 28, .13);
  --focus: 0 0 0 4px rgba(227, 6, 19, .11);
}

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at 100% 0, rgba(227, 6, 19, .025), transparent 27rem),
    var(--canvas);
}

body:not(.is-ready) .app-main > *,
body:not(.is-ready) .login-stage { opacity: 0; transform: translateY(5px); }

.app-main > *,
.login-stage {
  opacity: 1;
  transform: none;
  transition: opacity .24s ease, transform .24s ease;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.sidebar {
  padding: 18px 14px 15px;
  background:
    radial-gradient(circle at 20% -4%, rgba(227, 6, 19, .13), transparent 16rem),
    linear-gradient(180deg, #15171b, #101216);
}

.sidebar-brand {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 0 8px 18px;
}

.sidebar-brand img {
  width: 54px;
  height: 48px;
  padding: 4px;
  object-fit: contain;
  object-position: left center;
  border-radius: 11px;
}

.sidebar-brand span {
  color: #e6e8eb;
  font-size: 14px;
  letter-spacing: .08em;
}

.side-nav { gap: 4px; margin-top: 11px; }
.nav-label { margin: 15px 11px 5px; color: #6f757e; }

.side-nav a {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid transparent;
}

.side-nav a:hover {
  border-color: rgba(255, 255, 255, .045);
  transform: translateX(2px);
}

.side-nav a.is-active {
  border-color: rgba(255, 255, 255, .10);
  box-shadow: 0 9px 25px rgba(185, 0, 11, .24);
}

.copilot-launch {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
}

.copilot-launch::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.06), transparent 72%);
  transform: translateX(-100%);
  animation: copilot-sheen 8s ease-in-out infinite;
}

.copilot-launch small,
.copilot-heading small {
  display: flex;
  align-items: center;
  gap: 5px;
}

.copilot-launch small i,
.copilot-heading small i,
.topbar-status i,
.login-ai-status i {
  width: 6px;
  height: 6px;
  display: inline-block;
  flex: 0 0 auto;
  background: #27b77c;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(39, 183, 124, .13);
}

@keyframes copilot-sheen {
  0%, 70%, 100% { transform: translateX(-100%); }
  82% { transform: translateX(100%); }
}

.sidebar-foot > span:last-child { display: grid; }
.sidebar-foot strong { color: #989da5; font-size: 14px; }
.sidebar-foot small { color: #626871; font-size: 14px; }

.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: none;
  padding: 0;
  background: rgba(10, 12, 15, .46);
  border: 0;
  backdrop-filter: blur(2px);
}

.topbar {
  min-height: 66px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .90);
  box-shadow: var(--shadow-xs);
}

.topbar-product { font-size: 14px; }

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 9px;
  padding: 5px 9px;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid #c9e8d9;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.account-avatar {
  background: linear-gradient(145deg, #343941, #1d2025);
  box-shadow: 0 4px 12px rgba(20, 24, 30, .12);
}

.container {
  width: min(1440px, calc(100% - 48px));
  padding-top: 22px;
}

.page-head,
.company-head {
  position: relative;
  margin-bottom: 17px;
  padding: 20px 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.page-head::before,
.company-head::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
}

.page-head h1,
.company-head h1 {
  margin-top: 3px;
  font-size: clamp(25px, 2.6vw, 34px);
}

.page-head .muted { max-width: 780px; font-size: 14px; }
.page-head-surface { background: linear-gradient(110deg, #fff, #fbfbfc); }

.dashboard-hero {
  min-height: 128px;
  margin-bottom: 14px;
}

.admin-hero {
  background:
    radial-gradient(circle at 86% 0, rgba(227, 6, 19, .35), transparent 23rem),
    linear-gradient(120deg, #171a1f, #2b2f36 72%, #16181d);
}

.panel,
.stats article,
.company-stats article,
.cleanup-grid article,
.cleanup-preserved {
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

.panel {
  margin-bottom: 16px;
  padding: 20px;
}

.panel:hover,
.stats article:hover,
.company-stats article:hover {
  border-color: #d7dbe0;
}

.section-head {
  min-height: 68px;
  padding: 17px 20px;
  background: linear-gradient(180deg, #fff, #fcfcfd);
}

.section-head h2 { font-size: 17px; }

.section-count,
.section-head > span:not(.workspace-tag) {
  padding: 5px 9px;
  color: var(--slate);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.data-panel,
.catalog-table { padding: 0; overflow: hidden; }
.data-panel > h2,
.catalog-table > h2 { padding: 18px 20px 0; }

.stats {
  gap: 12px;
  margin-bottom: 16px;
}

.stats article {
  min-height: 104px;
  display: grid;
  align-content: center;
  padding: 16px 18px;
}

.stats article::before { width: 4px; }
.stats strong { font-size: clamp(24px, 2.5vw, 30px); }

.dashboard-stats article {
  min-height: 78px;
  padding: 13px 15px;
}

.primary,
.secondary,
.danger-button,
.edit-button {
  min-height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
}

.primary[aria-busy="true"]::after,
.danger-button[aria-busy="true"]::after {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: charge-catalog-spin .7s linear infinite;
}

.form-footer {
  margin: 5px -20px -20px;
  padding: 18px 20px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
}

.entity-form {
  max-width: 1180px;
  margin-inline: auto;
  padding: 24px;
}

.entity-form .form-footer {
  margin-right: -24px;
  margin-bottom: -24px;
  margin-left: -24px;
  padding-right: 24px;
  padding-left: 24px;
}

.form-section {
  padding: 7px 0 14px;
}

label { gap: 6px; }

input,
select,
textarea {
  min-height: 44px;
  background: #fff;
}

input:hover,
select:hover,
textarea:hover { border-color: #b9bfc7; }

input:user-invalid,
select:user-invalid,
textarea:user-invalid { border-color: #e5a19d; }

.table-wrap {
  scrollbar-color: #c7cbd1 transparent;
  scrollbar-width: thin;
}

table { font-size: 14px; }

th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px;
  background: #f7f8fa;
  box-shadow: inset 0 -1px var(--line);
}

td { padding: 13px 12px; }
tbody tr:hover { background: #fff9fa; }

.table-primary-action,
.receipt-open {
  transition: background .15s ease, transform .15s ease;
}

.table-primary-action:hover { transform: translateY(-1px); }

.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: opacity .18s ease, transform .18s ease;
}

.alert > span { flex: 1; }
.alert > button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  color: currentColor;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
}
.alert > button:hover { background: rgba(0,0,0,.05); }
.alert.is-closing { opacity: 0; transform: translateY(-4px); }

.copilot-fab {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  color: #fff;
  background: #181b20;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 17px;
  box-shadow: 0 16px 40px rgba(17, 20, 25, .24);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.copilot-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(17, 20, 25, .30);
}

.copilot-fab > span:last-child { display: grid; text-align: left; }
.copilot-fab strong { font-size: 14px; }
.copilot-fab small { color: #aeb3ba; font-size: 14px; }
.copilot-open .copilot-fab { opacity: 0; pointer-events: none; }

.copilot-panel { width: min(450px, 100vw); }
.copilot-panel > header { min-height: 73px; }
.copilot-heading small i { background: #27b77c; }
.copilot-suggestions button:hover {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.login-container {
  background:
    radial-gradient(circle at 10% 8%, rgba(227, 6, 19, .12), transparent 29rem),
    radial-gradient(circle at 94% 92%, rgba(31, 35, 41, .12), transparent 34rem),
    #eff1f4;
}

.login-stage {
  width: min(1060px, 100%);
  display: grid;
  grid-template-columns: minmax(390px, .88fr) minmax(450px, 1.12fr);
  align-items: stretch;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(210, 214, 220, .86);
  border-radius: 26px;
  box-shadow: 0 32px 90px rgba(18, 22, 28, .16);
}

.login-stage .factura-login {
  width: 100%;
  min-height: 610px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 5vw, 58px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-stage .login-logo { width: min(275px, 84%); margin-bottom: 38px; }
.login-stage .factura-login h1 { font-size: clamp(38px, 5vw, 50px); }
.login-stage .factura-login .primary { width: 100%; min-height: 48px; }

.login-ai-preview {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 5vw, 66px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 86% 13%, rgba(227, 6, 19, .38), transparent 19rem),
    radial-gradient(circle at 5% 95%, rgba(227, 6, 19, .15), transparent 23rem),
    linear-gradient(145deg, #20242a, #111317);
}

.login-ai-preview::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -180px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.login-ai-preview > * { position: relative; z-index: 1; }
.login-ai-preview > .copilot-orb { width: 52px; height: 52px; margin: 26px 0 17px; border-radius: 16px; font-size: 14px; }
.login-ai-preview .eyebrow { color: #ff8e96; }
.login-ai-preview h2 { margin: 5px 0 10px; font-size: clamp(27px, 3.5vw, 38px); line-height: 1.1; letter-spacing: -.035em; }
.login-ai-preview > p:not(.eyebrow) { max-width: 530px; margin: 0; color: #b9bec6; font-size: 14px; }
.login-ai-status {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #cbd0d7;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.login-ai-conversation {
  display: grid;
  gap: 8px;
  margin: 28px 0 18px;
  padding: 17px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 15px;
  backdrop-filter: blur(8px);
}

.login-ai-conversation span { color: #c7ccd2; font-size: 14px; }
.login-ai-conversation strong { font-size: 14px; line-height: 1.5; }
.login-ai-preview ul { display: grid; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.login-ai-preview li { display: flex; align-items: center; gap: 9px; color: #d8dbe0; font-size: 14px; }
.login-ai-preview li::before { content: "✓"; color: #ff737d; font-weight: 900; }
.login-ai-preview > small { color: #777e87; font-size: 14px; }

.system-state {
  max-width: 680px;
  display: grid;
  justify-items: start;
  gap: 9px;
  margin: 10vh auto 0;
  padding: 38px;
}
.system-state-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 15px;
  font-size: 24px;
  font-weight: 900;
}
.system-state h1 { margin: 2px 0; }
.system-state .button { margin-top: 8px; }

@media (max-width: 1180px) {
  .sidebar-scrim { display: block; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .menu-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .topbar-status { display: none; }
}

@media (max-width: 880px) {
  .login-stage { max-width: 560px; grid-template-columns: 1fr; }
  .login-stage .factura-login { min-height: auto; }
  .login-ai-preview { min-height: 390px; padding-block: 42px; }
  .login-ai-preview > .copilot-orb { margin-top: 20px; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 24px); padding-top: 14px; }
  .page-head,
  .company-head { padding: 18px; }
  .page-head::before,
  .company-head::before { width: 3px; }
  .entity-form { padding: 18px; }
  .entity-form .form-footer {
    margin-right: -18px;
    margin-bottom: -18px;
    margin-left: -18px;
    padding-right: 18px;
    padding-left: 18px;
  }
  .copilot-fab {
    right: 14px;
    bottom: 13px;
    padding-right: 9px;
  }
  .copilot-fab > span:last-child { display: none; }

  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table),
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) tbody,
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) tr,
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) td {
    display: block;
    width: 100%;
  }
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) tbody tr {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-xs);
  }
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) tbody td {
    min-height: 39px;
    display: grid;
    grid-template-columns: minmax(95px, .7fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) tbody td:last-child { border-bottom: 0; }
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 14px;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) tbody td[colspan] {
    display: block;
    text-align: center;
  }
  .adaptive-table:not(.receipts-table):not(.income-table):not(.portfolio-table) tbody td[colspan]::before { display: none; }
}

@media (max-width: 520px) {
  .login-container { padding: 14px; }
  .login-stage { border-radius: 19px; }
  .login-stage .factura-login { padding: 31px 25px; }
  .login-stage .login-logo { margin-bottom: 29px; }
  .login-ai-preview { min-height: 360px; padding: 32px 25px; }
  .login-ai-preview h2 { font-size: 27px; }
  .form-footer { display: grid; }
  .form-footer .button,
  .form-footer button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* 018A · Centro operativo fiscal: escala legible y superficies de alta claridad. */
:root {
  --font-body: 1rem;
  --font-small: .875rem;
  --font-label: .8125rem;
  --font-card-title: 1.25rem;
  --font-page-title: clamp(1.875rem, 3vw, 2.5rem);
  --focus: #2563eb;
  --surface-warm: #f5f5f2;
  --ink-strong: #15171a;
}

html { font-size: 100%; text-size-adjust: 100%; }
body { font-size: var(--font-body); line-height: 1.5; color: var(--ink-strong); }
button,input,select,textarea { min-height: 44px; font-size: 1rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.muted, small, .help { color: #56606f; font-size: var(--font-small); line-height: 1.45; }
.page-head h1 { font-size: var(--font-page-title); letter-spacing: -.035em; }
.card h2 { font-size: var(--font-card-title); }
.side-nav a { min-height: 44px; font-size: .9375rem; }
.copilot-message p,.copilot-form textarea { font-size: 1rem; }
.copilot-fab { display: none !important; }

.trust-pill { display:inline-flex; align-items:center; min-height:44px; padding:.65rem 1rem; color:#5f1723; background:#fff1f3; border:1px solid #f2c8ce; border-radius:999px; font-weight:750; }
.fiscal-command-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(20rem,.8fr); gap:1.5rem; margin:1.5rem 0; }
.command-card { position:relative; padding:1.75rem; border-radius:20px; }
.step-number { display:inline-grid; place-items:center; width:44px; height:44px; margin-bottom:1rem; color:#7d1f2d; background:#fff1f3; border-radius:14px; font-weight:900; }
.stack-form { display:grid; gap:1rem; margin-top:1.25rem; }
.stack-form label { display:grid; gap:.45rem; font-weight:700; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.privacy-note { padding:.9rem 1rem; color:#3c4c47; background:#eef7f2; border-left:4px solid #087a55; border-radius:10px; }
.configuration-summary { display:grid; gap:.35rem; margin:1rem 0; padding:1rem; background:#f7f7f5; border:1px solid #d8dde4; border-radius:14px; }
.configuration-summary p { margin:0; }
.inline-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem; margin:1rem 0; }
.inline-actions form { margin:0; }
.configuration-panel { padding:1.5rem; }
.configuration-panel summary { min-height:44px; cursor:pointer; }
fieldset { min-width:0; padding:1rem; border:1px solid #d8dde4; border-radius:14px; }
pre { max-width:100%; overflow:auto; padding:1rem; white-space:pre-wrap; overflow-wrap:anywhere; background:#f7f7f5; border-radius:12px; }
.document-stream { padding:1.75rem; }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.section-heading h2 { margin:.25rem 0 0; }
.status-chip { display:inline-flex; align-items:center; min-height:32px; padding:.25rem .7rem; color:#5f1723; background:#fff1f3; border:1px solid #f2c8ce; border-radius:999px; font-size:.875rem; font-weight:800; }
.responsive-table { max-width:100%; overflow:auto; }
.responsive-table table { min-width:680px; font-size:1rem; }
.responsive-table td,.responsive-table th { padding:.9rem .75rem; }
.responsive-table td small { display:block; margin-top:.2rem; }
.empty-state { padding:2rem; text-align:center; color:#56606f; background:#f7f7f5; border:1px dashed #b9c0c9; border-radius:16px; }
.empty-state strong { display:block; color:#202329; font-size:1.125rem; }
.preview-layout,.detail-grid,.mail-layout { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(19rem,.7fr); gap:1.5rem; }
.preview-document,.confirmation-panel,.detail-grid>.card,.message-list,.ai-guardrail { padding:1.75rem; border-radius:20px; }
.preview-parties { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1.5rem; }
.preview-parties>div { padding:1.25rem; background:#f7f7f5; border-radius:14px; }
.preview-parties span { display:block; color:#6b7280; font-size:.875rem; font-weight:800; text-transform:uppercase; }
.preview-parties strong { display:block; margin:.4rem 0; font-size:1.125rem; }
.totals { width:min(100%,24rem); margin:1.5rem 0 0 auto; }
.totals div,.detail-list div { display:flex; justify-content:space-between; gap:1rem; padding:.75rem 0; border-bottom:1px solid #d8dde4; }
.totals dd,.detail-list dd { margin:0; font-weight:800; text-align:right; }
.grand-total { font-size:1.25rem; }
.confirmation-panel { align-self:start; position:sticky; top:1rem; }
.confirmation-panel form { display:grid; gap:1rem; margin:1.25rem 0; }
.confirm-check { display:grid; grid-template-columns:24px 1fr; gap:.75rem; align-items:start; }
.confirm-check input { min-height:24px; }
.segmented { display:flex; width:max-content; padding:.3rem; margin:1.25rem 0; background:#e9ebee; border-radius:14px; }
.segmented a { min-height:44px; padding:.7rem 1.1rem; color:#3f4650; border-radius:10px; text-decoration:none; }
.segmented a.active { color:#17191d; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.08); font-weight:800; }
.message-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(12rem,.35fr); gap:1rem; padding:1.25rem 0; border-bottom:1px solid #d8dde4; }
.message-row strong { display:block; margin:.55rem 0 .3rem; font-size:1.0625rem; }
.message-row p { margin:.25rem 0; color:#56606f; }
.ai-guardrail { align-self:start; background:#1e2227; color:#fff; }
.ai-guardrail p,.ai-guardrail li { color:#d7dbe1; }
.ai-guardrail li { margin:.75rem 0; }

@media (max-width: 960px) {
  .fiscal-command-grid,.preview-layout,.detail-grid,.mail-layout { grid-template-columns:1fr; }
  .confirmation-panel { position:static; }
}
@media (max-width: 767px) {
  .command-card,.document-stream,.preview-document,.confirmation-panel,.message-list,.ai-guardrail { padding:1rem; border-radius:16px; }
  .form-grid,.preview-parties,.message-row { grid-template-columns:1fr; }
  .primary,.secondary { width:100%; min-height:48px; }
  .inline-actions { display:grid; grid-template-columns:1fr; }
  .inline-actions a,.inline-actions button,.inline-actions form { width:100%; }
}

/* 019A · Facturación selectiva y operación de despacho. */
.sr-only { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.billing-head,.office-head { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.billing-stats,.office-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:18px 0; }
.billing-stats a,.office-kpis article { display:grid; gap:3px; padding:18px; color:inherit; text-decoration:none; background:#fff; border:1px solid var(--line); border-radius:16px; }
.billing-stats a.is-active { border-color:var(--primary); box-shadow:0 0 0 2px rgba(218,0,24,.08); }
.billing-stats strong,.office-kpis strong { font-size:25px; }
.billing-stats span,.office-kpis span,.billing-stats small { color:var(--muted); font-size:14px; }
.billing-filters,.office-filters { display:flex; align-items:end; gap:12px; margin-bottom:14px; }
.billing-filters label,.office-filters label,.office-period-generate label { display:grid; gap:5px; min-width:170px; font-size:14px; font-weight:700; }
.billing-selection-bar { display:grid; grid-template-columns:minmax(220px,1fr) 190px minmax(220px,1fr) auto; align-items:center; gap:12px; margin-bottom:14px; }
.billing-selection-bar div { display:grid; }
.billing-selection-bar small { color:var(--muted); font-size:14px; }
.billing-table-panel { padding:0; overflow:hidden; }
.billing-table-panel .section-heading { padding:18px; }
.billing-table td { vertical-align:top; }
.billing-table td small { display:block; max-width:260px; margin-top:4px; color:var(--muted); font-size:14px; }
.billing-status { display:inline-flex; padding:6px 9px; border-radius:999px; background:#f1f3f5; font-size:14px; font-weight:800; text-transform:capitalize; }
.billing-status.is-facturado,.billing-status.is-completada,.billing-status.is-pagada,.billing-status.is-fondos_recibidos { color:#087653; background:#e4f7ef; }
.billing-status.is-no_facturable,.billing-status.is-cancelada,.billing-status.is-vencida { color:#a11226; background:#fff0f2; }
.billing-status.is-facturable,.billing-status.is-lista,.billing-status.is-programada { color:#805700; background:#fff6d8; }
.billing-action { min-width:240px; }
.billing-action details > summary,.office-actions details > summary { cursor:pointer; list-style:none; }
.billing-action details > summary::-webkit-details-marker,.office-actions details > summary::-webkit-details-marker { display:none; }
.billing-action .stack-form,.office-actions .stack-form { min-width:280px; margin-top:9px; padding:12px; background:var(--surface-soft); border:1px solid var(--line); border-radius:12px; }
.billing-review { display:inline-block; color:#805700; font-weight:800; }
.office-period-generate { display:flex; align-items:end; gap:10px; }
.office-layout { display:grid; grid-template-columns:minmax(300px,360px) minmax(0,1fr); gap:18px; align-items:start; }
.office-config { display:grid; gap:14px; }
.office-create,.office-engagement-list { padding:0; overflow:hidden; }
.office-create > summary,.office-engagement-list > summary { padding:18px; cursor:pointer; font-weight:800; }
.office-create > p,.office-create > form,.office-engagement-list > article,.office-engagement-list > p { margin:0; padding:0 18px 18px; }
.office-engagement-list article { display:grid; gap:3px; border-top:1px solid var(--line); padding-top:14px; }
.office-engagement-list span,.office-engagement-list small { color:var(--muted); font-size:14px; }
.office-work,.office-board { display:grid; gap:14px; min-width:0; }
.office-obligation { padding:18px; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-soft); }
.office-obligation.is-overdue { border-left:4px solid #d40020; }
.office-obligation > header { display:flex; justify-content:space-between; gap:18px; }
.office-obligation h2 { margin:8px 0 3px; font-size:20px; }
.office-obligation header p { margin:0; color:var(--muted); }
.office-due { display:grid; align-content:start; text-align:right; }
.office-due span { color:var(--muted); font-size:14px; text-transform:uppercase; }
.office-obligation-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:16px 0; }
.office-obligation-grid > span { display:grid; gap:3px; padding:12px; background:var(--surface-soft); border-radius:12px; }
.office-obligation-grid small { color:var(--muted); font-size:14px; }
.office-reference { padding:10px 12px; background:#fff8df; border-radius:10px; }
.office-actions { display:flex; align-items:flex-start; flex-wrap:wrap; gap:9px; padding-top:12px; border-top:1px solid var(--line); }
.office-actions details { position:relative; }
.office-actions details > form { position:absolute; z-index:5; width:310px; box-shadow:0 14px 30px rgba(16,24,40,.16); }
.office-actions details > a { display:block; margin:5px 0; font-size:14px; }

@media (max-width:1100px) {
  .billing-stats,.office-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .office-layout { grid-template-columns:1fr; }
  .office-obligation-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:767px) {
  .billing-head,.office-head,.office-period-generate { align-items:stretch; flex-direction:column; }
  .billing-stats,.office-kpis,.office-obligation-grid { grid-template-columns:1fr; }
  .billing-filters,.office-filters { align-items:stretch; flex-direction:column; }
  .billing-filters label,.office-filters label,.office-period-generate label { width:100%; }
  .billing-selection-bar { grid-template-columns:1fr; }
  .office-obligation > header { flex-direction:column; }
  .office-due { text-align:left; }
  .office-actions details,.office-actions summary,.office-actions > a { width:100%; }
  .office-actions details > form { position:static; width:auto; min-width:0; }
}
.license-banner{display:flex;align-items:center;gap:1rem;margin-bottom:1rem;padding:.9rem 1rem;background:#fff7d6;border:1px solid #e6c75a;border-radius:14px}.license-banner span{flex:1}.license-banner a{font-weight:800}.license-hero{padding:2rem;margin-bottom:1.5rem;color:#fff;background:linear-gradient(125deg,#15171a,#7d1f2d);border-radius:24px}.license-hero.is-blocked{background:linear-gradient(125deg,#3b1118,#8c2435)}.license-hero p{color:#f1dce0}.license-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin:1.25rem 0}.license-summary article{padding:1.1rem;background:#f7f7f5;border:1px solid #dde1e5;border-radius:14px}.license-summary span,.license-summary strong{display:block}.license-summary span{color:#667085;font-size:.85rem;font-weight:750}.license-summary strong{margin-top:.35rem}.license-form,.license-charge{margin:1.25rem 0}.license-admin table form{display:flex;gap:.5rem}.license-admin table input{min-width:9rem}@media(max-width:767px){.license-summary{grid-template-columns:1fr 1fr}.license-banner{align-items:flex-start;flex-direction:column}.license-admin table form{display:grid}}

/* 017A · La configuración PAC permanece compacta hasta que el administrador la solicita. */
.pac-config-card {
  padding: 0;
  overflow: hidden;
}

.pac-config-disclosure,
.pac-config-summary {
  width: 100%;
}

.pac-config-summary {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(180deg, #fff, #fcfcfd);
}

.pac-config-summary::-webkit-details-marker { display: none; }
.pac-config-summary::marker { content: ""; }

.pac-config-summary:hover .pac-config-trigger,
.pac-config-summary:focus-visible .pac-config-trigger {
  color: var(--red-dark);
  border-color: #ef9aa1;
}

.pac-config-heading {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pac-config-heading > strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
}

.pac-config-heading > span:last-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.pac-config-trigger {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 13px;
  color: var(--graphite);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 2px 7px rgba(20, 24, 30, .04);
  font-size: 14px;
  font-weight: 800;
  transition: color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.pac-config-trigger svg {
  width: 18px;
  height: 18px;
}

.pac-config-trigger .pac-config-chevron {
  width: 16px;
  height: 16px;
  transition: transform .18s ease;
}

.pac-config-disclosure[open] > .pac-config-summary {
  border-bottom: 1px solid var(--line);
}

.pac-config-disclosure[open] .pac-config-chevron {
  transform: rotate(180deg);
}

.pac-config-content {
  display: grid;
  gap: 20px;
  padding: 22px;
  background: #fff;
}

.pac-config-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pac-config-intro h3,
.pac-config-intro p,
.pac-config-note {
  margin: 0;
}

.pac-config-intro h3 { font-size: 17px; }
.pac-config-intro p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.pac-config-form { padding-top: 2px; }

.pac-config-table {
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pac-config-table table { min-width: 720px; }

.pac-csd-disclosure > summary {
  width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.pac-csd-disclosure > form {
  margin-top: 14px;
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pac-config-note {
  padding-top: 2px;
  color: var(--slate);
  font-size: 14px;
}

@media (max-width: 767px) {
  .pac-config-summary {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 17px;
  }

  .pac-config-trigger { width: 100%; }
  .pac-config-content { padding: 17px; }
  .pac-config-intro { display: grid; }
  .pac-csd-disclosure > summary { width: 100%; justify-content: center; }
  .pac-csd-disclosure > form { padding: 14px; }
}

/* 017B · El resumen PAC del Centro Fiscal se abre sólo desde el botón superior. */
.fiscal-center-head {
  z-index: 12;
  overflow: visible;
}

.fiscal-page-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.fiscal-pac-menu {
  position: relative;
}

.fiscal-pac-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 13px;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
}

.fiscal-pac-button::-webkit-details-marker { display: none; }
.fiscal-pac-button::marker { content: ""; }

.fiscal-pac-button svg {
  width: 18px;
  height: 18px;
}

.fiscal-pac-chevron {
  transition: transform .18s ease;
}

.fiscal-pac-menu[open] .fiscal-pac-chevron {
  transform: rotate(180deg);
}

.fiscal-pac-menu[open] .fiscal-pac-button {
  color: var(--red-dark);
  border-color: #ef9aa1;
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .07);
}

.fiscal-pac-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  right: 0;
  width: min(500px, calc(100vw - 48px));
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(20, 24, 30, .18);
}

.fiscal-pac-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fiscal-pac-panel-head h2,
.fiscal-pac-panel-head p,
.fiscal-pac-panel > p {
  margin: 0;
}

.fiscal-pac-panel-head h2 {
  margin-top: 3px;
  font-size: 18px;
}

.fiscal-pac-panel > p {
  margin-top: 10px;
}

.fiscal-pac-panel .configuration-summary {
  margin-bottom: 14px;
}

.fiscal-pac-panel .inline-actions {
  margin-bottom: 0;
}

.fiscal-pac-section {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.fiscal-pac-section > summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 13px;
  list-style: none;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
}

.fiscal-pac-section > summary::-webkit-details-marker { display: none; }
.fiscal-pac-section > summary::marker { content: ""; }
.fiscal-pac-section > summary > span:last-child { color: var(--red-dark); font-size: 20px; }
.fiscal-pac-section[open] > summary { border-bottom: 1px solid var(--line); }
.fiscal-pac-section[open] > summary > span:last-child { transform: rotate(45deg); }

.fiscal-pac-form {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: var(--surface-soft);
  border-radius: 0 0 12px 12px;
}

.fiscal-pac-form .form-grid { gap: 12px; }
.fiscal-pac-form > button { width: 100%; }

.fiscal-company-identity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fiscal-company-identity span {
  min-width: 0;
  display: grid;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.fiscal-company-identity strong {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.csd-alert-inline,
.csd-expiry-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.csd-alert-inline.is-ok,
.csd-expiry-badge.is-ok {
  color: #087a55;
  background: #eaf8f2;
  border-color: #bde8d6;
}

.csd-alert-inline.is-notice,
.csd-expiry-badge.is-notice {
  color: #73510b;
  background: #fff8dc;
  border-color: #ead48b;
}

.csd-alert-inline.is-warning,
.csd-expiry-badge.is-warning {
  color: #9a4c08;
  background: #fff1dc;
  border-color: #f0c28d;
}

.csd-alert-inline.is-urgent,
.csd-expiry-badge.is-urgent,
.csd-alert-inline.is-expired,
.csd-expiry-badge.is-expired {
  color: #a3141e;
  background: #fff0f1;
  border-color: #f1b7bc;
}

.csd-alert-inline.is-missing,
.csd-expiry-badge.is-missing {
  color: var(--slate);
  background: #f0f2f4;
  border-color: var(--line);
}

.fiscal-pac-button .csd-alert-inline {
  margin-left: 2px;
}

.csd-validity-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.csd-validity-list > strong {
  font-size: 14px;
}

.csd-validity-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.csd-validity-list article > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.csd-validity-list article small {
  color: var(--muted);
  font-size: 14px;
}

.csd-environment {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-transform: capitalize;
}

.fiscal-preview-grid {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0;
}

@media (max-width: 767px) {
  .fiscal-center-head { gap: 16px; }
  .fiscal-page-actions { display: grid; justify-content: stretch; }
  .fiscal-page-actions .trust-pill { width: 100%; justify-content: center; }
  .fiscal-pac-button { width: 100%; min-height: 48px; }
  .fiscal-pac-panel {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 10px;
    padding: 16px;
    box-shadow: var(--shadow-md);
  }
  .fiscal-pac-panel-head { display: grid; }
  .fiscal-company-identity { grid-template-columns: 1fr; }
  .fiscal-pac-button .csd-alert-inline { margin-left: auto; }
  .csd-validity-list article { align-items: flex-start; flex-direction: column; }
}

/* 017E · Administración fiscal y entrega de CFDI centralizadas por empresa. */
.fiscal-delivery-admin {
  display: grid;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.fiscal-delivery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.fiscal-delivery-head h3,
.fiscal-delivery-head p {
  margin: 0;
}

.fiscal-delivery-head h3 {
  margin-top: 3px;
  font-size: 17px;
}

.fiscal-delivery-head p:last-child {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.fiscal-delivery-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fiscal-delivery-summary span {
  min-width: 0;
  display: grid;
  padding: 11px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.fiscal-delivery-summary strong {
  color: var(--muted);
  font-size: 14px;
}

.fiscal-delivery-config > summary {
  width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  list-style: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.fiscal-delivery-config > summary::-webkit-details-marker { display: none; }
.fiscal-delivery-config > summary::marker { content: ""; }

.fiscal-delivery-config > form {
  margin-top: 14px;
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.delivery-sender {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: #eef7f2;
  border: 1px solid #c9e8d9;
  border-radius: 12px;
}

.delivery-sender span {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 767px) {
  .fiscal-delivery-head { display: grid; }
  .fiscal-delivery-summary { grid-template-columns: 1fr; }
  .fiscal-delivery-config > summary { width: 100%; justify-content: center; }
  .fiscal-delivery-config > form { padding: 14px; }
  .delivery-sender { align-items: flex-start; flex-direction: column; }
}

/* 017F · Facturación integrada en Cuentas por cobrar. */
.fiscal-action-cell {
  min-width: 220px;
  vertical-align: top;
}

.receivable-fiscal-action > summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.receivable-fiscal-action > summary::-webkit-details-marker { display: none; }
.receivable-fiscal-action > summary::marker { content: ""; }

.receivable-fiscal-action[open] > summary {
  margin-bottom: 10px;
}

.receivable-fiscal-form,
.receivable-fiscal-pending {
  min-width: 320px;
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.receivable-fiscal-form label {
  display: grid;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
}

.receivable-fiscal-form select {
  width: 100%;
  min-height: 44px;
}

.receivable-fiscal-form .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.receivable-fiscal-pending p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 767px) {
  .fiscal-action-cell { min-width: 0; }
  .receivable-fiscal-action > summary { width: 100%; justify-content: center; }
  .receivable-fiscal-form,
  .receivable-fiscal-pending { min-width: 0; }
  .receivable-fiscal-form .form-grid { grid-template-columns: 1fr; }
}

/* 019B · Operación enfocada en tareas, con configuración bajo demanda. */
.office-head-simple { min-height:0; padding:22px 24px; }
.office-head-simple h1 { margin-bottom:4px; }
.office-head-simple .muted { margin:0; }
.office-head-simple .office-period-generate { display:flex; align-items:end; gap:8px; }
.office-head-simple .office-period-generate label { min-width:175px; }
.office-head-simple .office-period-generate button { min-height:46px; white-space:nowrap; }

.office-summary-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:14px 0; overflow:hidden; background:#fff; border:1px solid var(--line); border-radius:14px; }
.office-summary-strip > span { display:grid; gap:2px; padding:13px 16px; border-right:1px solid var(--line); }
.office-summary-strip > span:last-child { border-right:0; }
.office-summary-strip strong { font-size:19px; line-height:1.2; }
.office-summary-strip small { color:var(--muted); font-size:14px; }
.office-summary-strip .has-alert strong { color:#c9001b; }

.office-command-center { display:grid; grid-template-columns:minmax(210px,1fr) auto auto; align-items:center; gap:10px; margin:14px 0 24px; padding:14px 16px; background:#f8f9fb; border:1px solid var(--line); border-radius:14px; }
.office-command-copy h2 { margin:2px 0 0; font-size:18px; }
.office-command-copy .eyebrow { margin:0; }
.office-quick-action > summary { display:flex; align-items:center; justify-content:center; min-height:44px; padding:0 16px; color:var(--text); background:#fff; border:1px solid var(--line); border-radius:10px; cursor:pointer; font-weight:800; list-style:none; white-space:nowrap; }
.office-quick-action > summary::-webkit-details-marker { display:none; }
.office-quick-action > summary::marker { content:""; }
.office-quick-action.is-primary > summary { color:#fff; background:var(--primary); border-color:var(--primary); }
.office-quick-action[open] { grid-column:1/-1; width:100%; }
.office-quick-action[open] > summary { width:max-content; margin-left:auto; color:var(--text); background:#fff; border-color:var(--line); }
.office-action-drawer { margin-top:12px; padding:22px; background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:0 12px 30px rgba(20,26,36,.09); }
.office-drawer-head { display:flex; justify-content:space-between; gap:24px; padding-bottom:16px; border-bottom:1px solid var(--line); }
.office-drawer-head h3 { margin:3px 0 0; font-size:21px; }
.office-drawer-head > p { max-width:420px; margin:0; color:var(--muted); font-size:14px; }
.office-simple-form { display:grid; gap:0; }
.office-form-section { display:grid; grid-template-columns:34px 180px minmax(0,1fr); gap:14px; align-items:start; padding:18px 0; border-bottom:1px solid var(--line); }
.office-form-step { display:flex; align-items:center; justify-content:center; width:30px; height:30px; color:#a90017; background:#fff0f2; border-radius:50%; font-weight:900; }
.office-form-section h4 { margin:2px 0 3px; font-size:16px; }
.office-form-section p { margin:0; color:var(--muted); font-size:14px; }
.office-form-fields { display:grid; gap:12px; }
.office-form-fields.two-columns { grid-template-columns:repeat(2,minmax(0,1fr)); }
.office-form-fields.three-columns { grid-template-columns:repeat(3,minmax(0,1fr)); }
.office-form-fields label { display:grid; gap:5px; color:var(--text); font-size:14px; font-weight:750; }
.office-form-fields .wide { grid-column:1/-1; }
.office-more-options { margin:14px 0 0 228px; padding:0; border:1px solid var(--line); border-radius:10px; }
.office-more-options > summary { padding:12px 14px; color:#4c5567; cursor:pointer; font-size:14px; font-weight:800; }
.office-more-options > .office-form-fields { padding:4px 14px 14px; }
.office-form-footer { display:flex; align-items:center; justify-content:flex-end; gap:14px; padding-top:16px; }
.office-form-footer small { color:var(--muted); font-size:14px; }

.office-work-first { margin-top:0; }
.office-list-head { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:12px; }
.office-list-head h2 { margin:3px 0 0; }
.office-filters-compact { margin:0; padding:10px; background:#fff; }
.office-filters-compact label { min-width:145px; }
.office-filters-compact label span { font-size:14px; }
.office-filters-compact input,.office-filters-compact select { min-height:42px; }
.office-filters-compact button { min-height:42px; }
.office-empty-state { display:flex; align-items:center; gap:14px; min-height:120px; padding:22px; }
.office-empty-state p { margin:5px 0 0; color:var(--muted); }
.office-empty-icon { display:flex; align-items:center; justify-content:center; flex:0 0 44px; width:44px; height:44px; color:#087653; background:#e4f7ef; border-radius:50%; font-size:22px; font-weight:900; }
.office-portfolio { margin-top:18px; padding:0; overflow:hidden; }
.office-portfolio > summary { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:16px 18px; cursor:pointer; list-style:none; }
.office-portfolio > summary::-webkit-details-marker { display:none; }
.office-portfolio > summary > span:first-child { display:grid; gap:2px; }
.office-portfolio > summary small,.office-portfolio > summary > span:last-child { color:var(--muted); font-size:14px; }
.office-portfolio-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:0 18px 18px; }
.office-portfolio-list article { display:grid; gap:3px; padding:12px; background:var(--surface-soft); border-radius:10px; }
.office-portfolio-list span,.office-portfolio-list small { color:var(--muted); font-size:14px; }

@media (max-width:1100px) {
  .office-command-center { grid-template-columns:1fr auto auto; }
  .office-list-head { align-items:stretch; flex-direction:column; }
  .office-filters-compact { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; }
  .office-filters-compact label { min-width:0; }
  .office-form-section { grid-template-columns:34px 150px minmax(0,1fr); }
  .office-more-options { margin-left:198px; }
}

@media (max-width:767px) {
  .office-head-simple { padding:18px; }
  .office-head-simple,.office-head-simple .office-period-generate { align-items:stretch; flex-direction:column; }
  .office-head-simple .office-period-generate label { min-width:0; }
  .office-summary-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .office-summary-strip > span:nth-child(2) { border-right:0; }
  .office-summary-strip > span:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .office-command-center { grid-template-columns:1fr; }
  .office-command-copy { margin-bottom:3px; }
  .office-quick-action,.office-quick-action > summary,.office-quick-action[open] > summary { width:100%; margin:0; }
  .office-action-drawer { padding:16px; }
  .office-drawer-head { display:grid; gap:7px; }
  .office-form-section { grid-template-columns:34px minmax(0,1fr); }
  .office-form-section > .office-form-fields { grid-column:1/-1; }
  .office-form-fields.two-columns,.office-form-fields.three-columns { grid-template-columns:1fr; }
  .office-form-fields .wide { grid-column:auto; }
  .office-more-options { margin-left:0; }
  .office-form-footer { align-items:stretch; flex-direction:column; }
  .office-form-footer button { width:100%; }
  .office-filters-compact { grid-template-columns:1fr; }
  .office-portfolio-list { grid-template-columns:1fr; }
}

/* 020A · Nota de crédito clara y bajo confirmación humana. */
.credit-note-action { margin-top:16px; padding:0; border:1px solid #f0c6cc; border-radius:12px; overflow:hidden; }
.credit-note-action > summary { padding:13px 15px; color:#9d0017; background:#fff5f6; cursor:pointer; font-weight:850; list-style:none; }
.credit-note-action > summary::-webkit-details-marker { display:none; }
.credit-note-action > form { margin:0; padding:15px; border:0; border-top:1px solid #f0c6cc; border-radius:0; }
.credit-note-action p,.credit-note-action small { margin:0; color:var(--muted); font-size:14px; }
.fiscal-relation-box,.preview-relation { display:grid; gap:5px; margin-top:16px; padding:14px; background:#f7f8fa; border:1px solid var(--line); border-radius:12px; }
.fiscal-relation-box span,.fiscal-relation-box code,.preview-relation span,.preview-relation small { color:var(--muted); font-size:14px; }
.fiscal-relation-box code,.preview-relation strong { overflow-wrap:anywhere; }
.preview-relation { margin:0 0 16px; border-left:4px solid var(--primary); }
.credit-correction { display:grid; gap:12px; padding:14px; background:#fff8e6; border:1px solid #ecdca5; border-radius:12px; }
.credit-correction > p { margin:0; font-size:14px; }
.credit-history { grid-column:1/-1; }
.credit-history-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 0; border-top:1px solid var(--line); }
.credit-history-row div { display:grid; gap:4px; }
.credit-history-row span { color:var(--muted); }
@media (max-width:720px) { .credit-history-row { align-items:flex-start; flex-direction:column; } }
.payment-complement-action p,.payment-complement-action small { margin:0; font-size:14px; color:var(--muted); }
.payment-balance-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:8px 0; }
.payment-balance-grid span { display:grid; gap:3px; padding:10px; background:#fff; border:1px solid var(--line); border-radius:9px; }
.payment-balance-grid strong { color:var(--ink); font-size:16px; }
.preview-secondary-actions { display:grid; gap:10px; margin-top:14px; }
@media (max-width:720px) { .payment-balance-grid { grid-template-columns:1fr; } }
