:root{
  --bg:#0f172a;
  --panel:#111827;
  --card:#0b1220;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --brand:#22d3ee;
  --brand-2:#38bdf8;
  --accent:#f59e0b;
  --ok:#10b981;
  --danger:#ef4444;
  --shadow:0 10px 24px rgba(0,0,0,.25),0 2px 8px rgba(0,0,0,.2);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  background:radial-gradient(1200px 600px at 20% -10%,#0b1220 30%,#04070f 70%,#01030a 100%),var(--bg);
  color:var(--text);
  line-height:1.55;
  font-size: 18px;   /* o 20px si la querés más grande */
}


a{
  color:var(--brand-2);
  text-decoration:none;
}
a:hover{text-decoration:underline}

.container{
  width:min(1100px,92%);
  margin-inline:auto;
  padding:16px;
}

/* ====== HEADER / NAV ====== */

.header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(8px);
  background:linear-gradient(180deg,rgba(4,7,15,.85),rgba(4,7,15,.5));
  border-bottom:1px solid rgba(255,255,255,.06);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
}

.brand .logo{
  width:36px;
  height:36px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  color:#00111a;
  font-weight:900;
  box-shadow:var(--shadow);
}

.nav ul{
  display:flex;
  gap:10px;
  list-style:none;
  padding:0;
  margin:0;
  align-items:center;
}

.nav a.nav-link{
  display:inline-block;
  padding:8px 12px;
  border-radius:10px;
  font-weight:600;
  letter-spacing:.2px;
}

.nav a.nav-link:hover{
  background:rgba(255,255,255,.06);
  text-decoration:none;
}

.nav a.active{
  background:linear-gradient(135deg,rgba(34,211,238,.2),rgba(56,189,248,.2));
  border:1px solid rgba(34,211,238,.35);
}

/* Botón hamburguesa (sistema original) */
.nav-toggle{
  display:none;
  background:transparent;
  border:1px solid rgba(255,255,255,.15);
  color:var(--text);
  padding:6px 10px;
  border-radius:8px;
}

/* Menú móvil: usa .nav ul.open */
@media (max-width:860px){
  .nav ul{
    display:none;
  }
  .nav ul.open{
    display:flex;
    position:absolute;
    inset:56px 16px auto 16px;
    flex-direction:column;
    background:#050b16;
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    padding:8px;
  }
  .nav-toggle{
    display:inline-block;
  }
}

/* ====== HERO / GRID / CARDS ====== */

.hero{
  margin-top:32px;
  display:grid;
  gap:18px;
  grid-template-columns:1.2fr 1fr;
  align-items:center;
}
.hero .title{
  font-size:clamp(28px,3vw,46px);
  line-height:1.15;
  margin:0;
}
.hero .subtitle{
  color:var(--muted);
  margin:0;
}
.hero .panel{
  background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.07);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
@media (max-width:860px){
  .hero{
    grid-template-columns:1fr;
  }
}

.grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(3,1fr);
  margin:26px 0 8px;
}
@media (max-width:1000px){
  .grid{
    grid-template-columns:repeat(2,1fr);
  }
}
@media (max-width:640px){
  .grid{
    grid-template-columns:1fr;
  }
}

.card{
  background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.07);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.card h3{margin-top:0}

.badge{
  display:inline-block;
  padding:2px 8px;
  font-size:12px;
  border-radius:99px;
  border:1px solid rgba(255,255,255,.18);
  color:var(--muted);
}

/* ====== TABLAS ====== */

.table{
  width:100%;
  border-collapse:collapse;
  border-spacing:0;
  margin:12px 0 24px;
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.07);
  border-radius:12px;
  overflow:hidden;
}
.table th,
.table td {
  padding:10px 12px;
  text-align:left;
  font-size: 16px;   /* antes no tenías tamaño fijo */
}

.table thead th{
  background:rgba(255,255,255,.06);
  font-size:14px;
}
.table tr:nth-child(even){
  background:rgba(255,255,255,.03);
}

/* ====== FOOTER ====== */

footer{
  margin-top:34px;
  padding:18px 0;
  color:var(--muted);
  border-top:1px solid rgba(255,255,255,.06);
}

/* ====== FORM / BOTONES ====== */

input,select,textarea,button{
  background:#0f1a2a;
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  border-radius:10px;
  padding:10px 12px;
  width:100%;
}

button{
  cursor:pointer;
  width:auto;
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  color:#e6e6b0;
  border:none;
  font-weight:800;
}
button:hover{filter:brightness(1.05)}

.muted{color:var(--muted)}
.kicker{
  font-size:13px;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:var(--brand);
}
.hr{
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);
  margin:12px 0;
}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0 14px;
}
.btn{
  display:inline-block;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
}
.btn:hover{
  background:rgba(255,255,255,.12);
  text-decoration:none;
}

.row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
@media (max-width:860px){
  .row{
    grid-template-columns:1fr;
  }
}

.hidden{display:none !important}
.tag{
  display:inline-block;
  padding:2px 8px;
  font-size:12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  color:#94a3b8;
}
.small{font-size:13px;color:#94a3b8}

.alert{
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:10px;
  background:rgba(255,255,255,.05);
  margin:6px 0;
}
.success{
  border-color:rgba(16,185,129,.35);
  background:rgba(16,185,129,.1);
}
.warn{
  border-color:rgba(245,158,11,.35);
  background:rgba(245,158,11,.08);
}
.error{
  border-color:rgba(239,68,68,.35);
  background:rgba(239,68,68,.1);
}

.print-area{
  background:#fff;
  color:#111;
  padding:16px;
  border-radius:8px;
}
.print-area h2{margin-top:0}

/* ==== Full width & docente dual list UI ==== */

.wide { width: min(1400px, 98%) !important; }
.card.stretch { width: 100%; }

.docente-comisiones .dual { 
  display: grid; 
  grid-template-columns: 1.2fr 80px 2fr; 
  gap: 16px; 
}
.selector-box { 
  border: 1px solid rgba(255,255,255,.12); 
  border-radius: 12px; 
  padding: 10px; 
  height: 460px; 
  overflow: auto; 
  background: rgba(255,255,255,.03);
}
.selector-box .search { margin-bottom: 8px; }
.selector-box ul { list-style: none; margin: 0; padding: 0; }
.selector-box li { padding: 6px 8px; border-radius: 8px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.selector-box li:hover { background: rgba(255,255,255,.06); }
.selector-box li .rm { border:1px solid rgba(239,68,68,.35); background: rgba(239,68,68,.15); padding:4px 8px; border-radius:8px; cursor:pointer; }
.dual .middle { display:flex; flex-direction:column; gap:10px; align-items:center; justify-content:center; }
.dual .middle button { width: 64px; }
.nota-select { min-width: 88px; }
.table-wrap { overflow:auto; }
.table-wrap table { min-width: 880px; }
h4.compact { margin: 6px 0 10px; }

/* ==== Ampliación específica para Mi espacio (Mis comisiones) ==== */

.container-wide { 
  width: min(1600px, 98%);
}

.docente-comisiones .dual { 
  grid-template-columns: 1.2fr 100px 2.2fr; 
}

.card.stretch { width: 100%; }

.table-wrap table { min-width: 1100px; }

.nota-select { min-width: 110px; }

/* ===== Admin: asignación de comisiones ===== */

.admin-grid{
  display:grid;
  gap:12px;
  grid-template-columns: 1fr;
}
@media (min-width: 920px){
  .admin-grid{
    grid-template-columns: 1fr 1fr;
  }
}
.admin-card{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.07);
  border-radius:16px;
  padding:16px;
}
.row-assign{
  display:grid;
  grid-template-columns: 2fr 1.2fr 1fr auto;
  gap:10px;
  align-items:center;
}
@media (max-width: 720px){
  .row-assign{
    grid-template-columns: 1fr;
  }
}
.badge-ok{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(16,185,129,.35);
  color:#10b981;
}
.badge-warn{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(245,158,11,.35);
  color:#f59e0b;
}
.smallmuted{
  font-size:12px;
  color:#94a3b8;
}

/* ==== Botones más legibles (sobrescribe .btn anterior) ==== */

.btn {
  background: var(--accent);
  color: #0b1020;
  font-weight: 600;
}
.btn:hover {
  filter: brightness(1.05);
}
.btn:active {
  filter: brightness(0.92);
  color: #0b1020;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  color: #0b1020;
}

/* ===== Header · Alinear contenido extra ===== */

.appbar-inner {
  display: flex;
  align-items: center;
}
.appbar-inner .tools {
  margin-left: auto;
}

/* Reajuste global de container para vistas anchas */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 16px;
}

/* Hacer que las cards ocupen todo el ancho */
.card {
  width: 100%;
  max-width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Logo real */
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

/* Overlay de icon cards */

.icon-card-overlay {
  position: absolute;
  bottom: 200;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 12px;
}

.icon-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 25, 67, 0.8) 0%,
    rgba(15, 23, 42, 0.45) 40%,
    rgba(15, 23, 42, 0.12) 75%,
    rgba(28, 49, 99, 0) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.8rem 1rem;
}

.opcional {color: yellow;
}

/* --- MENU DESKTOP --- */
header ul {
  display:flex;
  gap:14px;
  list-style:none;
}

/* --- VERSIÓN MOBILE --- */
@media (max-width: 900px) {

  .nav-toggle{
    display:block;
    font-size:26px;
    color:white;
    background:none;
    border:none;
    cursor:pointer;
  }

  header ul{
    display:none;                /* SE OCULTA DE ENTRADA */
    position:absolute;
    top:60px;
    right:10px;
    flex-direction:column;
    background:#0f172a;
    padding:12px;
    width:200px;
    border-radius:8px;
    box-shadow:0 8px 20px rgba(0,0,0,.5);
    z-index:999;
  }

  header ul.open{
    display:flex !important;     /* SE ABRE SOLAMENTE CUANDO SE TOCA */
  }

  header ul li a{
    display:block;
    padding:10px;
    border-bottom:1px solid rgba(255,255,255,.15);
  }
}

/* ======== MENÚ MOBILE PARA DOCENTES ======== */
.header ul {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:14px;
}

/* MODO ESCRITORIO normal */
@media(max-width: 768px){
  .header ul{
    position:absolute;
    top:60px;
    right:0;
    background:#0f172a;
    flex-direction:column;
    width:180px;
    padding:12px;
    border-radius:8px;
    display:none; /* ← el menú queda oculto */
  }

  .header ul.open{
    display:block; /* ← cuando tocás ☰ se muestra */
  }

  .nav-toggle{
    display:block !important;
    font-size:22px;
    background:none;
    border:none;
    color:white;
  }
}

header ul {
  display:flex;
  gap:10px;
}

@media(max-width:768px){
  header ul {
    display:none;
    flex-direction:column;
    background:#0f172a;
    position:absolute;
    top:60px;
    right:10px;
    padding:15px;
    border-radius:10px;
  }
  header ul.open {
    display:block;
  }
}


/* ====== MENU PRINCIPAL (desktop) ====== */
.header .nav ul {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ====== MODO MOBILE ====== */
@media (max-width: 768px) {
  .nav-toggle {
    display: inline-block;
    font-size: 24px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
  }

  .header .nav ul {
    position: absolute;
    top: 60px;
    right: 12px;
    background: #0f172a;
    padding: 12px;
    border-radius: 10px;
    width: 200px;
    flex-direction: column;
    gap: 10px;

    /* 👇 IMPORTANTE: OCULTO POR DEFECTO EN CELULAR */
    display: none;
    z-index: 9999;
  }

  .header .nav ul.open {
    /* 👇 SOLO SE MUESTRA CUANDO LE AGREGAMOS LA CLASE .open DESDE JS */
    display: flex !important;
  }
}

/* Desktop normal */
.header .nav-menu{
  display:flex;
  gap:14px;
  list-style:none;
}

/* Mobile hamburguesa */
@media(max-width:768px){
  .nav-menu{
    display:none;
    position:absolute;
    top:60px; right:15px;
    width:200px;
    flex-direction:column;
    background:#0f172a;
    padding:12px;
    border-radius:10px;
    z-index:9999;
  }

  .nav-menu.open{ display:flex !important; }
  .nav-toggle{ display:block; font-size:24px; background:none; border:none; color:white; }
}

/* En PC el toggle no se muestra */
@media(min-width:769px){
  .nav-toggle{ display:none; }
}

/* Avatar general para menú, encabezados y paneles */
.avatar-perfil {
    width:60px;          /* TAMAÑO CONTROLADO */
    height:60px;
    border-radius:50%;   /* REDONDO */
    object-fit:cover;    /* RECORTE SIN DEFORMAR */
    border:3px solid #fff8;
    background:#ffffff22;
    cursor:pointer;
    transition:0.25s;
}

.avatar-perfil:hover{
    transform:scale(1.07);
    border-color:#4f8cff;
}

/* Avatar de perfil (menú superior, etc.) */
.avatar-perfil {
  width: 52px;          /* tamaño fijo */
  height: 52px;
  border-radius: 50%;
  object-fit: cover;    /* recorte sin deformar */
  border: 2px solid #ffffffaa;
  background: #ffffff22;
  display: inline-block;
}
img.avatar-perfil {
  width: 52px !important;
  height: 52px !important;
}

