/* ============================================================
   EduNexus — Estilos de Dashboards y Páginas
   ============================================================ */

/* ─────────────────────────────────────────
   DIRECTOR HERO / WELCOME BANNER
───────────────────────────────────────── */
.welcome-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-radius: var(--border-radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.event-past-fade { opacity: 0.6; filter: grayscale(0.5); }
.welcome-hero::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 250px;
  height: 250px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.welcome-hero::after {
  content: '';
  position: absolute;
  right: 80px;
  bottom: -100px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.welcome-text { z-index: 1; }
.welcome-greeting {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.welcome-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin-bottom: 6px;
}
.welcome-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.welcome-actions {
  display: flex;
  gap: 10px;
  z-index: 1;
  flex-wrap: wrap;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.quick-action-btn {
  --text-primary: #1A202C;
  --text-secondary: #4A5568;
  --text-muted: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  background: white;
  border-radius: var(--border-radius);
  border: 1.5px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}
.quick-action-btn:hover {
  border-color: var(--color-primary);
  background: #f8fafc;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}
.quick-action-btn i {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.quick-action-btn span { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }

/* Icon colors for quick actions */
.qa-blue i { background: #dbeafe; color: #2563eb; }
.qa-green i { background: #dcfce7; color: #16a34a; }
.qa-yellow i { background: #fef3c7; color: #d97706; }
.qa-red i { background: #fee2e2; color: #dc2626; }
.qa-purple i { background: #f5f3ff; color: #7c3aed; }
.qa-teal i { background: #ccfbf1; color: #0d9488; }
.qa-navy i { background: #eff6ff; color: var(--color-primary); }
.qa-gold i { background: #fef3c7; color: var(--color-secondary-dark); }
.qa-pink i { background: #fce7f3; color: #be185d; }
.qa-indigo i { background: #e0e7ff; color: #4338ca; }
.qa-orange i { background: #ffedd5; color: #ea580c; }
.qa-cyan i { background: #cffafe; color: #0891b2; }

/* ─────────────────────────────────────────
   DASHBOARD CHARTS
───────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.chart-container { position: relative; height: 250px; }

/* ─────────────────────────────────────────
   BIRTHDAYS WIDGET
───────────────────────────────────────── */
.birthday-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}
.birthday-item:last-child { border-bottom: none; }

.birthday-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.birthday-info { flex: 1; min-width: 0; }
.birthday-name { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.birthday-grade { font-size: 0.78rem; color: var(--text-secondary); }

.birthday-days {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
}
.birthday-days.today { background: #fee2e2; color: #dc2626; }
.birthday-days.soon { background: #fef3c7; color: #92400e; }
.birthday-days.upcoming { background: #dbeafe; color: #1e40af; }

/* ─────────────────────────────────────────
   PARENT DASHBOARD — STUDENT CARD
───────────────────────────────────────── */
.student-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.student-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.student-card-header {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.student-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}
.student-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}
.student-card-grade {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}
.student-card-status {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
}
.status-al-dia { background: #10B981; color: white; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.status-pendiente { background: #FB7185; color: white; font-weight: 700; padding: 4px 10px; border-radius: 20px; }

.student-card-body { padding: 20px; }

.student-finance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.student-finance-row:last-child { border-bottom: none; }
.student-finance-label { font-size: 0.85rem; color: var(--text-secondary); }
.student-finance-value { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }

/* ─────────────────────────────────────────
   PAYMENT MONTHS SELECTOR
───────────────────────────────────────── */
.months-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 5px !important;
  margin-top: 8px;
}

.month-btn {
  padding: 10px 6px;
  border-radius: var(--border-radius-sm);
  border: 1.5px solid var(--border-color);
  background: white;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}
.month-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: #eff6ff; }
.month-btn.selected { background: var(--color-primary); border-color: var(--color-primary); color: white; }
.month-btn.paid { background: #dcfce7; border-color: #86efac; color: #15803d; }
.month-btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ─────────────────────────────────────────
   GALLERY
───────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.gallery-photo {
  aspect-ratio: 1;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background: var(--bg-app);
  cursor: pointer;
  position: relative;
}
.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-photo:hover img { transform: scale(1.05); }
.gallery-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}
.gallery-photo:hover .gallery-photo-overlay { opacity: 1; }

/* ─────────────────────────────────────────
   LIGHTBOX
───────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--border-radius-sm);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 1.5rem;
  background: rgba(255,255,255,0.1);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────────
   REPORT CARDS / BOLETINES
───────────────────────────────────────── */
.report-card-table {
  width: 100%;
  border-collapse: collapse;
}
.report-card-table th {
  background: var(--color-primary);
  color: white;
  padding: 10px 14px;
  font-size: 0.8rem;
  text-align: left;
}
.report-card-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
}
.report-card-table tr:nth-child(even) td { background: #f9fafb; }

.score-badge {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.score-a { background: #dcfce7; color: #15803d; }
.score-b { background: #dbeafe; color: #1d4ed8; }
.score-c { background: #fef3c7; color: #92400e; }
.score-d { background: #fee2e2; color: #991b1b; }

/* ─────────────────────────────────────────
   DELINQUENCY ALERTS
───────────────────────────────────────── */
.alert-critical-list {
  border: 1.5px solid #fca5a5;
  border-radius: var(--border-radius);
  overflow: hidden;
}
.delinquent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #fee2e2;
  background: white;
  gap: 12px;
}
.delinquent-row:last-child { border-bottom: none; }
.delinquent-row:hover { background: #fef2f2; }
.delinquent-name { font-weight: 600; font-size: 0.9rem; }
.delinquent-grade { font-size: 0.78rem; color: var(--text-muted); }
.delinquent-amount { font-weight: 700; color: var(--color-danger); font-size: 0.95rem; }

/* ─────────────────────────────────────────
   RESPONSIVE DASHBOARDS
───────────────────────────────────────── */
@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .welcome-hero { flex-direction: column; align-items: flex-start; }
  .welcome-name { font-size: 1.4rem; }
  .quick-actions-grid { grid-template-columns: repeat(3, 1fr); }
  .months-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─────────────────────────────────────────
   INDICADORES DE NOVEDAD (Dashboard Padre)
───────────────────────────────────────── */
.badge-new {
  background: #f59e0b;
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
  vertical-align: middle;
}

.new-item-highlight {
  animation: pulse-new-item 2s infinite ease-in-out;
  border: 2px solid #6366f1 !important;
  background: #fdfaf1 !important;
}

@keyframes pulse-new-item {
  0% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); }
  100% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.2); }
}

/* ─────────────────────────────────────────
   HIVE HUB PREMIUM EVENT CARDS (v5.6)
───────────────────────────────────────── */
.activity-card-premium {
  --text-primary: #1A202C !important;
  --text-secondary: #4A5568 !important;
  --text-muted: #64748b !important;
  background: white;
  border-radius: 28px !important;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.03);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  color: var(--text-primary) !important;
}

.activity-card-premium h1, .activity-card-premium h2, .activity-card-premium h3, .activity-card-premium h4, .activity-card-premium strong {
  color: var(--text-primary) !important;
}

.activity-card-premium p, .activity-card-premium span, .activity-card-premium div {
  color: var(--text-secondary);
}
.activity-card-premium:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 25px 45px rgba(0,0,0,0.1);
  border-color: var(--color-primary-light);
}

.event-badge-container {
  min-width: 65px;
  height: 65px;
  background: linear-gradient(135deg, var(--color-primary), #3b82f6);
  color: white;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}
.event-day { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.event-month { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; margin-top: 2px; opacity: 0.9; }

.event-content { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.event-content h4 { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.event-content p { margin: 0; font-size: 0.88rem; color: var(--text-secondary); line-height: 1.4; }

.btn-read-more {
  align-self: flex-start;
  margin-top: 8px;
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}
.btn-read-more:hover { gap: 10px; color: var(--color-primary-dark); }
.btn-read-more::after { content: '\f061'; font-family: 'Font Awesome 5 Free'; font-weight: 900; }

/* Realtime Animation */
.realtime-item-new {
  animation: slideInPremium 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes slideInPremium {
  0% { opacity: 0; transform: translateY(30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
  .activity-card-premium { padding: 16px; gap: 14px; }
  .event-badge-container { min-width: 55px; height: 55px; }
  .event-day { font-size: 1.2rem; }
}

/* ─────────────────────────────────────────
   HIVE HUB GALLERY PREMIUM (v6.0)
───────────────────────────────────────── */
.gallery-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 10px;
}

.gallery-item-hive {
  position: relative;
  border-radius: 28px !important;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.03);
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item-hive:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 45px rgba(0,0,0,0.12);
}

.gallery-item-hive img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item-hive:hover img { transform: scale(1.1); }

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(37, 99, 235, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
  z-index: 2;
  transition: all 0.3s ease;
}

.gallery-item-hive:hover .play-overlay {
  transform: translate(-50%, -50%) scale(1.2);
  background: var(--color-primary);
}

.gallery-item-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item-hive:hover .gallery-item-info { transform: translateY(0); }

/* Selector de Medios en Modal */
.media-type-selector {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 20px;
  gap: 4px;
}

.btn-type {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-type.active {
  background: white;
  color: var(--color-primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Modal Video Iframe */
.video-container-premium {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.video-container-premium iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 600px) {
  .gallery-grid-premium { grid-template-columns: 1fr; }
  .gallery-item-hive { border-radius: 20px !important; }
}

/* ═══════════════════════════════════════════════════════════════
   EXPEDIENTE FINANCIERO DIGITAL v8.5.0
   ═══════════════════════════════════════════════════════════════ */

.expediente-container {
  --text-primary: #1A202C !important;
  --text-secondary: #4A5568 !important;
  --text-muted: #64748b !important;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
  color: var(--text-primary);
}

/* ── HEADER INSTITUCIONAL ───────────── */
.exp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 32px 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.exp-header-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.exp-school-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.25);
}

.exp-school-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
}

.exp-school-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
  font-size: 0.78rem;
  color: #64748b;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
.exp-school-meta i {
  width: 14px;
  text-align: center;
  margin-right: 4px;
  color: #94a3b8;
}

.exp-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.exp-badge-digital {
  background: #1e3a5f;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exp-id {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  letter-spacing: 0.04em;
}

/* ── DIVIDER ─────────────────────────── */
.exp-divider {
  height: 4px;
  background: linear-gradient(90deg, #1e3a5f 0%, #c9a84c 40%, #1e3a5f 100%);
  margin: 0 32px;
  border-radius: 4px;
}

/* ── INFO CARDS GRID ─────────────────── */
.exp-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 24px 32px;
}

.exp-info-card {
  padding: 20px 24px;
  border: 1px solid #e8ecf1;
  border-radius: 14px;
}
.exp-info-card:first-child {
  border-right: none;
  border-radius: 14px 0 0 14px;
}
.exp-info-card:last-child {
  border-radius: 0 14px 14px 0;
}

.exp-info-card-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #2563eb;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.exp-info-card-title i {
  font-size: 0.85rem;
  opacity: 0.7;
}

.exp-info-row {
  margin-bottom: 12px;
}
.exp-info-row:last-child {
  margin-bottom: 0;
}

.exp-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.exp-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
}

.exp-value-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.exp-value-fee {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.exp-value-pending {
  font-style: italic;
  color: #94a3b8;
  font-weight: 400;
}

/* ── GLOBAL STATUS BADGES ────────────── */
.exp-global-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 7px 18px;
  border-radius: 100px;
  letter-spacing: 0.06em;
}

.exp-global-saldado {
  background: #dbeafe;
  color: #1d4ed8;
}

.exp-global-pendiente {
  background: #fef3c7;
  color: #b45309;
}

/* ── TABLE SECTION ───────────────────── */
.exp-table-section {
  padding: 0 32px 0;
}

.exp-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 16px 0;
}

.exp-table-wrapper {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}

.exp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.exp-th {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.exp-th-amount {
  text-align: right;
}

.exp-td {
  padding: 16px 18px;
  font-size: 0.88rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.exp-table tbody tr:last-child .exp-td {
  border-bottom: none;
}
.exp-table tbody tr:hover {
  background: #fafbfd;
}

.exp-td-amount {
  text-align: right;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  white-space: nowrap;
}

.exp-concept-main {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}
.exp-concept-sub {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ── STATUS BADGES (TABLE) ───────────── */
.exp-status-saldado {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #059669;
  letter-spacing: 0.04em;
}
.exp-status-pendiente {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #d97706;
  letter-spacing: 0.04em;
}

/* ── BALANCE FOOTER ──────────────────── */
.exp-balance-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 18px 24px;
  border-radius: 0 0 14px 14px;
  margin-top: -1px;
}

.exp-balance-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.exp-balance-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* ── EXPEDIENTE FOOTER ───────────────── */
.exp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ── RESPONSIVE ──────────────────────── */
@media (max-width: 768px) {
  .expediente-container {
    border-radius: 16px;
    margin: 0 -4px;
  }
  .exp-header {
    padding: 20px 20px 16px;
    flex-direction: column;
  }
  .exp-header-right {
    align-items: flex-start;
    flex-direction: row;
    gap: 10px;
  }
  .exp-divider {
    margin: 0 20px;
  }
  .exp-info-grid {
    grid-template-columns: 1fr;
    padding: 16px 20px;
    gap: 12px;
  }
  .exp-info-card:first-child,
  .exp-info-card:last-child {
    border-radius: 14px;
    border-right: 1px solid #e8ecf1;
  }
  .exp-table-section {
    padding: 0 20px;
  }
  
  /* Make table scroll horizontally on small screens */
  .exp-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .exp-table {
    min-width: 520px;
  }
  .exp-th, .exp-td {
    padding: 12px 14px;
  }
  .exp-footer {
    padding: 14px 20px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .exp-school-name {
    font-size: 1rem;
  }
  .exp-school-logo {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .exp-header {
    padding: 16px;
  }
  .exp-divider {
    margin: 0 16px;
  }
  .exp-info-grid {
    padding: 12px 16px;
  }
  .exp-table-section {
    padding: 0 16px;
  }
  .exp-balance-footer {
    padding: 14px 18px;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .exp-balance-amount {
    font-size: 1.2rem;
  }
}

/* ── PRINT STYLES ────────────────────── */
@media print {
  .expediente-container {
    box-shadow: none;
    border: 1px solid #e2e8f0;
    max-width: 100%;
  }
  .exp-footer button {
    display: none;
  }
}

/* ─────────────────────────────────────────
   TEACHER GALLERY MODULE v9.3.0
───────────────────────────────────────── */
.gallery-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.gallery-item-teacher {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.gallery-item-teacher:hover {
  transform: scale(1.05);
  z-index: 10;
}
.gallery-item-teacher img {
  transition: filter 0.3s ease;
}
.gallery-item-teacher:hover img {
  filter: brightness(0.9);
}
.gallery-item-teacher button {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gallery-item-teacher:hover button {
  opacity: 1;
}

.badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.375rem;
}
