/* ============================================================
   PANEL-DOCENTE.CSS — Sidebar y marco del panel docente (/recursos/)
   Mismos colores y estructura que el panel docente de aprendomates.com
   (panel-profesor/panel.css): menú lateral azul petróleo, barra superior
   blanca, fondo azul cielo muy claro, acento verde azulado.
   Se carga DESPUÉS de recursos.css: redefine sus tokens para que el contenido
   existente (clases .rec-*) herede la paleta nueva sin reescribirlo.
   Ver PANEL-DOCENTE.md.
   ============================================================ */

body.pd {
  --side: #15495a; --side-text: #d4ecf1; --side-dim: #9cc6d0;
  --sky: #8fc8d1; --bg: #eef6f8; --surface: #fff; --soft: #f5fafb; --line: #d8e8ec;
  --ink: #2a3540; --muted: #5d707a; --primary: #1f8a9c; --primary-hover: #17707f; --primary-soft: #e2f2f5;
  --cream: #fbf2e2;

  /* Tokens de recursos.css reasignados a la paleta de aprendomates */
  --rec-paper: var(--bg);
  --rec-ink: var(--ink);
  --rec-ink-soft: var(--muted);
  --rec-line: var(--line);
  --rec-morado: var(--primary);
  --rec-morado-soft: var(--primary-soft);
  --rec-navy: var(--side);
  --rec-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rec-display: var(--rec-sans);

  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

.pd :focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.pd-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.pd-main { min-width: 0; display: flex; flex-direction: column; }
.pd-main > .rec-main { width: 100%; flex: 1 0 auto; }

/* ---- menú lateral ---- */
.pd-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 20px 14px 14px;
  background: var(--side); color: #fff;
}
.pd-logo { display: block; padding: 9px 12px; background: #fff; border-radius: 10px; }
.pd-logo img { display: block; width: 100%; height: auto; }
.pd-side-sub {
  display: block; margin: 12px 6px 14px;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--side-dim); text-decoration: none;
}
.pd-side-sub:hover { color: #fff; }

.pd-nav { display: flex; flex-direction: column; gap: 2px; }
.pd-grp {
  margin: 14px 12px 4px; font-size: 11px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--side-dim);
}
.pd-grp:first-child { margin-top: 0; }
.pd-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--side-text); font-weight: 500; font-size: 15px; text-decoration: none;
}
.pd-nav a svg {
  width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.pd-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.pd-nav a[aria-current="page"] { background: #fff; color: var(--side); font-weight: 650; }
.pd-nav a:focus-visible { outline-color: #fff; }
.pd-nav a.pd-off { color: var(--side-dim); }
.pd-nav a.pd-off .pd-lock { margin-left: auto; width: 15px; height: 15px; opacity: .8; }
.pd-nav a.pd-off:hover { color: #fff; }

.pd-side-links {
  margin: 14px 12px 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px;
}
.pd-side-links a { color: var(--side-dim); text-decoration: none; }
.pd-side-links a:hover { color: #fff; text-decoration: underline; }

.pd-side-foot {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .14);
  min-width: 0; text-decoration: none; color: #fff;
}
.pd-side-foot { margin-top: auto; }
.pd-nav + .pd-side-links + .pd-side-foot,
.pd-nav + .pd-side-foot { margin-top: 22px; }
.pd-side-foot div { min-width: 0; }
.pd-side-foot b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-side-foot span.pd-role { display: block; font-size: 12px; color: var(--side-dim); }
.pd-avatar {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: var(--sky); color: var(--side); font-weight: 700; font-size: 14px;
}

/* ---- barra superior ---- */
.pd-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 32px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.pd-top-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--side); }
.pd-top-end { display: flex; align-items: center; gap: 12px; }
.pd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.pd-btn-primary { background: var(--primary); color: #fff !important; }
.pd-btn-primary:hover { background: var(--primary-hover); }
.pd-btn-ghost { background: var(--surface); border-color: var(--line); color: var(--side) !important; }
.pd-btn-ghost:hover { border-color: var(--primary); }

.pd-burger {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--side); cursor: pointer;
}
.pd-mlogo { display: none; }

/* subnavegación de Programación (antes en la cabecera) */
.pd-main .rec-subnav-row { background: var(--surface); border-bottom: 1px solid var(--line); }
.pd-main .rec-subnav-row-inner { max-width: none; padding: 10px 32px; }

/* ---- pie ---- */
.pd-main .rec-footer { background: transparent; border-top: 1px solid var(--line); }

/* ---- pantallas pequeñas: el menú pasa a cajón lateral ---- */
@media (max-width: 900px) {
  .pd-app { display: block; }
  .pd-side {
    position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; width: 272px; height: auto;
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: none;
  }
  .pd-side.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(21, 73, 90, .45); }
  .pd-burger { display: inline-flex; }
  .pd-top { padding: 10px 16px; position: sticky; top: 0; z-index: 40; }
  .pd-top-start { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .pd-top-title { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pd-main .rec-subnav-row-inner { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) { .pd-side { transition: none; } }

.pd-hola { font-weight: 600; color: var(--side); font-size: 15px; }
