/* === FONDO DE EMPLEADOS — CORPORATE & INSTITUTIONAL DESIGN SYSTEM === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Corporate Palette: Pure White, Slate Gray & Deep Navy Blue */
  --bg-main: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  
  --primary: #0F294A;          /* Deep Institutional Navy */
  --primary-light: #1E3A8A;    /* Corporate Blue */
  --primary-accent: #2563EB;   /* Bright Navy Accent */
  
  --navy-dark: #0A192F;
  --navy-header: #0F172A;
  
  --emerald: #059669;
  --emerald-bg: #ECFDF5;
  --emerald-border: #A7F3D0;
  --emerald-text: #065F46;
  
  --amber: #D97706;
  --amber-bg: #FFFBEB;
  --amber-border: #FDE68A;
  --amber-text: #92400E;
  
  --rose: #DC2626;
  --rose-bg: #FEF2F2;
  --rose-border: #FECACA;
  --rose-text: #991B1B;
  
  --text-main: #0F172A;        /* High contrast dark text */
  --text-muted: #475569;       /* Slate subtext */
  --text-subtle: #64748B;      /* Light slate */
  
  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-active: #1E3A8A;
  
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--navy-dark);
}

a {
  color: var(--primary-accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Time Travel Bar (Barra Institucional de Simulación) */
.time-travel-bar {
  background: #0B192C;
  border-bottom: 1px solid #1E293B;
  color: #F8FAFC;
  padding: 0.45rem 1.5rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: var(--shadow-sm);
}

.time-badge-sim {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
}

.btn-time {
  background: rgba(255, 255, 255, 0.12);
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.btn-time:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Navbar Institucional */
.navbar {
  position: sticky;
  top: 36px;
  z-index: 50;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.75rem;
  box-shadow: var(--shadow-sm);
}

.nav-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none !important;
}

.logo-badge {
  background: var(--primary);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-item a:hover {
  background: var(--bg-surface-elevated);
  color: var(--primary-light);
  text-decoration: none;
}

.nav-item.active a {
  background: #EFF6FF;
  color: var(--primary-light);
  border: 1px solid #BFDBFE;
}

.user-badge-menu {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Layout */
.main-wrapper {
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 5rem 1.25rem;
}

/* Hero Section / Próxima Cuota Card */
.hero-cuota-card {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-top: 4px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  margin-bottom: 1.5rem;
}

.cuota-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.cuota-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  font-weight: 700;
}

.cuota-monto {
  font-size: 2.35rem;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  color: var(--primary);
  line-height: 1.15;
  margin: 0.25rem 0 0.5rem 0;
}

.cuota-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cuota-actions {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-title {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.icon-emerald { background: var(--emerald-bg); color: var(--emerald-text); border: 1px solid var(--emerald-border); }
.icon-indigo  { background: #EFF6FF; color: var(--primary-light); border: 1px solid #BFDBFE; }
.icon-amber   { background: var(--amber-bg); color: var(--amber-text); border: 1px solid var(--amber-border); }
.icon-rose    { background: var(--rose-bg); color: var(--rose-text); border: 1px solid var(--rose-border); }

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--navy-dark);
  line-height: 1.2;
}

.stat-subtext {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Badges Institucionales */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-emerald {
  background: var(--emerald-bg);
  color: var(--emerald-text);
  border: 1px solid var(--emerald-border);
}
.badge-emerald .badge-dot { background: #059669; }

.badge-amber {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px solid var(--amber-border);
}
.badge-amber .badge-dot { background: #D97706; }

.badge-rose {
  background: var(--rose-bg);
  color: var(--rose-text);
  border: 1px solid var(--rose-border);
}
.badge-rose .badge-dot { background: #DC2626; }

.badge-indigo {
  background: #EFF6FF;
  color: var(--primary-light);
  border: 1px solid #BFDBFE;
}
.badge-indigo .badge-dot { background: #1D4ED8; }

.badge-secondary {
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: #1E3A8A;
  border-color: #1E3A8A;
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--navy-dark);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: #F8FAFC;
  border-color: var(--text-subtle);
}

.btn-success {
  background: var(--emerald);
  color: #FFFFFF;
  border-color: var(--emerald);
}

.btn-success:hover {
  background: #047857;
}

.btn-danger {
  background: var(--rose);
  color: #FFFFFF;
  border-color: var(--rose);
}

.btn-danger:hover {
  background: #B91C1C;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 4px;
}

/* Tables Institucionales */
.table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.custom-table th {
  padding: 0.85rem 1.15rem;
  background: #F8FAFC;
  color: var(--text-subtle);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.custom-table td {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover td {
  background: #F8FAFC;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.modal-backdrop.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: #F8FAFC;
}

/* Forms */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: #FFFFFF;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  text-align: center;
  cursor: pointer;
  background: #F8FAFC;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary-light);
  background: #EFF6FF;
}

.dropzone-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-light);
}

/* Alerts */
.alert-banner {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-text);
}

.alert-danger {
  background: var(--rose-bg);
  border: 1px solid var(--rose-border);
  color: var(--rose-text);
}

.alert-info {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E3A8A;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
  padding: 0.5rem 0.75rem;
  z-index: 40;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav-items {
  display: flex;
  justify-content: space-around;
  list-style: none;
}

.mobile-nav-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
}

.mobile-nav-item.active a {
  color: var(--primary-light);
}

.mobile-nav-icon {
  font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-bottom-nav {
    display: block;
  }
  
  .main-wrapper {
    padding-bottom: 6rem;
  }
  
  .cuota-monto {
    font-size: 1.9rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* === CIRCULAR SELECTION BUBBLES ("BOLITAS DE SELECCIÓN") === */
.selection-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.35rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.selectable-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.selectable-item-card:hover {
  border-color: var(--primary-accent);
  background: #F8FAFC;
}

.selectable-item-card.selected {
  border-color: var(--primary-accent);
  background: #EFF6FF;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.selectable-item-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Custom Round Bubble / Bolita */
.round-bubble {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  border: 2px solid #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.selectable-item-card.selected .round-bubble {
  border-color: var(--primary-accent);
  background: var(--primary-accent);
}

.round-bubble::after {
  display: none !important;
}

.bubble-check-icon {
  width: 13px;
  height: 13px;
  display: none;
}

.selectable-item-card.selected .bubble-check-icon {
  display: block;
}

.cuota-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.cuota-card-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.cuota-card-amount {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy-dark);
  font-family: var(--font-heading);
  white-space: nowrap;
}

.selectable-item-card.selected .cuota-card-amount {
  color: var(--primary-accent);
}

.selection-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-accent);
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  margin-top: 0.6rem;
  transition: all 0.2s ease;
}

