/* === Calificaciones · ProfeAcademī design === */

:root {
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --verde: #047857;
  --rojo: #b91c1c;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: #fffee0;
  color: #1f2937;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
.mono { font-family: 'Courier New', ui-monospace, monospace; font-feature-settings: 'tnum'; }

/* ── Wave background ── */
.pa-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, #fffee0 0%, #fff8e1 35%, #B7E8EB 100%);
}
.pa-ocean {
  height: 5%; width: 100%; position: absolute; bottom: 0; left: 0;
  background: #015871;
}
.pa-wave {
  background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/85486/wave.svg') repeat-x;
  position: absolute; top: -198px; width: 6400px; height: 198px;
  animation: paWave 7s cubic-bezier(.36,.45,.63,.53) infinite;
  transform: translate3d(0,0,0); opacity: .95;
}
.pa-wave:nth-child(2) {
  top: -175px;
  animation: paWave 7s cubic-bezier(.36,.45,.63,.53) -.125s infinite,
             paSwell 7s ease -1.25s infinite;
  opacity: .55;
}
@keyframes paWave {
  0% { margin-left: 0; }
  100% { margin-left: -1600px; }
}
@keyframes paSwell {
  0%,100% { transform: translate3d(0,-25px,0); }
  50% { transform: translate3d(0,5px,0); }
}

/* ── App shell ── */
.cf-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ── Topbar ── */
.cf-topbar {
  position: fixed; top: 10px; left: 12px; right: 12px; z-index: 100;
  height: 60px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 4px 24px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.65);
  padding: 0 18px;
  display: flex; align-items: center; gap: 18px;
}

.cf-brand {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; flex-shrink: 0;
}
.cf-brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg,#1f2937,#0f0f23);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 15px;
  letter-spacing: -.02em;
  box-shadow: 0 4px 12px rgba(15,15,35,.25);
}
.cf-brand > span {
  font-size: 15px; font-weight: 700; color: #1f2937; letter-spacing: -.01em;
  display: flex; flex-direction: column; line-height: 1.1;
}
.cf-brand-sub {
  display: block; font-size: 9px; font-weight: 500; color: #9ca3af;
  letter-spacing: .08em; text-transform: uppercase;
}

.cf-crumbs {
  flex: 1; display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: #6b7280; font-weight: 500;
  overflow: hidden; white-space: nowrap;
}
.cf-crumb {
  padding: 4px 9px; border-radius: 7px;
  background: none; border: none;
  color: #6b7280; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.cf-crumb:hover { background: rgba(94,75,168,.08); color: #5E4BA8; }
.cf-crumb.active { color: #1f2937; font-weight: 700; cursor: default; background: rgba(0,0,0,.04); }
.cf-crumb.active:hover { background: rgba(0,0,0,.04); color: #1f2937; }
.cf-crumb-sep { color: #d1d5db; font-size: 14px; user-select: none; }

.cf-topbar-user {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.cf-role-pill {
  padding: 3px 9px; border-radius: 7px;
  background: rgba(0,0,0,.06); color: #374151;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.cf-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #5E4BA8; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
}
.cf-topbar-user > span:not(.cf-role-pill) {
  font-size: 13px; font-weight: 600; color: #1f2937;
}
.cf-back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px;
  background: transparent; border: 1px solid rgba(0,0,0,.1);
  border-radius: 8px; color: #6b7280;
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s; text-decoration: none;
}
.cf-back-btn:hover { border-color: #5E4BA8; color: #5E4BA8; background: rgba(94,75,168,.06); }

.cf-logout-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px;
  background: transparent; border: 1px solid rgba(0,0,0,.1);
  border-radius: 8px; color: #6b7280;
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.cf-logout-btn:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,.06); }

/* ── Stage → glassmorphism panel ── */
.cf-stage {
  align-self: flex-start;
  width: calc(100% - 2.5rem);
  max-width: 940px;
  margin: 88px auto 2.5rem;
  padding: 2rem 1.75rem 2.5rem;
  position: relative;
  z-index: 10;

  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 22px;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.05),
    0 24px 64px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.96);
}

/* ── Loading ── */
.cf-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4rem 1rem; color: #6b7280; gap: 1rem;
}
.cf-spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(0,0,0,.1); border-top-color: #5E4BA8;
  border-radius: 50%; animation: cf-spin 0.9s linear infinite;
}
@keyframes cf-spin { to { transform: rotate(360deg); } }

/* ── Back button ── */
.cf-back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600;
  color: #6b7280; background: none; border: none; padding: 0;
  cursor: pointer; margin-bottom: 8px; transition: color .15s, gap .15s;
  line-height: 1;
}
.cf-back-btn:hover { color: #1f2937; gap: 8px; }
.cf-back-btn svg { transition: transform .15s; flex-shrink: 0; }
.cf-back-btn:hover svg { transform: translateX(-3px); }

/* ── Page header ── */
.cf-page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 26px; flex-wrap: wrap;
}
.cf-page-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.95rem; font-weight: 800; color: #1f2937;
  line-height: 1.1; letter-spacing: -.015em; margin: 0;
}
.cf-page-title .accent {
  color: #ff9500; font-family: 'Pacifico', cursive;
  font-weight: 400; font-size: .78em;
}
.cf-page-title .small-tag {
  display: inline-block; background: rgba(94,75,168,.1); color: #5E4BA8;
  font-family: 'Poppins', sans-serif; font-size: .52em; font-weight: 700;
  padding: 4px 10px; border-radius: 8px; vertical-align: middle;
  margin-left: 8px; letter-spacing: .04em; text-transform: uppercase;
}
.cf-page-sub { font-size: 13.5px; color: #6b7280; margin-top: 6px; line-height: 1.45; max-width: 680px; }
.cf-page-sub strong { color: #1f2937; font-weight: 600; }
.cf-page-label {
  font-size: 11px; font-weight: 700; color: #9ca3af;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px;
}

/* ── Buttons ── */
.cf-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border: none; border-radius: 9px;
  font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s; line-height: 1;
}
.cf-btn svg { flex-shrink: 0; }
.cf-btn:active { transform: translateY(1px); }
.cf-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none !important; }

.cf-btn-primary {
  background: linear-gradient(135deg,#7c3aed 0%,#5E4BA8 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(94,75,168,.35);
}
.cf-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(94,75,168,.5); }

.cf-btn-ghost {
  background: rgba(255,255,255,.7); color: #374151;
  border: 1px solid rgba(0,0,0,.1);
}
.cf-btn-ghost:hover { background: #fff; border-color: rgba(0,0,0,.18); transform: translateY(-1px); }

.cf-btn-warm {
  background: linear-gradient(135deg,#FDC500,#ff9500);
  color: #1a1a1a; box-shadow: 0 4px 14px rgba(253,197,0,.4); font-weight: 700;
}
.cf-btn-warm:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(253,197,0,.55); }

.cf-btn-danger {
  background: rgba(239,68,68,.1); color: #b91c1c;
  border: 1px solid rgba(239,68,68,.25);
}
.cf-btn-danger:hover { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.4); }

.cf-btn-lg { padding: 11px 18px; font-size: 14px; }
.cf-btn-sm { padding: 6px 10px; font-size: 11.5px; border-radius: 7px; }

.cf-icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.7);
  color: #6b7280; transition: all .15s; cursor: pointer;
}
.cf-icon-btn:hover { background: #fff; color: #1f2937; border-color: rgba(0,0,0,.15); }
.cf-icon-btn.danger:hover { background: rgba(239,68,68,.1); color: #b91c1c; border-color: rgba(239,68,68,.3); }

/* ── Toolbar ── */
.cf-toolbar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.cf-toolbar-spacer { flex: 1; }
.cf-search {
  display: flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border: 1px solid rgba(0,0,0,.1); border-radius: 9px;
  background: rgba(255,255,255,.78); backdrop-filter: blur(12px);
}
.cf-search input {
  border: none; outline: none; background: transparent;
  font-size: 13px; flex: 1; color: #1f2937; width: 180px;
  font-family: 'Poppins', sans-serif;
}
.cf-search input::placeholder { color: #9ca3af; }
.cf-search svg { color: #9ca3af; flex-shrink: 0; }

/* ── Stats ── */
.cf-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.cf-stat {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 14px; padding: 14px 18px;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.cf-stat.accent {
  background: linear-gradient(135deg,rgba(253,197,0,.18),rgba(255,255,255,.55));
  border-color: rgba(253,197,0,.35);
}
.cf-stat .label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #9ca3af;
}
.cf-stat .value {
  font-size: 1.7rem; font-weight: 800; color: #1f2937;
  line-height: 1.1; margin-top: 4px;
  font-family: 'Poppins', sans-serif; letter-spacing: -.02em;
}
.cf-stat .value.green { color: #047857; }
.cf-stat .value.red   { color: #b91c1c; }
.cf-stat .sub { font-size: 11px; color: #6b7280; margin-top: 2px; font-weight: 500; }

/* ── Cursos grid ── */
.cf-cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.cf-curso-card {
  background: rgba(255,255,255,.85);
  border: 1.5px solid rgba(0,0,0,.06);
  border-radius: 16px; padding: 20px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.23,1,.32,1);
  position: relative; overflow: hidden;
  text-align: left; display: flex; flex-direction: column; gap: 0;
}
.cf-curso-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: var(--card-color, #6366f1);
  transform: translateY(-5px); transition: transform .3s;
}
.cf-curso-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-color, rgba(94,75,168,.3));
  box-shadow: 0 16px 40px rgba(0,0,0,.15);
}
.cf-curso-card:hover::before { transform: translateY(0); }

.cf-curso-tag {
  font-family: 'Pacifico', cursive;
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--card-color, #6366f1);
  line-height: 1;
  letter-spacing: -.01em;
  margin-bottom: 8px;
}
.cf-curso-name {
  font-family: 'Abril Fatface', cursive;
  font-size: 0.9rem;
  font-weight: 400;
  color: #374151;
  line-height: 1.4;
}
.cf-curso-asig {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px; color: #b45309; font-size: 11px; font-weight: 600;
  background: rgba(253,197,0,.15); padding: 3px 9px; border-radius: 99px;
}
.cf-curso-meta {
  display: flex; justify-content: space-between;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed rgba(0,0,0,.07);
  font-size: 11px; color: #9ca3af;
}
.cf-curso-meta span strong { color: #1f2937; font-weight: 700; font-size: 13px; display: block; }

/* ── Borradores ── */
.cf-borradores {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 18px; margin-bottom: 26px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(31,38,135,.06);
}
.cf-borradores-head {
  display: flex; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid rgba(0,0,0,.06);
  background: rgba(239,68,68,.05); gap: 10px;
}
.cf-borradores-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #1f2937;
}
.cf-borradores-title .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,.2);
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
  50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.cf-borradores-sub {
  font-size: 11.5px; color: #9ca3af; margin-left: auto; font-weight: 500;
}
.cf-borrador-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; border-bottom: 1px dashed rgba(0,0,0,.06);
}
.cf-borrador-row:last-child { border-bottom: none; }
.cf-borrador-name { font-size: 13.5px; font-weight: 600; color: #1f2937; }
.cf-borrador-meta { font-size: 11px; color: #9ca3af; margin-top: 1px; }
.cf-borrador-meta .casilla { color: #5E4BA8; font-weight: 600; }
.cf-borrador-info { flex: 1; min-width: 0; }

/* ── Empty ── */
.cf-empty {
  text-align: center; padding: 56px 24px; color: #6b7280;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(16px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.65);
}
.cf-empty-icon { font-size: 3.4rem; margin-bottom: 10px; }
.cf-empty-title { font-size: 1.25rem; font-weight: 800; color: #1f2937; margin: 0 0 6px; }
.cf-empty-sub { font-size: 13px; max-width: 380px; margin: 0 auto; }

/* ── Modalidad ── */
.cf-modalidad-wrap {
  display: grid; grid-template-columns: 1fr; gap: 22px;
  max-width: 880px; margin: 0 auto;
}
@media (min-width: 720px) { .cf-modalidad-wrap { grid-template-columns: 1fr 1fr; } }

.cf-modalidad-card {
  position: relative; border-radius: 24px; overflow: hidden;
  cursor: pointer; transition: all .35s cubic-bezier(.23,1,.32,1);
  min-height: 310px; display: flex; flex-direction: column;
  padding: 32px; border: 1px solid transparent;
}
.cf-modalidad-card:hover { transform: translateY(-6px) scale(1.01); }

.cf-mod-primary {
  background: linear-gradient(135deg,#1f2937 0%,#0f0f23 100%);
  color: #fff; box-shadow: 0 12px 36px rgba(15,15,35,.25);
}
.cf-mod-primary:hover { box-shadow: 0 24px 60px rgba(15,15,35,.4); }

.cf-mod-secondary {
  background: rgba(255,255,255,.92);
  border-color: rgba(0,0,0,.06); color: #1f2937;
  box-shadow: 0 8px 28px rgba(31,38,135,.08);
}
.cf-mod-secondary:hover { box-shadow: 0 20px 48px rgba(94,75,168,.18); border-color: rgba(94,75,168,.25); }

.cf-mod-blob {
  position: absolute; width: 240px; height: 240px; border-radius: 50%;
  top: -100px; right: -100px; pointer-events: none;
  transition: transform .8s cubic-bezier(.23,1,.32,1);
}
.cf-mod-primary .cf-mod-blob {
  background: radial-gradient(circle,rgba(124,58,237,.5),transparent 70%);
}
.cf-mod-secondary .cf-mod-blob {
  background: radial-gradient(circle,rgba(253,197,0,.35),transparent 70%);
}
.cf-modalidad-card:hover .cf-mod-blob { transform: scale(1.4); }

.cf-modalidad-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 18px; position: relative; z-index: 1;
}
.cf-mod-primary .cf-modalidad-icon {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff;
}
.cf-mod-secondary .cf-modalidad-icon {
  background: rgba(94,75,168,.1); color: #5E4BA8;
}

.cf-modalidad-title {
  font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em;
  line-height: 1; position: relative; z-index: 1;
}
.cf-mod-primary .cf-modalidad-title { color: #fff; }

.cf-modalidad-desc {
  font-size: 13.5px; line-height: 1.55; margin-top: 10px; flex: 1;
  position: relative; z-index: 1;
}
.cf-mod-primary .cf-modalidad-desc { color: rgba(255,255,255,.7); }
.cf-mod-secondary .cf-modalidad-desc { color: #6b7280; }

.cf-modalidad-features {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px;
  position: relative; z-index: 1;
}
.cf-modalidad-feature {
  font-size: 10.5px; font-weight: 600; padding: 3px 9px;
  border-radius: 99px; letter-spacing: .02em;
}
.cf-mod-primary .cf-modalidad-feature {
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.12);
}
.cf-mod-secondary .cf-modalidad-feature {
  background: rgba(0,0,0,.04); color: #374151;
}

.cf-modalidad-cta {
  margin-top: 18px; display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700;
  position: relative; z-index: 1; transition: gap .3s;
}
.cf-modalidad-card:hover .cf-modalidad-cta { gap: 10px; }
.cf-mod-primary .cf-modalidad-cta { color: #fff; }
.cf-mod-secondary .cf-modalidad-cta { color: #5E4BA8; }

/* ── Table wrap ── */
.cf-table-wrap {
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 8px 28px rgba(31,38,135,.06);
}
.cf-table-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid rgba(0,0,0,.06);
  flex-wrap: wrap; gap: 10px;
}
.cf-table-title {
  font-size: 13.5px; font-weight: 700; color: #1f2937;
  display: flex; align-items: center; gap: 8px;
}
.cf-table-title .live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18);
}
.cf-table-tabs {
  display: flex; gap: 4px;
  background: rgba(0,0,0,.04); padding: 3px; border-radius: 9px;
}
.cf-table-tab {
  padding: 5px 12px; border-radius: 6px; border: none;
  font-size: 11.5px; font-weight: 600; color: #6b7280;
  cursor: pointer; transition: all .15s; background: transparent;
  font-family: inherit;
}
.cf-table-tab.active { background: #fff; color: #5E4BA8; box-shadow: 0 1px 3px rgba(0,0,0,.06); }

.cf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cf-table thead th {
  background: rgba(94,75,168,.05); padding: 12px 16px;
  text-align: left; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: #6b7280;
  border-bottom: 1px solid rgba(94,75,168,.12); vertical-align: bottom;
  white-space: nowrap;
}
.cf-table thead th .col-meta {
  display: block; font-size: 9.5px; font-weight: 500; color: #9ca3af;
  letter-spacing: .04em; text-transform: none; margin-top: 3px;
  font-family: 'Courier New', monospace;
}
.cf-table thead th.empty-col {
  color: #d1d5db; font-style: italic; font-weight: 400;
  text-transform: none; letter-spacing: 0; font-size: 11px;
}
.cf-table tbody td {
  padding: 11px 16px; border-bottom: 1px solid rgba(0,0,0,.05); color: #1f2937;
  white-space: nowrap;
}
.cf-table tbody tr:last-child td { border-bottom: none; }
.cf-table tbody tr:hover td { background: rgba(94,75,168,.03); }

.cf-st-name { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.cf-st-num {
  width: 22px; font-size: 11px; color: #9ca3af; font-weight: 600;
  flex-shrink: 0; text-align: right;
}
.cf-st-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.cf-st-fullname { font-weight: 600; font-size: 13px; color: #1f2937; }
.cf-st-rut { font-size: 10.5px; color: #9ca3af; font-family: 'Courier New', monospace; letter-spacing: -.02em; }

/* ── Eval column head ── */
.cf-eval-col-head { display: flex; flex-direction: column; gap: 2px; min-width: 86px; }
.cf-eval-col-head .name { font-weight: 600; color: #1f2937; font-size: 12px; letter-spacing: 0; text-transform: none; }
.cf-eval-col-head .date { font-size: 10px; color: #9ca3af; }

/* ── Grade chips ── */
.cf-grade {
  display: inline-block; padding: 2px 10px; border-radius: 99px;
  font-weight: 700; font-size: 12px; min-width: 42px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.cf-grade.aprobado { background: rgba(16,185,129,.14); color: #047857; border: 1px solid rgba(16,185,129,.3); }
.cf-grade.reprobado { background: rgba(239,68,68,.13); color: #b91c1c; border: 1px solid rgba(239,68,68,.3); }
.cf-grade.empty { color: #d1d5db; background: transparent; border: 1px dashed rgba(0,0,0,.1); font-weight: 400; }
.cf-grade.bloqueado { background: rgba(94,75,168,.1); color: #5E4BA8; border: 1px solid rgba(94,75,168,.2); }

.cf-promedio {
  font-family: 'Poppins', sans-serif; font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 800;
  padding: 2px 10px; border-radius: 99px;
  display: inline-block;
}
.cf-promedio.aprobado { background: rgba(16,185,129,.14); color: #047857; border: 1px solid rgba(16,185,129,.3); }
.cf-promedio.reprobado { background: rgba(239,68,68,.13); color: #b91c1c; border: 1px solid rgba(239,68,68,.3); }
.cf-promedio.empty { color: #d1d5db; background: transparent; border: 1px dashed rgba(0,0,0,.1); }

/* ── Eval list tags ── */
.cf-eval-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 20px; border-top: 1px solid rgba(0,0,0,.06);
  background: rgba(0,0,0,.02);
}
.cf-eval-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 12px;
  background: #fff; border: 1px solid rgba(94,75,168,.2); border-radius: 99px;
  font-size: 12px; font-weight: 600; color: #1f2937;
}
.cf-eval-tag .casilla-pill {
  font-size: 9.5px; background: rgba(94,75,168,.1); color: #5E4BA8;
  padding: 2px 7px; border-radius: 99px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.cf-eval-tag-edit {
  background: rgba(94,75,168,.08); border: none;
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #5E4BA8; cursor: pointer; transition: all .15s;
}
.cf-eval-tag-edit:hover { background: #5E4BA8; color: #fff; }

/* ── Nueva Eval panel (config) ── */
.cf-eval-panel {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 16px; padding: 18px;
  margin-bottom: 18px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px;
  backdrop-filter: blur(16px);
}
.cf-eval-field label {
  display: block; font-size: 10px; font-weight: 700; color: #9ca3af;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px;
}
.cf-input {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid rgba(0,0,0,.08); border-radius: 10px;
  font-family: 'Poppins', inherit; font-size: 14px; font-weight: 600;
  color: #1f2937; background: #fff; outline: none; transition: all .2s;
}
.cf-input:focus { border-color: #5E4BA8; box-shadow: 0 0 0 3px rgba(94,75,168,.15); }

/* ── Auto-save indicator ── */
.cf-saveindicator {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: #047857;
  padding: 5px 10px; background: rgba(16,185,129,.1);
  border-radius: 99px; border: 1px solid rgba(16,185,129,.2);
}
.cf-saveindicator .pip {
  width: 7px; height: 7px; border-radius: 50%; background: #10b981;
  animation: dot-pulse 2s ease-in-out infinite;
}

/* ── Kbd hint ── */
.cf-kbdhint {
  display: flex; align-items: center; gap: 14px;
  font-size: 11.5px; color: #6b7280;
  padding: 10px 16px;
  background: rgba(94,75,168,.05); border: 1px dashed rgba(94,75,168,.2);
  border-radius: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.cf-kbd {
  font-family: 'Courier New', monospace;
  background: #fff; border: 1px solid rgba(0,0,0,.12);
  border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 7px; font-size: 10.5px; font-weight: 700;
  color: #374151; margin: 0 2px;
}

/* ── Puntaje cell ── */
.cf-puntaje-cell { display: inline-flex; align-items: baseline; gap: 5px; }
.cf-puntaje-wrap {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: #fff; border: 1.5px solid rgba(0,0,0,.1);
  border-radius: 9px; padding: 4px 10px; transition: all .2s;
}
.cf-puntaje-wrap:focus-within { border-color: #5E4BA8; box-shadow: 0 0 0 3px rgba(94,75,168,.15); }
.cf-puntaje-wrap.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); background: rgba(239,68,68,.04); }
.cf-puntaje-cell input, .cf-puntaje-wrap input {
  width: 48px; border: none; outline: none;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 14px; text-align: right; color: #1f2937;
  background: transparent; font-variant-numeric: tabular-nums;
}
.cf-puntaje-cell input::-webkit-outer-spin-button,
.cf-puntaje-cell input::-webkit-inner-spin-button,
.cf-puntaje-wrap input::-webkit-outer-spin-button,
.cf-puntaje-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cf-puntaje-max { font-size: 11px; color: #9ca3af; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── Nota directa input ── */
.cf-nota-input {
  width: 60px; border: 1.5px solid rgba(0,0,0,.12); border-radius: 9px;
  outline: none; padding: 4px 8px;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 14px; text-align: center; color: #1f2937;
  background: #fff; font-variant-numeric: tabular-nums;
  transition: border-color .18s, box-shadow .18s;
}
.cf-nota-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.cf-nota-input.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); background: rgba(239,68,68,.04); }
.cf-nota-input::-webkit-outer-spin-button,
.cf-nota-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Live grade ── */
.cf-grade-live {
  display: inline-block; padding: 2px 10px; border-radius: 99px;
  font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums;
  min-width: 42px; text-align: center; transition: background 180ms, color 180ms;
}
.cf-grade-live.aprobado { background: rgba(16,185,129,.14); color: #047857; border: 1px solid rgba(16,185,129,.3); }
.cf-grade-live.reprobado { background: rgba(239,68,68,.13); color: #b91c1c; border: 1px solid rgba(239,68,68,.3); }
.cf-grade-live.pulse { animation: grade-pulse 280ms cubic-bezier(.2,.8,.2,1); }
@keyframes grade-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ── Estado pill ── */
.cf-estado-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700; font-family: 'Poppins', sans-serif;
}
.cf-estado-pip { width: 5px; height: 5px; border-radius: 50%; }
.cf-estado-pill.aprobado { background: rgba(16,185,129,.12); color: #047857; }
.cf-estado-pill.aprobado .cf-estado-pip { background: #10b981; }
.cf-estado-pill.reprobado { background: rgba(239,68,68,.12); color: #b91c1c; }
.cf-estado-pill.reprobado .cf-estado-pip { background: #ef4444; }
.cf-estado-pill.pendiente { background: rgba(0,0,0,.04); color: #9ca3af; }
.cf-estado-pill.pendiente .cf-estado-pip { background: #9ca3af; }

/* ── Pct cell ── */
.cf-pct-cell { font-variant-numeric: tabular-nums; color: #6b7280; font-weight: 600; font-size: 12.5px; }
.cf-pct-cell.empty { color: #d1d5db; }

/* ── Drafts inline ── */
.cf-drafts-inline {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 12px;
  background: rgba(94,75,168,.06); border: 1px dashed rgba(94,75,168,.25);
  margin-top: 14px; font-size: 12.5px; color: #5E4BA8; flex-wrap: wrap;
}
.cf-drafts-inline strong { color: #1f2937; font-weight: 600; }
.cf-draft-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; background: #fff; border: 1px solid rgba(94,75,168,.2);
  border-radius: 99px; font-size: 11.5px; font-weight: 600;
  color: #5E4BA8; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.cf-draft-chip:hover { background: #5E4BA8; color: #fff; }

/* ── Sumativas ── */
.cf-sum-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px;
}
.cf-sum-card {
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 4px 16px rgba(31,38,135,.06);
  display: flex; flex-direction: column; gap: 0;
}
.cf-sum-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding-bottom: 12px;
  border-bottom: 1px dashed rgba(0,0,0,.07); margin-bottom: 12px;
}
.cf-sum-stu { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cf-sum-stu-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  color: #fff; font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cf-sum-name { font-size: 13.5px; font-weight: 700; color: #1f2937; line-height: 1.15; }
.cf-sum-rut { font-size: 10.5px; color: #9ca3af; font-family: 'Courier New', monospace; }

.cf-sum-prom { text-align: right; line-height: 1.05; flex-shrink: 0; }
.cf-sum-prom-val {
  font-size: 1.4rem; font-weight: 800;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.cf-sum-prom-val.aprobado { color: #047857; }
.cf-sum-prom-val.reprobado { color: #b91c1c; }
.cf-sum-prom-val.empty { color: #d1d5db; }
.cf-sum-prom-label { font-size: 9.5px; font-weight: 700; color: #9ca3af; letter-spacing: .06em; text-transform: uppercase; margin-top: 1px; }

.cf-sum-chips {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 30px;
}
.cf-sum-chip {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; padding: 5px 10px; border-radius: 9px;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  cursor: pointer; transition: all .15s; border: 1px solid transparent;
  user-select: none;
}
.cf-sum-chip:hover { transform: translateY(-1px); }
.cf-sum-chip:hover .cf-sum-chip-x { opacity: 1; transform: scale(1); }
.cf-sum-chip.aprobado { background: rgba(16,185,129,.14); color: #047857; border-color: rgba(16,185,129,.3); }
.cf-sum-chip.reprobado { background: rgba(239,68,68,.13); color: #b91c1c; border-color: rgba(239,68,68,.3); }
.cf-sum-chip-pending { border-style: dashed !important; border-color: rgba(94,75,168,.4) !important; background: rgba(94,75,168,.06) !important; color: #5E4BA8 !important; opacity: .85; }
.cf-sum-chip-x {
  position: absolute; top: -6px; right: -6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #ef4444; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; opacity: 0; transform: scale(.7);
  transition: all .15s; border: 2px solid #fff; font-weight: 700; line-height: 1;
}

.cf-sum-add-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px; border: 1px dashed rgba(94,75,168,.4);
  background: transparent; border-radius: 9px; color: #5E4BA8;
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.cf-sum-add-chip:hover { background: rgba(94,75,168,.08); border-color: #5E4BA8; border-style: solid; }

.cf-sum-add-row {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1.5px solid #5E4BA8; border-radius: 9px;
  padding: 2px 4px; box-shadow: 0 0 0 3px rgba(94,75,168,.15);
}
.cf-sum-nota-inp {
  width: 48px; border: none; outline: none; padding: 4px 6px;
  font-family: 'Poppins', inherit; font-weight: 700;
  font-size: 13px; text-align: center; background: transparent; color: #1f2937;
}
.cf-sum-add-ok {
  width: 24px; height: 24px; border-radius: 6px;
  border: none; cursor: pointer;
  background: #10b981; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.cf-sum-add-cancel {
  width: 24px; height: 24px; border-radius: 6px;
  border: none; cursor: pointer;
  background: rgba(0,0,0,.06); color: #6b7280;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 14px;
}

/* ── Modal ── */
.cf-modal-bg {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15,15,35,.45); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 16px;
  animation: fadeIn .2s;
}
.cf-modal-bg.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.cf-modal-box {
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 22px; width: 100%; max-width: 480px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  animation: modalin .3s cubic-bezier(.34,1.4,.64,1);
  overflow: hidden;
}
@keyframes modalin { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; } }

.cf-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 20px 22px 16px; border-bottom: 1px solid rgba(0,0,0,.06);
}
.cf-modal-title {
  font-size: 15px; font-weight: 800; color: #1f2937;
  display: flex; align-items: center; gap: 8px; margin: 0; line-height: 1.2;
}
.cf-modal-sub { font-size: 12px; color: #6b7280; margin: 3px 0 0; }
.cf-modal-x {
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.05); color: #6b7280;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0;
}
.cf-modal-x:hover { background: rgba(239,68,68,.12); color: #ef4444; }

.cf-modal-body { padding: 22px; }
.cf-modal-foot {
  padding: 14px 22px 18px; border-top: 1px solid rgba(0,0,0,.06);
  display: flex; justify-content: flex-end; gap: 8px;
  background: rgba(0,0,0,.02);
}

.cf-field { margin-bottom: 14px; }
.cf-field label { display: block; font-size: 11px; font-weight: 700; color: #374151; margin-bottom: 6px; letter-spacing: .02em; }
.cf-field .hint { font-size: 11px; color: #9ca3af; margin-top: 5px; line-height: 1.4; }
.cf-field input, .cf-field select {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid rgba(0,0,0,.1); border-radius: 10px;
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  color: #1f2937; background: #fff; outline: none; transition: all .2s;
}
.cf-field input:focus, .cf-field select:focus { border-color: #5E4BA8; box-shadow: 0 0 0 3px rgba(94,75,168,.15); }
.cf-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Quick select buttons inside modal */
.cf-quick-row {
  display: flex; gap: 6px; margin-top: 6px;
}
.cf-quick-btn {
  flex: 1; padding: 7px 6px; border-radius: 8px;
  border: 1px solid rgba(0,0,0,.1); background: rgba(255,255,255,.7);
  color: #374151; font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.cf-quick-btn:hover, .cf-quick-btn.active { background: #5E4BA8; color: #fff; border-color: #5E4BA8; }

/* ── Toasts ── */
.cf-toasts {
  position: fixed; bottom: 24px; right: 18px; z-index: 600;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.cf-toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: #fff;
  border: 1px solid rgba(0,0,0,.08); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  font-size: 13px; font-weight: 600; color: #1f2937;
  min-width: 280px; pointer-events: auto;
  animation: toastin .3s cubic-bezier(.34,1.4,.64,1);
}
@keyframes toastin { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; } }
.cf-toast.success { border-left: 3px solid #10b981; }
.cf-toast.success .cf-toast-icon { background: rgba(16,185,129,.12); color: #047857; }
.cf-toast.error { border-left: 3px solid #ef4444; }
.cf-toast.error .cf-toast-icon { background: rgba(239,68,68,.12); color: #b91c1c; }
.cf-toast.warn { border-left: 3px solid #f59e0b; }
.cf-toast.warn .cf-toast-icon { background: rgba(245,158,11,.12); color: #b45309; }
.cf-toast-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
/* Legacy pip style */
.cf-toast .pip { display: none; }

/* ── Banner ── */
.cf-banner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: 14px;
  margin-bottom: 22px; font-size: 13px; line-height: 1.45;
}
.cf-banner.warn { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: #92400e; }
.cf-banner.warn strong { color: #78350f; }
.cf-banner.info { background: rgba(94,75,168,.08); border: 1px solid rgba(94,75,168,.2); color: #5E4BA8; }
.cf-banner svg { flex-shrink: 0; margin-top: 1px; }

/* ── Tabs ── */
.cf-tabs {
  display: flex; gap: 2px; border-bottom: 1px solid rgba(0,0,0,.06); margin-bottom: 20px;
}
.cf-tab {
  padding: 8px 14px; background: none; border: none;
  font-size: 13px; font-weight: 500; color: #6b7280;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s; cursor: pointer; font-family: inherit;
}
.cf-tab:hover { color: #1f2937; }
.cf-tab.active { color: #5E4BA8; border-bottom-color: #5E4BA8; font-weight: 600; }

/* ── Utility ── */
.cf-hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 720px) {
  .cf-stage {
    width: calc(100% - 1.5rem);
    margin-top: 82px;
    padding: 1.5rem 1rem 2rem;
    border-radius: 18px;
  }
  .cf-page-title { font-size: 1.5rem; }
  .cf-crumbs { display: none; }
  .cf-role-pill { display: none; }
  .cf-eval-panel { grid-template-columns: 1fr; }
  .cf-stats { grid-template-columns: 1fr 1fr; }
  .cf-table-wrap { overflow-x: auto; }
  .cf-cursos-grid { grid-template-columns: 1fr; }
  .cf-sum-grid { grid-template-columns: 1fr; }
  .cf-form-row { grid-template-columns: 1fr; }
  .cf-modalidad-card { min-height: auto; padding: 24px 20px; }
  .cf-toasts { right: 8px; left: 8px; }
  .cf-toast { min-width: 0; }
}

/* ============================================================
   Overrides — Mis cursos & Evaluaciones panel
   ============================================================ */
/* Título "Mis cursos" en amarillo + 25% más grande (1.95rem → 2.44rem) */
.cf-page-title.cf-mis-cursos-title {
  color: #ffc107;
  font-size: 2.44rem;
}

/* Panel Evaluaciones: stage 10% más ancho (940px → 1034px) */
body.cf-vista-evaluar .cf-stage,
.cf-stage.cf-stage-evaluar {
  max-width: 1034px;
}

/* ============================================================
   Notas Acumulativas v2 · Planilla continua
   ============================================================ */
.cf-grid-wrap {
  position: relative;
  border-radius: 16px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 8px 32px rgba(0,40,80,0.08);
  overflow: auto;
  max-width: 100%;
}

.cf-grid {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13px;
}

.cf-grid thead th {
  position: sticky; top: 0; z-index: 3;
  background: rgba(245,250,255,0.92);
  backdrop-filter: blur(10px);
  font-weight: 600;
  font-size: 12px;
  color: #1d3a5f;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0,40,80,0.10);
  text-align: center;
  white-space: nowrap;
}

.cf-grid thead th.cf-col-est {
  text-align: left;
  padding-left: 16px;
  min-width: 240px;
  position: sticky; left: 0; z-index: 4;
}

.cf-grid thead th.cf-col-prom {
  background: rgba(255, 235, 200, 0.85);
  color: #7a4a00;
  position: sticky; right: 0; z-index: 4;
}

.cf-grid tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0,40,80,0.06);
  text-align: center;
  vertical-align: middle;
}

.cf-grid tbody td.cf-col-est {
  text-align: left;
  padding-left: 16px;
  position: sticky; left: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  z-index: 2;
  font-weight: 500;
  color: #1d3a5f;
}

.cf-grid tbody tr:hover td { background: rgba(255, 165, 0, 0.04); }
.cf-grid tbody tr:hover td.cf-col-est { background: rgba(255, 165, 0, 0.10); }

/* Celda editable — visible siempre, estilo planilla */
.cf-cell-input {
  width: 100%;
  max-width: 60px;
  border: 1px solid rgba(0,40,80,0.18);
  background: rgba(255,255,255,0.75);
  text-align: center;
  font: inherit;
  font-weight: 600;
  color: #1d3a5f;
  padding: 6px 4px;
  border-radius: 6px;
  outline: none;
  transition: border-color .12s, background .12s, box-shadow .12s;
  -moz-appearance: textfield;
}
.cf-cell-input::-webkit-outer-spin-button,
.cf-cell-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cf-cell-input::placeholder { color: rgba(0,40,80,.25); font-weight: 400; }

.cf-cell-input:hover  { border-color: rgba(255,140,0,0.55); background: #fff; }
.cf-cell-input:focus  { border-color: #ff9500; background: #fff; box-shadow: 0 0 0 3px rgba(255,149,0,0.20); }
.cf-cell-input.cf-saving { background: rgba(255,200,100,0.20); }
.cf-cell-input.cf-saved  { background: rgba(120,220,140,0.25); }
.cf-cell-input.cf-error  { border-color: #d33; background: rgba(220,60,60,0.10); color: #a00; }
.cf-cell-input.cf-aprobado  { color: #1b7d3a; }
.cf-cell-input.cf-reprobado { color: #c1262a; }

/* Tick verde temporal al guardar */
.cf-cell-wrap { position: relative; display: inline-block; }
.cf-cell-tick {
  position: absolute; top: -2px; right: -6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #28a745;
  color: white;
  font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.5);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.cf-cell-tick.show { opacity: 1; transform: scale(1); }

/* Columna Promedio */
.cf-grid td.cf-col-prom {
  position: sticky; right: 0;
  background: rgba(255, 248, 235, 0.92);
  backdrop-filter: blur(8px);
  font-weight: 700;
  font-size: 14px;
  z-index: 2;
}
.cf-prom-pill {
  display: inline-block;
  min-width: 38px;
  padding: 4px 8px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.cf-prom-pill.aprobado  { background: rgba(40,167,69,.15);  color: #1b7d3a; }
.cf-prom-pill.reprobado { background: rgba(220,53,69,.15);   color: #c1262a; }
.cf-prom-pill.empty     { color: #999; }

/* Cabecera de cada columna actividad (con menú de eliminar) */
.cf-col-act {
  position: relative;
  min-width: 80px;
}
.cf-col-act .cf-col-del {
  position: absolute;
  top: 4px; right: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.08);
  color: #555;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .15s;
}
.cf-col-act:hover .cf-col-del { opacity: 1; }
.cf-col-act .cf-col-del:hover { background: rgba(220,53,69,.85); color: #fff; }

/* Botón "+ Nueva Actividad" */
.cf-add-col-btn {
  border: 1px dashed rgba(255,149,0,.55);
  background: rgba(255,255,255,.6);
  color: #ff7300;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition: background .15s, transform .1s;
}
.cf-add-col-btn:hover { background: rgba(255,149,0,.12); }
.cf-add-col-btn:active { transform: scale(.97); }

/* Variante "+ Múltiples" — secundaria, sin acaparar atención */
.cf-add-bulk-btn {
  border-style: solid;
  border-color: rgba(0,40,80,.18);
  color: #1d3a5f;
  background: rgba(255,255,255,.55);
}
.cf-add-bulk-btn:hover { background: rgba(0,40,80,.06); border-color: rgba(0,40,80,.32); }

/* Cabecera editable inline */
.cf-col-title {
  display: inline-block;
  min-width: 60px;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: text;
  outline: none;
  border: 1px solid transparent;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.cf-col-title:hover { border-color: rgba(255,140,0,.30); background: rgba(255,255,255,.55); }
.cf-col-title:focus { border-color: #ff9500; background: #fff; box-shadow: 0 0 0 3px rgba(255,149,0,.18); }
.cf-col-title.cf-renaming { background: rgba(255,200,100,.25); }
.cf-col-title.cf-renamed  { background: rgba(120,220,140,.30); }

/* Modal nueva actividad */
.cf-mini-form { display: flex; flex-direction: column; gap: 12px; }
.cf-mini-form input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid rgba(0,40,80,.18);
  border-radius: 8px;
  outline: none;
}
.cf-mini-form input:focus { border-color: #ff9500; box-shadow: 0 0 0 3px rgba(255,149,0,.18); }
