/* =========================================================
   ROBOPLAYS - SISTEMA DE GESTIÓN EDUCATIVA Y COBRANZAS
   Estilos visuales modernos, responsivos y dinámicos
   ========================================================= */

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #e0e7ff;
  --secondary: #06b6d4;
  --secondary-hover: #0891b2;
  --accent: #ec4899;
  
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #273549;
  --bg-surface: #131d31;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border: #334155;
  --border-focus: #818cf8;
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.15);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* --- SIDEBAR DE NAVEGACIÓN --- */
.sidebar {
  width: 260px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-menu {
  list-style: none;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
  transform: translateX(3px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.1));
  color: #fff;
  border-left: 3px solid var(--primary);
  box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.1);
}

.nav-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background-color: var(--danger);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- CONTENIDO PRINCIPAL --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
}

.topbar {
  padding: 16px 28px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left h1 {
  font-size: 1.35rem;
  font-weight: 700;
}

.topbar-left p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.badge-live {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.container-body {
  padding: 28px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* --- TABS & PANELES --- */
.view-panel {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.view-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- FILTROS DE CABECERA --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background-color: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.form-select, .form-input {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-select:focus, .form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-success {
  background-color: var(--success);
  color: #fff;
}
.btn-success:hover { background-color: #059669; }

.btn-warning {
  background-color: var(--warning);
  color: #111;
}
.btn-warning:hover { background-color: #d97706; }

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}
.btn-danger:hover { background-color: #dc2626; }

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background-color: var(--border);
  color: #fff;
}

/* --- TARJETAS DEL DASHBOARD DE CLASE --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.student-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.student-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.4);
}

.student-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
}

.student-meta h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.student-meta p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.badge-tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- ROBOT DEL DÍA (EN LA TARJETA) --- */
.robot-box {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.robot-icon {
  font-size: 26px;
  background: rgba(99, 102, 241, 0.15);
  padding: 10px;
  border-radius: var(--radius-md);
}

.robot-info {
  flex: 1;
}

.robot-label {
  font-size: 0.7rem;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.robot-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

.robot-cat {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* --- BOTONES DE ACCIÓN DE CLASE --- */
.class-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

.class-actions .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.8rem;
  padding: 9px 8px;
}

/* --- SEMÁFORO DE COBRANZA --- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(239, 68, 68, 0.3); }

.card-footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #25d366;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: rgba(37, 211, 102, 0.1);
  transition: background 0.2s;
}

.whatsapp-link:hover {
  background: rgba(37, 211, 102, 0.25);
}

/* --- TABLAS (ALUMNOS Y COBRANZAS) --- */
.table-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

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

.modern-table th {
  background-color: var(--bg-surface);
  padding: 14px 18px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.modern-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.modern-table tr:hover td {
  background-color: var(--bg-card-hover);
}

/* --- KPIS Y STATS --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.kpi-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.kpi-number {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.kpi-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- MODALES --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalScale 0.2s ease-out;
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-full {
  grid-column: span 2;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--border-focus);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* --- TOASTS DE NOTIFICACIÓN --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  min-width: 280px;
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error   { border-left: 4px solid var(--danger); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- CALENDARIO Y SELECTOR DE FECHAS DE CLASE --- */
.calendar-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 24px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.date-icon {
  position: absolute;
  left: 10px;
  pointer-events: none;
  font-size: 0.95rem;
}

.date-input {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  color: #fff;
  padding: 7px 12px 7px 34px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color-scheme: dark;
}

.date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.date-status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.date-heading {
  font-weight: 700;
  color: #fff;
  font-size: 0.92rem;
  letter-spacing: -0.2px;
}

.badge-tag-today {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  font-weight: 700 !important;
}

.badge-tag-hist {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

.badge-tag-future {
  background: rgba(99, 102, 241, 0.2) !important;
  color: #a5b4fc !important;
  border: 1px solid rgba(99, 102, 241, 0.4) !important;
}

.btn-icon {
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.attendance-status-wrap {
  margin: -4px 0 10px;
}

.att-status-indicator {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-completado {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-progreso {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-ausente {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-pending {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-dim);
  border: 1px dashed rgba(148, 163, 184, 0.25);
}

.btn-action-active {
  box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  transform: scale(1.04) !important;
  font-weight: 800 !important;
}

@media (max-width: 900px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .nav-menu { flex-direction: row; overflow-x: auto; padding: 10px; }
  .cards-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-full { grid-column: span 1; }
  .calendar-bar { flex-direction: column; align-items: stretch; }
  .calendar-controls { justify-content: space-between; }
  .report-section-grid { grid-template-columns: 1fr; }
}

/* --- MÓDULO DE REPORTES Y DOCUMENTO IMPRIMIBLE --- */
.report-document {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  gap: 20px;
}

.report-header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.report-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.report-subtitle {
  font-size: 0.88rem;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 2px;
}

.report-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.report-header-info {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.report-badge-status {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.report-period-text {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.report-date-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.report-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.report-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.report-box-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.stats-table {
  width: 100%;
  font-size: 0.86rem;
}

.stats-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-highlight {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--secondary);
}

.bars-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stat-bar-header strong {
  color: #fff;
}

.stat-bar-val {
  color: #fff;
  font-weight: 600;
}

.stat-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.report-detail-table {
  width: 100%;
  font-size: 0.84rem;
}

.report-detail-table th {
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  padding: 10px 12px;
}

.report-detail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.table-total-row {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
  font-size: 0.9rem;
}

.table-total-row td {
  padding: 12px;
  color: #fff;
  border-top: 2px solid var(--border);
}

.report-signatures {
  display: flex;
  justify-content: space-around;
  margin-top: 48px;
  padding-top: 24px;
}

.signature-line {
  text-align: center;
  width: 240px;
}

.signature-line .line {
  border-top: 1px solid var(--border);
  margin-bottom: 8px;
}

.sign-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
}

.sign-role {
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* --- ESTILOS DE IMPRESIÓN Y PDF (@MEDIA PRINT) --- */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt !important;
  }
  .sidebar, .topbar, .no-print, .btn, .filter-bar, .modal-overlay, .toast-container {
    display: none !important;
  }
  .main-content {
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .container-body {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .view-panel {
    display: none !important;
  }
  #panel-reports.view-panel {
    display: block !important;
  }
  .report-document {
    background: #fff !important;
    color: #000 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .report-header {
    border-bottom: 2px solid #000 !important;
    padding-bottom: 12px !important;
    margin-bottom: 20px !important;
  }
  .report-title {
    color: #000 !important;
    font-size: 14pt !important;
  }
  .report-subtitle, .report-meta, .report-period-text, .report-date-text {
    color: #333 !important;
  }
  .report-badge-status {
    border: 1px solid #333 !important;
    color: #000 !important;
    background: #eee !important;
  }
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
  }
  .kpi-card, .report-box {
    background: #fff !important;
    border: 1px solid #bbb !important;
    color: #000 !important;
    box-shadow: none !important;
    padding: 10px 14px !important;
    page-break-inside: avoid;
  }
  .kpi-icon {
    display: none !important;
  }
  .kpi-number {
    color: #000 !important;
    font-size: 1.25rem !important;
  }
  .kpi-title {
    color: #555 !important;
    font-size: 0.72rem !important;
  }
  .report-box-title {
    color: #000 !important;
    border-bottom: 1px solid #ccc !important;
  }
  .stat-highlight {
    color: #000 !important;
    font-weight: bold !important;
  }
  .stats-table td {
    color: #000 !important;
    border-bottom: 1px solid #ddd !important;
  }
  .stat-bar-header {
    color: #333 !important;
  }
  .stat-bar-header strong, .stat-bar-val {
    color: #000 !important;
  }
  .stat-bar-track {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
  }
  .modern-table {
    border-collapse: collapse !important;
    width: 100% !important;
  }
  .modern-table th {
    background-color: #f1f5f9 !important;
    color: #000 !important;
    border: 1px solid #94a3b8 !important;
    font-size: 8pt !important;
    padding: 6px !important;
  }
  .modern-table td {
    border: 1px solid #cbd5e1 !important;
    color: #000 !important;
    font-size: 8pt !important;
    padding: 5px 6px !important;
  }
  .table-total-row td {
    background: #f8fafc !important;
    color: #000 !important;
    font-weight: bold !important;
    border-top: 2px solid #000 !important;
  }
  .badge-tag {
    border: 1px solid #666 !important;
    background: #fff !important;
    color: #000 !important;
    font-size: 7.5pt !important;
  }
  .report-signatures {
    display: flex !important;
    justify-content: space-around !important;
    margin-top: 40px !important;
    page-break-inside: avoid;
  }
  .signature-line .line {
    border-top: 1px solid #000 !important;
  }
  .sign-name, .sign-role {
    color: #000 !important;
  }
}


