@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Mono:wght@400;500&family=DM+Sans:wght@300;400;500;600;700&display=swap");

/* =========================================================
   PANEL DEL ENTRENADOR — identidad Aegis Fortis
   Archivo: ./css/aegis.css. Incluye el módulo de Pagos.
========================================================= */

:root {
  --black: #0a0a0a;
  --surface: #131313;
  --surface2: #1c1c1c;
  --lime: #bfff00;
  --lime-hover: #d6ff33;
  --white: #f0f0f0;
  --gray: #6b6b6b;
  --gray-soft: #9a9a9a;
  --gray-light: #2a2a2a;
  --danger: #ff5a45; /* único color nuevo: distingue "Moroso" del resto */

  --fd: "Bebas Neue", Impact, sans-serif;
  --fb: "DM Sans", system-ui, sans-serif;
  --fm: "DM Mono", monospace;

  --slant-sm: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  --slant: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.6;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
}
input,
textarea,
select {
  font-family: inherit;
}
a {
  color: inherit;
}
strong {
  color: var(--white);
  font-weight: 600;
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--lime) var(--surface);
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--surface);
}
*::-webkit-scrollbar-thumb {
  background: var(--lime);
  border: 2px solid var(--surface);
}

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

/* =========================================================
   LAYOUT
========================================================= */
#app-shell {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid rgba(191, 255, 0, 0.1);
  display: flex;
  flex-direction: column;
  padding: 28px 0;
}
.brand {
  padding: 0 24px 28px 24px;
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 20px;
}
.brand-title {
  font-family: var(--fd);
  font-size: 2rem;
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
}
.brand-sub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--fm);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 14px 0 0;
}
.brand-sub::before {
  content: "";
  flex-shrink: 0;
  width: 24px;
  height: 1px;
  background: var(--lime);
}
.nav-actions {
  display: flex;
  flex-direction: column;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  font-family: var(--fm);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: var(--gray-soft);
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  transition: color 0.2s, background 0.2s;
}
.nav-item:hover {
  color: var(--lime);
  background: rgba(191, 255, 0, 0.04);
}
.nav-item.active {
  color: var(--lime);
  background: rgba(191, 255, 0, 0.08);
  border-left-color: var(--lime);
}
.nav-dot {
  width: 8px;
  height: 8px;
  background: currentColor;
  clip-path: var(--slant-sm);
}
.sidebar-footer {
  margin-top: auto;
  padding: 16px 24px 0 24px;
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--gray);
  border-top: 1px solid var(--gray-light);
}

/* MAIN */
.main {
  flex: 1;
  min-width: 0;
  padding: 40px 44px;
}
.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}
.view-title {
  font-family: var(--fd);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 8px 0;
}
.view-desc {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--gray-soft);
  margin: 0;
}

/* =========================================================
   BOTONES
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.8rem 1.75rem;
  font-family: var(--fm);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-primary {
  background: var(--lime);
  color: var(--black);
  clip-path: var(--slant);
}
.btn-primary:hover {
  background: var(--lime-hover);
}
.btn-secondary {
  background: transparent;
  color: var(--lime);
  border-color: var(--lime);
}
.btn-secondary:hover {
  background: var(--lime);
  color: var(--black);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--gray-light);
}
.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
}
.btn-text {
  background: transparent;
  border: none;
  color: var(--lime);
  padding: 6px 4px;
}
.btn-text:hover {
  text-decoration: underline;
}
.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger-outline:hover {
  background: var(--danger);
  color: var(--black);
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.68rem;
}
.btn-primary.btn-sm {
  clip-path: var(--slant-sm);
  padding: 0.55rem 1.3rem;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =========================================================
   LISTA DE ALUMNOS
========================================================= */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-bottom: 28px;
  background: var(--gray-light);
  border: 1px solid var(--gray-light);
}
.stat-card {
  flex: 1;
  min-width: 150px;
  padding: 20px 24px;
  background: var(--surface);
}
.stat-num {
  font-family: var(--fd);
  font-size: 2.75rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--lime);
}
.stat-label {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--gray-soft);
}

.filters-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}
.search-input {
  flex: 1;
  min-width: 220px;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--white);
  background: var(--surface2);
  border: 1px solid var(--gray-light);
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus {
  border-color: var(--lime);
}
.search-input::placeholder {
  color: var(--gray);
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-btn {
  padding: 0.75rem 1.25rem;
  font-family: var(--fm);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-soft);
  background: transparent;
  border: 1px solid var(--gray-light);
  transition: border-color 0.2s, color 0.2s;
}
.filter-btn:hover {
  border-color: var(--lime);
  color: var(--lime);
}
.filter-btn.active {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--black);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--gray-light);
}
.list-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-light);
  cursor: pointer;
  transition: background 0.3s;
}
.list-row:last-child {
  border-bottom: none;
}
.list-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--lime);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}
.list-row:hover {
  background: rgba(191, 255, 0, 0.04);
}
.list-row:hover::before {
  transform: scaleY(1);
}
.row-main {
  min-width: 0;
}
.row-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
}
.row-sub {
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--gray-soft);
}
.row-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-family: var(--fm);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-al-dia {
  background: rgba(191, 255, 0, 0.1);
  border-color: rgba(191, 255, 0, 0.4);
  color: var(--lime);
}
.badge-moroso {
  background: rgba(255, 90, 69, 0.12);
  border-color: rgba(255, 90, 69, 0.5);
  color: var(--danger);
}
.badge-becado {
  background: var(--surface2);
  border-color: var(--gray-light);
  color: var(--gray-soft);
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  font-weight: 300;
  color: var(--gray-soft);
}
.empty-state-title {
  margin: 0 0 6px 0;
  font-family: var(--fd);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
}

/* =========================================================
   FORMULARIOS
========================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 16px;
}
.field label {
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--white);
  background: var(--surface2);
  border: 1px solid var(--gray-light);
  outline: none;
  appearance: none;
  color-scheme: dark;
  transition: border-color 0.2s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--lime);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--gray);
}
.field textarea {
  min-height: 120px;
  line-height: 1.65;
  resize: vertical;
}
.field select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B6B6B' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.field select option {
  background: var(--surface2);
}
.field-row {
  display: flex;
  gap: 14px;
}
.field-row .field {
  flex: 1;
}
.field-hint {
  margin: 5px 0 0;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--gray-soft);
}
.field-error {
  margin-top: 5px;
  font-family: var(--fm);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--danger);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--lime);
}
.checkbox-row label {
  font-family: var(--fm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
}

/* =========================================================
   MODALES
========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(8px);
}
.modal {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--gray-light);
  border-top: 2px solid var(--lime);
}
.modal.modal-wide {
  max-width: 680px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-light);
}
.modal-title {
  margin: 0;
  font-family: var(--fd);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
}
.modal-close {
  padding: 4px;
  font-size: 18px;
  line-height: 1;
  color: var(--gray);
  background: transparent;
  border: none;
  transition: color 0.2s;
}
.modal-close:hover {
  color: var(--lime);
}
.modal-body {
  padding: 22px;
  max-height: 70vh;
  overflow-y: auto;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--gray-light);
}

/* =========================================================
   DETALLE DE ALUMNO
========================================================= */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 0;
  font-family: var(--fm);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-soft);
  background: transparent;
  border: none;
  transition: color 0.2s;
}
.back-link:hover {
  color: var(--lime);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.hero-card {
  flex: 1;
  min-width: 190px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--gray-light);
}
.hero-num {
  display: block;
  font-family: var(--fd);
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--white);
}
.hero-label {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--gray-soft);
}

/* Clases restantes: tarjeta destacada en lima */
.hero-card-remaining {
  background: var(--lime);
  border-color: var(--lime);
}
.hero-card-remaining .hero-num,
.hero-card-remaining .hero-label {
  color: var(--black);
}
.hero-card-remaining .hero-label {
  font-weight: 500;
}

.hero-card-status .hero-num {
  font-size: 2.5rem;
}
.hero-card-status.status-al-dia {
  background: rgba(191, 255, 0, 0.06);
  border-color: rgba(191, 255, 0, 0.4);
}
.hero-card-status.status-al-dia .hero-num {
  color: var(--lime);
}
.hero-card-status.status-moroso {
  background: rgba(255, 90, 69, 0.08);
  border-color: rgba(255, 90, 69, 0.5);
}
.hero-card-status.status-moroso .hero-num {
  color: var(--danger);
}
.hero-card-status.status-becado {
  background: var(--surface2);
}
.hero-card-status.status-becado .hero-num {
  color: var(--gray-soft);
}

.mini-stat {
  flex: 1;
  min-width: 130px;
}
.mini-num {
  display: block;
  font-family: var(--fd);
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--white);
}
.mini-label {
  display: block;
  margin-top: 4px;
  font-family: var(--fm);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}

/* Bloques */
.card-block {
  margin-bottom: 20px;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--gray-light);
}
.card-block h3 {
  margin: 0 0 18px 0;
  padding-left: 12px;
  font-family: var(--fd);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--white);
  border-left: 3px solid var(--lime);
}
.card-block.accent-maroon h3 {
  border-left-color: var(--lime);
}
.card-block.accent-blue h3 {
  border-left-color: var(--lime);
}
.card-block.accent-gray h3 {
  border-left-color: var(--gray);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.scholarship-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

/* Casillas de clases */
.class-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.class-square {
  width: 26px;
  height: 26px;
  background: var(--surface2);
  border: 1px solid var(--gray-light);
  clip-path: var(--slant-sm);
}
.class-square.used {
  background: var(--lime);
  border-color: var(--lime);
}

/* Pagos */
.payment-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--gray-light);
}
.payment-chip:last-child {
  margin-bottom: 0;
}
.payment-chip-amount {
  font-family: var(--fd);
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--lime);
}
.payment-chip-meta {
  margin-top: 2px;
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--gray-soft);
}

/* Historial de renovaciones */
.timeline-item {
  margin-bottom: 8px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--gray-light);
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}
.timeline-item-sub {
  margin-top: 4px;
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--gray-soft);
}

/* Actividad */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.activity-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface2);
  border: 1px solid var(--gray-light);
}
.activity-date-chip {
  flex-shrink: 0;
  padding: 0.4rem 0.9rem;
  font-family: var(--fm);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--black);
  background: var(--lime);
  clip-path: var(--slant-sm);
}
.activity-card-text {
  flex: 1;
  padding-top: 2px;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--white);
}
.activity-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 12px;
  color: var(--gray-soft);
  background: transparent;
  border: 1px solid var(--gray-light);
  transition: border-color 0.2s, color 0.2s;
}
.icon-btn:hover {
  border-color: var(--lime);
  color: var(--lime);
}

/* Toast */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  padding: 12px 20px;
  font-family: var(--fm);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--black);
  background: var(--lime);
  clip-path: var(--slant);
}

/* =========================================================
   MÓDULO DE PAGOS
========================================================= */

/* Controles de mes y rango */
.month-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.month-control {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 200px;
}
.month-control label {
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}
.month-input,
.month-count {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--white);
  background: var(--surface2);
  border: 1px solid var(--gray-light);
  outline: none;
  appearance: none;
  color-scheme: dark;
  transition: border-color 0.2s;
}
.month-input:focus,
.month-count:focus {
  border-color: var(--lime);
}
.month-count {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B6B6B' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.month-count option {
  background: var(--surface2);
}

/* Ingreso del mes: el dato principal de la vista */
.finance-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 30px 32px 28px;
  color: var(--black);
  background: var(--lime);
}
.finance-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 140px;
  background: rgba(0, 0, 0, 0.06);
  clip-path: polygon(50px 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.finance-kicker {
  font-family: var(--fm);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.finance-total {
  margin-top: 6px;
  font-family: var(--fd);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
}
.finance-sub {
  margin-top: 12px;
  font-family: var(--fm);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Gráfico de evolución (SVG generado por la app) */
.chart-card {
  margin-bottom: 20px;
  padding: 24px 26px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--gray-light);
}
.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.chart-head h3 {
  margin: 0;
  padding-left: 12px;
  font-family: var(--fd);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  border-left: 3px solid var(--lime);
}
.chart-head span {
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}
.payments-chart {
  display: block;
  width: 100%;
  min-width: 560px; /* con muchos meses, el gráfico se desplaza en horizontal */
  height: auto;
  overflow: visible;
}
.chart-grid-line {
  stroke: var(--gray-light);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.chart-line {
  fill: none;
  stroke: var(--lime);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart-point {
  fill: var(--black);
  stroke: var(--lime);
  stroke-width: 2;
}
.chart-label {
  fill: var(--gray-soft);
  font-family: var(--fm);
  font-size: 10px;
}
.chart-value {
  fill: var(--white);
  font-family: var(--fm);
  font-size: 10px;
}

/* Meses anteriores */
.month-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-light);
}
.month-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface2);
  border-bottom: 1px solid var(--gray-light);
  border-left: 3px solid transparent;
}
.month-row:last-child {
  border-bottom: none;
}
.month-row.current {
  background: rgba(191, 255, 0, 0.06);
  border-left-color: var(--lime);
}
.month-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
}
.month-meta {
  margin-top: 2px;
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--gray-soft);
}
.month-total {
  font-family: var(--fd);
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: var(--white);
}
.month-row.current .month-total {
  color: var(--lime);
}

/* Detalle de pagos del mes */
.payment-detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.payment-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--gray-light);
}
.payment-detail-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
}
.payment-detail-meta {
  margin-top: 2px;
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--gray-soft);
}
.payment-detail-amount {
  flex-shrink: 0;
  font-family: var(--fd);
  font-size: 1.4rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: var(--lime);
}

@media (max-width: 720px) {
  .month-control {
    flex: 1;
    min-width: 100%;
  }
  .finance-hero {
    padding: 24px 22px;
  }
  .chart-card {
    padding: 20px 18px;
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 720px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  .field-row {
    flex-direction: column;
    gap: 0;
  }
  .activity-card {
    flex-wrap: wrap;
  }
}

@media (max-width: 820px) {
  #app-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(191, 255, 0, 0.1);
  }
  .brand {
    margin-bottom: 0;
    padding: 0 16px 0 0;
    border-bottom: none;
    border-right: 1px solid var(--gray-light);
  }
  .brand-title {
    font-size: 1.4rem;
  }
  .brand-sub,
  .sidebar-footer {
    display: none;
  }
  .nav-actions {
    flex-direction: row;
  }
  .nav-item {
    width: auto;
    padding: 10px 16px;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  .nav-item.active {
    border-left: none;
    border-bottom-color: var(--lime);
  }
  .main {
    padding: 24px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
