/* Libro de calificaciones · Portal docente y School Manager */
.topbar.gb241f3-bar {
  background:linear-gradient(110deg,#fff,#edf5ff);
  border-bottom-color:#d6e4fa;
}
.topbar.gb241f3-bar .gb241f3-picker {
  background:#fff;
  border-color:#d5e3fa;
}
#content.gb241f3-page {
  --book-ink:#13294f;
  --book-muted:#4c6386;
  --book-line:#d9e5f7;
  --book-shadow:0 6px 16px #19478912,0 1px 3px #19478910;
  background:linear-gradient(150deg,#f4f7ff,#eaf2fc);
  color:var(--book-ink);
  padding:clamp(10px,1.35vw,20px);
}
.gb241f3-page .gb-ui-icon {
  display:block;
  flex:none;
  width:23px;
  height:23px;
  object-fit:contain;
}
.gb-book-identity {display:flex;min-width:0;align-items:center;gap:clamp(10px,2vw,25px)}
.gb-book-hero {
  position:relative;
  isolation:isolate;
  display:flex;
  align-items:center;
  gap:clamp(12px,2vw,25px);
  min-height:133px;
  overflow:hidden;
  margin-bottom:12px;
  padding:19px 37% 19px clamp(15px,2vw,28px);
  border:1px solid #d6deff;
  border-radius:19px;
  background:linear-gradient(139deg,transparent 63%,#5588f126 63%,#7666e93b 83%,transparent 83%),
    linear-gradient(108deg,#eef2ff 0%,#e1e8ff 48%,#b8c8ff 68%,#8d98f6 100%);
  box-shadow:var(--book-shadow);
}
.gb-book-hero::after {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0 0 0 auto;
  width:clamp(215px,34%,340px);
  background:url("assets/gradebook-hero.jpg") right center/auto 137% no-repeat;
  mask-image:linear-gradient(to right,transparent,transparent 19%,#000 55%);
}
.gb-book-emblem {
  display:grid;
  place-items:center;
  flex:none;
  width:clamp(55px,6vw,78px);
  aspect-ratio:1;
  border:1px solid #fff;
  border-radius:19px;
  background:linear-gradient(140deg,#ecf7ff,#abd5ff);
  box-shadow:0 5px 12px #2e5da929,inset 0 0 12px #fff8;
}
.gb241f3-page .gb-book-emblem .gb-ui-icon {width:68%;height:68%}
.gb-book-subject {min-width:0;overflow-wrap:anywhere}
.gb-book-code {
  color:#2e5090;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
}
.gb-book-subject h1 {
  margin:2px 0 8px;
  color:#102853;
  font-size:clamp(24px,3vw,40px);
  line-height:1.06;
  letter-spacing:-.035em;
}
.gb-book-context {
  display:flex;
  flex-wrap:wrap;
  gap:5px 8px;
  margin:0;
  padding:0;
  list-style:none;
}
.gb-book-context li {
  padding:4px 9px;
  border:1px solid #fcfdff;
  border-radius:8px;
  background:#f8fbffbd;
  color:#23477f;
  font-size:11px;
  font-weight:750;
}

#content.gb241f3-page .at241-tabs {
  gap:8px;
  margin:0 0 12px;
  padding:6px;
  border:1px solid var(--book-line);
  border-radius:15px;
  background:#fff;
  box-shadow:var(--book-shadow);
}
.gb241f3-page .at241-tab-buttons {gap:3px}
.gb241f3-page .at241-tab {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  padding:7px 12px;
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  color:#23416c;
  font-size:12px;
}
.gb241f3-page .at241-tab .gb-ui-icon {width:19px;height:19px}
.gb241f3-page .at241-tab:hover {background:#ecf4ff}
.gb241f3-page .at241-tab.active,
.gb241f3-page #gb231-plus {
  border:1px solid #1d5de0;
  background:linear-gradient(128deg,#067cdd,#1543d3);
  color:#fff;
  box-shadow:0 3px 7px #144bd836;
}
.gb241f3-page .at241-tab.active .gb-ui-icon {padding:2px;border-radius:5px;background:#fff}
.gb241f3-page :is(#gb231-plus,#gb231-toggle,.gb-school-menu>summary) {
  min-height:38px;
  padding:8px 12px;
  border-radius:9px;
  font-size:12px;
}
.gb241f3-page #gb231-plus:hover {background:linear-gradient(128deg,#096cca,#123cb8)}
.gb241f3-page #gb231-toggle {
  border:1px solid #d8e6fa;
  background:#eff5ff;
  color:#173f79;
}
.gb241f3-page .at241-tabs:not([data-active-view="grades"]) :is(.gb231-actions,#gb231-toggle,.gb-school-search) {display:none}
.gb241f3-page .at241-tabs:not(.gb-school-toolbar):not([data-active-view="grades"]) .at241-tab-actions {display:none}
.gb241f3-page .at241-tabs:not([data-active-view="grades"]) + .gb-book-metrics {display:none}
.gb-book-hero--compact:has(.at241-tabs:not([data-active-view="grades"])) + .gb-book-metrics {display:none}

.gb-book-metrics {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:0 0 12px;
}
.gb-book-metric {
  --metric-wash:#eaf4ff;
  --metric-chip:#d4eaff;
  --metric-ink:#175aae;
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
  min-height:68px;
  padding:9px 13px;
  border:1px solid var(--book-line);
  border-radius:14px;
  background:linear-gradient(110deg,#fff,var(--metric-wash));
  box-shadow:var(--book-shadow);
}
.gb-book-metric[data-tone="violet"] {--metric-wash:#f2ebff;--metric-chip:#eadbff;--metric-ink:#6740b8}
.gb-book-metric[data-tone="mint"] {--metric-wash:#eaf8f5;--metric-chip:#d2f0e8;--metric-ink:#187364}
.gb241f3-page .gb-book-metric .gb-ui-icon {
  width:39px;
  height:39px;
  padding:8px;
  border-radius:11px;
  background:var(--metric-chip);
}
.gb-book-metric dt {color:var(--book-muted);font-size:12px;font-weight:750;line-height:1.2}
.gb-book-metric dd {margin:2px 0 0;color:var(--metric-ink);font-size:23px;font-weight:850;line-height:1.05}

#content.gb241f3-page :is(.gb241-shell,.at241-panel):not([hidden]) {
  padding:12px;
  border:1px solid var(--book-line);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--book-shadow);
}
.gb241f3-page .gb241-main {gap:9px}
.gb-book-table-title,.gb-attendance-title {
  display:flex;
  align-items:center;
  gap:9px;
}
.gb-book-table-title h2 {margin:0;font-size:16px;letter-spacing:-.015em}
.gb-book-table-title .gb-ui-icon,.gb-attendance-title .gb-ui-icon {
  width:32px;
  height:32px;
  padding:5px;
  border-radius:9px;
  background:#eaf2ff;
}
.gb241f3-page .gb231-scroll {border:1px solid #d8e4f7;border-radius:11px;background:#f7faff}
#content.gb241f3-page .gb231-table :is(th,td) {border-color:#dae5f5}
#content.gb241f3-page .gb231-table thead th.gb231-student {background-color:#eaf1ff}
#content.gb241f3-page .gb231-table tbody td.gb231-student {background-color:#f7faff}
#content.gb241f3-page .gb231-table tbody tr:nth-child(even) td.gb231-student {background-color:#eef4ff}
#content.gb241f3-page .gb231-table :is(th,td).gb231-average {background-color:#e5f0ff;color:#16498c}
#content.gb241f3-page .gb231-table thead th.gb231-average {background-color:#d5e6ff}
#content.gb241f3-page .gb231-table tbody td[data-gb-cell] {
  background-color:color-mix(in srgb,var(--gb-group-tone,#397de3) 6%,white);
}
#content.gb241f3-page .gb231-table tbody tr:nth-child(even) td[data-gb-cell] {
  background-color:color-mix(in srgb,var(--gb-group-tone,#397de3) 11%,white);
}
#content.gb241f3-page .gb231-table thead th.gb231-activity-head {
  background-color:color-mix(in srgb,var(--gb-group-tone,#397de3) 18%,white);
  color:#294368;
}
#content.gb241f3-page .gb231-table th.gb231-average .gb241e-head {
  writing-mode:horizontal-tb !important;
  transform:none !important;
  white-space:normal !important;
  width:100%;
  padding:3px;
  line-height:1.16;
}
.gb241f3-page .gb231-table th.gb231-student img {height:29px!important}
.gb241f3-page .gb231-table .gb241f-photo {border:2px solid #fff;box-shadow:0 0 0 1px #cee0f6}
.gb241f3-page .gb231-table .gb236-tag {border-radius:6px}
#content.gb241f3-page .gb231-table .gb-score:not(:disabled) {
  border-color:#163e781c;
  border-radius:7px;
  background-color:#ffffff8c;
}
#content.gb241f3-page .gb231-table .gb-score:focus {background-color:#fff}
.gb241f3-page .gb231-table tbody td:has(.gb-score:focus) {box-shadow:inset 0 0 0 2px #0b69ea}
.gb241f3-page .gb231-note {color:var(--book-muted);font-size:11px}
.gb241f3-page .gb-book-no-activities {
  display:grid;
  grid-template-columns:minmax(0,max-content) minmax(0,1fr);
  align-items:stretch;
}
.gb-book-no-activities > :not(.gb231-scroll,.gb-book-empty) {grid-column:1/-1}
.gb-book-empty {
  display:grid;
  justify-items:center;
  align-content:center;
  gap:6px;
  min-height:132px;
  padding:18px;
  border:1px dashed #cbdcf6;
  border-radius:12px;
  background:linear-gradient(140deg,#f9fbff,#eff5ff);
  text-align:center;
}
.gb241f3-page .gb-book-empty .gb-ui-icon {
  width:44px;
  height:44px;
  padding:8px;
  border-radius:12px;
  background:#e3edff;
}
.gb-book-empty :is(h2,h3,p) {margin:0}
.gb-book-empty h3 {font-size:15px}
.gb-book-empty p {color:var(--book-muted);font-size:12px}
.gb-book-empty[data-gb-create-on-double-click] {cursor:pointer;user-select:none}
.gb-book-empty[data-gb-create-on-double-click]:hover {border-color:#83a9e4}
.gb241f3-page .at241-legend {border:1px solid #dce8fc;background:#eff5ff}
.gb241f3-page .at241-scroll {border-color:var(--book-line);border-radius:11px}
.gb241f3-page .at241-table th {background:#e9efff}
.gb241f3-page .at241-empty {padding:16px;text-align:center;color:var(--book-muted)}
.gb241f3-page .at241-empty :is(h3,p) {margin:4px 0}
.gb241f3-page .at241-footer {padding-top:8px}
.gb241f3-page :is(.class-dash-card,.class-dash-metric) {border-radius:14px;box-shadow:var(--book-shadow)}

@media(max-width:900px) {
  .gb241f3-page .gb-book-no-activities {grid-template-columns:minmax(0,1fr)}
  .gb-book-no-activities > .gb231-scroll {justify-self:start;width:max-content;max-width:100%}
}
@media(max-width:600px) {
  #content.gb241f3-page {padding:8px}
  .gb-book-hero {min-height:112px;padding:14px 14px 14px 12px}
  .gb-book-hero::after {opacity:.2;width:55%}
  .gb-book-emblem {width:49px;border-radius:13px}
  .gb-book-subject h1 {font-size:23px}
  .gb-book-context li {padding:3px 7px}
  .gb241f3-page .at241-tab-buttons {flex:1 1 100%}
  .gb241f3-page .at241-tab {flex:1 1 auto;padding-inline:7px}
  .gb241f3-page .at241-tab .gb-ui-icon {width:16px;height:16px}
  .gb241f3-page .at241-tab-actions {width:100%}
  .gb-book-metrics {gap:5px}
  .gb-book-metric {flex-wrap:wrap;align-content:flex-start;gap:5px;padding:7px}
  .gb241f3-page .gb-book-metric .gb-ui-icon {width:29px;height:29px;padding:5px;border-radius:7px}
  .gb-book-metric dt {font-size:10px;overflow-wrap:anywhere}
  .gb-book-metric dd {font-size:19px}
  #content.gb241f3-page :is(.gb241-shell,.at241-panel):not([hidden]) {padding:7px}
  .gb241f3-page .gb231-scroll {--book-mobile-student:min(var(--gb-student-width),43vw)}
  #content.gb241f3-page .gb231-table .gb231-student {
    width:var(--book-mobile-student);
    min-width:var(--book-mobile-student);
    max-width:var(--book-mobile-student);
  }
  #content.gb241f3-page .gb231-table .gb231-average {
    left:var(--book-mobile-student)!important;
    width:76px;
    min-width:76px;
    max-width:76px;
  }
  .gb241f3-page .gb231-table .gb241f-person strong {white-space:normal}
}

/* Encabezado compacto del portal docente y acciones por equipo. */
.gb-book-hero--compact {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:3px 12px;
  min-height:0;
  margin-bottom:8px;
  padding:8px 11px 6px;
  border-radius:14px;
}
.gb-book-hero--compact::after {width:180px;opacity:.38;background-size:auto 126%}
.gb-book-hero--compact .gb-book-identity {gap:8px}
.gb-book-hero--compact .gb-book-emblem {width:38px;border-radius:10px}
.gb-book-hero--compact .gb-book-subject {display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px}
.gb-book-hero--compact .gb-book-subject h1 {order:-1;margin:0;font-size:clamp(18px,2.2vw,27px)}
.gb-book-hero--compact .gb-book-code {font-size:9px;letter-spacing:.05em}
.gb-book-hero--compact .gb-book-context {gap:3px}
.gb-book-hero--compact .gb-book-context li {padding:2px 6px;font-size:10px}
#content.gb241f3-page .gb-book-hero--compact .at241-tabs {display:contents}
.gb-book-hero--compact .at241-tab-actions {grid-column:2;grid-row:1;justify-content:flex-end;gap:5px}
.gb-book-hero--compact .at241-tab-buttons {grid-column:1/-1;grid-row:2;gap:3px}
.gb-book-hero--compact .at241-tab,
.gb-book-hero--compact :is(#gb231-plus,#gb231-toggle) {
  min-height:31px;
  padding:5px 9px;
  font-size:11px;
}
.gb-book-hero--compact .at241-tab .gb-ui-icon {width:16px;height:16px}
.gb-book-hero--compact .at241-tab:not(.active) {background:#ffffff9e}
.gb-book-hero--compact .at241-tab:not(.active):hover {background:#fff}
.gb-book-hero--compact + .gb-book-metrics {gap:7px;margin-bottom:8px}
.gb-book-hero--compact + .gb-book-metrics .gb-book-metric {min-height:47px;gap:7px;padding:5px 9px;border-radius:11px}
.gb-book-hero--compact + .gb-book-metrics .gb-ui-icon {width:29px;height:29px;padding:5px;border-radius:7px}
.gb-book-hero--compact + .gb-book-metrics dt {font-size:10px}
.gb-book-hero--compact + .gb-book-metrics dd {font-size:19px}
#content.gb241f3-page:has(.gb-book-hero--compact) .gb241-shell:not([hidden]) {padding:8px}
.gb-book-hero--compact ~ .gb241-shell .gb241-main {gap:6px}
.gb-book-hero--compact ~ .gb241-shell .gb-book-table-title > .gb-ui-icon {width:27px;height:27px;padding:4px}
.gb-book-hero--compact ~ .gb241-shell .gb-book-table-title h2 {font-size:14px}
.gb-book-table-title {flex-wrap:wrap}
.gb241f3-page .gb-book-table-title #gb231-plus {min-height:30px;padding:5px 8px;font-size:11px}
.gb-team-tools {display:flex;flex-wrap:wrap;gap:5px;margin-inline-start:auto}
.gb-team-tools .btn {min-height:30px;padding:5px 8px;font-size:11px;white-space:normal}
.gb-team-tools [aria-pressed="true"] {box-shadow:inset 0 0 0 1px #4883e0}
.gb-team-badge {
  display:inline-block;
  max-width:calc(100% - 35px);
  margin-inline-start:5px;
  padding:2px 5px;
  border-radius:5px;
  background:#dceaff;
  color:#224e8d;
  font-size:9px;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  vertical-align:middle;
}
#content.gb241f3-page .gb231-table .gb-team-start td {border-top:2px solid #94b8eb}
.gb-team-grade-summary,.gb-team-grade-help {margin:0;padding:5px 11px 10px;color:#465e84;font-size:12px;line-height:1.4}
@media(max-width:600px) {
  .gb-book-hero--compact .at241-tab-buttons {grid-row:2}
  .gb-book-hero--compact .at241-tab-actions {grid-column:1/-1;grid-row:3;width:auto;margin:0}
  .gb-book-hero--compact .gb-book-identity {grid-column:1/-1}
  .gb-book-hero--compact + .gb-book-metrics .gb-book-metric {align-items:center}
}
@media print {
  #content.gb241f3-page {background:#fff}
  .gb-book-hero {min-height:0;padding:8px;background:#fff;box-shadow:none}
  .gb-book-hero::after,.gb-book-emblem {display:none}
  .gb241f3-page :is(.class-dash-card,.class-dash-metric) {box-shadow:none}
}
