/* Panel de tutores SDC — look SDC: fondo oscuro, turquesa, amarillo para pendientes */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #0a1120;
  color: #e8eef5;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 20px 14px 48px; }

/* Estructura con menú a la izquierda (en móvil pasa arriba) */
.mp-layout { display: flex; min-height: 100vh; align-items: stretch; }
.mp-side { width: 230px; flex-shrink: 0; background: #0d1626; border-right: 1px solid #1c2a45; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; box-sizing: border-box; }
.mp-brand-title { font-weight: 700; font-size: 15px; margin-top: 2px; }
.mp-sidenav { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; }
.mp-sidenav a { padding: 10px 12px; border-radius: 10px; color: #93a1b5; text-decoration: none; font-size: 14px; font-weight: 600; border: 1px solid transparent; min-height: 44px; display: flex; align-items: center; box-sizing: border-box; }
.mp-sidenav a.is-on { color: #2fd6c3; background: rgba(47, 214, 195, 0.08); border-color: #223150; }
.mp-side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid #1c2a45; }
.mp-main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 26px 20px 48px; box-sizing: border-box; }
.mp-page-head { margin-bottom: 2px; }
.mp-panel { background: #0d1626; border: 1px solid #1c2a45; border-radius: 24px; padding: 20px; }
.mp-kicker { color: #2fd6c3; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.mp-title { font-size: 22px; font-weight: 600; margin-top: 2px; }
.mp-user { color: #93a1b5; font-size: 13px; padding-top: 6px; white-space: nowrap; }
.mp-updated { color: #6b7a90; font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mp-refresh { background: transparent; border: 1px solid #223150; color: #9fd9d0; border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.mp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.mp-kpi { background: #131f33; border: 1px solid #223150; border-radius: 12px; padding: 12px 8px; text-align: center; }
.mp-kpi-num { font-size: 26px; font-weight: 700; color: #2fd6c3; }
.mp-kpi-alert .mp-kpi-num { color: #f4c542; }
.mp-kpi-label { color: #93a1b5; font-size: 11px; margin-top: 2px; }
.mp-toggle { background: transparent; border: 1px solid #2fd6c3; color: #2fd6c3; border-radius: 999px; padding: 9px 16px; font-size: 13px; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; box-sizing: border-box; }
.mp-toggle.is-on { background: #2fd6c3; color: #0d1626; font-weight: 600; }
.mp-filters { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.mp-csv { border-color: #223150; color: #9fd9d0; }
.mp-csv:hover { border-color: #2fd6c3; }
.mp-subject { background: #131f33; border: 1px solid #223150; border-radius: 16px; padding: 14px; margin-top: 12px; }
.mp-subject-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mp-subject-name { font-weight: 600; font-size: 15px; }
.mp-program { color: #6b7a90; font-size: 12px; margin-top: 2px; }
.mp-badge { background: rgba(244, 197, 66, 0.14); color: #f4c542; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.mp-badge-ok { background: rgba(47, 214, 195, 0.12); color: #2fd6c3; }
.mp-tasks { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mp-task { background: #0f1a2d; border: 1px solid #1e2c46; border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mp-task-info { flex: 1; min-width: 140px; }
.mp-task-name { font-size: 14px; font-weight: 600; }
.mp-task-name .mp-chip { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; vertical-align: 1px; }
.mp-task-due { color: #6b7a90; font-size: 12px; margin-top: 2px; }
.mp-task-count { font-size: 18px; font-weight: 700; color: #f4c542; }
.mp-open { background: #2fd6c3; color: #0d1626; border: none; border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer; min-height: 36px; text-decoration: none; display: inline-block; }
.mp-tutor { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mp-tutor-detail { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.mp-chip { background: #1b2a44; color: #9fd9d0; font-size: 12px; font-weight: 600; border-radius: 8px; padding: 4px 8px; }
.mp-note { margin-top: 12px; background: rgba(47, 214, 195, 0.1); border: 1px solid #2fd6c3; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #cfeee9; }
.mp-error { margin-top: 12px; background: rgba(244, 92, 92, 0.1); border: 1px solid #f45c5c; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #f6c9c9; }
.mp-foot { color: #6b7a90; font-size: 12px; margin-top: 14px; }

/* Alertas de atraso y novedades */
.mp-note-late { background: rgba(244, 197, 66, 0.12); border-color: #f4c542; color: #f4dfa0; }
.mp-note-nueva { background: rgba(47, 214, 195, 0.1); border-color: #2fd6c3; }
.mp-chip-nueva { background: #f4c542; color: #0d1626; font-size: 10px; font-weight: 700; border-radius: 6px; padding: 2px 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.mp-task-late { border-color: rgba(244, 197, 66, 0.55); }
.mp-subject-late { border-color: rgba(244, 197, 66, 0.45); }
.mp-late { color: #f4c542; }

/* Informe maquetado imprimible (estilo SDC en pantalla, limpio al imprimir) */
.rep { max-width: 900px; margin: 0 auto; padding: 28px 18px 48px; }
.rep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; border-bottom: 2px solid #2fd6c3; padding-bottom: 14px; }
.rep-title { font-size: 24px; font-weight: 700; margin-top: 4px; }
.rep-actions { display: flex; gap: 8px; }
.rep-actions .mp-toggle { min-height: 40px; }
.rep-meta { color: #93a1b5; font-size: 13px; margin-top: 10px; }
.rep-note { margin-top: 12px; background: rgba(244, 197, 66, 0.12); border: 1px solid #f4c542; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #f4dfa0; }
.rep-sec { margin-top: 26px; }
.rep-h2 { font-size: 18px; font-weight: 700; color: #2fd6c3; margin: 0 0 4px; }
.rep-sub { color: #6b7a90; font-size: 12px; margin-bottom: 10px; }
.rep-ok { color: #2fd6c3; font-size: 13px; padding: 8px 0; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rep-table th { text-align: left; color: #93a1b5; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 10px; border-bottom: 1px solid #223150; }
.rep-table td { padding: 9px 10px; border-bottom: 1px solid #1c2a45; vertical-align: top; }
.rep-table .rep-num { text-align: right; font-weight: 700; color: #f4c542; }
.rep-table tr.rep-late td { background: rgba(244, 197, 66, 0.06); }
.rep-foot { color: #6b7a90; font-size: 11px; margin-top: 26px; border-top: 1px solid #1c2a45; padding-top: 10px; }

@media print {
  body { background: #fff; color: #111; }
  .no-print { display: none !important; }
  .rep { padding: 0; max-width: none; }
  .rep-title, .rep-h2 { color: #0d6b60; }
  .rep-head { border-bottom-color: #0d6b60; }
  .rep-meta, .rep-sub, .rep-foot { color: #555; }
  .mp-kicker { color: #0d6b60; }
  .rep-table th { color: #555; border-bottom-color: #999; }
  .rep-table td { border-bottom-color: #ccc; color: #111; }
  .rep-table .rep-num { color: #8a6d00; }
  .rep-table tr.rep-late td { background: #fff7dd; }
  .rep-note { background: #fff7dd; border-color: #d9b830; color: #6b5600; }
  .rep-ok { color: #0d6b60; }
  .rep-sec { page-break-inside: avoid; }
}
.mp-loading { color: #93a1b5; font-size: 14px; padding: 32px 0; text-align: center; }

/* Login */
.login { background: #0d1626; border: 1px solid #1c2a45; border-radius: 24px; padding: 28px 22px; margin-top: 8vh; }
.login .mp-title { font-size: 24px; }
.login-sub { color: #93a1b5; font-size: 14px; margin-top: 8px; line-height: 1.5; }
.login label { display: block; color: #93a1b5; font-size: 12px; font-weight: 600; margin: 16px 0 6px; }
.login input {
  width: 100%; background: #0f1a2d; border: 1px solid #223150; color: #e8eef5;
  border-radius: 10px; padding: 12px; font-size: 15px; min-height: 48px;
}
.login input:focus { outline: none; border-color: #2fd6c3; }
.login button[type="submit"] {
  width: 100%; margin-top: 20px; background: #2fd6c3; color: #0d1626; border: none;
  border-radius: 10px; padding: 13px; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 48px;
}
.login button[disabled] { opacity: 0.5; cursor: default; }
.logout { background: transparent; border: none; color: #6b7a90; font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }

@media (min-width: 768px) {
  .wrap { padding-top: 40px; }
  .mp-panel { padding: 28px; }
  .mp-title { font-size: 26px; }
}

/* En pantallas estrechas el menú izquierdo pasa a ser una barra superior */
@media (max-width: 820px) {
  .mp-layout { flex-direction: column; }
  .mp-side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px; border-right: none; border-bottom: 1px solid #1c2a45; }
  .mp-sidenav { flex-direction: row; margin-top: 0; margin-left: auto; }
  .mp-sidenav a { min-height: 40px; padding: 8px 12px; }
  .mp-side-foot { margin: 0 0 0 auto; border: none; padding: 0; display: flex; align-items: center; gap: 10px; }
  .mp-main { padding: 18px 14px 40px; }
}
