/* Estilos de aulapp.cl. El ingreso copia el de la app móvil de Aulapp (repo
   Aulapp/app2026, apps/web: globals.css .auth-* + native-app.css): fondo blanco y
   solo el cuadro, centrado. Las pantallas con sesión copian el AppShell de la app
   (menú lateral, barra y menú de usuario), sus cuadros de curso (.course-world) y
   su Aula digital (.wall-*), con los colores de .app-shell-kinetic. */
:root {
  --kc-primary: #ff6115;
  --kc-primary-text: #a83900;
  --kc-charcoal: #1a2130;
  --kc-background: #faf8ff;
  --kc-surface-container-low: #f2f3ff;
  --kc-surface-container-high: #e2e7ff;
  --kc-border: #e4e7f6;
  --kc-text: #131b2e;
  --kc-text-muted: #5a4137;
  --kc-shadow-sm: 0 1px 2px rgba(19, 27, 46, 0.05), 0 0 0 1px rgba(19, 27, 46, 0.035);
  --kc-shadow-md: 0 4px 6px -1px rgba(19, 27, 46, 0.08), 0 2px 4px -2px rgba(19, 27, 46, 0.05);
  --color-tinta: #131b2e;
  --color-tinta-suave: #5f6974;
  --color-fondo: #f2f3ff;
  --color-linea: #e4e7f6;
  --color-critico: #ba1a1a;
  /* Color de los cursos en la app (azul tinta): -a es la punta clara del degradado. */
  --world-curso-a: #5b82ad;
  --world-curso-b: #1f3f66;
  --motion-fast: 300ms;
  --motion-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
}

body {
  color: #1e252d;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

input, button { font: inherit; color: inherit; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  background: #ffffff;
}

.auth-panel-inner {
  width: 100%;
  max-width: 400px;
}

.auth-form-card {
  animation: auth-card-in 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 150ms backwards;
}

@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.auth-form-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  margin-bottom: 2rem;
}

.auth-form-title {
  margin: 0 0 0.4rem;
  line-height: 1.1;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #1e252d;
}

.auth-form-sub {
  margin: 0;
  color: #5f6974;
  line-height: 1.5;
  font-size: 15px;
}

.auth-form-icon {
  order: -1;
  width: 76px;
  height: 76px;
  border-radius: 20px;
  flex-shrink: 0;
  box-shadow: 0 14px 30px -14px rgba(255, 97, 21, 0.75);
  animation:
    app-icon-pop 650ms var(--motion-ease) backwards,
    app-icon-float 4.5s ease-in-out 650ms infinite;
}

@keyframes app-icon-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.82) rotate(8deg); }
  to { opacity: 1; transform: none; }
}

@keyframes app-icon-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    box-shadow: 0 14px 30px -14px rgba(255, 97, 21, 0.75);
  }
  50% {
    transform: translateY(-9px) rotate(-6deg);
    box-shadow: 0 26px 38px -18px rgba(255, 97, 21, 0.5);
  }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 15px;
  font-weight: 600;
}

.auth-field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.auth-field-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1e252d;
}

.auth-link-small {
  font-size: 13px;
  font-weight: 600;
  color: var(--kc-primary);
  text-decoration: none;
}

.auth-link-small:hover { text-decoration: underline; }

.auth-input {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.95rem;
  border: 1.5px solid #e2dccf;
  border-radius: 14px;
  background: #fcfbf8;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.auth-input:hover { border-color: #cfc6b4; }

.auth-input:focus-within {
  border-color: var(--kc-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 97, 21, 0.14);
}

.auth-input > .material-symbols-outlined {
  font-size: 20px;
  color: #9aa3ad;
  transition: color var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease);
}

.auth-input:focus-within > .material-symbols-outlined {
  color: var(--kc-primary);
  transform: scale(1.1);
}

.auth-input input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.95rem 0;
  font-size: 16px;
  font-weight: 400;
  box-shadow: none;
  outline: none;
}

.auth-eye {
  display: inline-flex;
  border: none;
  background: transparent;
  padding: 4px;
  border-radius: 8px;
  color: #9aa3ad;
  cursor: pointer;
  transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.auth-eye:hover { color: #1e252d; background: #f0eee6; }
.auth-eye .material-symbols-outlined { font-size: 20px; }

.auth-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 14px;
  animation: motion-rise var(--motion-fast) var(--motion-ease) backwards;
}

.auth-notice[hidden] { display: none; }
.auth-notice .material-symbols-outlined { font-size: 19px; }

@keyframes motion-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.auth-submit {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  margin-top: 0.4rem;
  padding: 1rem 1.2rem;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff7a2f 0%, #ff6115 50%, #f04e05 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px -12px rgba(255, 97, 21, 0.75);
  transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) ease;
}

.auth-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.35) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 700ms ease;
}

.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -14px rgba(255, 97, 21, 0.85); }
.auth-submit:hover::after { transform: translateX(120%); }
.auth-submit:active { transform: scale(0.97); }

.auth-submit .material-symbols-outlined {
  font-size: 20px;
  transition: transform var(--motion-fast) var(--motion-ease);
}

.auth-submit:hover .material-symbols-outlined { transform: translateX(4px); }


/* ------------------------------------------------------------ Google */

.auth-google {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0.9rem 1.2rem;
  border: 1.5px solid #e2dccf;
  border-radius: 14px;
  background: #fff;
  color: #1e252d;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease);
}

.auth-google:hover { border-color: #cfc6b4; box-shadow: 0 10px 24px -16px rgba(30, 37, 45, 0.45); transform: translateY(-1px); }
.auth-google:active { transform: scale(0.98); }
.auth-google:focus-visible { outline: none; border-color: var(--kc-primary); box-shadow: 0 0 0 4px rgba(255, 97, 21, 0.14); }
.auth-google svg { width: 20px; height: 20px; flex-shrink: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.4rem 0;
  color: #9aa3ad;
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ebe5da;
}

/* ------------------------------------------------------------ Errores */

.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 14px;
  animation: motion-rise var(--motion-fast) var(--motion-ease) backwards;
}

.auth-error[hidden] { display: none; }
.auth-error .material-symbols-outlined { font-size: 19px; }

.auth-form-card.is-error { animation: auth-shake 420ms cubic-bezier(0.36, 0.07, 0.19, 0.97); }

@keyframes auth-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

.auth-submit:disabled { opacity: 0.75; cursor: progress; transform: none; }

/* Mientras se revisa si ya hay sesión, la pantalla no se muestra. */
.is-checking { visibility: hidden; }

/* -------------------------------- Menú lateral, barra y menú de usuario
   Copia del AppShell de la app (packages/ui + globals.css .app-shell-kinetic):
   barra superior con el logo, menú lateral oscuro contraído a íconos que se
   despliega al pasar el cursor (o queda fijo con las tres rayitas) y, en el
   teléfono, el mismo menú abajo. Lo arma A.iniciar (app.js). */

html.con-menu, html.con-menu body { background: var(--kc-background); }

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--kc-background);
  font-feature-settings: "cv11", "ss01";
  text-rendering: optimizeLegibility;
}

.app-topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  height: 84px;
  padding: 0 1.25rem;
  background: rgba(250, 248, 255, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.app-topbar-start { display: flex; align-items: center; gap: 6px; min-width: 0; }
.app-topbar-brand { display: inline-flex; align-items: center; border-radius: 6px; text-decoration: none; }
.app-topbar-brand:focus-visible { outline: 2px solid var(--kc-primary); outline-offset: 2px; }
.app-topbar-logo { display: block; width: auto; height: 66px; transition: transform var(--motion-fast) var(--motion-ease); }
.app-topbar-brand:hover .app-topbar-logo { transform: scale(1.04); }
.app-topbar-icon { display: none; }

.app-sidenav-toggle { display: none; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border: none; border-radius: 10px; background: transparent; color: var(--kc-text); cursor: pointer; transition: background-color var(--motion-fast) ease; }
.app-sidenav-toggle:hover, .app-sidenav-toggle[aria-pressed="true"] { background: var(--kc-surface-container-low); }
.app-sidenav-toggle:focus-visible { outline: 2px solid var(--kc-primary); outline-offset: 2px; }
.app-sidenav-toggle .material-symbols-outlined { font-size: 24px; }

.app-body { flex: 1; display: flex; min-height: 0; }
.app-sidenav { display: none; }
.app-bottomnav { display: none; }

.app-content {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 2rem 2.5rem;
  background: var(--kc-background);
  color: var(--kc-text);
  font-size: 14px;
  line-height: 20px;
}

@media (min-width: 768px) {
  .app-topbar { padding-left: 14px; }
  .app-sidenav-toggle { display: inline-flex; }

  .app-sidenav {
    --sidenav-rail: 68px;
    --sidenav-open: 256px;
    position: relative;
    z-index: 15;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: var(--sidenav-rail);
    padding: 1rem 0.75rem;
    overflow: hidden auto;
    background: var(--kc-charcoal);
    transition: width 0.22s var(--motion-ease);
  }

  html[data-sidenav-hover="1"] .app-sidenav,
  .app-sidenav:has(:focus-visible) { width: var(--sidenav-open); transition-delay: 90ms; }
  html[data-sidenav="open"] .app-sidenav { width: var(--sidenav-open); }

  .app-sidenav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    color: rgba(234, 237, 255, 0.72);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
  }

  .app-sidenav a:hover { background: rgba(234, 237, 255, 0.08); color: #fff; }
  .app-sidenav a.is-active { background: var(--kc-primary); color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
  .app-sidenav a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

  .app-sidenav-icon { flex-shrink: 0; font-size: 19px; transition: transform var(--motion-fast) var(--motion-ease); }
  .app-sidenav a:hover .app-sidenav-icon { transform: translateX(2px) scale(1.08); }
  .app-sidenav a.is-active .app-sidenav-icon { transform: scale(1.05); }
  html:not([data-sidenav="open"]):not([data-sidenav-hover="1"]) .app-sidenav:not(:has(:focus-visible)) a .app-sidenav-icon { transform: none; }

  .app-sidenav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateX(-6px); transition: opacity 0.16s ease, transform 0.2s var(--motion-ease); }
  html[data-sidenav-hover="1"] .app-sidenav .app-sidenav-label,
  .app-sidenav:has(:focus-visible) .app-sidenav-label,
  html[data-sidenav="open"] .app-sidenav-label { opacity: 1; transform: none; transition-delay: 90ms; }
}

@media (max-width: 767px) {
  .app-body { flex-direction: column; }
  .app-content { padding: 1rem 1rem 1.5rem; }
  .app-topbar-logo { display: none; }
  .app-topbar-icon { display: block; width: 56px; height: 56px; margin: -4px -6px; }

  .app-bottomnav {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--kc-charcoal);
  }

  .app-bottomnav::-webkit-scrollbar { display: none; }

  .app-bottomnav a {
    flex: 1 0 auto;
    min-width: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.6em 0.25em;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11.5px;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--motion-fast) ease;
  }

  .app-bottomnav a.is-active { color: var(--kc-primary); }
  .app-bottomnav-icon { font-size: 22px; }
}

@media (max-width: 640px) {
  .app-topbar { height: 68px; }
}

.app-user { position: relative; display: flex; align-items: center; gap: 4px; }
.app-user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--kc-text); font: inherit; font-weight: 600; cursor: pointer; }
.app-user-btn:hover, .app-user-btn[aria-expanded="true"] { background: var(--kc-surface-container-low); border-color: var(--kc-border); }
.app-user-avatar { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; transition: transform var(--motion-fast) var(--motion-ease); }
.app-user-btn:hover .app-user-avatar { transform: scale(1.06); }
.app-user-initials { display: inline-flex; align-items: center; justify-content: center; background: var(--kc-primary); color: #fff; font-size: 13px; font-weight: 700; }
.app-user-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.app-user-caret { display: inline-block; font-size: 11px; color: #6b7a89; transition: transform var(--motion-fast) var(--motion-ease); }
.app-user-btn[aria-expanded="true"] .app-user-caret { transform: rotate(180deg); }
.app-user-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 220px; max-width: calc(100vw - 32px); padding: 6px; border: 1px solid var(--kc-border); border-radius: 10px; background: #fff; box-shadow: var(--kc-shadow-md); font-size: 14px; line-height: 20px; transform-origin: top right; animation: motion-pop var(--motion-fast) var(--motion-ease) backwards; }
.app-user-menu[hidden] { display: none; }
.app-user-menu-head { margin-bottom: 4px; padding: 8px 10px 10px; border-bottom: 1px solid var(--kc-border); font-size: 13px; }
.app-user-menu-head strong, .app-user-menu-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user-menu-head small { color: var(--color-tinta-suave); font-size: 12.5px; }
.app-user-menu-role { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--kc-surface-container-high); color: var(--kc-text); font-size: 11.5px; font-weight: 700; }
.app-user-menu a, .app-user-menu button { display: block; width: 100%; padding: 9px 10px; border: none; border-radius: 8px; background: transparent; color: var(--kc-text); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.app-user-menu a:hover, .app-user-menu button:hover { background: var(--kc-surface-container-low); }
.app-user-menu .is-danger { color: var(--color-critico); }
@media (max-width: 640px) { .app-user-name { display: none; } }

@keyframes motion-pop {
  from { opacity: 0; transform: translateY(-4px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* Encabezado de página, como en la app: etiqueta con punto, título y bajada. */
.pagina { max-width: 1180px; min-width: 0; animation: motion-rise 420ms var(--motion-ease) backwards; }
.page-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0.5rem; padding: 3px 10px; border-radius: 12px; background: var(--kc-surface-container-high); color: var(--kc-text-muted); font-size: 11px; font-weight: 500; line-height: 14px; letter-spacing: 0.05em; text-transform: uppercase; }
.page-eyebrow::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--kc-primary); }
.app-content h1 { margin: 0 0 0.25rem; color: var(--kc-text); font-size: 36px; font-weight: 700; line-height: 44px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.page-subtitle { max-width: 72ch; margin: 0.15rem 0 1.25rem; color: var(--kc-text-muted); font-size: 14px; line-height: 20px; }
.pagina-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0 20px; }
.pagina-head > .btn { margin-bottom: 1.25rem; }
@media (max-width: 767px) { .app-content h1 { font-size: 28px; line-height: 36px; } }

/* ------------------------------------------------ Piezas compartidas */

/* Como .app-shell-kinetic .card en la app: blanca, sin borde a la vista, sombra suave. */
.card { background: #fff; border: 1px solid transparent; border-radius: 12px; box-shadow: var(--kc-shadow-sm); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0.5rem 1rem; border-radius: 12px; border: 1.5px solid transparent; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) ease, background-color var(--motion-fast) ease, border-color var(--motion-fast) ease; }
.btn .material-symbols-outlined { font-size: 19px; }
.btn-primario { background: linear-gradient(135deg, #ff7a2f 0%, #ff6115 50%, #f04e05 100%); color: #fff; box-shadow: 0 10px 22px -12px rgba(255, 97, 21, 0.75); }
.btn-primario:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(255, 97, 21, 0.85); }
.btn-secundario { background: #fff; color: var(--color-tinta); border-color: #e2dccf; }
.btn-secundario:hover { border-color: #cfc6b4; background: var(--color-fondo); }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.btn-peligro { background: transparent; border: none; color: var(--color-critico); font-weight: 600; }
.btn-peligro:hover { background: color-mix(in srgb, var(--color-critico) 8%, transparent); }

.campos { display: grid; gap: 14px; }
.campos-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo[hidden] { display: none; }
.campo > span { color: var(--kc-text); font-size: 13.5px; font-weight: 600; line-height: 18px; }
.campo > span small { margin-left: 4px; color: var(--color-tinta-suave); font-size: 12.5px; font-weight: 500; }
.campo input, .campo textarea, .campo select { width: 100%; min-width: 0; min-height: 46px; padding: 0.7rem 0.9rem; border: 1px solid transparent; border-radius: 12px; background: var(--kc-surface-container-low); color: var(--kc-text); font: inherit; font-size: 15px; line-height: 22px; transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background-color var(--motion-fast) ease; }
.campo input::placeholder, .campo textarea::placeholder { color: #8a90a6; }
.campo input:hover, .campo textarea:hover, .campo select:hover { background: #eceefd; }
.campo textarea { min-height: 96px; resize: vertical; }
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: none; border-color: var(--kc-primary); background: #fff; box-shadow: 0 0 0 4px rgba(255, 97, 21, 0.14); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--kc-primary); }
.acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acciones .espacio { flex: 1; }
.muted { color: var(--color-tinta-suave); }
.aviso-ok { margin: 0; padding: 0.7rem 0.9rem; border-radius: 10px; background: #e3f5ea; color: #1f7a44; font-size: 14px; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: #f1f3f5; color: var(--color-tinta); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tag .material-symbols-outlined { font-size: 15px; }
.tag-warn { background: #fff1e1; color: #8a4b00; }
.tag-ok { background: #e3f5ea; color: #1f7a44; }
.tag-solid { background: var(--kc-primary); color: #fff; }

.vacio { text-align: center; padding: 2.5rem 1rem; color: var(--color-tinta-suave); }
.vacio > .material-symbols-outlined { display: block; font-size: 40px; margin-bottom: 8px; color: var(--kc-primary); }
.vacio p { margin: 16px 0 0; }

/* ------------------------------------------------- Inicio y Cursos
   Mosaico de cursos: copia de «Mis cursos» del docente en la app (.my-courses y
   la tarjeta compacta de mundo, .course-world.my-course, en el color de los
   cursos .w-curso). */

.seccion { margin-top: 1.75rem; }
.seccion:first-child { margin-top: 0.5rem; }
.seccion-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.seccion-head h2 { margin: 0; font-size: 24px; font-weight: 600; line-height: 32px; letter-spacing: -0.015em; }
.grupo-titulo { margin: 0 0 12px; font-size: 18px; font-weight: 600; line-height: 26px; }
.grupo-titulo small { margin-left: 6px; color: var(--kc-text-muted); font-size: 13px; font-weight: 500; }
.seccion-mas { margin: 16px 0 0; }
.seccion-mas a { display: inline-flex; align-items: center; gap: 4px; color: var(--kc-primary-text); font-weight: 700; text-decoration: none; }
.seccion-mas a:hover { text-decoration: underline; }
.seccion-mas .material-symbols-outlined { font-size: 18px; }
@media (max-width: 767px) { .seccion-head h2 { font-size: 20px; line-height: 28px; } }

.my-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 22px; margin-top: 8px; }
.w-curso { --world-color: var(--world-curso-b); --world-grad: linear-gradient(135deg, var(--world-curso-a), var(--world-curso-b)); --world-shadow: color-mix(in srgb, var(--world-curso-b) 35%, transparent); }
.course-world { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 24px 22px 20px; overflow: hidden; border-radius: 20px; color: inherit; text-decoration: none; transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s; }
.course-world::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--world-grad); opacity: 0; transition: opacity 0.2s; }
.course-world:hover { border-color: color-mix(in srgb, var(--world-color) 45%, transparent); box-shadow: 0 14px 34px -12px var(--world-shadow); transform: translateY(-3px); }
.course-world:hover::after { opacity: 1; }
.course-world:focus-visible { outline: 2px solid var(--world-color); outline-offset: 3px; }
.course-world-tile { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 52px; height: 52px; margin: 0 0 6px; border-radius: 15px; background: var(--world-grad); box-shadow: 0 8px 18px -8px var(--world-shadow); color: #fff; }
.course-world-tile .material-symbols-outlined { font-size: 28px; font-variation-settings: "FILL" 1, "wght" 500, "opsz" 40; }
.course-world-title { color: var(--kc-text); font-size: 22px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.course-world-desc { color: var(--kc-text-muted); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.course-world-includes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.course-world-includes span { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--world-color) 9%, transparent); color: color-mix(in srgb, var(--world-color) 80%, var(--kc-text)); font-size: 12px; font-weight: 600; }
.course-world-foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--kc-border); }
.course-world-fact { flex: 1; min-width: 0; color: var(--kc-text); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.course-world-enter { display: inline-flex; align-items: center; gap: 4px; color: var(--world-color); font-size: 14px; font-weight: 700; white-space: nowrap; }
.course-world-enter .material-symbols-outlined { font-size: 18px; transition: transform 0.15s; }
.course-world:hover .course-world-enter .material-symbols-outlined { transform: translateX(3px); }
@media (max-width: 640px) {
  .my-courses { gap: 14px; }
  .course-world { padding: 20px 18px 18px; }
  .course-world-title { font-size: 19px; }
}

.buscador { display: flex; align-items: center; gap: 8px; max-width: 420px; margin: 0 0 18px; padding: 0 12px; border: 1.5px solid var(--kc-border); border-radius: 12px; background: #fff; transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.buscador:focus-within { border-color: var(--kc-primary); box-shadow: 0 0 0 4px rgba(255, 97, 21, 0.14); }
.buscador .material-symbols-outlined { color: #9aa3ad; font-size: 20px; }
.buscador input { flex: 1; min-width: 0; padding: 0.65rem 0; border: none; outline: none; background: transparent; font: inherit; font-size: 15px; }

.curso-form { padding: 20px; margin-bottom: 14px; }
.curso-form h3 { margin: 0 0 4px; font-size: 18px; }
.curso-form > p { margin: 0 0 16px; font-size: 14px; color: var(--color-tinta-suave); }

/* --------------------------------------------------------------- Curso */

.volver { display: inline-flex; align-items: center; gap: 4px; color: var(--color-tinta-suave); font-size: 14px; font-weight: 600; text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.volver:hover { color: var(--kc-primary); }
.volver .material-symbols-outlined { font-size: 18px; }
.curso-head { margin: 14px 0 18px; }
.app-content .curso-head h1 { margin: 0 0 6px; }
.curso-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--color-tinta-suave); font-size: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-linea); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: none; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--color-tinta-suave); padding: 10px 12px; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab:hover { color: var(--color-tinta); }
.tab.is-active { color: var(--color-tinta); border-bottom-color: var(--kc-primary); }

.aula-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .aula-grid { grid-template-columns: minmax(0, 1fr); } }
.aula-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.side-card { padding: 16px 18px; }
.side-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.side-card h2 .material-symbols-outlined { font-size: 20px; color: var(--kc-primary); }
.side-card.is-hot { border-color: color-mix(in srgb, var(--kc-primary) 45%, transparent); }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.side-list a, .side-list div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; color: inherit; text-decoration: none; min-width: 0; }
.side-list a:hover { background: var(--color-fondo); }
.side-list strong { font-size: 14px; overflow-wrap: anywhere; }
.side-list small { font-size: 12.5px; color: var(--color-tinta-suave); }
.side-empty { margin: 0; font-size: 13.5px; color: var(--color-tinta-suave); }

/* ------------------------------------------------- Aula digital (muro)
   Copia de la app (globals.css .wall-*): mismos cuadros, íconos y detalle. */

.wall-composer { padding: 0.9rem 1rem 1rem; border-radius: 14px; margin-bottom: 18px; }
.wall-composer-head { display: flex; gap: 10px; align-items: center; }
.wall-composer-prompt { flex: 1; min-width: 0; text-align: left; border: 1px solid var(--color-linea); background: var(--color-fondo); border-radius: 999px; padding: 0.6rem 1rem; color: #6b7a89; font: inherit; cursor: text; }
.wall-composer-prompt:hover { border-color: var(--kc-primary); }
.wall-composer-title { flex: 1; min-width: 0; border: 1px solid var(--color-linea); border-radius: 10px; padding: 0.55rem 0.75rem; font: inherit; font-size: 17px; font-weight: 600; }
.wall-composer-title:focus { outline: none; border-color: var(--kc-primary); box-shadow: 0 0 0 3px rgba(255, 97, 21, 0.14); }
.wall-kinds { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.wall-kind { border: 1px solid var(--color-linea); background: #fff; border-radius: 999px; padding: 0.35rem 0.8rem; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--color-tinta); }
.wall-kind .material-symbols-outlined { font-size: 18px; color: var(--kc-primary); }
.wall-kind:hover { border-color: var(--kc-primary); }
.wall-kind.is-active { background: var(--kc-primary); color: #fff; border-color: var(--kc-primary); }
.wall-kind.is-active .material-symbols-outlined { color: #fff; }
.wall-kind:disabled { opacity: 0.45; cursor: not-allowed; }
.wall-composer-body { margin-top: 12px; display: grid; gap: 12px; }
.wall-avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--kc-primary); color: #fff; font-size: 13px; font-weight: 700; }
img.wall-avatar { object-fit: cover; }

.wall-cards { display: flex; flex-direction: column; gap: 18px; }
.wall-card { display: flex; align-items: flex-start; gap: 20px; padding: 24px 26px; margin: 0; border-radius: 16px; text-decoration: none; color: inherit; min-width: 0; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
a.wall-card:hover { border-color: var(--kc-primary); box-shadow: 0 8px 22px rgba(20, 36, 51, 0.08); transform: translateY(-1px); }
.wall-card:focus-visible { outline: 2px solid var(--kc-primary); outline-offset: 2px; }
.wall-card.is-pinned { border-color: color-mix(in srgb, var(--kc-primary) 45%, transparent); }
.wall-card.is-dim { opacity: 0.7; }
.wall-card.is-locked { background: var(--kc-surface-container-low); border: 1px dashed #c9cfe6; box-shadow: none; }
.wall-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wall-card-title { font-size: 18px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.wall-card-kind { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 13px; font-weight: 600; color: #6b7a89; }
.wall-card-pin { display: inline-flex; align-items: center; gap: 2px; color: var(--kc-primary); }
.wall-card-pin .material-symbols-outlined { font-size: 16px; font-variation-settings: "FILL" 1; }
.wall-card-text { font-size: 14px; line-height: 1.6; color: #6b7a89; margin-top: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.wall-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; font-size: 12.5px; color: #6b7a89; }
.wall-card-due { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--color-tinta); }
.wall-card-due .material-symbols-outlined { font-size: 16px; }
.wall-card-status { font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #f1f3f5; color: var(--color-tinta); }
.wall-card-status.is-todo { background: #fff1e1; color: #8a4b00; }
.wall-card-status.is-done { background: #e3f5ea; color: #1f7a44; }
.wall-card-chevron { align-self: center; font-size: 26px; color: #9aa5b1; transition: transform 0.15s, color 0.15s; }
a.wall-card:hover .wall-card-chevron { color: var(--kc-primary); transform: translateX(3px); }
.wall-kind-tile { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 52px; height: 52px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #ff9a4d, #ff6115); box-shadow: 0 4px 12px -4px rgba(255, 97, 21, 0.45); }
.wall-kind-tile .material-symbols-outlined { font-size: 28px; font-variation-settings: "FILL" 1, "wght" 500, "opsz" 40; }
.wall-kind-tile.is-lg { width: 60px; height: 60px; border-radius: 16px; }
.wall-kind-tile.is-lg .material-symbols-outlined { font-size: 32px; }
.wall-card.is-locked .wall-kind-tile { background: #d9d4c8; box-shadow: none; }

.wall-detail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wall-detail-card { padding: 22px 24px; border-radius: 14px; margin: 0; min-width: 0; }
.wall-detail-head { display: flex; gap: 18px; align-items: center; }
.wall-detail-title { font-size: 22px; font-weight: 600; line-height: 1.25; margin: 0 0 4px; overflow-wrap: anywhere; }
.wall-detail-kind { margin: 0; font-size: 13px; color: #6b7a89; }
.wall-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.wall-detail-body { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.wall-post-text { margin: 0; line-height: 1.65; overflow-wrap: anywhere; }
.wall-post-text p { margin: 0 0 0.8em; }
.wall-post-text p:last-child { margin-bottom: 0; }
.wall-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; }
.wall-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wall-link { display: flex; gap: 10px; align-items: center; border: 1px solid var(--color-linea); border-radius: 10px; padding: 0.6rem 0.8rem; text-decoration: none; color: inherit; background: var(--color-fondo); min-width: 0; }
.wall-link:hover { border-color: var(--kc-primary); }
.wall-link > .material-symbols-outlined { font-size: 20px; color: var(--kc-primary); }
.wall-link span span { display: block; font-size: 13px; color: #6b7a89; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wall-link strong { display: block; font-size: 14px; }
.wall-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 20px -24px -22px; padding: 14px 24px; border-top: 1px solid var(--color-linea); }
.wall-detail-actions .espacio { flex: 1; }

/* Entregas y revisión */
.entregas { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--color-linea); display: flex; flex-direction: column; gap: 12px; }
.entregas h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.entregas h3 .material-symbols-outlined { font-size: 20px; color: var(--kc-primary); }
.entrega { border: 1px solid var(--color-linea); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.entrega-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.entrega-head strong { font-size: 15px; }
.entrega-head .espacio { flex: 1; }
.entrega-texto { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.6; }
.revision { background: var(--color-fondo); border-radius: 10px; padding: 10px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.revision strong { font-size: 13px; }
.nota { font-size: 20px; font-weight: 800; }
.asignar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.asignar select { border: 1.5px solid #e2dccf; border-radius: 10px; padding: 0.45rem 0.6rem; font: inherit; font-size: 14px; background: #fff; max-width: 100%; }

/* Participantes */
.participantes { display: flex; flex-direction: column; gap: 18px; }
.grupo h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-tinta-suave); }
.persona { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-linea); min-width: 0; }
.persona:first-of-type { border-top: none; }
.persona-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.persona-id strong { font-size: 15px; overflow-wrap: anywhere; }
.persona-id small { font-size: 13px; color: var(--color-tinta-suave); overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .wall-cards { gap: 14px; }
  .wall-card { gap: 14px; padding: 18px 16px; }
  .wall-card-chevron { display: none; }
  .wall-kind-tile { width: 44px; height: 44px; border-radius: 12px; }
  .wall-kind-tile .material-symbols-outlined { font-size: 24px; }
  .wall-card-title { font-size: 16px; }
  .wall-detail-card { padding: 18px 16px; }
  .wall-detail-actions { margin: 18px -16px -18px; padding: 12px 16px; }
}

/* ------------------------------------------------- Ventana «Nuevo curso»
   Como las ventanas de la app (.app-portal-dialog, .profile-modal): fondo
   oscurecido, caja blanca de esquinas de 20 px y la X arriba a la derecha. A la
   derecha, el cuadro del curso tal como quedará en Cursos. En el teléfono ocupa
   toda la pantalla y la vista previa se omite. */

html.dlg-abierto { overflow: hidden; }

.dlg { width: min(960px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; overflow: hidden; border: none; border-radius: 20px; background: #fff; color: var(--kc-text); box-shadow: 0 24px 60px rgba(15, 23, 36, 0.3); animation: motion-rise var(--motion-fast) var(--motion-ease) backwards; }
.dlg::backdrop { background: rgba(15, 23, 36, 0.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: motion-fade var(--motion-fast) ease-out backwards; }
@keyframes motion-fade { from { opacity: 0; } to { opacity: 1; } }
.dlg-caja { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 330px; grid-template-rows: minmax(0, 1fr) auto; max-height: calc(100dvh - 48px); }
.dlg-head { padding-right: 28px; }
.dlg-head h2 { margin: 0; font-size: 24px; font-weight: 700; line-height: 32px; letter-spacing: -0.015em; }
.dlg-head p { margin: 4px 0 0; color: var(--kc-text-muted); font-size: 14px; line-height: 20px; }
.dlg-cerrar { position: absolute; top: 14px; right: 14px; display: inline-flex; padding: 6px; border: none; border-radius: 999px; background: transparent; color: #6b7a89; cursor: pointer; transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease; }
.dlg-cerrar:hover { background: rgba(19, 27, 46, 0.06); color: var(--kc-text); }
.dlg-cerrar:focus-visible { outline: 2px solid var(--kc-primary); outline-offset: 2px; }
.dlg-pie { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--kc-border); background: #fff; }
.dlg-pie-nota { flex: 1; margin: 0; color: var(--kc-text-muted); font-size: 13px; }
.dlg-pie .espacio { flex: 1; }
.dlg-pie .btn { min-height: 44px; padding: 0.55rem 1.15rem; }
.dlg-pie .btn-primario:disabled { opacity: 0.45; box-shadow: none; cursor: not-allowed; }

.nc-campos { display: flex; flex-direction: column; gap: 18px; min-height: 0; padding: 28px 28px 24px; overflow-y: auto; }
.nc .campo > span small { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--kc-surface-container-high); color: var(--kc-text-muted); font-size: 11.5px; font-weight: 600; }
.nc-nombre input { min-height: 54px; padding: 0.8rem 1rem; font-size: 18px; font-weight: 600; }
.nc textarea { min-height: 84px; resize: none; }
.nc-cuenta { align-self: flex-end; margin-top: -2px; color: #8a90a6; font-size: 12px; }
.nc-fechas { display: flex; flex-direction: column; gap: 14px; min-width: 0; margin: 4px 0 0; padding: 18px 0 0; border: none; border-top: 1px solid var(--kc-border); }
.nc-fechas legend { float: left; width: 100%; margin: 0 0 14px; padding: 0; font-size: 15px; font-weight: 700; }
.nc-fechas legend + * { clear: both; }
.nc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nc-chip { min-height: 38px; padding: 0.4rem 0.9rem; border: 1px solid var(--kc-border); border-radius: 999px; background: #fff; color: var(--kc-text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease); }
.nc-chip:hover { border-color: #c9cfe6; background: var(--kc-surface-container-low); }
.nc-chip:active { transform: scale(0.96); }
.nc-chip[aria-checked="true"] { border-color: var(--kc-primary); background: var(--kc-primary); color: #fff; }
.nc-chip:focus-visible { outline: 2px solid var(--kc-primary); outline-offset: 2px; }
.nc-resumen { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--world-curso-b) 6%, #fff); color: var(--kc-text); font-size: 13.5px; font-weight: 500; }
.nc-resumen .material-symbols-outlined { flex: none; color: var(--world-curso-b); font-size: 19px; }

.nc-vista { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 64px 24px 28px; overflow-y: auto; border-left: 1px solid var(--kc-border); background: linear-gradient(180deg, #f6f7ff 0%, #eef0fd 100%); }
.nc-vista-titulo { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 3px 10px; border-radius: 12px; background: #fff; color: var(--kc-text-muted); font-size: 11px; font-weight: 500; line-height: 14px; letter-spacing: 0.05em; text-transform: uppercase; }
.nc-vista-titulo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--kc-primary); }
.nc-vista-nota { margin: 0; color: var(--kc-text-muted); font-size: 13px; line-height: 19px; }
.course-world.is-vista { box-shadow: 0 14px 34px -16px rgba(31, 63, 102, 0.35), var(--kc-shadow-sm); }
.course-world-title.is-vacio { color: #a3a9bd; }

@media (max-width: 860px) {
  .dlg-caja { grid-template-columns: minmax(0, 1fr); }
  .nc-vista { display: none; }
}

@media (max-width: 640px) {
  .dlg { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .dlg-caja { height: 100dvh; max-height: 100dvh; }
  .nc-campos { padding: 20px 16px; }
  .dlg-pie { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .dlg-pie-nota { display: none; }
  .dlg-pie .btn { flex: 1; }
}

/* ------------------------------------------------------- Evaluaciones
   Pestaña del curso (public/evaluaciones.js): lista con la ponderación,
   resumen de notas, tabla de especificaciones, registro por estudiante y
   escala. Colores de evaluación: uno por posición, solo para distinguirlas. */

.ev-color-0 { --ev: #ff6115; --ev-a: #ff9a4d; }
.ev-color-1 { --ev: #1f6fe0; --ev-a: #5cb3ff; }
.ev-color-2 { --ev: #12955a; --ev-a: #3fcf8e; }
.ev-color-3 { --ev: #7b4bd6; --ev-a: #a98bf0; }
.ev-color-4 { --ev: #0e8a8a; --ev-a: #3cc6c0; }
.ev-color-5 { --ev: #c2410c; --ev-a: #f59e0b; }

.ev-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.ev-head p { margin: 4px 0 0; }
.ev-h2 { margin: 0; font-size: 24px; font-weight: 600; line-height: 32px; letter-spacing: -0.015em; }

.ev-pond { padding: 16px 18px; margin-bottom: 18px; }
.ev-pond-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-bottom: 10px; font-size: 14px; }
.ev-pond-lista { display: inline-flex; align-items: center; gap: 4px; color: var(--kc-success, #0f7a55); font-weight: 600; }
.ev-pond-lista .material-symbols-outlined { font-size: 18px; }
.ev-pond-barra { display: flex; gap: 3px; height: 10px; overflow: hidden; border-radius: 999px; background: var(--kc-surface-container-low); }
.ev-pond-barra span { min-width: 4px; background: linear-gradient(90deg, var(--ev-a), var(--ev)); }
.ev-pond-leyenda { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--kc-text-muted); }
.ev-pond-leyenda li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ev-pond-leyenda strong { color: var(--kc-text); }
.ev-punto { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ev); }

.ev-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 14px; }
.ev-card { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 18px 20px; border-radius: 16px; color: inherit; text-decoration: none; transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s; }
a.ev-card:hover { border-color: color-mix(in srgb, var(--kc-primary) 40%, transparent); box-shadow: 0 12px 28px -14px rgba(19, 27, 46, 0.3); transform: translateY(-2px); }
a.ev-card:focus-visible { outline: 2px solid var(--kc-primary); outline-offset: 2px; }
.ev-card-tile { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--ev-a), var(--ev)); color: #fff; box-shadow: 0 8px 18px -10px var(--ev); }
.ev-card-tile .material-symbols-outlined { font-size: 26px; font-variation-settings: "FILL" 1; }
.ev-card-body { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.ev-card-title { font-size: 16.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.ev-card-meta { color: var(--kc-text-muted); font-size: 13px; }
.ev-card-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.ev-card-prom { display: flex; flex: none; flex-direction: column; align-items: center; min-width: 58px; }
.ev-card-prom small { color: var(--kc-text-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.ev-card-prom strong { font-size: 26px; font-weight: 700; line-height: 1.1; }
.ev-card-prom.is-ok strong, .ev-n.is-ok, .ev-mi-nota.is-ok, .rg-nota.is-ok strong, strong.is-ok { color: #0f7a55; }
.ev-card-prom.is-mal strong, .ev-n.is-mal, .ev-mi-nota.is-mal, .rg-nota.is-mal strong, strong.is-mal { color: #ba1a1a; }
.ev-pdf { display: inline-flex; align-items: center; gap: 4px; color: var(--kc-primary-text); font-size: 13px; font-weight: 700; text-decoration: none; }
.ev-pdf:hover { text-decoration: underline; }
.ev-pdf .material-symbols-outlined { font-size: 18px; }
.ev-sin-est { display: flex; align-items: center; gap: 6px; margin: 18px 0 0; }

.ev-resumen { margin-top: 18px; padding: 18px 20px; }
.ev-resumen-head h3 { margin: 0; font-size: 17px; }
.ev-resumen-head p { margin: 2px 0 12px; font-size: 13px; }
.ev-tabla-caja { overflow-x: auto; }
.ev-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.ev-tabla th, .ev-tabla td { padding: 9px 10px; border-bottom: 1px solid var(--kc-border); text-align: center; white-space: nowrap; }
.ev-tabla thead th { color: var(--kc-text-muted); font-size: 12px; font-weight: 600; vertical-align: bottom; }
.ev-tabla thead th span { display: block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; margin: 0 auto; }
.ev-tabla thead th small { display: block; font-weight: 500; }
.ev-tabla th[scope="row"], .ev-tabla thead th:first-child { text-align: left; font-weight: 600; color: var(--kc-text); }
.ev-tabla tbody tr:last-child th, .ev-tabla tbody tr:last-child td { border-bottom: none; }
.ev-tabla td:last-child, .ev-tabla thead th:last-child { background: var(--kc-surface-container-low); }
.ev-n { font-weight: 700; }
.ev-n-aus { color: var(--kc-text-muted); font-size: 12px; }
.ev-parcial { display: block; color: var(--kc-text-muted); font-size: 11px; }
.ev-resumen-lista { display: none; margin: 0; padding: 0; list-style: none; }
.ev-resumen-lista li { padding: 12px 0; border-bottom: 1px solid var(--kc-border); }
.ev-resumen-lista li:last-child { border-bottom: none; }
.ev-rl-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; }
.ev-rl-top .ev-n { font-size: 18px; }
.ev-rl-notas { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; color: var(--kc-text-muted); font-size: 13px; }
@media (max-width: 720px) {
  .ev-tabla-caja { display: none; }
  .ev-resumen-lista { display: block; }
}

.ev-mi-final { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 18px 20px; }
.ev-mi-final p { margin: 0; }
.ev-mi-final .ev-pdf { margin-top: 8px; }
.ev-mi-nota { font-size: 40px; font-weight: 700; line-height: 1; }

/* Detalle */
.ev-det-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin: 12px 0 16px; }
.ev-det-id { min-width: 0; }
.ev-det-titulo { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ev-det-meta { margin: 6px 0 0; color: var(--kc-text-muted); font-size: 13.5px; line-height: 20px; }
.ev-det-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ev-seg { display: inline-flex; max-width: 100%; margin-bottom: 16px; padding: 4px; overflow-x: auto; scrollbar-width: none; border-radius: 12px; background: var(--kc-surface-container-high); }
.ev-seg::-webkit-scrollbar { display: none; }
.ev-seg button { flex: none; padding: 8px 14px; border: none; border-radius: 9px; background: transparent; color: var(--kc-text-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease; }
.ev-seg button:hover { color: var(--kc-text); }
.ev-seg button[aria-selected="true"] { background: #fff; color: var(--kc-text); box-shadow: var(--kc-shadow-sm); }
.ev-seg button:focus-visible { outline: 2px solid var(--kc-primary); outline-offset: 1px; }
.ev-seg-corto { display: none; }
@media (max-width: 560px) {
  .ev-seg { display: flex; }
  .ev-seg button { flex: 1; }
  .ev-seg-largo { display: none; }
  .ev-seg-corto { display: inline; }
}

/* Ventanas de evaluación y registro (una columna) */
.dlg-angosto { width: min(660px, calc(100% - 32px)); }
.dlg-angosto .dlg-caja { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) { .dlg-angosto { width: 100%; } }
.ef-campos { display: flex; flex-direction: column; gap: 16px; min-height: 0; padding: 28px 28px 22px; overflow-y: auto; }
.ef-sufijo { position: relative; display: block; }
.ef-sufijo input { padding-right: 2.2rem; }
.ef-sufijo b { position: absolute; top: 50%; right: 0.9rem; transform: translateY(-50%); color: var(--kc-text-muted); font-weight: 600; pointer-events: none; }
.ef-rapidas { margin-top: -6px; }
.ef-ayuda { margin: -8px 0 0; color: var(--kc-text-muted); font-size: 13px; }
.ef-ayuda:empty { display: none; }
.ef-escala { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .ef-escala { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nc-chip[aria-pressed="true"] { border-color: var(--kc-primary); background: var(--kc-primary); color: #fff; }

/* Tabla de especificaciones */
.te { padding: 18px 20px; }
.te-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.te-resumen { display: flex; flex-wrap: wrap; gap: 6px; }
.te-resumen span { padding: 4px 10px; border-radius: 999px; background: var(--kc-surface-container-low); font-size: 13px; }
.te-cols { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.te-cols > span { margin-right: 4px; color: var(--kc-text-muted); font-size: 13px; font-weight: 600; }
.te-cols .nc-chip { min-height: 32px; padding: 0.25rem 0.75rem; font-size: 13px; }
.te-aviso { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0.6rem 0.8rem; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 13.5px; }
.te-aviso[hidden] { display: none; }
.te-aviso .material-symbols-outlined { font-size: 18px; }
.te-vacia { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; color: var(--kc-text-muted); text-align: center; }
.te-vacia > .material-symbols-outlined { font-size: 36px; color: var(--kc-primary); }
.te-vacia p { max-width: 52ch; margin: 0; }

.te-tabla { overflow-x: auto; margin: 0 -4px; padding: 0 4px 4px; }
.te-fila { display: grid; grid-template-columns: var(--te-cols); align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--kc-border); }
.te-fila > * { min-width: 0; }
.te-cab { padding: 0 0 8px; color: var(--kc-text-muted); font-size: 12px; font-weight: 600; }
.te-n { color: var(--kc-text-muted); font-weight: 700; text-align: center; }
.te-l { display: none; }
.te-c { display: flex; align-items: center; gap: 8px; }
.te-c input, .te-c select, .te-varias input, .te-varias select { width: 100%; min-width: 0; min-height: 40px; padding: 0.45rem 0.65rem; border: 1px solid transparent; border-radius: 10px; background: var(--kc-surface-container-low); color: var(--kc-text); font: inherit; font-size: 14.5px; transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background-color var(--motion-fast) ease; }
.te-c input:hover, .te-c select:hover { background: #eceefd; }
.te-c input:focus, .te-c select:focus, .te-varias input:focus, .te-varias select:focus { outline: none; border-color: var(--kc-primary); background: #fff; box-shadow: 0 0 0 3px rgba(255, 97, 21, 0.14); }
.te-c input.is-mal { border-color: #ba1a1a; background: #fcebea; }
.te-clave { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.te-clave select { width: auto; min-height: 36px; padding: 0.3rem 0.5rem; font-size: 13px; }
.te-letras { display: inline-flex; gap: 4px; }
.te-letras button { width: 34px; height: 34px; border: 1px solid var(--kc-border); border-radius: 9px; background: #fff; color: var(--kc-text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease; }
.te-letras button:hover { border-color: #c9cfe6; background: var(--kc-surface-container-low); }
.te-letras button[aria-pressed="true"] { border-color: #0f7a55; background: #0f7a55; color: #fff; }
.te-letras button:focus-visible { outline: 2px solid var(--kc-primary); outline-offset: 1px; }
.te-nota { display: inline-flex; align-items: center; gap: 4px; color: var(--kc-text-muted); font-size: 13px; }
.te-nota .material-symbols-outlined { font-size: 17px; color: var(--kc-primary); }
.te-falta { color: #9a3412; font-size: 13px; font-weight: 600; }
.te-acciones { display: flex; justify-content: flex-end; gap: 2px; }
.te-acciones button { display: inline-flex; padding: 6px; border: none; border-radius: 8px; background: transparent; color: #8a90a6; cursor: pointer; }
.te-acciones button:hover { background: var(--kc-surface-container-low); color: var(--kc-text); }
.te-acciones button[data-accion="quitar"]:hover { background: #fcebea; color: #ba1a1a; }
.te-acciones .material-symbols-outlined { font-size: 19px; }
.te-fila.is-fija { min-height: 44px; font-size: 14px; }
/* Incisos: van corridos bajo su pregunta de desarrollo (3a, 3b…). */
.te-fila:has(+ .te-fila.is-inciso) { border-bottom-style: dashed; }
.te-fila.is-inciso { background: linear-gradient(90deg, var(--kc-surface-container-low), transparent 70%); }
.te-fila.is-inciso .te-n { color: var(--kc-text); }
.te-acciones button[data-accion="inciso"] { color: var(--kc-primary); }

/* Ítems de la tabla: cada uno, un bloque con su encabezado y sus preguntas. */
.te-ajustes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.te-numeracion { display: inline-flex; align-items: center; gap: 8px; color: var(--kc-text-muted); font-size: 13px; font-weight: 600; }
.te-numeracion select { min-height: 34px; padding: 0.3rem 0.6rem; border: 1px solid var(--kc-border); border-radius: 10px; background: #fff; color: var(--kc-text); font: inherit; font-size: 13px; }
.te-sec { margin-top: 16px; padding: 14px 16px 12px; border: 1px solid var(--kc-border); border-radius: 14px; background: #fff; }
.te-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 8px; }
.te-sec-id { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.te-sec-num { padding: 3px 10px; border-radius: 999px; background: var(--kc-charcoal); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; }
.te-sec-tipo { font-size: 16px; }
.te-sec-opc, .te-sec-id select { display: inline-flex; align-items: center; gap: 6px; color: var(--kc-text-muted); font-size: 13px; font-weight: 600; }
.te-sec-id select { min-height: 32px; padding: 0.2rem 0.5rem; border: 1px solid var(--kc-border); border-radius: 9px; background: #fff; color: var(--kc-text); font: inherit; font-size: 13px; }
.te-sec-sub { color: var(--kc-text-muted); font-size: 13px; }
.te-sec-inicio { display: inline-flex; align-items: center; gap: 6px; color: var(--kc-text-muted); font-size: 13px; font-weight: 600; }
.te-sec-inicio input { width: 56px; min-height: 32px; padding: 0.2rem 0.4rem; border: 1px solid var(--kc-border); border-radius: 9px; background: #fff; color: var(--kc-text); font: inherit; font-size: 13px; text-align: center; }
.te-sec-inicio input:focus { outline: none; border-color: var(--kc-primary); box-shadow: 0 0 0 3px rgba(255, 97, 21, 0.14); }
.te-sec-titulo { flex-basis: 100%; min-height: 38px; padding: 0.4rem 0.7rem; border: 1px solid transparent; border-radius: 10px; background: var(--kc-surface-container-low); color: var(--kc-text); font: inherit; font-size: 14px; }
.te-sec-titulo:focus { outline: none; border-color: var(--kc-primary); background: #fff; box-shadow: 0 0 0 3px rgba(255, 97, 21, 0.14); }
.te-sec-titulo-fijo { flex-basis: 100%; margin: 0; color: var(--kc-text-muted); font-size: 13.5px; }
.te-sec-vacia { margin: 6px 0; color: var(--kc-text-muted); font-size: 13.5px; }
.te-sec-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 10px; }
.te-sec-pie .btn { min-height: 36px; padding: 0.35rem 0.8rem; font-size: 13px; }
.te-varias { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--kc-text-muted); font-size: 13.5px; }
.te-varias input { width: 58px; min-height: 36px; padding: 0.3rem 0.4rem; text-align: center; }
.te-clave-sel { width: auto !important; min-width: 84px; }
.te-sec .te-tabla { margin-top: 4px; }

.te-nuevo { margin-top: 18px; padding: 16px; border: 1.5px dashed #c9cfe6; border-radius: 14px; background: var(--kc-surface-container-low); }
.te-nuevo h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 15px; }
.te-nuevo h4 .material-symbols-outlined { font-size: 20px; color: var(--kc-primary); }
.te-nuevo-ayuda { margin: 8px 0 0; color: var(--kc-text-muted); font-size: 13px; }
.te-nuevo-campos { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 12px; }
.te-nuevo-campos .campo { width: 150px; }
.te-nuevo-campos .campo input, .te-nuevo-campos .campo select { background: #fff; }

#te-dims:not(:empty) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--kc-border); }
.te-dim h4 { margin: 0 0 8px; font-size: 14px; }
.te-dim table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.te-dim th, .te-dim td { padding: 6px 4px; border-bottom: 1px solid var(--kc-border); text-align: right; }
.te-dim th:first-child, .te-dim td:first-child { text-align: left; overflow-wrap: anywhere; }
.te-dim td:last-child { white-space: nowrap; }
.te-dim th { color: var(--kc-text-muted); font-size: 12px; font-weight: 600; }
.te-barrita { display: inline-block; width: 46px; height: 6px; margin-right: 8px; overflow: hidden; vertical-align: middle; border-radius: 999px; background: var(--kc-surface-container-high); }
.te-barrita i { display: block; height: 100%; background: var(--world-curso-b); }

.te-barra { position: sticky; bottom: 12px; z-index: 10; display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--kc-charcoal); color: #fff; box-shadow: 0 16px 36px -14px rgba(15, 23, 36, 0.55); animation: motion-rise var(--motion-fast) var(--motion-ease) backwards; }
.te-barra[hidden] { display: none; }
.te-barra > span:first-child { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.te-barra .material-symbols-outlined { font-size: 18px; color: var(--kc-primary); }
.te-barra .espacio { flex: 1; }
.te-barra .btn-secundario { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.te-barra .btn-secundario:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); }

@media (max-width: 760px) {
  .te { padding: 14px; }
  .te-cab { display: none; }
  .te-fila { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; margin-bottom: 10px; padding: 12px; border: 1px solid var(--kc-border); border-radius: 12px; }
  .te-n { grid-column: 1; text-align: left; }
  .te-n::before { content: "Pregunta "; }
  .te-acciones { grid-column: 2; grid-row: 1; }
  .te-c { grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 4px; }
  .te-c.is-medio { grid-column: auto; }
  .te-l { display: block; color: var(--kc-text-muted); font-size: 12px; font-weight: 600; }
  .te-fila.is-fija .te-acciones { display: none; }
  .te-barra { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
  .te-barra > span:first-child { flex-basis: 100%; }
  .te-barra .espacio { display: none; }
  .te-barra .btn { flex: 1; }
}

/* Escala */
.ev-escala { padding: 18px 20px; }
.ev-escala-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.ev-escala-top h3 { margin: 0; font-size: 17px; }
.ev-escala-top p { margin: 4px 0 0; max-width: 70ch; font-size: 13.5px; }
.ev-escala-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.ev-escala-fila { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 6px 10px; border-radius: 9px; font-size: 13.5px; }
.ev-escala-fila span { color: var(--kc-text-muted); }
.ev-escala-fila.is-ok { background: #eef8f3; }
.ev-escala-fila.is-ok strong { color: #0f7a55; }
.ev-escala-fila.is-mal { background: #fdf2f1; }
.ev-escala-fila.is-mal strong { color: #ba1a1a; }
.ev-escala-fila.is-corte { outline: 2px solid #0f7a55; outline-offset: -2px; }
.ev-escala-nota { margin: 12px 0 0; font-size: 12.5px; }

/* Registro */
.ev-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px; margin-bottom: 14px; }
.ev-kpis > .card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.ev-kpis > .ev-kpi-pdf { flex-direction: row; }
.ev-kpis small { color: var(--kc-text-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.ev-kpis strong { font-size: 24px; font-weight: 700; line-height: 1.2; }
.ev-kpis strong span { color: var(--kc-text-muted); font-size: 14px; font-weight: 500; }
.ev-kpi-pdf { flex-direction: row; align-items: center; gap: 12px; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.ev-kpi-pdf:hover { border-color: color-mix(in srgb, var(--kc-primary) 40%, transparent); transform: translateY(-1px); }
.ev-kpi-pdf > .material-symbols-outlined { font-size: 30px; color: var(--kc-primary); }
.ev-kpi-pdf span { display: flex; flex-direction: column; }
.ev-kpi-pdf strong { font-size: 15px; }
.ev-kpi-pdf small { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.ev-kpi-pdf.is-excel > .material-symbols-outlined { color: #12955a; }
.campo-ayuda { margin: -6px 0 0; color: var(--kc-text-muted); font-size: 12.5px; }
.ev-kpi-pdf.is-correo > .material-symbols-outlined { color: #1f6fe0; }

/* Envío de la retroalimentación por correo */
.en-conectar { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 14px; background: var(--kc-surface-container-low); }
.en-conectar p { margin: 4px 0 0; color: var(--kc-text-muted); font-size: 14px; line-height: 20px; }
.en-icono { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #5cb3ff, #1f6fe0); color: #fff; }
.en-icono .material-symbols-outlined { font-size: 24px; font-variation-settings: "FILL" 1; }
.en-de { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--kc-surface-container-low); font-size: 14px; }
.en-de .material-symbols-outlined { font-size: 18px; color: #1f6fe0; }
.en-enlace { padding: 0; border: none; background: none; color: var(--kc-primary-text); font: inherit; font-weight: 600; cursor: pointer; }
.en-enlace:hover { text-decoration: underline; }
.en-ayuda { margin-top: 2px; }
.en-marcar { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--kc-text-muted); }
.en-bien { display: inline-flex; align-items: center; gap: 2px; color: #0f7a55 !important; font-weight: 600 !important; }
.en-bien .material-symbols-outlined { font-size: 15px; }
.en-mal { color: #ba1a1a !important; font-weight: 600; }
.en-sin { margin: 6px 0 0; font-size: 13px; }
.en-avance { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.en-avance p { margin: 0; }
.en-barra { height: 10px; overflow: hidden; border-radius: 999px; background: var(--kc-surface-container-high); }
.en-barra i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff9a4d, #ff6115); transition: width 0.4s ease; }
.en-resultado { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; }

/* Exportar a Excel: lista de evaluaciones para marcar */
.ex-lista { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; border: none; min-width: 0; }
.ex-legend { margin-bottom: 6px; padding: 0; font-size: 14px; font-weight: 700; }
.ex-item { align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--kc-surface-container-low); font-weight: 500; }
.ex-item input { margin-top: 2px; flex: none; }
.ex-item span { display: flex; flex-direction: column; min-width: 0; }
.ex-item strong { overflow-wrap: anywhere; }
.ex-item small { color: var(--kc-text-muted); font-size: 12.5px; font-weight: 500; }

.ev-nomina { padding: 6px 8px; }
.ev-nomina-cab, .ev-fila-btn { display: grid; grid-template-columns: 28px 36px minmax(0, 1fr) 96px 92px 28px; align-items: center; gap: 12px; }
.ev-nomina-cab { padding: 8px 12px 6px; color: var(--kc-text-muted); font-size: 12px; font-weight: 600; }
.ev-nomina-cab span:first-child { grid-column: 1 / 4; padding-left: 0; }
.ev-nomina-cab span:nth-child(2) { text-align: right; }
.ev-nomina-cab span:nth-child(3) { text-align: center; }
.ev-fila { display: flex; align-items: center; border-top: 1px solid var(--kc-border); }
.ev-fila-btn { flex: 1; min-width: 0; padding: 10px 12px; border: none; border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ev-fila-btn:hover { background: var(--kc-surface-container-low); }
.ev-fila-btn:focus-visible { outline: 2px solid var(--kc-primary); outline-offset: -2px; }
.ev-fila-n { color: var(--kc-text-muted); font-size: 13px; text-align: center; }
.ev-fila-id { display: flex; flex-direction: column; min-width: 0; }
.ev-fila-id strong, .ev-fila-id small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-fila-id small { color: var(--kc-text-muted); font-size: 12.5px; }
.ev-fila-pts { font-weight: 600; text-align: right; }
.ev-fila-pts small { color: var(--kc-text-muted); font-weight: 500; }
.ev-fila-nota { text-align: center; }
.ev-fila-nota .ev-n { font-size: 18px; }
.ev-sin { color: var(--kc-text-muted); font-size: 12.5px; }
.ev-fila-ir { color: #9aa5b1; }
.ev-fila-ir .material-symbols-outlined { font-size: 20px; }
.ev-fila-pdf { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: var(--kc-primary); }
a.ev-fila-pdf:hover { background: #fff1e8; }
.ev-fila-pdf .material-symbols-outlined { font-size: 21px; }
@media (max-width: 640px) {
  .ev-nomina-cab { display: none; }
  .ev-fila-btn { grid-template-columns: 36px minmax(0, 1fr) auto 20px; gap: 10px; padding: 10px 6px; }
  .ev-fila-n, .ev-fila-pts { display: none; }
  .ev-fila-pdf { width: 36px; }
}

/* Ventana de registro */
.rg-cuerpo { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 26px 28px 12px; overflow-y: auto; }
.rg-head { padding-right: 28px; }
.rg-eyebrow { margin: 0 0 2px !important; color: var(--kc-text-muted); font-size: 12px !important; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.rg-ausente { align-self: flex-start; padding: 8px 12px; border-radius: 10px; background: var(--kc-surface-container-low); }
.rg-ayuda { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--kc-text-muted); font-size: 12.5px; }
.rg-ayuda .material-symbols-outlined { font-size: 18px; }
@media (hover: none) and (pointer: coarse) { .rg-ayuda { display: none; } }
.rg-lista { margin: 0; padding: 0; list-style: none; transition: opacity var(--motion-fast) ease; }
.rg-lista.is-ausente { opacity: 0.4; pointer-events: none; }
.rg-fila { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 26px; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--kc-border); }
.rg-fila:last-child { border-bottom: none; }
.rg-fila.is-inciso .rg-info { padding-left: 10px; border-left: 2px solid #ffd2bd; }
.rg-sec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 14px; padding: 8px 10px; border-radius: 10px; background: var(--kc-surface-container-low); font-size: 14px; }
.rg-sec:first-child { margin-top: 0; }
.rg-sec small { color: var(--kc-text-muted); font-size: 12.5px; }
.rg-opciones.is-completacion button .material-symbols-outlined { font-size: 22px; }
.rg-opciones.is-completacion button[data-r="C"][aria-checked="true"] { border-color: #0f7a55; background: #0f7a55; }
.rg-opciones.is-completacion button[data-r="I"][aria-checked="true"] { border-color: #ba1a1a; background: #ba1a1a; }
.rg-fila:focus-within { background: linear-gradient(90deg, #fff6f0, transparent 70%); }
.rg-n { color: var(--kc-text-muted); font-weight: 700; text-align: center; }
.rg-info { display: flex; flex-direction: column; min-width: 0; }
.rg-info strong { font-size: 14px; }
.rg-info small { overflow: hidden; color: var(--kc-text-muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.rg-opciones { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.rg-opciones button { width: 42px; height: 42px; border: 1px solid var(--kc-border); border-radius: 11px; background: #fff; color: var(--kc-text); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease); }
.rg-opciones button:hover { border-color: #c9cfe6; background: var(--kc-surface-container-low); }
.rg-opciones button:active { transform: scale(0.94); }
.rg-opciones button[aria-checked="true"] { border-color: var(--kc-primary); background: var(--kc-primary); color: #fff; }
.rg-opciones button:focus-visible { outline: 2px solid var(--kc-primary); outline-offset: 2px; }
.rg-puntos { display: inline-flex; align-items: center; gap: 8px; }
.rg-puntos input { width: 76px; min-height: 42px; padding: 0.4rem 0.6rem; border: 1px solid transparent; border-radius: 11px; background: var(--kc-surface-container-low); color: var(--kc-text); font: inherit; font-size: 16px; font-weight: 700; text-align: center; }
.rg-puntos input:focus { outline: none; border-color: var(--kc-primary); background: #fff; box-shadow: 0 0 0 3px rgba(255, 97, 21, 0.14); }
.rg-puntos input.is-mal { border-color: #ba1a1a; background: #fcebea; }
.rg-puntos small { color: var(--kc-text-muted); font-size: 13px; white-space: nowrap; }
.rg-marca { display: inline-flex; justify-content: center; }
.rg-marca .material-symbols-outlined { font-size: 22px; font-weight: 700; }
.rg-bien { color: #0f7a55; }
.rg-mal { color: #ba1a1a; }
.rg-sin { color: #9a3412; font-weight: 700; }
.rg-comentario { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--kc-border); }
.rg-comentario textarea { min-height: 76px; }
.rg-pie { flex-wrap: wrap; }
.rg-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; width: 100%; font-size: 14px; color: var(--kc-text-muted); }
.rg-total strong { color: var(--kc-text); font-size: 17px; }
.rg-nota { margin-left: auto; font-size: 15px; font-weight: 600; color: var(--kc-text); }
.rg-nota strong { font-size: 22px; }
.rg-pie .auth-error { width: 100%; }
.rg-pie .espacio { flex: 1; }
@media (max-width: 520px) {
  .rg-cuerpo { padding: 20px 16px 10px; }
  .rg-fila { grid-template-columns: 30px minmax(0, 1fr) 24px; row-gap: 8px; }
  .rg-opciones, .rg-puntos { grid-column: 2 / 3; grid-row: 2; justify-content: flex-start; }
  .rg-marca { grid-column: 3; grid-row: 1 / 3; }
  .rg-pie .btn-peligro { order: 9; width: 100%; }
}

/* Aviso flotante */
.aviso-flotante { position: fixed; bottom: 24px; left: 50%; z-index: 300; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: var(--kc-charcoal); color: #fff; box-shadow: 0 16px 36px -14px rgba(15, 23, 36, 0.55); font-size: 14px; font-weight: 500; transform: translateX(-50%); animation: aviso-entra var(--motion-fast) var(--motion-ease) backwards; transition: opacity 0.4s ease, transform 0.4s ease; }
.aviso-flotante .material-symbols-outlined { font-size: 20px; color: #3fcf8e; }
.aviso-flotante.is-saliendo { opacity: 0; transform: translate(-50%, 8px); }
@keyframes aviso-entra { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translateX(-50%); } }
@media (max-width: 767px) { .aviso-flotante { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

/* En pantallas táctiles los campos van a 16 px: con menos, el iPhone hace zoom al tocarlos y deja la vista corrida. */
@media (hover: none) and (pointer: coarse) {
  .campo input, .campo textarea, .campo select, .buscador input, .te-c input, .te-c select, .te-varias input, .te-varias select, .te-sec-inicio input, .te-sec-titulo { font-size: 16px; }
}

/* ----------------------------------------------------------- Proyectos */

.pronto { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 640px; padding: 48px 24px; text-align: center; }
.pronto h2 { margin: 6px 0 0; font-size: 20px; font-weight: 600; }
.pronto p { margin: 0; max-width: 44ch; color: var(--kc-text-muted); }

/* ----------------------------------------------------------- Membresía
   Página de planes clásica: tres columnas con nombre, precio, botón y lo que
   incluye; la del medio, destacada. */

.planes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; margin-top: 28px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 18px; min-width: 0; padding: 28px 26px; border-radius: 20px; }
.plan.is-destacado { border: 2px solid var(--kc-primary); box-shadow: 0 18px 40px -22px rgba(255, 97, 21, 0.55); }
.plan-cinta { position: absolute; top: -12px; left: 24px; padding: 3px 12px; border-radius: 999px; background: var(--kc-primary); color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; }
.plan-head h2 { margin: 0; font-size: 22px; font-weight: 700; line-height: 28px; }
.plan-head p { margin: 4px 0 0; color: var(--kc-text-muted); }
.plan-precio { margin: 0; }
.plan-precio strong { font-size: 36px; font-weight: 700; line-height: 44px; letter-spacing: -0.02em; }
.plan-precio strong.is-pendiente { color: var(--kc-text-muted); font-size: 24px; font-weight: 600; line-height: 44px; letter-spacing: -0.01em; }
.plan-boton { width: 100%; min-height: 44px; }
.plan-boton:disabled { opacity: 1; cursor: default; transform: none; }
.btn-primario.plan-boton:disabled { opacity: 0.55; box-shadow: none; }
.btn-secundario.plan-boton:disabled { color: var(--kc-text-muted); background: var(--kc-surface-container-low); border-color: transparent; }
.plan-lista { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--kc-border); list-style: none; }
.plan-lista li { display: flex; align-items: flex-start; gap: 10px; }
.plan-lista .material-symbols-outlined { flex: none; color: var(--kc-primary); font-size: 20px; }
.planes-nota { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; color: var(--kc-text-muted); font-size: 13px; }
.planes-nota .material-symbols-outlined { font-size: 18px; }
@media (max-width: 1000px) {
  .planes { grid-template-columns: minmax(0, 1fr); max-width: 520px; gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-form-card, .auth-form-icon, .auth-notice, .auth-error, .pagina, .app-user-menu, .dlg, .dlg::backdrop { animation: none; }
  .app-sidenav, .app-sidenav-label { transition: none !important; }
}
