
.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 1720px;
  margin-inline: auto;
}

.app-shell.auth-locked {
  grid-template-columns: 1fr;
}

.app-shell.student-shell {
  grid-template-columns: 200px minmax(0, 1fr);
  max-width: 1320px;
  margin-inline: auto;
}

/* La profe usa el mismo layout que la alumna: barra lateral + contenido. */
.app-shell.teacher-shell {
  grid-template-columns: 200px minmax(0, 1fr);
  max-width: 1320px;
  margin-inline: auto;
}

.sidebar {
  background: rgba(255, 253, 248, 0.96);
  color: var(--ink);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--taupe);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
}

.brand-logo {
  width: min(190px, 86%);
  height: auto;
  display: block;
  margin: 0 auto;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button,
.ghost-button,
.mode-button,
.primary-button,
.soft-button,
.danger-button,
.icon-button {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
  /* Estas clases se usan tanto en <button> como en <a> (links con pinta de
     botón, ej. WhatsApp/Bizum) — sin esto, cualquier <a> queda subrayado por
     default del navegador. Un solo lugar para las dos veces. */
  text-decoration: none;
}

.nav button {
  width: 100%;
  color: var(--muted);
  background: transparent;
  text-align: left;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-badge {
  background: var(--clay);
  color: #fff;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  flex-shrink: 0;
}

.nav button.active,
.nav button:hover {
  background: var(--brand-smoke);
  color: var(--ink);
}

.sidebar-footer {
  display: none !important;
}

.ghost-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0 14px;
}

.workspace {
  min-width: 0;
}

.topbar {
  min-height: 92px;
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 32px;
}

.topbar-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

.mobile-menu-button,
.mobile-menu-backdrop {
  display: none;
}

.mobile-menu-button {
  min-height: 40px;
  width: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
}

.profile-mobile-nav {
  display: none;
}

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 6px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 0;
}

.mode-button {
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
}

.mode-button.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.content {
  padding: 28px 32px 48px;
}

.student-shell .content {
  /* workspace constrained by app-shell max-width */
}

.teacher-shell .content {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.login-wrap {
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
}
