.rsa-row.total .num { color: var(--white); }
.balance-footnote { background: #FFFFFF; margin: 0; padding: 8px 4px 0 4px; font-size: 11px; color: #6B6E7E; font-style: italic; }

.roster-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.roster-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.roster-card .rn { font-weight: 700; font-size: 14px; }
.roster-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.roster-badge.activa { background: rgba(27,158,90,0.12); color: var(--success); }
.roster-badge.pendiente { background: rgba(107,110,126,0.12); color: var(--text-muted); }

.history-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white); }
.history-table { width: 100%; border-collapse: collapse; background: var(--white); }
.history-table th { text-align: left; font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; padding: 14px 14px; background: var(--light-gray); color: var(--text-muted); border-bottom: 1px solid var(--border); line-height: 1.25; }
.history-table th.num, .history-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.history-table td { padding: 14px 14px; font-size: 12.5px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.history-table tr:last-child td { border-bottom: none; }
.history-table tr.current { background: rgba(49,93,245,0.04); }
.history-table tr.current td { font-weight: 700; }
.history-table.centered th, .history-table.centered td { text-align: center; }
.history-table.centered th.num, .history-table.centered td.num { text-align: center; }

.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.doc-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; display: flex; align-items: center; gap: 14px; transition: border 0.15s, transform 0.1s; background: var(--white); text-decoration: none; color: inherit; }
.doc-card:hover { border-color: var(--menta-blue); transform: translateY(-1px); }
.doc-icon { width: 34px; height: 42px; flex-shrink: 0; border: 1.5px solid var(--menta-black); border-radius: 4px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px; font-size: 8px; font-weight: 700; color: var(--menta-black); position: relative; }
.doc-icon::before { content: ''; position: absolute; top: 5px; left: 5px; right: 5px; border-top: 1px solid var(--menta-black); }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-weight: 700; font-size: 12.5px; margin-bottom: 2px; }
.doc-meta { font-size: 10.5px; color: var(--text-muted); }

.pending-banner { display: grid; grid-template-columns: minmax(280px, 1fr) 1.4fr; gap: 32px; align-items: center; background: #F5EFE5; border-left: 4px solid #315DF5; border-radius: var(--radius-md); padding: 32px 36px; margin-bottom: 28px; }
.pending-banner.clear { border-left-color: var(--success); }
.pending-banner .metric .eyebrow { font-size: 10px; font-weight: 700; color: var(--menta-blue); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.pending-banner .metric .value { font-size: 32px; font-weight: 700; color: var(--menta-black); letter-spacing: -0.5px; line-height: 1.1; }
.pending-banner .metric .sub { font-size: 12px; color: #6B6E7E; margin-top: 6px; }
.pending-banner .copy h4 { font-size: 14px; font-weight: 700; color: var(--menta-black); margin-bottom: 6px; }
.pending-banner .copy p { font-size: 12px; color: #4A4D5C; line-height: 1.55; }
.pending-banner .copy p strong { color: var(--menta-black); }

.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; }
.status-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-chip.pendiente { background: rgba(180,83,9,0.10); color: var(--warning); }
.status-chip.pendiente::before { background: var(--warning); }
.status-chip.pagado { background: rgba(27,158,90,0.12); color: var(--success); }
.status-chip.pagado::before { background: var(--success); }
.status-chip.facturado { background: rgba(49,93,245,0.10); color: var(--menta-blue); }
.status-chip.facturado::before { background: var(--menta-blue); }

.invoice-instructions { background: var(--menta-black); color: var(--white); border-radius: var(--radius-md); padding: 36px 40px; }
.invoice-instructions h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.invoice-instructions p { font-size: 13px; line-height: 1.65; opacity: 0.9; margin-bottom: 12px; }
.invoice-instructions .field-grid { margin-top: 28px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.12); display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.invoice-instructions .field-grid .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; opacity: 0.6; margin-bottom: 4px; }
.invoice-instructions .field-grid .value { font-size: 13px; font-weight: 700; }
.invoice-instructions .field-grid .value a { color: #9DB6FF; }

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contact-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px 32px; }
.contact-card .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.contact-card .name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.contact-card a.mail { font-size: 13px; color: var(--menta-blue); }

footer.portal-foot { border-top: 1px solid var(--border); padding: 24px 100px; display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); max-width: 1320px; margin: 0 auto; }

@media (max-width: 720px) {
  .portal { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; padding: 20px; }
  .nav { display: none; }
  .content { padding: 32px 24px; }
  .topbar { padding: 20px 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .docs-grid, .contact-grid, .roster-grid { grid-template-columns: 1fr; }
  .invoice-instructions .field-grid { grid-template-columns: 1fr; }
  .pending-banner { grid-template-columns: 1fr; }
  .rsa-head, .rsa-row { grid-template-columns: 1fr 90px 46px 100px; padding: 12px 16px; }
}

.live-eyebrow{font-size:11px;font-weight:700;color:var(--menta-blue);text-transform:uppercase;letter-spacing:1px;margin-bottom:10px;}
.live-hero-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;}
.live-wf{background:#F5EFE5;border-radius:var(--radius-md);overflow:hidden;margin-top:20px;}
.live-wf .row{display:flex;justify-content:space-between;align-items:center;padding:12px 28px;font-size:13px;border-top:1px solid rgba(0,0,0,0.06);}
.live-wf .row:first-child{border-top:none;}
.live-wf .row.muted{color:var(--text-muted);}
.live-wf .row.total{background:var(--menta-blue);color:#fff;font-weight:700;border-top:none;}
@media (max-width:720px){.live-hero-grid{grid-template-columns:1fr 1fr;}}
