/* Prórrogas — tema moderno v2 (legible, denso, sin romper IDs) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --pr-bg: #e8f0fa;
  --pr-surface: #ffffff;
  --pr-surface-2: #f4f7fb;
  --pr-border: #d0dae8;
  --pr-text: #111827;
  --pr-muted: #4b5563;
  --pr-primary: #0a4d8f;
  --pr-primary-light: #1565b8;
  --pr-primary-soft: #dbeafe;
  --pr-accent: #0e9ab4;
  --pr-danger: #dc2626;
  --pr-shadow: 0 4px 24px rgba(10, 40, 80, 0.1);
  --pr-radius: 12px;
  --pr-font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --pr-text-base: 16px;
  --pr-text-lg: 18px;
  --pr-text-xl: 22px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--pr-font) !important;
  font-size: var(--pr-text-base) !important;
  background: linear-gradient(160deg, #dce9f8 0%, #eef3f9 45%, #f5f7fa 100%) !important;
  color: var(--pr-text) !important;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Anula el * { font-size:16px } legacy solo donde estorba */
#coord_student_view_table th,
#coord_student_view_table td,
.pr-filter-card,
.pr-table-card,
.pr-app-header,
.content-pop,
#nwf {
  font-size: var(--pr-text-base);
}

/* ── Login ── */
#form_log {
  min-height: 100vh;
  padding: 32px 20px;
}

#form_log > .col-md-4 {
  width: 100%;
  max-width: 440px;
  float: none;
  margin: 0 auto;
  padding: 0;
}

.pr-login-card {
  background: #fff;
  border: 1px solid var(--pr-border);
  border-radius: 16px;
  box-shadow: var(--pr-shadow);
  padding: 40px 36px 36px;
  text-align: center;
}

.pr-login-card img {
  width: 140px !important;
  height: auto !important;
  margin-bottom: 12px;
}

.pr-login-card h3.blue {
  font-size: var(--pr-text-xl) !important;
  font-weight: 800 !important;
  color: var(--pr-primary) !important;
  margin: 0 0 28px !important;
}

#nwf label {
  display: block;
  text-align: left;
  font-size: 15px !important;
  font-weight: 600;
  color: var(--pr-text);
  margin: 16px 0 8px;
}

#nwf .form-control {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 2px solid var(--pr-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  font-size: var(--pr-text-base) !important;
  color: var(--pr-text) !important;
}

#nwf .form-control:focus {
  outline: none;
  border-color: var(--pr-primary-light) !important;
  box-shadow: 0 0 0 3px rgba(21, 101, 184, 0.15);
}

#go {
  width: 100%;
  height: 52px;
  margin-top: 24px;
  border: none !important;
  border-radius: 10px !important;
  background: var(--pr-primary) !important;
  color: #fff !important;
  font-size: var(--pr-text-lg) !important;
  font-weight: 700 !important;
  cursor: pointer;
}

#go:hover { background: var(--pr-primary-light) !important; }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.content-wrap,
.content {
  background: transparent !important;
}

.header { display: none !important; }

/* ── Top bar ── */
#user_panel {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  float: none !important;
}

#user_panel.smoothness-1 { background: transparent !important; }
#user_panel_name { display: none !important; }

.pr-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  margin: 0 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--pr-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.pr-app-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pr-app-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.pr-app-brand__text h1 {
  margin: 0 !important;
  font-size: var(--pr-text-xl) !important;
  font-weight: 800 !important;
  color: var(--pr-text) !important;
  line-height: 1.2;
}

.pr-app-brand__text p {
  margin: 4px 0 0 !important;
  font-size: 15px !important;
  color: var(--pr-muted) !important;
}

#logout {
  float: none !important;
  margin: 0 !important;
  padding: 12px 20px !important;
  border: 2px solid var(--pr-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--pr-text) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer;
}

#logout:hover {
  color: var(--pr-danger) !important;
  border-color: #fca5a5 !important;
  background: #fef2f2 !important;
}

/* ── Filtros (toolbar compacto) ── */
#search_panel {
  margin: 0 20px 16px;
}

#print_fieldset {
  display: block !important;
  width: 100% !important;
  float: none !important;
  border: none !important;
  margin: 0;
  padding: 0;
}

.pr-filter-card {
  background: #fff;
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-radius);
  box-shadow: var(--pr-shadow);
  padding: 18px 22px;
}

.pr-filter-card legend {
  display: none;
}

.pr-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr minmax(160px, 200px);
  gap: 12px 16px;
  align-items: end;
}

.pr-filter-grid > div label {
  display: block;
  font-size: 14px !important;
  font-weight: 700;
  color: var(--pr-text);
  margin-bottom: 6px;
}

.pr-filter-grid .form-control,
#print_fieldset select {
  width: 100% !important;
  height: 46px;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 2px solid var(--pr-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-size: var(--pr-text-base) !important;
  font-weight: 500;
  color: var(--pr-text) !important;
}

.pr-filter-inscripcion {
  margin: 0;
  padding: 0;
  border: none;
}

.pr-filter-btn-label {
  display: block;
  font-size: 14px !important;
  font-weight: 700;
  color: var(--pr-text);
  margin-bottom: 6px;
}

.pr-filter-inscripcion .help-block {
  display: none;
}

#btn_mostrar_inscripcion {
  margin: 0 !important;
  width: 100%;
  height: 46px;
  padding: 0 20px !important;
  border: none !important;
  border-radius: 8px !important;
  background: var(--pr-accent) !important;
  color: #fff !important;
  font-size: var(--pr-text-base) !important;
  font-weight: 700 !important;
  white-space: nowrap;
  cursor: pointer;
}

#btn_mostrar_inscripcion:hover {
  background: #0c8499 !important;
}

/* ── Tabla ── */
#coord_report_panel {
  float: none !important;
  width: 100% !important;
  padding: 0 20px 28px !important;
}

.pr-table-card {
  background: #fff;
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-radius);
  box-shadow: var(--pr-shadow);
  overflow: hidden;
}

#coord_report_type_header,
#coord_report_type_header.cl4 {
  margin: 0 !important;
  margin-left: 0 !important;
  padding: 14px 20px;
  font-size: var(--pr-text-lg) !important;
  font-weight: 800 !important;
  color: var(--pr-text) !important;
  border-bottom: 2px solid var(--pr-border);
  background: var(--pr-surface-2);
}

h3.cl4 {
  margin-left: 0 !important;
}

.pr-table-wrap {
  overflow-x: auto;
}

#coord_student_view_table {
  width: 100% !important;
  border: none !important;
  border-collapse: collapse !important;
  margin: 0 !important;
  table-layout: fixed;
}

#coord_student_view_table thead {
  background: var(--pr-primary) !important;
}

#coord_student_view_table thead th {
  padding: 12px 10px !important;
  border: none !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Anchos de columna */
#coord_student_view_table th:nth-child(1),
#coord_student_view_table td:nth-child(1) { width: 44px; text-align: center; }
#coord_student_view_table th:nth-child(2),
#coord_student_view_table td:nth-child(2) { width: 88px; }
#coord_student_view_table th:nth-child(3),
#coord_student_view_table td:nth-child(3) { width: 26%; }
#coord_student_view_table th:nth-child(4),
#coord_student_view_table td:nth-child(4) { width: 16%; }
#coord_student_view_table th:nth-child(5),
#coord_student_view_table td:nth-child(5),
#coord_student_view_table th:nth-child(6),
#coord_student_view_table td:nth-child(6),
#coord_student_view_table th:nth-child(7),
#coord_student_view_table td:nth-child(7) { width: 9%; font-size: 14px !important; }
#coord_student_view_table th:nth-child(8),
#coord_student_view_table td:nth-child(8) { width: 72px; text-align: center; }
#coord_student_view_table th:nth-child(9),
#coord_student_view_table td:nth-child(9),
#coord_student_view_table th:nth-child(10),
#coord_student_view_table td:nth-child(10) { width: 64px; text-align: center; }
#coord_student_view_table th:nth-child(11),
#coord_student_view_table td:nth-child(11),
#coord_student_view_table td.pr-col-portal {
  width: 120px;
  min-width: 120px;
  text-align: center;
  white-space: normal;
  overflow: visible;
}

#data_student_view_table td {
  padding: 11px 10px !important;
  border: none !important;
  border-bottom: 1px solid #e5eaf0 !important;
  vertical-align: middle;
  font-size: var(--pr-text-base) !important;
  font-weight: 500;
  color: var(--pr-text) !important;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}

#data_student_view_table td:nth-child(3) {
  font-weight: 600;
  white-space: nowrap;
}

#data_student_view_table tr:hover td {
  background: #edf4fc !important;
}

#data_student_view_table tr:nth-child(even) td {
  background: #fafbfd;
}

#data_student_view_table tr:nth-child(even):hover td {
  background: #edf4fc !important;
}

#data_student_view_table tr td.text-center {
  padding: 28px !important;
  font-size: var(--pr-text-base) !important;
  color: var(--pr-muted) !important;
}

/* Badges */
.pr-plan-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.3;
  background: var(--pr-primary-soft);
  color: var(--pr-primary);
}

.pr-plan-badge--pending {
  background: #fef3c7;
  color: #92400e;
}

/* Botones tabla */
.pr-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer;
}

.pr-action-btn--add {
  background: var(--pr-primary) !important;
  color: #fff !important;
}

.pr-action-btn--edit {
  background: #059669 !important;
  color: #fff !important;
}

.pr-action-btn--portal {
  background: #7c3aed !important;
  color: #fff !important;
  font-size: 12px !important;
  padding: 6px 10px !important;
  width: auto !important;
  min-width: 88px !important;
  height: auto !important;
  min-height: 36px !important;
  gap: 4px;
}

.pr-portal-status {
  color: #7c3aed;
  font-weight: 600;
}

.pr-modal-hint {
  font-size: 13px;
  color: #4b5563;
  margin: 0 0 12px;
}

.pr-form-row--checks {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.pr-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}

.pr-modal-status {
  margin-top: 8px;
  font-size: 13px;
  color: #1d4ed8;
}

.pr-action-btn i {
  font-size: 16px !important;
  color: #fff !important;
}

.pr-action-btn--add img,
.pr-action-btn--edit img,
.js-prorroga-btn img,
.js-correccion-btn img {
  display: none !important;
}

/* ── Modales ── */
#popup,
#popup2,
#popup3 {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 20px !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10050 !important;
  overflow-y: auto !important;
  background: rgba(17, 24, 39, 0.6) !important;
  backdrop-filter: blur(4px);
}

.content-pop {
  position: relative !important;
  width: 100% !important;
  max-width: 680px !important;
  min-width: 0 !important;
  margin: auto !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid var(--pr-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2) !important;
  overflow: hidden;
}

.pr-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--pr-border);
  background: var(--pr-surface-2);
}

.pr-modal-header #alumno_nombre,
.pr-modal-header #alumno_nombre2 {
  margin: 0 0 6px !important;
  font-size: var(--pr-text-lg) !important;
  font-weight: 800 !important;
  color: var(--pr-text) !important;
  line-height: 1.3 !important;
}

.pr-modal-header #alumno_plan,
.pr-modal-header #alumno_plan2 {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--pr-primary) !important;
}

.pr-modal-body { padding: 20px 24px; }

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

.pr-form-field label {
  display: block;
  margin: 0 0 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--pr-text) !important;
}

.content-pop input[type="text"],
.content-pop input[type="number"],
.content-pop input[type="date"],
.content-pop select {
  width: 100% !important;
  height: 46px;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 2px solid var(--pr-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-size: var(--pr-text-base) !important;
  color: var(--pr-text) !important;
}

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

#cerrarBtn,
#cerrarBtn2,
#guardarBtn,
#guardarBtn2 {
  position: static !important;
  height: 46px;
  padding: 0 22px !important;
  border-radius: 8px !important;
  font-size: var(--pr-text-base) !important;
  font-weight: 700 !important;
  cursor: pointer;
}

#cerrarBtn,
#cerrarBtn2 {
  background: #fff !important;
  color: var(--pr-text) !important;
  border: 2px solid var(--pr-border) !important;
}

#guardarBtn,
#guardarBtn2 {
  background: var(--pr-primary) !important;
  color: #fff !important;
  border: none !important;
}

/* ── Error ── */
#error {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20000;
  padding: 14px 24px;
  border-radius: 10px;
  background: #fef2f2 !important;
  border: 2px solid #fecaca;
}

#error span {
  font-size: var(--pr-text-base) !important;
  color: var(--pr-danger) !important;
  font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .pr-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pr-filter-inscripcion {
    grid-column: 1 / -1;
  }

  #coord_student_view_table {
    table-layout: auto;
    min-width: 900px;
  }
}

@media (max-width: 640px) {
  .pr-app-header {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  #search_panel,
  #coord_report_panel {
    margin-left: 12px;
    margin-right: 12px;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .pr-filter-grid {
    grid-template-columns: 1fr;
  }

  .pr-form-row {
    grid-template-columns: 1fr;
  }
}
