/* Finanzas — complemento del tema */
.app { display: none; min-height: 100vh; }
.app.visible { display: flex; }
section.page-section { display: none; }
section.page-section.active { display: block; }
.login-card .err { color: var(--danger); font-size: 0.85rem; margin-top: 0.75rem; display: none; }
.login-card .back { display: inline-block; margin-top: 1rem; color: var(--accent); font-size: 0.88rem; text-decoration: none; }
.nav .badge-count {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 0.72rem;
  padding: 0.1rem 0.45rem; border-radius: 999px; font-weight: 600;
}
.pay-item {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; margin-bottom: 0.65rem;
}
.pay-item strong { color: var(--text); }
.pay-item small { color: var(--text-muted); }
.empty { color: var(--text-muted); padding: 1rem; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.info-box { background: var(--bg-elevated); border-radius: 8px; padding: 0.85rem; border: 1px solid var(--border); }
.info-box .label { font-size: 0.75rem; color: var(--text-muted); }
.info-box .value { font-size: 1.05rem; font-weight: 600; margin-top: 0.25rem; color: var(--gold); }

/* Modal recibo */
.receipt-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 1.5rem; overflow-y: auto; }
.receipt-modal[hidden] { display: none !important; }
.receipt-modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); }
.receipt-modal-panel {
  position: relative; z-index: 1; width: min(820px, 100%); margin-top: 0.5rem; margin-bottom: 2rem;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.receipt-modal-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.receipt-modal-toolbar h3 { margin: 0; font-size: 1.1rem; }
.receipt-modal-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.receipt-document { padding: 1.25rem; max-height: 75vh; overflow-y: auto; }

/* Documento imprimible */
.rc-sheet {
  background: #fff; color: #1a1a1a; border-radius: 8px; padding: 2rem 2.25rem;
  font-family: 'Segoe UI', system-ui, sans-serif; font-size: 0.92rem; line-height: 1.45;
}
.rc-head { text-align: center; border-bottom: 2px solid #1a3a5c; padding-bottom: 1rem; margin-bottom: 1.25rem; }
.rc-brand { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: #b8860b; font-weight: 700; }
.rc-head h1 { font-size: 1.15rem; margin: 0.35rem 0; color: #1a3a5c; }
.rc-meta { margin: 0; font-size: 0.85rem; color: #444; }
.rc-block { margin-bottom: 1.15rem; }
.rc-block h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: #1a3a5c; margin: 0 0 0.5rem; border-bottom: 1px solid #ddd; padding-bottom: 0.25rem; }
.rc-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.rc-table th { text-align: left; width: 38%; padding: 0.35rem 0.5rem 0.35rem 0; color: #555; font-weight: 600; vertical-align: top; }
.rc-table td { padding: 0.35rem 0; }
.rc-desc { margin: 0 0 0.75rem; }
.rc-totals .rc-total-row td, .rc-totals .rc-total-row th { font-size: 1rem; padding-top: 0.5rem; border-top: 1px solid #ccc; }
.rc-obs p { margin: 0.35rem 0; }
.rc-legal { font-size: 0.78rem; color: #555; margin-top: 0.75rem !important; }
.rc-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2.5rem; }
.rc-sign-line { border-top: 1px solid #333; margin-bottom: 0.35rem; height: 2.5rem; }
.rc-sign p { margin: 0; font-size: 0.82rem; text-align: center; }
.rc-footer-note { text-align: center; font-size: 0.72rem; color: #888; margin: 1.5rem 0 0; }

@media print {
  body * { visibility: hidden; }
  .receipt-modal, .receipt-modal * { visibility: visible; }
  .receipt-modal { position: absolute; inset: 0; padding: 0; background: #fff; }
  .receipt-modal-backdrop, .no-print { display: none !important; }
  .receipt-modal-panel { box-shadow: none; border: none; width: 100%; max-width: 100%; margin: 0; }
  .receipt-document { max-height: none; overflow: visible; padding: 0; }
  .rc-sheet { border-radius: 0; padding: 1rem; }
}

@media (max-width: 768px) {
  .app.visible { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .rc-foot { grid-template-columns: 1fr; }
}

.subs-actions { white-space: nowrap; }
.subs-actions .btn { margin: 0.15rem 0.1rem; }
.btn-trial {
  background: linear-gradient(135deg, #1565c0, #42a5f5);
  color: #fff;
  border: none;
}
.btn-trial:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
