:root {
  color-scheme: light;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #171c19;
  background: #f6f7f3;
  font-synthesis: none;
  --green: #244733;
  --green-dark: #163322;
  --muted: #4e5d53;
  --rule: #cdd7cd;
  --paper: #fcfdfb;
  --glass: rgba(252, 253, 251, .89);
  --heading: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.shell {
  width: min(100%, 88rem);
  min-height: 100vh;
  min-height: 100svh;
  margin: auto;
  padding: clamp(1rem, 4vw, 3.5rem);
}

.identity {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .2rem 0 1rem;
  border-bottom: 1px solid var(--rule);
  isolation: isolate;
  background: #f6f7f3;
}
.identity img {
  display: block;
  object-fit: contain;
  flex: none;
  mix-blend-mode: multiply;
}
.identity-name { display: grid; gap: .25rem; }
.identity-name strong { font-size: 1.05rem; }
.identity-name span, .identity-product { color: var(--muted); font-size: .875rem; }
.identity-product {
  margin-left: auto;
  color: #202124;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 750;
  letter-spacing: -.05em;
  white-space: nowrap;
}
.identity-product strong { color: #0068d9; }

.layout {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  grid-template-areas: "access intro";
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  min-height: min(37rem, 73vh);
  margin-top: clamp(1.15rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 5.3vw, 5rem);
  overflow: hidden;
  border: 1px solid #dbe2d9;
  border-radius: 1.5rem;
  background: #fcfdf9;
}
.layout::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(100deg, #f6f7f3 8%, rgba(246, 247, 243, .96) 39%, rgba(246, 247, 243, .78) 66%, rgba(246, 247, 243, .43)),
    url("./edificio.webp") right center / cover no-repeat,
    #dce5da;
}
.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .09em;
  line-height: 1.5;
  text-transform: uppercase;
}
.intro { grid-area: intro; }
.intro h1 {
  margin: .75rem 0 0;
  font-weight: 300;
  font-size: clamp(3.25rem, 6.7vw, 7rem);
  line-height: .98;
  letter-spacing: -.062em;
}
.intro em {
  display: block;
  color: var(--green);
  font-family: var(--heading);
  font-weight: 400;
  letter-spacing: -.072em;
}
.intro-description { max-width: 29rem; margin: 1.5rem 0 0; color: #34493c; line-height: 1.6; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; padding: 1.5rem .25rem 0; color: var(--muted); font-size: .84rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.site-footer a { color: var(--green); }
.legal { width: min(100%, 48rem); margin: clamp(2rem, 6vw, 5rem) auto; padding: clamp(1.4rem, 4vw, 3rem); border: 1px solid var(--rule); border-radius: 1.25rem; background: var(--paper); line-height: 1.65; }
.legal h1 { margin: .3rem 0 1rem; font: 400 clamp(2.1rem, 5vw, 3.5rem)/1.1 var(--heading); }
.legal h2 { margin: 1.8rem 0 .4rem; font-size: 1.12rem; }
.legal p, .legal ul { margin: .65rem 0; }
.legal a { color: var(--green); }

.panel {
  grid-area: access;
  min-width: 0;
  padding: clamp(1.35rem, 3.25vw, 3rem);
  border: 1px solid rgba(255, 255, 255, .93);
  border-radius: 1.25rem;
  background: var(--paper);
  box-shadow: 0 1.2rem 3.4rem rgba(25, 54, 39, .15), inset 0 1px 1px #fff;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel {
    background: var(--glass);
    -webkit-backdrop-filter: blur(19px) saturate(120%);
    backdrop-filter: blur(19px) saturate(120%);
  }
}
.panel h2 {
  margin: 0;
  font-family: var(--heading);
  font-size: clamp(1.85rem, 3.4vw, 3rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.045em;
}
.muted { margin: .8rem 0 1.4rem; color: var(--muted); line-height: 1.55; }
form { display: grid; gap: .65rem; }
label { font-size: .9rem; font-weight: 650; }
input, button, select {
  min-height: 3rem;
  border-radius: .65rem;
  padding: .65rem .85rem;
  font: inherit;
}
input, select {
  max-width: 100%;
  border: 1px solid #839588;
  background-color: #fff;
  color: inherit;
}
input { width: 100%; }
select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: linear-gradient(45deg, transparent 50%, #244733 50%), linear-gradient(135deg, #244733 50%, transparent 50%);
  background-position: right 1.16rem center, right .85rem center;
  background-size: .31rem .31rem;
  background-repeat: no-repeat;
}
button {
  border: 1px solid var(--green);
  border-radius: 2rem;
  background: var(--green);
  color: white;
  cursor: pointer;
  font-weight: 650;
  line-height: 1.3;
  padding-inline: 1.25rem;
}
form > button { margin-top: .35rem; }
button:hover { background: var(--green-dark); }
button:disabled { opacity: .7; cursor: wait; }
button.secondary { background: rgba(255, 255, 255, .68); color: var(--green); }
button.secondary:hover { background: #e6eee5; }
:focus-visible { outline: 3px solid #156b9c; outline-offset: 3px; }
.message { margin: 1rem 0 0; color: var(--green); line-height: 1.5; }
.message[data-error] { color: #8e2631; }
.message:empty { display: none; }

.shell[data-signed-in] .identity-product { display: block; }
.shell[data-signed-in] {
  width: min(100%, 98rem);
  background: #f6f7f3;
}
.shell[data-signed-in] .layout {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "access";
  min-height: auto;
  margin-top: 1.5rem;
  padding: clamp(.65rem, 2.3vw, 2rem);
  border-radius: 1.35rem;
}
.shell[data-signed-in] .layout::before {
  background:
    linear-gradient(115deg, rgba(246, 247, 243, .96) 4%, rgba(246, 247, 243, .82) 52%, rgba(229, 239, 247, .72)),
    url("./edificio.webp") right top / cover no-repeat;
}
.shell[data-signed-in] .intro { display: none; }
.shell[data-signed-in] .panel {
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 .6rem 2.2rem rgba(25, 54, 39, .07);
}
.admin-nav { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.25rem; border-bottom: 1px solid var(--rule); }
.admin-nav a {
  padding: .7rem 0;
  color: var(--green);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.admin-nav a:hover { color: #0068d9; }
.admin-nav a[aria-current="page"] { color: #0057b8; border-bottom: 2px solid #0057b8; }
.staff-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.15rem;
}
.staff-header .eyebrow { margin-bottom: .4rem; }
.profile {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.25rem;
  min-width: 0;
  margin: 0;
  padding: .85rem 1rem;
  border: 1px solid var(--rule);
  border-radius: .75rem;
  background: rgba(255, 255, 255, .6);
}
.profile div { min-width: 0; }
.profile dt { font-size: .875rem; color: var(--muted); }
.profile dd { margin: .25rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.management { margin-top: 2rem; border-top: 1px solid rgba(36, 71, 51, .17); padding-top: 1.5rem; }
.shell[data-signed-in] .layout { padding: clamp(.5rem, 1.8vw, 1.4rem); }
.shell[data-signed-in] .panel { padding: clamp(1.2rem, 3vw, 2.5rem); }
.shell[data-signed-in] .staff-header { padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.shell[data-signed-in] .staff-header h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.shell[data-signed-in] .profile { grid-column: auto; justify-self: end; padding: 0; border: 0; background: none; gap: .5rem 1.5rem; }
.shell[data-signed-in] .staff-header #signout { grid-column: 2; grid-row: 1; justify-self: end; }
.shell[data-signed-in] .staff-header .profile { grid-column: 1 / -1; justify-self: stretch; }
.shell[data-signed-in] .admin-nav { margin-top: 0; gap: clamp(.75rem, 2.5vw, 2rem); }
.staff-view { margin-top: 1.8rem; }
.overview-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.5rem);
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 1rem;
  background: linear-gradient(110deg, rgba(244,249,244,.96), rgba(225,238,244,.72));
}
.overview-heading h3 { margin: .4rem 0 .7rem; font: 400 clamp(2.1rem, 4.5vw, 4rem)/1.05 var(--heading); letter-spacing: -.05em; color: var(--green); }
.overview-heading p:last-child { max-width: 36rem; margin: 0; color: var(--muted); line-height: 1.55; }
.overview-heading img { flex: none; width: clamp(4rem, 10vw, 6rem); height: auto; mix-blend-mode: multiply; }
.overview-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.overview-stats div { display: flex; align-items: baseline; gap: .8rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--rule); }
.overview-stats strong { font: 400 clamp(2rem, 4vw, 3rem)/1 var(--heading); color: var(--green); }
.overview-stats span { color: var(--muted); font-size: .9rem; }
.space-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.space-card {
  display: flex; flex-direction: column; min-height: 12rem; gap: .65rem;
  padding: clamp(1.25rem, 2.5vw, 1.8rem); border: 1px solid rgba(36,71,51,.2);
  border-radius: .9rem; background: rgba(255,255,255,.7);
  color: inherit; text-decoration: none;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.space-card:hover { border-color: #0057b8; background: rgba(255,255,255,.94); transform: translateY(-2px); }
.space-number { color: #0057b8; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.space-card strong { font: 400 clamp(1.4rem, 2.4vw, 1.9rem)/1.1 var(--heading); color: var(--green); }
.space-card > span:nth-child(3) { max-width: 28rem; color: var(--muted); line-height: 1.45; }
.space-action { display: flex; justify-content: space-between; gap: 1rem; width: 100%; margin-top: auto; padding-top: .5rem; color: #0057b8; font-size: .9rem; font-weight: 700; }
.shell[data-signed-in] .management { margin-top: 0; padding: 0; border: 0; }
.shell[data-signed-in] .management .staff-view { max-width: 55rem; }
.section-intro { margin: -.35rem 0 1.5rem; color: var(--muted); line-height: 1.5; }
.shell[data-signed-in] .management h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.shell[data-signed-in] .card { border-radius: .9rem; background: rgba(255,255,255,.7); }
.shell[data-signed-in] .account-card { margin-top: 1.8rem; max-width: none !important; }
.shell[data-signed-in] #groups-panel { border: 0; padding: 0; }
.management h3 {
  margin: 0 0 1rem;
  font-family: var(--heading);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--green);
}
.management h4 { margin: 0 0 .9rem; font-size: 1.08rem; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.card {
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(36, 71, 51, .18);
  border-radius: .65rem;
  background: rgba(255, 255, 255, .42);
}
.account-card { margin-top: 1rem; }
.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, auto) auto auto;
  gap: .6rem;
  align-items: center;
  padding: .75rem 0;
  border-top: 1px solid var(--rule);
}
.account-row > span { overflow-wrap: anywhere; }
.account-row button { min-height: 2.75rem; }
.account-row .state { font-size: .9rem; color: var(--muted); }
#new-group:not([hidden]) { display: grid; gap: .65rem; }
#groups-panel > label { display: block; margin-bottom: .5rem; }
#group-data h4 { margin-top: 1.25rem; }
#group-data ul { padding-left: 1.25rem; }
#group-data li { margin: .4rem 0; overflow-wrap: anywhere; }

@media (max-width: 800px) {
  .admin-grid, .account-row { grid-template-columns: 1fr; }
  .overview-stats div { display: grid; gap: .25rem; }
}
@media (max-width: 680px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "access";
    min-height: auto;
    gap: 1.15rem;
  }
  .layout::before {
    background:
      linear-gradient(180deg, #fcfdf9 3%, rgba(252, 253, 249, .78) 26%, rgba(222, 233, 220, .42) 70%, #dce5da),
      url("./edificio.webp") 59% 50% / cover no-repeat;
  }
  .intro h1 { font-size: clamp(2.6rem, 10vw, 5rem); }
  .intro em { display: inline; }
  .shell:not([data-signed-in]) .panel { padding: 1.1rem 1.35rem; }
  #login .muted { margin: .65rem 0 1rem; }
  .shell[data-signed-in] .admin-nav { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
  .shell[data-signed-in] .profile { gap: .4rem 1rem; }
  .overview-heading { align-items: flex-start; }
  .overview-heading img { width: 3.5rem; }
  .overview-stats { gap: .25rem; }
  .overview-stats div { padding: .7rem .35rem; }
  .overview-stats span { font-size: .78rem; }
  .space-grid { grid-template-columns: 1fr; }
  .space-card { min-height: 10rem; }
}
@media (max-width: 390px) {
  .layout { padding: 1rem; }
  .staff-header { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .profile { width: 100%; }
}
@media (prefers-reduced-transparency: reduce) {
  .panel { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Signed-in workspaces: shared structure, separate institutional photographs. */
.shell[data-signed-in] { width: min(100%, 108rem); padding: clamp(.6rem, 1.5vw, 1.5rem); background: #e5effb; }
.shell[data-signed-in] .identity { display: none; }
.shell[data-signed-in] .layout { margin-top: 0; padding: 0; border: 0; background: transparent; overflow: visible; }
.shell[data-signed-in] .layout::before { display: none; }
.shell[data-signed-in] .panel { padding: 0; border: 0; border-radius: 1.5rem; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.shell[data-signed-in] #staff { display: grid; grid-template-columns: minmax(13.5rem, 17rem) minmax(0, 1fr); gap: 0 clamp(1rem, 2vw, 2rem); }
.shell[data-signed-in] .staff-header { position: relative; isolation: isolate; grid-column: 1 / -1; grid-template-columns: minmax(0,1fr) auto; min-height: clamp(16rem, 25vw, 22rem); padding: clamp(1.3rem, 3vw, 3rem); border: 1px solid rgba(255,255,255,.8); border-radius: 1.5rem; overflow: hidden; color: white; background: #144075; }
.shell[data-signed-in] .staff-header::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(8,38,80,.79), rgba(8,45,80,.43) 55%, rgba(8,45,80,.13)), url("./edificio.webp") center / cover; }
.shell[data-role="admin"] .staff-header::before { background-image: linear-gradient(90deg, rgba(8,38,80,.8), rgba(8,45,80,.43) 55%, rgba(8,45,80,.13)), url("./liceo-frente.png"); background-position: center, center 43%; }
.shell[data-role="admin"][data-view="docencia"] .staff-header::before { background-image: linear-gradient(90deg, rgba(8,38,80,.79), rgba(8,45,80,.43) 55%, rgba(8,45,80,.13)), url("./edificio.webp"); background-position: center; }
.shell[data-signed-in] .staff-header .eyebrow, .shell[data-signed-in] .staff-header h2 { color: white; text-shadow: 0 2px 12px rgba(0,0,0,.26); }
.shell[data-signed-in] .hero-brand { grid-column: 1 / -1; grid-row: 1; display: inline-flex; align-items: center; gap: .65rem; justify-self: start; width: fit-content; max-width: 100%; padding: .45rem .9rem .45rem .5rem; border: 1px solid rgba(255,255,255,.7); border-radius: 4rem; background: rgba(255,255,255,.86); color: #183b69; box-shadow: 0 .45rem 1.3rem rgba(9,35,73,.13); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.hero-brand img { display: block; flex: none; width: 2.7rem; height: 3rem; object-fit: contain; mix-blend-mode: multiply; }
.hero-brand > div { display: grid; gap: .05rem; }
.hero-brand strong { font-size: 1rem; letter-spacing: -.025em; }
.hero-brand span { font-size: .77rem; }
.shell[data-signed-in] .staff-header > div:nth-child(2) { grid-column: 1; grid-row: 2; min-width: 0; }
.shell[data-signed-in] .staff-header h2 { font-family: Helvetica, Arial, sans-serif; font-weight: 750; font-size: clamp(2rem, 4.4vw, 4rem); letter-spacing: -.055em; }
.workspace-switch { display: inline-flex; align-items: center; gap: .65rem; margin-top: .8rem; padding: .35rem .5rem .35rem .8rem; border: 1px solid rgba(255,255,255,.48); border-radius: .75rem; background: rgba(11,45,86,.43); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: .75rem; font-weight: 650; }
.workspace-switch[hidden] { display: none; }
.workspace-switch select { max-width: min(18rem, 55vw); padding: .35rem .5rem; border: 0; border-radius: .45rem; background: rgba(255,255,255,.88); color: #14385f; font: inherit; }
.shell[data-signed-in] .staff-header .profile { grid-column: 1 / -1; grid-row: 3; align-self: end; width: fit-content; max-width: 100%; padding: .6rem 1rem; border: 1px solid rgba(255,255,255,.4); border-radius: .8rem; background: rgba(255,255,255,.17); color: white; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.shell[data-signed-in] .profile dt { color: #e5efff; }
.shell[data-signed-in] .staff-header #signout { grid-column: 2; grid-row: 2; align-self: center; border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.8); color: #12375b; }
.shell[data-signed-in] .admin-nav { grid-column: 1; grid-row: 2; align-self: start; display: flex; flex-direction: column; gap: .3rem; min-height: 31rem; margin: 1.2rem 0 0; padding: 1rem; border: 1px solid rgba(255,255,255,.84); border-radius: 1.2rem; background: rgba(255,255,255,.68); box-shadow: 0 1rem 2rem rgba(25,60,100,.08); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.shell[data-signed-in] .admin-nav[hidden] { display: none; }
.shell[data-signed-in] .admin-nav a { padding: .85rem 1rem; border: 0; border-radius: .8rem; color: #183153; }
.shell[data-signed-in] .admin-nav a[aria-current="page"] { border: 0; background: #2466b7; color: #fff; box-shadow: 0 .4rem 1rem rgba(20,72,150,.2); }
.nav-marks { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding: 1rem .25rem .1rem; border-top: 1px solid #b9cee5; color: #183153; font-size: .72rem; line-height: 1.25; }
.ib-mark { display: grid; justify-items: center; gap: .3rem; width: 6.4rem; text-align: center; }
.ib-mark img { display: block; width: 3.7rem; height: 3.7rem; object-fit: contain; }
.mep-crop { position: relative; display: block; flex: none; width: 7rem; height: 5rem; overflow: hidden; mix-blend-mode: multiply; }
.mep-crop img { position: absolute; display: block; width: 12rem; max-width: none; height: auto; left: -2.55rem; top: -4.4rem; }
.shell[data-signed-in] .staff-view, .shell[data-signed-in] #management { grid-column: 2; grid-row: 2; align-self: start; min-width: 0; margin-top: 1.2rem; }
.shell[data-signed-in] #groups-panel { padding: clamp(1.2rem, 2vw, 2rem); border: 1px solid rgba(255,255,255,.85); border-radius: 1.2rem; background: rgba(255,255,255,.72); }
.shell[data-signed-in] .staff-view h3 { color: #153b73; }
.shell[data-signed-in] .overview-heading { background: rgba(255,255,255,.78); border-radius: 1.15rem; box-shadow: 0 .7rem 2rem rgba(30,68,110,.06); }
.shell[data-signed-in] .overview-heading h3 { color: #143a72; }
.shell[data-signed-in] .overview-stats div, .teacher-summary div { padding: 1.25rem; border: 1px solid rgba(255,255,255,.9); border-radius: 1.05rem; background: rgba(255,255,255,.78); }
.shell[data-signed-in] .overview-stats strong, .teacher-summary strong { color: #1356ae; }
.shell[data-signed-in] .space-card { border-color: rgba(255,255,255,.9); border-radius: 1.05rem; background: rgba(255,255,255,.76); box-shadow: 0 .7rem 2rem rgba(30,68,110,.05); }
#teacher-overview { padding: clamp(1.2rem, 2.5vw, 2.5rem); border: 1px solid rgba(255,255,255,.9); border-radius: 1.2rem; background: rgba(255,255,255,.62); box-shadow: 0 1rem 2.5rem rgba(25,60,100,.07); }
#teacher-overview h3 { margin: .35rem 0 .65rem; font: 400 clamp(2rem, 4vw, 3.6rem)/1.06 var(--heading); letter-spacing: -.045em; }
#teacher-overview .section-intro { margin: 0 0 1.4rem; }
.teacher-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.teacher-summary div { display: grid; gap: .25rem; }
.teacher-summary strong { font: 400 clamp(2rem, 4vw, 3.2rem)/1 var(--heading); }
.teacher-summary span { color: #435975; }
.teacher-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.teacher-section-heading h4 { margin: 0 0 1rem; font: 400 1.65rem/1.2 var(--heading); color: #163b72; }
.teacher-section-heading a { color: #1356ae; font-weight: 700; }
.teacher-group-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.teacher-group-card { display: flex; flex-direction: column; gap: .5rem; min-height: 11rem; padding: 1.35rem; border: 1px solid #cbdcf1; border-radius: 1rem; background: rgba(255,255,255,.86); color: #173558; text-decoration: none; }
.teacher-group-card:hover { border-color: #2466b7; background: white; }
.teacher-group-card > span:first-child { color: #2466b7; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.teacher-group-card strong { font: 400 1.6rem/1.1 var(--heading); }
.teacher-group-card > span:last-child { margin-top: auto; font-size: .9rem; font-weight: 700; }
.teacher-empty { grid-column: 1/-1; padding: 2rem; border: 1px dashed #b3c9e4; border-radius: 1rem; color: #435975; }

/* Quiet glass surfaces keep the photographs and the institution's work in focus. */
.shell[data-signed-in] { --ink-blue: #17375f; --accent-blue: #2364b3; }
.shell[data-signed-in] .overview-heading, #teacher-overview {
  border: 1px solid rgba(255,255,255,.94);
  background: linear-gradient(115deg, rgba(255,255,255,.88), rgba(233,242,253,.72));
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
}
.shell[data-signed-in] .overview-heading { align-items: flex-start; }
.shell[data-signed-in] .overview-heading h3 { max-width: 13ch; margin-bottom: .8rem; }
.overview-label {
  display: inline-flex; flex: none; align-items: center; min-height: 2rem;
  padding: .35rem .8rem; border: 1px solid #c7d8ee; border-radius: 3rem;
  background: rgba(238,246,255,.9); color: var(--ink-blue, #17375f);
  font-size: .78rem; font-weight: 700; letter-spacing: .025em;
}
.shell[data-signed-in] .overview-stats { gap: .8rem; margin: .9rem 0 1.1rem; }
.shell[data-signed-in] .overview-stats div, .teacher-summary div {
  position: relative; min-height: 7.4rem; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  gap: .65rem; padding: 1.15rem 1.3rem; border: 1px solid rgba(255,255,255,.95);
  background: linear-gradient(130deg, rgba(255,255,255,.91), rgba(237,246,255,.77));
  box-shadow: 0 .45rem 1.5rem rgba(29,72,125,.045);
}
.shell[data-signed-in] .overview-stats div::before, .teacher-summary div::before {
  content: ""; position: absolute; top: 1.1rem; right: 1.2rem; width: 1.35rem; height: 1.35rem;
  border: 2px solid #8eb9eb; border-radius: .38rem; transform: rotate(-10deg);
}
.shell[data-signed-in] .overview-stats strong, .teacher-summary strong { font: 600 clamp(2rem, 3.7vw, 3.1rem)/1 Arial, sans-serif; letter-spacing: -.065em; }
.shell[data-signed-in] .overview-stats span, .teacher-summary span { color: #3b5675; font-size: .9rem; font-weight: 600; }
.shell[data-signed-in] .space-card {
  position: relative; min-height: 12.5rem; overflow: hidden; border-color: rgba(255,255,255,.94);
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(241,248,255,.75));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.shell[data-signed-in] .space-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: .27rem; background: linear-gradient(#5da6f4,#1e5ea9);
}
.shell[data-signed-in] .space-card:hover { border-color: #9fc2eb; background: #fff; box-shadow: 0 .8rem 2rem rgba(26,74,134,.1); }
.shell[data-signed-in] .space-card strong { font-family: Georgia, serif; color: #153b70; }
.shell[data-signed-in] .space-card > span:nth-child(3) { color: #405979; }
.shell[data-signed-in] .admin-nav { background: linear-gradient(160deg,rgba(255,255,255,.81),rgba(235,245,255,.67)); }
.shell[data-signed-in] .admin-nav a:not([aria-current="page"]):hover { background: rgba(212,231,253,.76); color: #174d91; }
.shell[data-signed-in] #management .card, .shell[data-signed-in] #groups-panel { box-shadow: 0 .7rem 2rem rgba(28,67,118,.06); }
.shell[data-signed-in] #management button:not(.secondary) { border-color: #215da8; background: #215da8; }
.shell[data-signed-in] #management button:not(.secondary):hover { background: #174b8c; }
.shell[data-signed-in] #management button.secondary { border-color: #b4cdea; color: #174b8c; }
.shell[data-signed-in] #management input:focus, .shell[data-signed-in] #management select:focus, .shell[data-signed-in] #groups-panel select:focus { outline: 3px solid #9ac5f1; outline-offset: 2px; }
.teacher-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.teacher-heading .section-intro { max-width: 39rem; }
.teacher-summary { margin-top: 1rem; }
.teacher-group-card { background: linear-gradient(135deg,rgba(255,255,255,.96),rgba(237,246,255,.88)); box-shadow: 0 .5rem 1.5rem rgba(29,72,125,.05); }
.teacher-group-card:hover { box-shadow: 0 .8rem 1.8rem rgba(29,72,125,.12); transform: translateY(-2px); }
@media (max-width: 780px) {
  .shell[data-signed-in] #staff { grid-template-columns: minmax(0,1fr); }
  .shell[data-signed-in] .admin-nav { grid-column: 1; grid-row: 2; flex-direction: row; min-height: 0; overflow-x: auto; white-space: nowrap; }
  .shell[data-signed-in] .staff-view, .shell[data-signed-in] #management { grid-column: 1; grid-row: 3; }
  .nav-marks { display: none; }
  .overview-label { display: none; }
}
@media (max-width: 520px) {
  .shell[data-signed-in] .staff-header { min-height: 15rem; grid-template-columns: minmax(0,1fr); }
  .shell[data-signed-in] .staff-header > div:nth-child(2) { grid-column: 1; grid-row: 2; }
  .shell[data-signed-in] .staff-header #signout { grid-column: 1; grid-row: 3; justify-self: start; }
  .shell[data-signed-in] .staff-header .profile { grid-column: 1; grid-row: 4; width: 100%; }
  .teacher-summary, .teacher-group-grid { grid-template-columns: 1fr; }
  .shell[data-signed-in] .overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shell[data-signed-in] .overview-stats div:last-child { grid-column: 1 / -1; }
}

/* Work areas: keep the selector and records in the same visual field. */
.shell[data-signed-in] #groups-panel { max-width: none; }
.group-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.3rem; }
.group-toolbar .eyebrow { margin-bottom: .25rem; }
.group-toolbar h3 { margin: 0; }
.group-picker { display: grid; gap: .35rem; width: min(28rem, 48%); }
.group-picker label { font-size: .85rem; font-weight: 700; color: #3b5675; }
.group-picker select { width: 100%; margin: 0; }
#group-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.group-data-card { position: relative; min-width: 0; min-height: 13rem; padding: 1.35rem; border: 1px solid rgba(255,255,255,.95); border-radius: 1rem; background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(238,246,255,.79)); }
#group-data .group-data-card h4 { margin: 0 2.8rem 1rem 0; color: #153b70; font: 600 1.18rem/1.25 Arial, sans-serif; }
.group-data-count { position: absolute; top: 1.1rem; right: 1.2rem; display: grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 .35rem; border-radius: .65rem; background: #e1efff; color: #1356ae; font-weight: 700; }
#group-data .group-data-card ul { margin: 0; padding: 0; list-style: none; }
#group-data .group-data-card li { padding: .55rem 0; border-top: 1px solid #dce7f3; line-height: 1.4; }
#group-data .group-data-card li:first-child { border-top: 0; }
.teacher-group-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.teacher-summary { grid-template-columns: repeat(2, minmax(0, 12rem)); }
@media (max-width: 1180px) {
  .shell[data-signed-in] #staff { grid-template-columns: minmax(0, 1fr); }
  .shell[data-signed-in] .admin-nav { grid-column: 1; grid-row: 2; flex-direction: row; align-items: center; min-height: 0; flex-wrap: wrap; gap: .25rem; padding: .55rem; }
  .shell[data-signed-in] .admin-nav a { padding: .65rem .9rem; }
  .shell[data-signed-in] .staff-view, .shell[data-signed-in] #management { grid-column: 1; grid-row: 3; }
  .nav-marks { display: none; }
  .shell[data-signed-in] .staff-header { min-height: 15rem; }
  .shell[data-signed-in] .overview-heading h3 { max-width: none; }
}
@media (max-width: 780px) {
  .teacher-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .group-toolbar { align-items: stretch; flex-direction: column; gap: 1rem; }
  .group-picker { width: 100%; }
  #group-data, .teacher-group-grid { grid-template-columns: minmax(0, 1fr); }
  .group-data-card { min-height: 0; }
  .shell[data-signed-in] .admin-nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
}

.attendance-panel {
  margin-bottom: 1rem; padding: clamp(1.1rem, 2vw, 1.8rem);
  border: 1px solid rgba(255,255,255,.95); border-radius: 1.1rem;
  background: linear-gradient(120deg, rgba(255,255,255,.96), rgba(231,243,255,.87));
}
.attendance-panel[hidden] { display: none; }
.attendance-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.2rem; }
.attendance-heading .eyebrow { margin: 0 0 .3rem; }
.attendance-heading h4 { margin: 0; color: #153b70; font: 400 clamp(1.5rem, 2.3vw, 2rem)/1.15 var(--heading); }
.attendance-fields { display: flex; align-items: end; gap: .75rem; }
.attendance-fields label { display: grid; gap: .3rem; color: #3b5675; font-size: .82rem; font-weight: 700; }
.attendance-fields input { margin: 0; min-height: 2.7rem; }
.attendance-fields input[type="number"] { width: 5.5rem; }
.attendance-panel .message { margin: .9rem 0; }
.attendance-students { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .9rem; }
.attendance-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-width: 0; padding: .55rem .7rem; border: 1px solid #d6e5f5; border-radius: .7rem; background: rgba(255,255,255,.82); }
.attendance-row span { overflow-wrap: anywhere; font-weight: 600; color: #183153; }
.attendance-row select { flex: none; width: 9rem; margin: 0; padding: .55rem; }
.attendance-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.attendance-actions button { width: auto; min-height: 2.75rem; }
@media (max-width: 760px) {
  .attendance-heading { align-items: stretch; flex-direction: column; }
  .attendance-students { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .attendance-fields { flex-wrap: wrap; }
  .attendance-row { align-items: stretch; flex-direction: column; }
  .attendance-row select { width: 100%; }
}
