:root {
  color-scheme: only light;
  --verde: #004231;
  --verde-oscuro: #0a5725;
  --amarillo: #f6c200;
  --fondo: #f3f3f3;
  --tarjeta: #ffffff;
  --texto: #2a2a2a;
  --muted: #6b6b6b;
  --linea: #e2e2e2;
  --campo: #d5d5d5;
  --boton: #4caf50;
  --boton-hover: #43a047;
  --rojo: #c62828;
  --aviso-fondo: #fdecec;
  --aviso-borde: #f0c2c2;
  --info-fondo: #e7f5fa;
  --info-borde: #b9dce8;
  --info-titulo: #0c6f8c;
  --sombra: 0 1px 3px rgba(0, 0, 0, 0.08);
  --ancho: 1240px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #f3f3f3;
  color: #2a2a2a;
  color-scheme: only light;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  min-height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
  font-size: 14px;
  color-scheme: only light;
  background-color: #fff;
  color: #2a2a2a;
}

.cabecera {
  background: var(--verde);
  color: #fff;
}

.cabecera-inner {
  min-height: 68px;
  padding: 8px 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.logo {
  height: 25px;
  width: 136px;
  max-width: none;
  object-fit: none;
  justify-self: start;
  display: block;
}

.marca-carpeta {
  margin: 0;
  justify-self: center;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.sesion {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sesion-datos {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.sesion-nombre {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.2;
}

.sesion-cerrar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.sesion-cerrar:hover {
  text-decoration: underline;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.barra {
  background: var(--amarillo);
  color: #3a3a3a;
  font-size: 13px;
}

.barra-inner {
  padding: 6px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.barra-correo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.idioma {
  border: 0;
  background: transparent;
  color: #3a3a3a;
  font-size: 13px;
  cursor: pointer;
}

.contenedor {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 16px 18px 40px;
}

.ruta-bar {
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  min-height: 42px;
  padding: 5px 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
  overflow: visible;
}

.chev {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #67b33a;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  height: 32px;
  white-space: nowrap;
  padding: 0 20px 0 12px;
  margin-right: 4px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}

.chev + .chev {
  padding-left: 20px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
}

.ruta-actual {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  color: #333;
  font-size: 14px;
}

.contenedor-angosto {
  max-width: 560px;
}

.contenedor-medio {
  max-width: 860px;
}

.tarjeta {
  background: var(--tarjeta);
  border: 1px solid #ececec;
  box-shadow: var(--sombra);
  padding: 22px 26px 26px;
}

.tarjeta h1 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 700;
}

.campo {
  margin-bottom: 14px;
}

.campo label {
  display: block;
  margin-bottom: 4px;
  color: #4d4d4d;
  font-size: 13px;
}

.campo input,
.campo select {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--campo);
  border-radius: 2px;
  background: #fff;
  color: var(--texto);
}

.campo input:focus,
.campo select:focus,
.idioma:focus {
  outline: 2px solid #b7dfb9;
  border-color: #7dbe80;
}

.notas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.nota-box {
  background: #f3f3f3;
  border: 1px solid #e6e6e6;
  min-height: 74px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.nota-box strong {
  display: block;
  font-size: 16px;
}

.nota-box span,
.nota-box small {
  display: block;
  color: #444;
  font-size: 13px;
}

.ayuda {
  margin: 10px 0 16px;
  color: #555;
  font-size: 12.5px;
}

.centro {
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--boton);
  color: #fff;
  border: 0;
  border-radius: 4px;
  min-width: 118px;
  height: 36px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  background: var(--boton-hover);
}

.migas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.miga {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--verde);
  color: #fff;
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 700;
}

.miga.actual {
  background: #fff;
  color: #333;
  border: 1px solid #cfcfcf;
  font-weight: 600;
}

.flecha {
  color: var(--verde);
  font-size: 16px;
  font-weight: 700;
}

.linea-examen {
  margin: 0 0 14px;
  font-size: 14px;
}

.tabla-scroll {
  width: 100%;
  max-width: none;
  overflow: visible;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}

.tabla-simple {
  min-width: 760px;
}

th,
td {
  border: 1px solid #cfcfcf;
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
}

thead th {
  background: #fafafa;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.grupos th {
  background: #f3f3f3;
  font-size: 12px;
}

.materia {
  text-align: center;
  line-height: 1.25;
}

.nombre {
  text-align: center;
  line-height: 1.25;
}

.nota-ok {
  background: #2e9d4a;
  color: #fff;
  font-weight: 700;
}

.btn-tabla {
  margin-top: 16px;
}

.aviso {
  background: var(--aviso-fondo);
  border: 1px solid var(--aviso-borde);
  color: #a32020;
  padding: 16px 18px;
  margin-bottom: 16px;
  font-size: 15px;
}

.aviso p {
  margin: 0;
}

.bloque-examen {
  border: 1px solid #e4e4e4;
  padding: 28px 22px 24px;
  text-align: center;
}

.bloque-examen h2 {
  margin: 0 0 22px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
}

.sigla {
  margin: 0 0 18px;
  font-size: 18px;
}

.programada {
  margin: 0;
  color: var(--rojo);
  font-weight: 700;
  font-size: 18px;
}

.programada-fecha {
  margin: 2px 0 18px;
  color: var(--rojo);
  font-size: 16px;
}

.info {
  max-width: 520px;
  margin: 0 auto 26px;
  background: var(--info-fondo);
  border: 1px solid var(--info-borde);
  border-radius: 8px;
  padding: 18px 16px 16px;
  text-align: center;
}

.info h3 {
  margin: 0 0 12px;
  color: var(--info-titulo);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.info .destacado {
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 16px;
  line-height: 1.35;
}

.info p {
  margin: 3px 0;
  font-size: 16px;
}

.sin-intento {
  margin: 8px auto 28px;
  max-width: 420px;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.3;
}

.historial {
  text-align: left;
  margin-top: 8px;
}

.historial h3 {
  margin: 0 0 10px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 800px) {
  .cabecera-inner,
  .barra-inner {
    padding-left: 10px;
    padding-right: 10px;
  }

  .marca-carpeta {
    font-size: 12px;
    letter-spacing: 0.3px;
  }

  .bloque-examen h2 {
    font-size: 22px;
  }

  .sin-intento {
    font-size: 18px;
  }
}

@media (max-width: 700px) {
  .cabecera-inner {
    min-height: 68px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "logo titulo avatar"
      "logo datos avatar";
    align-items: center;
    column-gap: 8px;
    row-gap: 1px;
    padding: 6px 8px;
  }

  .logo {
    grid-area: logo;
    width: 96px;
    height: 34px;
    max-width: none;
    object-fit: contain;
    object-position: left center;
  }

  .marca-carpeta {
    grid-area: titulo;
    justify-self: stretch;
    align-self: end;
    text-align: left;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
    padding-left: 2px;
  }

  .sesion {
    display: contents;
  }

  .sesion-datos {
    grid-area: datos;
    align-items: flex-start;
    align-self: start;
    text-align: left;
    width: 100%;
  }

  .sesion-nombre {
    width: 100%;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    white-space: nowrap;
  }

  .sesion-cerrar {
    justify-content: flex-start;
    width: auto;
    font-size: 11px;
    letter-spacing: 0.2px;
  }

  .avatar {
    grid-area: avatar;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #cfd3d6;
    align-self: center;
  }

  .barra-inner {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .barra-correo {
    flex: 1;
    min-width: 0;
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .idioma {
    flex: 0 0 auto;
    font-size: 11px;
    margin-left: auto;
  }

  .contenedor {
    padding: 16px 10px 32px;
  }

  .tarjeta,
  .bloque-examen {
    padding: 16px 12px 18px;
  }

  .notas {
    grid-template-columns: 1fr;
  }

  .bloque-examen h2,
  .sigla,
  .programada {
    font-size: 18px;
  }

  .info .destacado,
  .info p {
    font-size: 15px;
  }
}
