/* ============================================================
   Registro de alumnos y docentes — identidad institucional
   Estilos con prefijo rg- para no colisionar con style.css
   ============================================================ */

html.rg-active,
html.rg-active body {
  height: 100%;
}

html.rg-active body {
  background: #f6f7f9;
}

/* Neutraliza el layout de pantalla completa que trae el header */
html.rg-active .app-container--full {
  display: block;
  min-height: 100vh;
  background: none;
}

html.rg-active .main-content--full {
  display: block;
  min-height: 100vh;
  padding: 0;
}

.rg-page {
  --primary: #c8102e;
  --primary-dark: #a30d25;
  --primary-light: #fdf1f2;
  --danger: #c8102e;
  --danger-light: #fdf1f2;
  --success: #0f6b3d;
  --success-light: #e8f7ee;
  --gray-50: #f8fafc;
  --gray-100: #f2f4f7;
  --gray-200: #e4e7ec;
  --gray-300: #d0d5dd;
  --gray-400: #98a2b3;
  --gray-500: #667085;
  --gray-600: #475467;
  --gray-700: #344054;
  --gray-800: #1c2430;
  --radius: 12px;
  --radius-sm: 10px;
  --rg-navy: #0b1f3a;
  --rg-navy-2: #12325a;
  --rg-red: #c8102e;
  --rg-line: #e4e7ec;
  --rg-muted: #667085;
  --rg-font-ui: "Ubuntu Sans", "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --rg-font-display: "Ubuntu Sans", "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  font-family: var(--rg-font-ui);
  color: #1c2430;
  background: #f6f7f9;
  -webkit-font-smoothing: antialiased;
}

.rg-page,
.rg-page * {
  box-sizing: border-box;
}

/* ---------- Panel institucional ---------- */
.rg-brand {
  position: sticky;
  top: 0;
  flex: 0 0 38%;
  max-width: 540px;
  height: 100vh;
  padding: 48px 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #071525 0%, #0d2748 52%, #123a66 100%);
}

.rg-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 78%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 78%);
}

.rg-brand::after {
  content: "";
  position: absolute;
  top: -190px;
  right: -220px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 50%;
  box-shadow:
    0 0 0 80px rgba(255, 255, 255, .025),
    0 0 0 160px rgba(255, 255, 255, .018);
}

.rg-brand-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.rg-brand-logo {
  flex: 0 0 auto;
  width: 66px;
  height: 66px;
  padding: 5px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.rg-brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: contain;
}

.rg-brand-name {
  font-family: var(--rg-font-display);
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: .01em;
}

.rg-brand-name small {
  display: block;
  margin-top: 5px;
  font-family: var(--rg-font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

.rg-brand-middle {
  position: relative;
  z-index: 1;
  padding: 26px 0;
}

.rg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: #ffb3bd;
}

.rg-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--rg-red);
}

.rg-brand-middle h1 {
  margin: 0 0 14px;
  font-family: var(--rg-font-display);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.rg-brand-middle p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .70);
}

.rg-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.rg-steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.rg-step-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: #ffd7dd;
  font-size: 11px;
  font-weight: 700;
}

.rg-step-txt strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
}

.rg-step-txt small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .58);
}

.rg-brand-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  font-size: 11px;
  color: rgba(255, 255, 255, .55);
}

.rg-brand-bottom strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .86);
}

.rg-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: .02em;
  white-space: nowrap;
  color: rgba(255, 255, 255, .75);
}

.rg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #43d17c;
  box-shadow: 0 0 0 3px rgba(67, 209, 124, .15);
}

/* ---------- Contenido del formulario ---------- */
.rg-main {
  flex: 1;
  min-width: 0;
  padding: 40px 44px 48px;
  background: radial-gradient(120% 90% at 100% 0%, #fff 0%, #f7f8fa 60%, #eef1f5 100%);
}

.rg-main-inner {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.rg-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rg-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 24, 40, .10);
  animation: none;
  opacity: 1;
}

.rg-card::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--rg-navy) 0%, var(--rg-navy-2) 55%, var(--rg-red) 100%);
}

.rg-card .card-header {
  align-items: flex-start;
  padding: 26px 32px 20px;
  border-bottom: 1px solid #eef1f5;
  background: #fff;
}

.rg-card-header h3 {
  margin: 2px 0 6px;
  font-family: var(--rg-font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--rg-navy);
}

.rg-kicker {
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rg-red);
}

.rg-card-sub {
  max-width: 520px;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--rg-muted);
}

.rg-back-btn {
  flex: 0 0 auto;
  margin-top: 3px;
}

.rg-card .card-body {
  padding: 24px 32px 30px;
}

.rg-card h4,
.rg-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rg-line);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--rg-navy-2);
}

.rg-card h4 i,
.rg-section-title i {
  font-size: 13px;
  color: var(--rg-red);
}

/* Formularios */
.rg-page .form-group {
  margin-bottom: 16px;
}

.rg-page .form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #344054;
}

.rg-page .form-label .required,
.rg-page .required {
  color: var(--rg-red);
}

.rg-page .form-control {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--rg-line);
  border-radius: 10px;
  background: #fff;
  color: #1c2430;
  font-family: var(--rg-font-ui);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}

.rg-page .form-control:focus {
  outline: none;
  border-color: var(--rg-navy-2);
  box-shadow: 0 0 0 4px rgba(18, 50, 90, .10);
}

.rg-page .form-control::placeholder {
  color: #98a2b3;
}

/* Los selects usan la flecha nativa del navegador (ver style.css). */
.rg-page select.form-control {
  color-scheme: light;
}

.rg-page textarea.form-control {
  min-height: 84px;
}

.rg-page input[type="file"].form-control {
  min-height: 0;
  padding: 8px 10px;
  background: #fbfcfd;
  font-size: 12.5px;
}

.rg-page input[type="file"].form-control::file-selector-button {
  margin-right: 10px;
  padding: 6px 11px;
  border: 1px solid var(--rg-line);
  border-radius: 7px;
  background: #f2f4f7;
  color: #344054;
  font-family: var(--rg-font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.rg-page input[type="radio"],
.rg-page input[type="checkbox"] {
  accent-color: var(--rg-red);
}

.rg-page .form-row {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 16px;
}

.rg-page .form-hint {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #98a2b3;
}

.rg-page .form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--rg-line);
}

.rg-page .btn {
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.rg-page .btn-primary {
  background: var(--rg-red);
  box-shadow: 0 8px 18px rgba(200, 16, 46, .18);
}

.rg-page .btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 10px 22px rgba(200, 16, 46, .24);
}

.rg-page .btn-secondary {
  border: 1px solid var(--rg-line);
  background: #f2f4f7;
  color: #344054;
}

.rg-page .btn-secondary:hover {
  background: #e9edf2;
}

.rg-page .btn-sm {
  padding: 8px 12px;
  font-size: 12px;
}

.rg-page .btn-lg {
  padding: 13px 22px;
  font-size: 14px;
}

.rg-page .alert {
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}

.rg-page .alert-error {
  border: 1px solid #f3c3c9;
  background: #fdf1f2;
  color: #9f1226;
}

.rg-page .alert-success {
  border: 1px solid #bfe8ce;
  background: #e8f7ee;
  color: #0f6b3d;
}

.rg-page .alert i {
  margin-top: 2px;
}

.rg-page .badge-primary {
  border: 1px solid #d8e1ec;
  background: #eef2f8;
  color: var(--rg-navy-2);
}

.rg-page .comm-checklist {
  scrollbar-width: thin;
}

.rg-legal {
  margin: 22px 0 0;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.6;
  color: #98a2b3;
}

.rg-legal span {
  font-weight: 600;
  color: #667085;
}

/* ---------- Adaptación a tablets y móviles ---------- */
@media (max-width: 1024px) {
  .rg-page {
    flex-direction: column;
    align-items: stretch;
  }

  .rg-brand {
    position: relative;
    flex: none;
    width: 100%;
    max-width: none;
    height: auto;
    padding: 22px 22px 24px;
  }

  .rg-brand-middle {
    margin-top: 16px;
    padding: 0;
  }

  .rg-brand-middle h1 {
    margin-bottom: 0;
    font-size: 28px;
  }

  .rg-brand-middle p,
  .rg-steps,
  .rg-brand-bottom {
    display: none;
  }

  .rg-eyebrow {
    margin-bottom: 10px;
    font-size: 9.5px;
  }

  .rg-main {
    padding: 24px 18px 40px;
  }

  .rg-main-inner {
    max-width: 720px;
  }

  .rg-card .card-header {
    padding: 22px 20px 18px;
  }

  .rg-card-header h3 {
    font-size: 24px;
  }

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

@media (max-width: 560px) {
  .rg-brand-logo {
    width: 58px;
    height: 58px;
  }

  .rg-brand-name {
    font-size: 16px;
  }

  .rg-brand-middle h1 {
    font-size: 24px;
  }

  .rg-card .card-header {
    flex-direction: column;
    gap: 10px;
  }

  .rg-card-header h3 {
    font-size: 22px;
  }

  .rg-card .card-body {
    padding: 18px 16px 22px;
  }

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

  .rg-page .form-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .rg-legal {
    margin-top: 18px;
  }
}

/* ---------- Paneles cortos en escritorio ---------- */
@media (min-width: 1025px) and (max-height: 780px) {
  .rg-brand {
    padding: 32px 40px 30px;
  }

  .rg-brand-middle h1 {
    font-size: 32px;
  }

  .rg-brand-middle p {
    font-size: 13px;
  }

  .rg-steps {
    gap: 9px;
    margin-top: 18px;
  }
}

@media (min-width: 1025px) and (max-height: 680px) {
  .rg-brand-middle p {
    display: none;
  }

  .rg-brand-middle h1 {
    font-size: 28px;
    margin-bottom: 0;
  }

  .rg-steps {
    gap: 7px;
    margin-top: 14px;
  }

  .rg-step-txt small {
    display: none;
  }
}
