/* =========================================================
   PERFIL DEL ESTUDIANTE — CSS COMPLETO (Dark Premium)
   Clases Particulares La Serena
   ========================================================= */

:root{
  --bg:#0b1220;
  --card:#0f1a33;
  --card2:#0c1730;
  --line:rgba(255,255,255,.10);
  --line2:rgba(255,255,255,.14);
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.72);
  --muted2:rgba(234,240,255,.55);

  --accent:#6ec6ff;
  --accent2:#9de1ff;

  --good:#62f6b3;
  --warn:#ffd36e;
  --bad:#ff6e6e;

  --shadow: 0 18px 55px rgba(0,0,0,.45);
  --shadow2: 0 10px 25px rgba(0,0,0,.35);

  --radius:18px;
  --radius2:22px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(110,198,255,.10), transparent 55%),
    radial-gradient(1000px 700px at 85% 10%, rgba(157,225,255,.08), transparent 55%),
    var(--bg);
  color:var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button,input{font:inherit;color:inherit}

/* =========================================================
   LAYOUT
   ========================================================= */

.wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px;
}

.section{
  margin-top: 16px;
}

.card,
.panel,
.box{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.card-inner{
  padding: 16px;
}

/* =========================================================
   TOP BAR
   ========================================================= */

.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}

.brand-badge{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  font-weight: 800;
  letter-spacing: .5px;
  background: rgba(110,198,255,.10);
  border: 1px solid rgba(110,198,255,.22);
  box-shadow: 0 10px 25px rgba(0,0,0,.28);
}

.brand-text{
  display:flex;
  flex-direction:column;
  gap: 2px;
  min-width: 0;
}

.brand-text .t1{
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text .t2{
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  user-select: none;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(110,198,255,.25);
}

.btn:active{transform: translateY(0)}

.btn-accent{
  border-color: rgba(110,198,255,.25);
  background: rgba(110,198,255,.10);
}

.btn-accent:hover{
  background: rgba(110,198,255,.14);
  border-color: rgba(110,198,255,.35);
}

.btn-sm{
  padding: 8px 12px;
  font-size: 13px;
}

/* =========================================================
   HEADER PERFIL (ALUMNO)
   ========================================================= */

.profile{
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 16px;
}

.avatar{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  font-weight: 900;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(234,240,255,.92);
}

.profile-info{
  min-width: 0;
  display:flex;
  flex-direction:column;
  gap: 3px;
}

.profile-info .name{
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .2px;
  line-height: 1.1;
}

.profile-info .meta{
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   TITULOS DE SECCION (icono + titulo + boton)
   ========================================================= */

.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}

.section-title{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .2px;
}

.section-title .icon{
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}

.counter{
  margin-left: 10px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(234,240,255,.85);
}

/* =========================================================
   FRASE DE APOYO
   ========================================================= */

.quote{
  padding: 14px 16px 16px;
}

.quote p{
  margin: 0;
  color: rgba(234,240,255,.86);
  line-height: 1.45;
}

/* =========================================================
   TABLA (PRÓXIMAS CLASES)
   ========================================================= */

.table-wrap{
  padding: 12px 12px 14px;
}

.table{
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.12);
}

.table th, .table td{
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13.5px;
}

.table th{
  font-size: 12px;
  color: rgba(234,240,255,.72);
  letter-spacing: .8px;
  text-transform: uppercase;
  background: rgba(255,255,255,.03);
}

.table tr:last-child td{border-bottom: 0}

.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  white-space: nowrap;
}

.pill.online{
  border-color: rgba(110,198,255,.24);
  background: rgba(110,198,255,.10);
}

.pill.presencial{
  border-color: rgba(98,246,179,.20);
  background: rgba(98,246,179,.08);
}

/* =========================================================
   TAREAS PENDIENTES — FIX COMPLETO (lo que te fallaba)
   ========================================================= */

.tasks{
  padding: 12px 12px 6px;
}

.tasks-list{
  display:flex;
  flex-direction:column;
  gap: 12px;
  padding-bottom: 10px;
}

/* cada tarea */
.task{
  display:grid;
  grid-template-columns: 38px 1fr auto; /* checkbox | texto | derecha */
  align-items:center;
  gap: 12px;

  padding: 14px 14px;
  border-radius: 16px;

  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);

  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.task:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(110,198,255,.26);
}

/* checkbox */
.task input[type="checkbox"]{
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  justify-self: center;
}

/* IMPORTANTE: evita que el texto se vaya lejos */
.task .task-main{
  display:flex;
  flex-direction:column;
  gap: 4px;
  min-width: 0;
}

/* titulo */
.task .task-title{
  font-weight: 850;
  letter-spacing: .2px;
  color: var(--text);
  line-height: 1.25;
  font-size: 14.5px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* meta fecha */
.task .task-meta{
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.2;
}

/* derecha: badge (vence) */
.task .task-right{
  justify-self: end;
  display:flex;
  align-items:center;
  gap: 8px;
  white-space: nowrap;
}

.task .due{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: rgba(234,240,255,.92);
  background: rgba(110,198,255,.10);
  border: 1px solid rgba(110,198,255,.22);
}

/* completada */
.task.done{
  opacity: .75;
}

.task.done .task-title{
  text-decoration: line-through;
  color: rgba(234,240,255,.70);
}

/* footer de tareas */
.tasks-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: var(--muted2);
  font-size: 12.5px;
}

.link-btn{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  padding: 10px 14px;
  border-radius: 12px;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.link-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(110,198,255,.22);
}

/* Responsive tareas (móvil): badge baja abajo */
@media (max-width: 520px){
  .task{
    grid-template-columns: 38px 1fr;
  }
  .task .task-right{
    grid-column: 2 / 3;
    justify-self: start;
    margin-top: 6px;
  }
}

/* =========================================================
   GUÍAS (PDF)
   ========================================================= */

.guides{
  padding: 12px 12px 14px;
}

.guide{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.guide:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(110,198,255,.24);
}

.guide .left{
  min-width: 0;
  display:flex;
  flex-direction:column;
  gap: 4px;
}

.guide .title{
  font-weight: 850;
  letter-spacing: .2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide .sub{
  font-size: 12.5px;
  color: var(--muted);
}

.guide .open{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(110,198,255,.22);
  background: rgba(110,198,255,.10);
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  white-space: nowrap;
}

.guide .open:hover{
  transform: translateY(-1px);
  background: rgba(110,198,255,.14);
  border-color: rgba(110,198,255,.34);
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer{
  margin-top: 18px;
  padding: 14px 6px 0;
  text-align:center;
  color: rgba(234,240,255,.45);
  font-size: 12.5px;
}

/* =========================================================
   MOBILE TWEAKS
   ========================================================= */

@media (max-width: 720px){
  .wrap{padding: 16px}
  .top{border-radius: 18px}
  .profile-info .name{font-size: 18px}
  .table th, .table td{padding: 10px 10px}
}