:root {
  --bg: #0a0a0a;
  --bg-soft: #1a1a1a;
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --ink: #0a0a0a;
  --muted: #5c5c5c;
  --brand: #c8102e;
  --brand-deep: #8b0a1e;
  --accent: #e10600;
  --danger: #c8102e;
  --ok: #0a0a0a;
  --line: rgba(10, 10, 10, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  --radius: 18px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(200, 16, 46, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(10, 10, 10, 0.06), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; line-height: 1.55; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.page-auth { min-height: 100vh; }
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.auth__panel {
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth__brand {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin: 0 0 1.2rem;
}
.auth__brand span,
.topbar__brand span { color: var(--brand); }
.auth__logo-wrap {
  width: 100%;
  max-width: clamp(420px, 78vw, 640px);
  margin: 0 0 1.25rem;
  overflow: visible;
}
.auth__logo {
  display: block;
  width: 100%;
  max-width: clamp(420px, 78vw, 640px);
  height: auto;
  max-height: clamp(220px, 38vh, 340px);
  object-fit: contain;
  object-position: left center;
}
.auth__lead, .lead, .muted { color: var(--muted); }
.auth__credit {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.page-auth .site-footer { display: none; }
.auth__hint {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  background: rgba(200, 16, 46, 0.08);
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}
.auth__visual {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  display: grid;
  place-items: end start;
  padding: clamp(2rem, 5vw, 4rem);
  background: #1a0508;
}
.auth__visual-bg {
  position: absolute;
  inset: -12px;
  background:
    url("../img/login-bg.png") center center / cover no-repeat;
  filter: blur(2.5px) saturate(1.1) contrast(1.05);
  transform: scale(1.04);
  z-index: 0;
}
.auth__visual-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(160deg, rgba(200, 16, 46, 0.42) 0%, rgba(139, 10, 30, 0.28) 45%, rgba(10, 10, 10, 0.45) 100%),
    radial-gradient(circle at 80% 20%, rgba(200, 16, 46, 0.22), transparent 55%);
}
.auth__visual p {
  position: relative;
  z-index: 2;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.15;
  max-width: 12ch;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 3vw, 1.5rem);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.topbar__brand a {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
}
.topbar__logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.topbar__logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
}
.topbar__user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.topbar__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.85rem;
}
.topbar__meta span { color: var(--muted); }

.sidebar-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}
.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  align-items: stretch;
}
.app-content {
  min-width: 0;
  padding-bottom: 1rem;
}

.sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow: auto;
  background: #0a0a0a;
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0.85rem 1.25rem;
  z-index: 30;
}
.sidebar__brand {
  padding: 0.35rem 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.85rem;
}
.sidebar__brand strong {
  font-family: var(--display);
  font-size: 1.2rem;
  display: block;
}
.sidebar__brand span { color: var(--brand); }
.sidebar__eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.45rem;
}
.sidebar__logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 118px;
  padding: 0.7rem;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
  line-height: 0;
}
.sidebar__logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
  object-position: center;
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}
.sidebar__section {
  margin: 0.9rem 0.65rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.sidebar__subsection {
  margin: 0.65rem 0.75rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 180, 190, 0.85);
}
.sidebar__group { margin-bottom: 0.15rem; }
.sidebar__link,
.sidebar__accordion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease;
  background: transparent;
  border: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.sidebar__link:hover,
.sidebar__accordion:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.sidebar__link.is-active,
.sidebar__accordion.is-active,
.sidebar__group.is-open > .sidebar__accordion {
  background: var(--brand);
  color: #fff;
}
.sidebar__chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-right: 0.15rem;
}
.sidebar__group.is-open .sidebar__chevron {
  transform: rotate(45deg);
  margin-top: -0.15rem;
}
.sidebar__panel {
  display: grid;
  gap: 0.15rem;
  margin: 0.2rem 0 0.45rem;
  padding: 0.15rem 0 0.15rem 0.35rem;
  border-left: 2px solid rgba(200, 16, 46, 0.55);
  margin-left: 0.75rem;
  animation: rise 0.25s ease both;
}
.sidebar__panel[hidden] { display: none !important; }
.sidebar__link--sub {
  display: block;
  font-size: 0.86rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
}
.sidebar__link--sub:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.sidebar__link--sub.is-active {
  background: rgba(200, 16, 46, 0.35);
  color: #fff;
}
.sidebar__link.is-disabled,
.sidebar__link--sub.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.sidebar__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar__user {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}
.sidebar__user span { color: rgba(255, 255, 255, 0.55); }

.sidebar-backdrop {
  display: none;
}

.app-main {
  width: min(1100px, calc(100% - 2rem));
  margin: 1.5rem auto 2rem;
}

body.page-app .site-footer {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 1.5rem;
}

.hero-panel,
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-deep);
  margin: 0 0 0.4rem;
}
.hero-panel__stat {
  background: var(--bg);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  min-width: 140px;
  box-shadow: var(--shadow);
  animation: rise 0.6s ease both;
  border-top: 3px solid var(--brand);
}
.hero-panel__stat span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}
.hero-panel__stat strong {
  font-family: var(--display);
  font-size: 1.5rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.module-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 180px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: rise 0.55s ease both;
}
.module-card:nth-child(2) { animation-delay: 0.05s; }
.module-card:nth-child(3) { animation-delay: 0.1s; }
.module-card:nth-child(4) { animation-delay: 0.15s; }
.module-card:nth-child(5) { animation-delay: 0.2s; }
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.module-card p { flex: 1; color: var(--muted); margin: 0; }
.module-card--soon { opacity: 0.78; }

.tool-card {
  border-top: 3px solid var(--brand);
}
.tool-card__meta {
  margin: 0.25rem 0 0.5rem;
}
.crumb {
  color: var(--brand);
  font-weight: 600;
}
.crumb:hover { text-decoration: underline; }

/* —— Espacio de herramienta (SIMEL, etc.) —— */
.tool-hero {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 2rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: 22px;
  background:
    radial-gradient(700px 280px at 0% 0%, rgba(200, 16, 46, 0.35), transparent 55%),
    linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 55%, #2a0a12 100%);
  color: #ffffff;
  box-shadow: var(--shadow);
  animation: rise 0.5s ease both;
}
.tool-hero--compact {
  grid-template-columns: 1.5fr auto;
  align-items: center;
}
.tool-hero__crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}
.tool-hero__crumb a {
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.tool-hero__crumb a:hover { border-color: var(--brand); color: #fff; }
.tool-hero__label {
  display: inline-block;
  margin: 0 0 0.55rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(200, 16, 46, 0.55);
  background: rgba(200, 16, 46, 0.18);
  color: #ffd7de;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tool-hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.5rem;
}
.tool-hero__lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 0.55rem;
  max-width: 38ch;
}
.tool-hero__desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  max-width: 48ch;
}
.tool-hero__aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.tool-hero__aside--actions {
  background: transparent;
  border: 0;
  padding: 0;
}
.progress-ring {
  text-align: center;
}
.progress-ring strong {
  display: block;
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 1;
  color: #ffffff;
}
.progress-ring span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}
.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #ff4d6d);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.section-head {
  margin-bottom: 1rem;
}
.section-head h2 {
  margin-bottom: 0.25rem;
}
.section-head p {
  margin: 0;
  color: var(--muted);
}

.module-grid--tool {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mod-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 220px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: rise 0.55s ease both;
}
.mod-card:nth-child(2) { animation-delay: 0.05s; }
.mod-card:nth-child(3) { animation-delay: 0.1s; }
.mod-card:nth-child(4) { animation-delay: 0.15s; }
.mod-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.mod-card--ready {
  border-color: rgba(200, 16, 46, 0.35);
  border-top: 3px solid var(--brand);
}
.mod-card--soon {
  background: #fafafa;
}
.mod-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.mod-card__num {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}
.mod-card--soon .mod-card__num { color: #9a9a9a; }
.mod-card__status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #efefef;
  color: #5c5c5c;
}
.mod-card__status--on {
  background: rgba(200, 16, 46, 0.12);
  color: var(--brand-deep);
}
.mod-card h3 {
  margin: 0;
  font-size: 1.25rem;
}
.mod-card p {
  margin: 0;
  flex: 1;
  color: var(--muted);
}
.btn--disabled {
  background: #ececec;
  color: #8a8a8a;
  cursor: not-allowed;
  pointer-events: none;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}
.workspace-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.35rem;
}
.workspace-card--dark {
  background: #0a0a0a;
  color: #ffffff;
  border-color: #0a0a0a;
}
.workspace-card--dark h2 { color: #ffffff; }
.workspace-card--dark .muted { color: rgba(255, 255, 255, 0.65); }
.workspace-card--dark strong { color: #ffb3c0; }

.status-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.status-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.status-list li:last-child { border-bottom: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #ffffff; }
.btn--primary:hover { background: var(--brand-deep); color: #ffffff; }
.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn--sm { padding: 0.45rem 0.8rem; font-size: 0.9rem; }
.btn--block { width: 100%; }

.form { display: grid; gap: 1rem; }
.form--card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.field { display: grid; gap: 0.35rem; }
.field span { font-size: 0.9rem; font-weight: 600; }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: #fff;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(200, 16, 46, 0.35);
  border-color: var(--brand);
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.simel-subnav {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  border-left: 4px solid var(--brand);
}
.simel-subnav__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.simel-breadcrumb {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
}
.simel-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.simel-breadcrumb li:not(:last-child)::after {
  content: "/";
  color: #b0b0b0;
  margin-left: 0.15rem;
}
.simel-breadcrumb a {
  color: var(--brand);
  font-weight: 600;
}
.simel-breadcrumb a:hover { text-decoration: underline; }
.simel-breadcrumb span[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}
.reading-card { margin-bottom: 1rem; }
.reading-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: normal;
}
.question-list { display: grid; gap: 1rem; }
.question-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.question-card__stem {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}
.option-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.option-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}
.option-list li.is-correct {
  border-color: rgba(200, 16, 46, 0.45);
  background: rgba(200, 16, 46, 0.06);
}
.guide-box {
  margin: 0.5rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #f3f3f3;
  border: 1px dashed var(--line);
}
.option-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin: 0.25rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.option-card:hover {
  border-color: rgba(200, 16, 46, 0.35);
  box-shadow: 0 4px 14px rgba(10, 10, 10, 0.06);
}
.option-card:has(input:checked) {
  border-color: rgba(200, 16, 46, 0.45);
  background: linear-gradient(180deg, #fff 0%, rgba(200, 16, 46, 0.04) 100%);
}
.option-card > input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.option-card__body {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}
.option-card__title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.option-card__text {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}
.option-card__meta {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}
.option-card__meta code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(10, 10, 10, 0.06);
  color: var(--ink);
}
.options-box {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafa;
}
.option-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.65rem;
}
.option-row__radio {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-weight: 500;
}
.check-item input { width: auto; }

.btn--danger {
  background: #fff;
  color: var(--brand);
  border: 1px solid rgba(200, 16, 46, 0.45);
}
.btn--danger:hover {
  background: var(--brand);
  color: #fff;
}
.inline-form { display: inline; }
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

/* —— Lectura en voz —— */
.voz-dashboard { display: grid; gap: 1rem; }
.voz-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.voz-alumno-banner,
.voz-cola-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  padding: 0.95rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(200, 16, 46, 0.22);
  background: linear-gradient(135deg, #fff5f6 0%, #ffffff 65%);
  box-shadow: 0 8px 22px rgba(200, 16, 46, 0.06);
}
.voz-alumno-banner strong {
  font-family: var(--display);
  font-size: 1.35rem;
  display: inline-block;
  margin-right: 0.35rem;
}
.voz-alumno-banner__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.15rem;
}
.voz-alumno-banner__progress,
.voz-cola-banner {
  font-size: 0.92rem;
  font-weight: 600;
  color: #333;
}
.voz-sesion-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}
.voz-check-all {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  cursor: pointer;
}
.voz-informe-resumen { margin-top: 0.25rem; }
.voz-bandas-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.voz-banda__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}
.voz-banda--bajo .voz-metrica__bar i { background: linear-gradient(90deg, #b42318, #f97066); }
.voz-banda--esperado .voz-metrica__bar i { background: linear-gradient(90deg, #067647, #32d583); }
.voz-banda--alto .voz-metrica__bar i { background: linear-gradient(90deg, #075985, #38bdf8); }
.voz-banda--sin_estandar .voz-metrica__bar i { background: #999; }
@media print {
  .topbar, .sidebar, .simel-subnav, .btn-row, .sidebar-toggle, .sidebar-backdrop { display: none !important; }
  .app-main { padding: 0 !important; }
  .voz-metrica { break-inside: avoid; box-shadow: none; }
}
.voz-metricas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.voz-metrica {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1.2rem 1.25rem;
  display: grid;
  gap: 0.4rem;
  box-shadow: 0 10px 28px rgba(10, 10, 10, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.voz-metrica::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: #c8102e;
}
.voz-metrica:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(10, 10, 10, 0.1);
}
.voz-metrica__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.voz-metrica__label {
  color: #5b5b5b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.3;
}
.voz-metrica__badge {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: #f3f3f3;
  color: #333;
  border: 1px solid rgba(10, 10, 10, 0.08);
}
.voz-metrica__value {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.05;
  color: #0a0a0a;
  letter-spacing: -0.02em;
}
.voz-metrica__value abbr {
  margin-left: 0.28rem;
  font-size: 0.55em;
  font-weight: 700;
  color: #666;
  text-decoration: none;
}
.voz-metrica__sep {
  color: #aaa;
  font-weight: 500;
  margin: 0 0.15rem;
}
.voz-metrica__bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.08);
  overflow: hidden;
  margin: 0.15rem 0 0.1rem;
}
.voz-metrica__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c8102e, #ff4d6d);
}
.voz-metrica__meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: #333;
}
.voz-metrica__hint {
  color: #6b6b6b;
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Velocidad por banda de fluidez */
.voz-metrica--bajo {
  background: linear-gradient(180deg, #fff1f1 0%, #ffffff 70%);
  border-color: rgba(180, 35, 24, 0.28);
}
.voz-metrica--bajo::before { background: #b42318; }
.voz-metrica--bajo .voz-metrica__value { color: #b42318; }
.voz-metrica--bajo .voz-metrica__badge { background: #fee4e2; color: #b42318; border-color: transparent; }
.voz-metrica--bajo .voz-metrica__bar i { background: linear-gradient(90deg, #b42318, #f97066); }

.voz-metrica--esperado {
  background: linear-gradient(180deg, #edfcf2 0%, #ffffff 70%);
  border-color: rgba(6, 118, 71, 0.28);
}
.voz-metrica--esperado::before { background: #067647; }
.voz-metrica--esperado .voz-metrica__value { color: #067647; }
.voz-metrica--esperado .voz-metrica__badge { background: #dcfae6; color: #067647; border-color: transparent; }
.voz-metrica--esperado .voz-metrica__bar i { background: linear-gradient(90deg, #067647, #32d583); }

.voz-metrica--alto {
  background: linear-gradient(180deg, #eef7ff 0%, #ffffff 70%);
  border-color: rgba(7, 89, 133, 0.28);
}
.voz-metrica--alto::before { background: #075985; }
.voz-metrica--alto .voz-metrica__value { color: #075985; }
.voz-metrica--alto .voz-metrica__badge { background: #e0f2fe; color: #075985; border-color: transparent; }
.voz-metrica--alto .voz-metrica__bar i { background: linear-gradient(90deg, #075985, #38bdf8); }

.voz-metrica--sin_estandar::before { background: #777; }

/* Tonos para decodificación / vacilaciones / regresiones */
.voz-metrica--tone-ok {
  background: linear-gradient(180deg, #edfcf2 0%, #ffffff 72%);
  border-color: rgba(6, 118, 71, 0.22);
}
.voz-metrica--tone-ok::before { background: #067647; }
.voz-metrica--tone-ok .voz-metrica__value { color: #067647; }
.voz-metrica--tone-ok .voz-metrica__badge { background: #dcfae6; color: #067647; border-color: transparent; }
.voz-metrica--tone-ok .voz-metrica__bar i { background: linear-gradient(90deg, #067647, #32d583); }

.voz-metrica--tone-mid {
  background: linear-gradient(180deg, #fff8eb 0%, #ffffff 72%);
  border-color: rgba(147, 55, 13, 0.22);
}
.voz-metrica--tone-mid::before { background: #b54708; }
.voz-metrica--tone-mid .voz-metrica__value { color: #b54708; }
.voz-metrica--tone-mid .voz-metrica__badge { background: #fef0c7; color: #93370d; border-color: transparent; }
.voz-metrica--tone-mid .voz-metrica__bar i { background: linear-gradient(90deg, #b54708, #fdb022); }

.voz-metrica--tone-low {
  background: linear-gradient(180deg, #fff1f1 0%, #ffffff 72%);
  border-color: rgba(180, 35, 24, 0.22);
}
.voz-metrica--tone-low::before { background: #b42318; }
.voz-metrica--tone-low .voz-metrica__value { color: #b42318; }
.voz-metrica--tone-low .voz-metrica__badge { background: #fee4e2; color: #b42318; border-color: transparent; }
.voz-metrica--tone-low .voz-metrica__bar i { background: linear-gradient(90deg, #b42318, #f97066); }

.voz-metrica--decod::before { width: 5px; }
.voz-metrica--vacil::before { width: 5px; }
.voz-metrica--regres::before { width: 5px; }

.voz-comp-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.voz-comp-score { display: flex; align-items: center; gap: 0.5rem; }
.voz-comp-score strong { font-family: var(--display); font-size: 1.25rem; }
.voz-word.is-isolated-dim { opacity: 0.22; filter: blur(0.4px); }
.voz-word.is-isolated-focus { opacity: 1; }
.voz-word.is-blocked { opacity: 0.35; pointer-events: none; }
.voz-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}
.voz-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}
.voz-stat strong {
  font-family: var(--display);
  font-size: 1.35rem;
}
.voz-progress { margin: 0.25rem 0 0.5rem; }
.voz-text {
  font-size: 1.2rem;
  line-height: 2;
}
.voz-word {
  display: inline-block;
  padding: 0.1rem 0.2rem;
  border-radius: 6px;
  margin: 0.1rem 0.05rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.voz-word.is-done { background: rgba(6, 118, 71, 0.14); color: #067647; }
.voz-word.is-current {
  background: rgba(200, 16, 46, 0.14);
  color: var(--brand-deep);
  outline: 2px solid rgba(200, 16, 46, 0.35);
}
.voz-live {
  min-height: 4.5rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #f7f7f7;
  border: 1px dashed var(--line);
  color: var(--ink);
}
.rec-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #999;
  margin-right: 0.35rem;
}
.rec-dot.is-on {
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.5);
  animation: pulse-rec 1.2s infinite;
}
@keyframes pulse-rec {
  0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(200, 16, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}
.voz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tag {
  display: inline-flex;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.tag--ok { background: #dcfae6; color: #067647; }
.tag--sub { background: #fef0c7; color: #93370d; }
.tag--omit { background: #fee4e2; color: #b42318; }
.tag--ins { background: #e0f2fe; color: #075985; }
.tag--rep { background: #ece9fe; color: #5925dc; }
.tag--doubt { background: #f3f3f3; color: #333; border: 1px solid #ccc; }
.tag--inv { background: #fce7f6; color: #9d174d; }
.tag--reg { background: #ffedd5; color: #9a3412; }
.tag--sil { background: #ecfdf5; color: #047857; }
.tag--ent { background: #eef2ff; color: #3730a3; }
.tag--nivel-literal { background: #dcfae6; color: #067647; }
.tag--nivel-inferencial { background: #e0f2fe; color: #075985; }
.tag--nivel-critica { background: #ece9fe; color: #5925dc; }
.voz-analysis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.voz-chip {
  display: inline-flex;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #f3f3f3;
}
.voz-chip.tipo-correcta { background: #dcfae6; color: #067647; }
.voz-chip.tipo-sustitucion { background: #fef0c7; color: #93370d; }
.voz-chip.tipo-omision { background: #fee4e2; color: #b42318; }
.voz-chip.tipo-insercion { background: #e0f2fe; color: #075985; }
.voz-chip.tipo-repeticion { background: #ece9fe; color: #5925dc; }
.voz-chip.tipo-dudosa,
.voz-chip.tipo-vacilacion { background: #f3f3f3; color: #333; border: 1px dashed #999; }
.voz-chip.tipo-inversion { background: #fce7f6; color: #9d174d; }
.voz-chip.tipo-regresion { background: #ffedd5; color: #9a3412; }
.voz-chip.tipo-silabeo { background: #ecfdf5; color: #047857; }
.voz-chip.tipo-entonacion { background: #eef2ff; color: #3730a3; }

@media (max-width: 860px) {
  .voz-stats,
  .voz-metricas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}
.field--inline { min-width: 200px; }

.flash {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 500;
}
.flash--error { background: #fde8ec; color: var(--danger); border: 1px solid rgba(200, 16, 46, 0.25); }
.flash--success { background: #0a0a0a; color: #ffffff; }
.flash--info { background: #f3f3f3; color: var(--ink); border: 1px solid var(--line); }

.table-wrap {
  overflow: auto;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.table th,
.table td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: #0a0a0a;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--ink);
  width: fit-content;
}
.badge--admin { background: #c8102e; color: #ffffff; }
.badge--docente { background: #0a0a0a; color: #ffffff; }
.badge--estudiante { background: #f3f3f3; color: #0a0a0a; border: 1px solid #0a0a0a; }
.badge--acudiente { background: #ffffff; color: #c8102e; border: 1px solid #c8102e; }

.site-footer {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .sidebar-toggle { display: inline-flex; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    z-index: 50;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 45;
  }
  .sidebar-backdrop[hidden] { display: none; }
  .topbar__meta { display: none; }
}

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth__visual { min-height: 220px; place-items: center; text-align: center; }
  .auth__visual p { max-width: none; }
  .hero-panel, .page-head { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .tool-hero,
  .tool-hero--compact,
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}
