:root{--green:#1f6f4a;--green2:#eaf5ef;--ink:#173028;--muted:#66756f;--line:#dbe5df;--bg:#f5f8f6;--white:#fff;--red:#b42318;--redbg:#fff1f0;--yellow:#9a6700;--yellowbg:#fff8db;--shadow:0 10px 30px rgba(20,55,40,.08)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink)}button,input,select{font:inherit}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px max(20px,calc((100vw - 1180px)/2));background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(10px)}.brand{display:flex;align-items:center;gap:12px}.logo{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:var(--green);color:white;font-weight:800}.brand h1{font-size:18px;margin:0}.brand p{font-size:12px;margin:3px 0 0;color:var(--muted)}.nav{display:flex;gap:6px}.nav-link{border:0;background:transparent;padding:10px 12px;border-radius:10px;color:var(--muted);cursor:pointer}.nav-link:hover,.nav-link.active{background:var(--green2);color:var(--green);font-weight:700}.menu-btn{display:none;border:1px solid var(--line);background:white;border-radius:10px;padding:8px 10px}.container{width:min(1180px,calc(100% - 32px));margin:0 auto;padding:32px 0 56px}.view{display:none}.view.active{display:block}.hero{display:grid;grid-template-columns:1.5fr .7fr;gap:28px;align-items:stretch;background:linear-gradient(135deg,#ecf7f1,#fff);border:1px solid var(--line);border-radius:24px;padding:42px;box-shadow:var(--shadow)}.eyebrow{display:inline-block;font-size:12px;text-transform:uppercase;letter-spacing:.12em;font-weight:800;color:var(--green);margin-bottom:10px}.hero h2,.page-head h2{font-size:clamp(28px,4vw,44px);line-height:1.05;margin:0 0 14px}.hero p,.page-head p,.panel-head p{color:var(--muted);line-height:1.65;margin:0;max-width:720px}.hero-actions{display:flex;gap:10px;margin-top:24px;flex-wrap:wrap}.hero-card{border:1px solid var(--line);background:white;border-radius:20px;padding:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;box-shadow:var(--shadow)}.school-icon{font-size:54px;margin-bottom:10px}.hero-card strong{font-size:20px}.hero-card span{color:var(--muted);margin-top:5px}.hero-card small{margin-top:16px;padding:6px 10px;background:var(--green2);color:var(--green);border-radius:999px;font-weight:700}.btn{border:0;border-radius:12px;padding:11px 16px;font-weight:750;cursor:pointer}.btn.primary{background:var(--green);color:white}.btn.primary:hover{filter:brightness(.96)}.btn.secondary{background:white;color:var(--ink);border:1px solid var(--line)}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}.stat-card{background:white;border:1px solid var(--line);border-radius:18px;padding:18px;display:flex;gap:14px;align-items:center;box-shadow:var(--shadow)}.stat-card>span{font-size:30px}.stat-card strong{display:block;font-size:25px}.stat-card small{color:var(--muted)}.stat-card.warning{background:var(--yellowbg)}.panel{background:white;border:1px solid var(--line);border-radius:20px;padding:22px;box-shadow:var(--shadow)}.panel-head{display:flex;justify-content:space-between;gap:20px}.panel h3{margin:0 0 6px}.steps{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:22px}.step{background:var(--bg);border:1px solid var(--line);border-radius:14px;padding:14px}.step b{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--green);color:white;margin-bottom:12px}.step span{font-size:13px;font-weight:700}.page-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:18px}.page-head h2{font-size:38px}.toolbar{margin-bottom:16px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.input{width:100%;border:1px solid #cfdad4;background:white;border-radius:12px;padding:11px 12px;outline:none}.input:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(31,111,74,.1)}.cards-list{display:grid;gap:10px}.student-card,.alert-card{border:1px solid var(--line);border-radius:16px;padding:15px;display:flex;justify-content:space-between;gap:18px;align-items:center}.student-main h4,.alert-main h4{margin:0 0 5px}.meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:13px}.badge{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:12px;font-weight:750;background:var(--green2);color:var(--green)}.badge.red{background:var(--redbg);color:var(--red)}.badge.yellow{background:var(--yellowbg);color:var(--yellow)}.card-actions{display:flex;gap:7px;flex-wrap:wrap}.small-btn{border:1px solid var(--line);background:white;border-radius:9px;padding:7px 9px;cursor:pointer;font-size:12px}.small-btn.danger{color:var(--red)}.attendance-list{display:grid;gap:8px}.attendance-row{display:grid;grid-template-columns:1fr 320px;gap:14px;align-items:center;border-bottom:1px solid var(--line);padding:12px 2px}.attendance-name strong{display:block}.attendance-name small{color:var(--muted)}.attendance-options{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.attendance-options label{cursor:pointer}.attendance-options input{display:none}.attendance-options span{display:block;text-align:center;padding:8px;border:1px solid var(--line);border-radius:10px;font-size:12px}.attendance-options input:checked+span{border-color:var(--green);background:var(--green2);color:var(--green);font-weight:800}.footer-actions{display:flex;justify-content:flex-end;margin-top:18px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:760px}th,td{padding:11px;border-bottom:1px solid var(--line);text-align:left;font-size:13px}th{color:var(--muted);font-size:12px;text-transform:uppercase}.grade-input{width:76px;border:1px solid var(--line);border-radius:9px;padding:7px}.average{font-weight:800}.legend{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:16px;font-size:13px;color:var(--muted)}.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}.dot.red{background:#d92d20}.dot.yellow{background:#f4b740}.dot.green{background:#32a56a}.alert-card.high{border-left:5px solid #d92d20}.alert-card.medium{border-left:5px solid #f4b740}.alert-reasons{margin-top:7px;color:var(--muted);font-size:13px}.empty{text-align:center;padding:36px;color:var(--muted)}.dialog{width:min(560px,calc(100% - 24px));border:0;border-radius:20px;padding:0;box-shadow:0 24px 70px rgba(0,0,0,.22)}.dialog::backdrop{background:rgba(15,30,25,.45)}.dialog form{padding:22px}.dialog-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:16px}.dialog-head h3{margin:0}.dialog-head p{margin:5px 0 0;color:var(--muted);font-size:13px}.dialog label{display:block;font-size:13px;font-weight:700;margin-bottom:12px}.dialog label .input{margin-top:6px;font-weight:400}.icon-btn{border:0;background:var(--bg);border-radius:10px;width:36px;height:36px;cursor:pointer}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.toast{position:fixed;right:18px;bottom:18px;background:#173028;color:white;padding:12px 16px;border-radius:12px;box-shadow:var(--shadow);opacity:0;pointer-events:none;transform:translateY(10px);transition:.25s;z-index:50}.toast.show{opacity:1;transform:translateY(0)}
@media(max-width:800px){.menu-btn{display:block}.topbar{flex-wrap:wrap}.nav{display:none;width:100%;overflow:auto}.nav.open{display:flex}.nav-link{white-space:nowrap}.hero{grid-template-columns:1fr;padding:25px}.stats-grid{grid-template-columns:1fr 1fr}.steps{grid-template-columns:1fr 1fr}.page-head{align-items:flex-start;flex-direction:column}.attendance-row{grid-template-columns:1fr}.grid2{grid-template-columns:1fr}.student-card,.alert-card{align-items:flex-start;flex-direction:column}.card-actions{width:100%}.card-actions .small-btn{flex:1}}
@media(max-width:480px){.container{width:min(100% - 20px,1180px);padding-top:20px}.stats-grid{grid-template-columns:1fr}.steps{grid-template-columns:1fr}.hero-actions .btn{width:100%}.attendance-options{grid-template-columns:1fr}.page-head h2{font-size:32px}}

/* Identidad de la I.E. Exaltación de la Santa Cruz */
.brand-logo{width:50px;height:50px;object-fit:contain;border-radius:12px;background:#fff;border:1px solid var(--line);padding:3px}.connection-wrap{display:flex;align-items:center;margin-left:auto}.connection-status{font-size:11px;font-weight:800;padding:5px 9px;border-radius:999px;background:#eaf5ef;color:#0b7a3c}.connection-status.offline{background:#fff3cd;color:#8a5b00}.school-card{overflow:hidden}.school-logo{width:min(100%,245px);height:180px;object-fit:contain;margin-bottom:14px}
@media(max-width:980px){.connection-wrap{display:none}}
@media(max-width:800px){.brand-logo{width:44px;height:44px}.brand{min-width:0}.brand h1{font-size:17px}.brand p{max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.school-logo{height:150px}}

/* Inicio: texto ampliado sin agregar tarjetas adicionales */
.hero-description{max-width:800px!important;font-size:16px;line-height:1.75!important}

/* Notas: el grado conserva el filtro original y el curso se elige desde su propia columna */
.notes-table{min-width:680px}
.notes-table th:nth-child(1){width:46%}.notes-table th:nth-child(2){width:18%}.notes-table th:nth-child(3){width:18%}.notes-table th:nth-child(4){width:18%}
.student-grade-meta{display:block;color:var(--muted);font-size:11px;font-weight:500;margin-top:4px}
.course-grade-input{width:96px;max-width:100%;padding:9px 10px;font-size:14px}
.subject-heading{padding-top:6px;padding-bottom:6px}
.subject-header-select{width:100%;min-width:150px;border:1px solid transparent;background:transparent;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;padding:7px 26px 7px 0;cursor:pointer;outline:none}
.subject-header-select:hover,.subject-header-select:focus{color:var(--ink);border-bottom-color:var(--line)}

@media(max-width:700px){.notes-table{min-width:600px}.hero-description{font-size:15px}}

/* Todo el bloque de identidad superior vuelve a Inicio */
.brand-home{border:0;background:transparent;padding:0;margin:0;display:flex;align-items:center;justify-content:flex-start;gap:12px;cursor:pointer;border-radius:12px;color:inherit;text-align:left}
.brand-home:hover h1{color:var(--green)}
.brand-home:focus-visible{outline:3px solid rgba(31,111,74,.25);outline-offset:3px}
.brand-copy{display:block}

/* Filtros grandes por grado y sección: mismo nivel y ancho completo */
.filter-row{
  display:grid;
  gap:16px;
  align-items:end;
  margin-bottom:22px;
}
.filter-row label{
  display:block;
  font-size:14px;
  font-weight:800;
  color:var(--ink);
}
.filter-row label .input{
  margin-top:8px;
  min-height:54px;
  padding:13px 16px;
  border-radius:14px;
  font-size:15px;
  font-weight:400;
}
.student-filter-row{grid-template-columns:1.2fr 1fr 1fr}
.attendance-filter-row{grid-template-columns:1fr 1fr 1fr}
.notes-filter-row,.alerts-filter-row{grid-template-columns:1fr 1fr;max-width:none}

/* Inicio vuelve a mostrar únicamente el resumen general */
.stats-grid{margin:18px 0}

@media(max-width:800px){
  .student-filter-row,.attendance-filter-row{grid-template-columns:1fr 1fr}
  .student-filter-row .search-filter{grid-column:1 / -1}
  .attendance-filter-row label:last-child{grid-column:1 / -1}
  .notes-filter-row,.alerts-filter-row{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .filter-row,.student-filter-row,.attendance-filter-row,.notes-filter-row,.alerts-filter-row{grid-template-columns:1fr}
  .student-filter-row .search-filter,.attendance-filter-row label:last-child{grid-column:auto}
}


/* v8: inicio sin cifras y seguimiento visual de cursos calificados */
.static-summary .stat-card{min-height:96px;justify-content:center;gap:14px}
.static-summary .stat-icon{font-size:30px}
.static-summary .stat-label{font-size:18px;line-height:1.2;color:var(--ink)}
.static-summary .stat-card.warning .stat-label{color:#6f5200}

/* Estado del curso dentro del desplegable de Notas */
.subject-header-select.complete{color:#0b7a3c;background:#eaf5ef;border-color:#b9dfc9;border-radius:9px;padding-left:8px}
.subject-header-select.partial{color:#8a5b00;background:#fff6dc;border-color:#efd889;border-radius:9px;padding-left:8px}
.subject-header-select.pending{color:#66736d;background:#f4f7f5;border-color:#d8e1dc;border-radius:9px;padding-left:8px}
.subject-header-select option.complete{color:#0b7a3c;background:#eef8f2}
.subject-header-select option.partial{color:#8a5b00;background:#fff8e7}
.subject-header-select option.pending{color:#5f6c66;background:#fff}
.course-grade-input.has-value{border-color:#75bf95;background:#f1faf5}
.average{min-width:116px}
.average>span{display:block}
.average-pending{font-weight:700;color:var(--muted)}
.average-progress{display:block;margin-top:3px;color:var(--muted);font-size:10px;font-weight:600;white-space:nowrap}
.average-progress.complete{color:#0b7a3c}
