@charset "UTF-8";
/* ── CloudMinerva Dashboard Styles ─────────────────────────────────────────── */
:root {
  --cm-panel: color-mix(in srgb, var(--brand-color) 12%, #020817);
  --cm-panel-2: color-mix(in srgb, var(--brand-color) 16%, #04070f);
  --cm-panel-3: color-mix(in srgb, var(--brand-color) 20%, #050a18);
}

/* ── Dashboard shell ───────────────────────────────────────────────────────── */
.cm-shell {
  width: 100%;
  max-width: var(--ms-content-max, 1440px);
  margin-inline: auto;
  border-radius: 20px;
  padding: 28px 26px 44px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: rgba(255, 255, 255, 0.92);
  background: radial-gradient(circle at 16% 18%, rgba(34, 211, 238, 0.12), transparent 36%), radial-gradient(circle at 86% 76%, rgba(239, 68, 68, 0.09), transparent 42%), linear-gradient(140deg, var(--cm-panel) 0%, var(--cm-panel-2) 52%, var(--cm-panel-3) 100%);
  min-height: 100vh;
}

@media (max-width: 720px) {
  .cm-shell {
    padding: 18px 14px 34px;
  }
}
.cm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cm-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.cm-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cm-title-logo {
  width: 55px;
  height: 55px;
  object-fit: contain;
  flex: 0 0 auto;
}

.cm-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: calc(0.3em + var(--ms-a11y-letter-add, 0em));
  color: rgba(148, 163, 184, 0.92);
}

/* The heading block of a panel card: the section icon, its kicker and the title as one line. It
   lives here, beside the shell it belongs to, and not on the screen that happened to need it first —
   any screen wearing .cm-card--panel gets the same header without copying four rules. */
.cm-panel-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.cm-panel-heading > div {
  min-width: 0;
}
.cm-panel-heading > .material-symbols-outlined {
  flex: 0 0 auto;
  color: var(--ms-orange);
  font-size: 1.45rem;
}
.cm-panel-heading .cm-h2 {
  overflow-wrap: anywhere;
}

.cm-title {
  margin: 6px 0 2px;
  font-size: 28px;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
}

.cm-subtitle {
  color: rgba(148, 163, 184, 0.9);
  font-size: 14px;
}

.cm-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 560px) {
  .cm-title-logo {
    width: 28px;
    height: 28px;
  }
}
/* The way back to the command, beside the LIVE chip and built like it — the two sit together and would
   read as two different kinds of thing otherwise. Unlike the chip this one is pressable, so it takes the
   brand tint on hover and says so with the cursor. */
/* must match FADE_MS in _CmMap.cshtml */
.cm-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  /* Grey, and derived from the text colour rather than from the brand: beside the LIVE chip this must
     read as the same kind of thing, and the brand navy at 25% over a navy header is a border nobody
     can see. The dashboard's own skin for it is further down, beside the chip's. */
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  background: color-mix(in srgb, currentColor 8%, transparent);
  backdrop-filter: blur(10px);
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.cm-home-btn:hover {
  border-color: color-mix(in srgb, currentColor 26%, transparent);
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.cm-home-btn.is-home-out {
  opacity: 0;
}
.cm-home-btn[hidden] {
  display: none;
}
.cm-home-btn .material-symbols-outlined {
  font-size: 1.05rem;
}

@media (prefers-reduced-motion: reduce) {
  .cm-home-btn {
    transition: border-color 0.15s ease, background-color 0.15s ease;
  }
}
.cm-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 25%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 35%, transparent);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: calc(0.12em + var(--ms-a11y-letter-add, 0em));
}

.cm-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.55);
}

.cm-section {
  margin-bottom: 16px;
}

.cm-card {
  position: relative;
  border-radius: var(--ms-radius);
  border: 1px solid color-mix(in srgb, var(--brand-color) 22%, transparent);
  background: radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--brand-color) 12%, transparent), transparent 34%), radial-gradient(circle at 82% 72%, rgba(248, 113, 113, 0.09), transparent 38%), linear-gradient(160deg, rgba(2, 10, 28, 0.92), rgba(3, 21, 50, 0.88));
  box-shadow: inset 0 0 40px rgba(2, 132, 199, 0.15), 0 20px 60px rgba(2, 6, 23, 0.45);
}

.cm-card--panel {
  padding-bottom: 16px;
}

.cm-panel-body {
  padding: 0 18px 18px;
}

.cm-mid-grid {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.cm-mid-grid > * {
  min-width: 0;
}

/* Dining is not visible for this person, so the row carries only the map (see Home/Index --solo). Collapse
   the second, empty 1fr column so the map spans the full width instead of leaving a blank half beside it. */
.cm-mid-grid--solo {
  grid-template-columns: 1fr;
}

/* ── Units following the map's selection (the command's panel) ────────────────────────────────────
   The card is swapped whole for another arsenal's, so it says it is working while the new one is on its way
   and arrives with a fade instead of blinking into place. Two things wear this: the card itself, where it is
   swapped in place, and the band under the map, which is empty until an arsenal is picked and has to say it
   is working with nothing in it yet. */
#cm-units-panel,
.cm-arsenal-detail {
  position: relative;
}
#cm-units-panel.is-loading,
.cm-arsenal-detail.is-loading {
  /* The table stays legible underneath — it is still true, just no longer the one asked for. */
}
#cm-units-panel.is-loading::before,
.cm-arsenal-detail.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  background: color-mix(in srgb, var(--ms-surface) 55%, transparent);
}
#cm-units-panel.is-loading,
.cm-arsenal-detail.is-loading {
  /* The app's own spinner, drawn rather than inserted: the card is replaced whole, so any element added
     to it would have to be found and removed again on the way out. */
}
#cm-units-panel.is-loading::after,
.cm-arsenal-detail.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid color-mix(in srgb, var(--brand-color) 18%, transparent);
  border-top-color: color-mix(in srgb, var(--brand-color) 85%, transparent);
  border-radius: 50%;
  animation: cmSpin 0.7s linear infinite;
}

/* Whatever the card's head carries on its right — the Activas/Todas switch, and in the band the close
   button — as ONE group, so a card with both does not push the switch into the middle of its own head. */
.cm-card-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Going out. Must match FADE_MS in _CmArsenals' loader, which empties the band when this has run. */
.cm-arsenal-detail.is-closing {
  opacity: 0;
  transition: opacity 180ms ease;
}

/* Empty and loading: without a height of its own the veil and its spinner would have nothing to be drawn
   over, and the band would look like nothing had happened. */
.cm-arsenal-detail.is-loading:empty {
  min-height: 140px;
}

/* Inside the band the card is on its own — no map beside it to take a height from — so it drops the top
   margin the standalone panel carries and lets its table decide, up to a point: a big arsenal's
   establishment scrolls inside the card instead of running the page on for a screenful. */
.cm-arsenal-detail .cm-tabs-panel {
  margin-top: 0;
}

.cm-units-band [data-cm-units-pane] {
  max-height: 420px;
  overflow: auto;
}

/* ── The umbrella's summary (the command's panel) ─────────────────────────────────────────────────
   A row is a PICK and not a link: it opens the band under the map. It says so by lighting up under the
   pointer and by staying lit while that is the arsenal the band is showing. */
.cm-arsenals-panel tr[data-cm-arsenal] {
  cursor: pointer;
}
.cm-arsenals-panel tr.is-current {
  background: color-mix(in srgb, var(--brand-color) 16%, transparent);
}
.cm-arsenals-panel {
  /* The name is a real button so it can be reached with the keyboard; it is dressed as the text of its
     own cell, which is what it looks like it is. */
}
.cm-arsenals-panel .cm-arsenal-open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.cm-units-swapped {
  animation: cmUnitsIn 220ms ease both;
}

@keyframes cmUnitsIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cm-units-swapped {
    animation: none;
  }
  .cm-arsenal-detail.is-closing {
    transition: none;
  }
  #cm-units-panel.is-loading::after,
  .cm-arsenal-detail.is-loading::after {
    animation: none;
  }
}
@keyframes cmCountersIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cm-counters {
    animation: none;
  }
}
/* ── Counter tiles (October's dashboard cards) ─────────────────────────────────
   Deliberately plain Bootstrap cards, like the Meteorología tiles, so they read as a summary strip
   and not as another cm-* panel competing with the map and the dining chart. */
.cm-counters {
  animation: cmCountersIn 220ms ease both;
}
.cm-counters .cm-counter-card {
  border: 0;
  border-radius: var(--ms-radius);
  background: var(--ms-surface);
  color: inherit;
  box-shadow: var(--ms-shadow-card);
  transition: background-color 0.15s ease;
}
.cm-counters a.cm-counter-card:hover {
  background: color-mix(in srgb, var(--brand-color) 4%, var(--ms-surface));
}
.cm-counters .card-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1.75rem 1.5rem;
}
.cm-counters .cm-counter-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cm-counters .cm-counter-label {
  text-transform: uppercase;
}
.cm-counters .cm-counter-icon {
  flex: 0 0 auto;
  font-size: 34px;
  line-height: 1;
  color: var(--ms-orange);
  font-variation-settings: "FILL" 0, "wght" 250, "GRAD" -25, "opsz" 40;
}
.cm-counters .cm-counter-value {
  color: var(--cm-dashboard-heading);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: calc(0em + var(--ms-a11y-letter-add, 0em));
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.cm-counters .cm-weather-card .card-body {
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
}
.cm-counters .cm-weather-now {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.cm-counters .cm-weather-icon {
  flex: 0 0 auto;
  font-size: 40px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 250, "GRAD" -25, "opsz" 40;
}
.cm-counters .cm-weather-text {
  min-width: 0;
}
.cm-counters .cm-weather-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.cm-counters .cm-weather-temp {
  flex: 0 0 auto;
  color: var(--cm-dashboard-heading);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.cm-counters .cm-weather-temp .cm-weather-unit {
  font-size: 14px;
  font-weight: 400;
  vertical-align: super;
}
.cm-counters .cm-weather-desc {
  min-width: 0;
  overflow: hidden;
  color: var(--cm-dashboard-text, inherit);
  font-size: 13px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-counters .cm-weather-detail {
  margin-top: 2px;
  overflow: hidden;
  color: var(--cm-dashboard-muted, var(--ms-text-muted));
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-counters .cm-weather-sun {
  display: flex;
  flex: 0 0 auto;
  gap: 20px;
  margin-left: auto;
}
.cm-counters .cm-weather-sun-item {
  text-align: center;
}
.cm-counters .cm-weather-sun-icon {
  display: block;
  margin-inline: auto;
  font-size: 18px;
  line-height: 18px;
  font-variation-settings: "FILL" 0, "wght" 250, "GRAD" -25, "opsz" 24;
}
.cm-counters .cm-weather-sun-icon--rise {
  color: var(--ms-orange);
}
.cm-counters .cm-weather-sun-icon--set {
  color: var(--cm-dashboard-muted, var(--ms-text-muted));
}
.cm-counters .cm-weather-sun-time {
  color: var(--cm-dashboard-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}
.cm-counters .cm-weather-sun-label {
  color: var(--cm-dashboard-muted, var(--ms-text-muted));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
  line-height: 14px;
  text-transform: uppercase;
}

/* ── The sky, by colour ─────────────────────────────────────────────────────────────────────────
   One colour per condition, from the icon the server already chose (WeatherJson.Icon), so a sky can
   be read at a glance before any word of it is: sun amber, cloud slate, rain blue, storm violet,
   snow ice, fog grey. Dark keeps the same hues, lifted: the light values sit too deep against navy.

   Stated HERE, in the stylesheet every page loads, because two screens now paint these icons — the
   «Meteorología» board and the arsenal's weather card on the control panel — and a palette written
   once per screen is a palette that ends up disagreeing with itself. Unscoped on purpose: the class
   is only ever put on a weather icon, so there is nothing else for it to reach. */
.wx-ico--sunny {
  color: #f0a500;
}

.wx-ico--partly_cloudy_day {
  color: #d9932b;
}

.wx-ico--cloud {
  color: #7b8ea3;
}

.wx-ico--rainy {
  color: #3b82f6;
}

.wx-ico--thunderstorm,
.wx-ico--storm {
  color: #7c5cd6;
}

.wx-ico--weather_snowy {
  color: #56b6d8;
}

.wx-ico--foggy {
  color: #94a3b8;
}

[data-bs-theme=dark] .wx-ico--sunny,
html.dark .wx-ico--sunny {
  color: #ffc44d;
}

[data-bs-theme=dark] .wx-ico--partly_cloudy_day,
html.dark .wx-ico--partly_cloudy_day {
  color: #f0b565;
}

[data-bs-theme=dark] .wx-ico--cloud,
html.dark .wx-ico--cloud {
  color: #a3b6cc;
}

[data-bs-theme=dark] .wx-ico--rainy,
html.dark .wx-ico--rainy {
  color: #6aa8ff;
}

[data-bs-theme=dark] .wx-ico--thunderstorm,
[data-bs-theme=dark] .wx-ico--storm,
html.dark .wx-ico--thunderstorm,
html.dark .wx-ico--storm {
  color: #a68cf0;
}

[data-bs-theme=dark] .wx-ico--weather_snowy,
html.dark .wx-ico--weather_snowy {
  color: #7fd3ef;
}

[data-bs-theme=dark] .wx-ico--foggy,
html.dark .wx-ico--foggy {
  color: #b6c2d1;
}

/* Map + dining side by side. Both cards fill the row height and the map viewer, which used to carry
   a hardcoded 520px, now takes whatever the row gives it. */
/* The map card's tab bar: the shared mn-switch, and under it the layer picker that only the weather tab
   shows. Under and not beside, so the switch keeps the place and the width it has on every other card and
   the picker appearing does not shove it sideways. */
/* Only the switch now: which field the weather paints is chosen ON the map, by the picker the map
   carries, so nothing here appears and disappears with the tab. */
.cm-map-tabs {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* ── One map per tab ──────────────────────────────────────────────────────────────────────────────
   The tabs of the map card are not readings of one Leaflet instance any more: each is a panel with a map
   of its own — the geostrategic one, and the weather component. They are stacked on the same box and
   cross-fade, so the card keeps its height and neither map ever draws over the other. */
/* must match PANEL_FADE_MS in _CmMap.cshtml */
.cm-map-panels {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  isolation: isolate;
  z-index: 0;
}

.cm-map-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 1;
  transition: opacity 0.22s ease;
}
.cm-map-panel.is-panel-out {
  opacity: 0;
}
.cm-map-panel[hidden] {
  display: none;
}
.cm-map-panel > .spain-map-viewer {
  flex: 1 1 auto;
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cm-map-panel {
    transition: none;
  }
}
/* Enlarged, the weather tab takes the WHOLE card over the window — its header carries the tab switch and
   the layer picker, and the big view needs them as much as the small one does. The component asks for this
   by class (wx-map-card--full); what that means for this card is said here. */
.cm-card--map.wx-map-card--full {
  position: fixed;
  inset: 0;
  z-index: 1040; /* over the panel, under Bootstrap's modals (1055) */
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.cm-map-dining-row > .cm-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
}
.cm-map-dining-row .cm-map-panels {
  flex: 1 1 auto;
  min-height: 420px;
}
.cm-map-dining-row {
  /* «Unidades» beside the map: the card is the map's height, so its table takes the leftover space and
     SCROLLS inside it. Without this the rows simply run past the bottom of the card and are cut off — the
     card is told not to overflow, and nothing was told to scroll. */
}
.cm-map-dining-row .cm-tabs-panel > .cm-panel-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.cm-map-dining-row [data-cm-units-pane],
.cm-map-dining-row .cm-arsenals-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.cm-map-dining-row .cm-dining-section > .cm-panel-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.cm-map-dining-row {
  /* The chart keeps its aspect ratio, so it is centred in the leftover space instead of hugging the
     bottom edge of the card. */
}
.cm-map-dining-row .cm-dining-chart-wrap {
  margin-block: auto;
}
.cm-map-dining-row {
  /* At this column width the summary no longer fits on one line: the chips take the first row and
     the period navigator drops to its own, right-aligned, instead of floating mid-row. */
}
.cm-map-dining-row .cm-dining-summary {
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 16px;
}
.cm-map-dining-row .cm-dining-legend-row {
  flex: 1 1 auto;
  gap: 8px 14px;
}
.cm-map-dining-row .cm-dining-legend-item {
  padding: 4px 10px;
  gap: 6px;
}
.cm-map-dining-row .cm-dining-nav {
  margin-left: auto;
}
.cm-map-dining-row .cm-dining-period {
  min-width: 0;
}

@media (max-width: 1040px) {
  .cm-mid-grid {
    grid-template-columns: 1fr;
  }
  .cm-table-scroll {
    min-height: 300px;
  }
}
.cm-courses-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

@media (max-width: 1040px) {
  .cm-courses-grid {
    grid-template-columns: 1fr;
  }
}
.cm-courses-section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: calc(0.18em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

/* Donut */
.cm-courses-donut {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 14%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 16%, transparent);
  min-width: 0;
}

.cm-donut-wrap {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  margin-top: 10px;
  margin-bottom: 12px;
}

.cm-donut {
  width: 100%;
  max-width: 220px;
  height: auto;
  overflow: visible;
}

.cm-donut-slice {
  cursor: default;
  pointer-events: none;
  transition: opacity 120ms ease, stroke-width 120ms ease;
}

.cm-donut-center {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  flex-direction: column;
  text-align: center;
  pointer-events: none;
}

.cm-donut-center-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: calc(0.04em + var(--ms-a11y-letter-add, 0em));
  color: rgba(240, 249, 255, 0.98);
}

.cm-donut-center-label {
  font-size: 11px;
  letter-spacing: calc(0.18em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.cm-donut-center-sub {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.92);
  max-width: 220px;
}

.cm-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-donut-legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 12%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 22%, transparent);
  padding: 8px 10px;
  color: rgba(226, 232, 240, 0.92);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.cm-donut-legend-row:hover {
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand-color) 24%, transparent);
}
.cm-donut-legend-row.is-active {
  background: color-mix(in srgb, var(--brand-color) 18%, transparent);
  border-color: color-mix(in srgb, var(--brand-color) 44%, transparent);
}

.cm-donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--brand-color) 18%, transparent);
}

.cm-donut-legend-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: calc(0.02em + var(--ms-a11y-letter-add, 0em));
}

.cm-donut-legend-value {
  font-size: 13px;
  font-weight: 600;
  color: rgba(240, 249, 255, 0.98);
}

/* Table */
.cm-courses-table {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 14%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 16%, transparent);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cm-courses-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.cm-courses-search {
  width: 220px;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 18%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 25%, transparent);
  padding: 9px 12px;
  color: rgba(240, 249, 255, 0.92);
  outline: none;
}
.cm-courses-search:focus {
  border-color: color-mix(in srgb, var(--brand-color) 44%, transparent);
}

.cm-table-scroll {
  overflow: auto;
  max-height: 100%;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 12%, transparent);
  flex: 1 1 0;
  /* Standard properties (Chrome 121+, Firefox, Safari 18+); the ::-webkit- block below is the
     fallback for older WebKit. Note that when scrollbar-color is honoured it WINS over the
     ::-webkit-scrollbar rules, so both must describe the same thin brand-tinted scrollbar. */
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--brand-color) 35%, transparent) transparent;
}
.cm-table-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.cm-table-scroll::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--brand-color) 5%, transparent);
  border-radius: 4px;
}
.cm-table-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand-color) 40%, transparent);
  border-radius: 4px;
  transition: background 0.2s ease;
}
.cm-table-scroll::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--brand-color) 60%, transparent);
}
.cm-table-scroll .cm-table {
  min-width: 600px;
}

.cm-table-scroll--mini {
  max-height: 280px;
}

.cm-table {
  width: 100%;
  border-collapse: collapse;
}
.cm-table.is-column-layout-locked {
  table-layout: fixed;
}
.cm-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--cm-panel) 90%, transparent);
  color: rgba(148, 163, 184, 0.92);
  font-size: 12px;
  letter-spacing: calc(0.16em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 0;
}
.cm-table tbody td {
  padding: 10px 12px;
  height: calc(2 * 1.5 * 1em + 2 * 10px);
  border-bottom: 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: 13px;
}
.cm-table tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}
.cm-table tbody tr:hover > td {
  background: color-mix(in srgb, var(--brand-color) 8%, transparent);
}
.cm-table tbody tr.is-selected > td {
  background: color-mix(in srgb, var(--brand-color) 16%, transparent);
}

.cm-td-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
}

.cm-table-empty {
  text-align: center;
  color: rgba(148, 163, 184, 0.92);
}

/* Pills (status/severity) */
.cm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--brand-color) 18%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 25%, transparent);
  color: rgba(240, 249, 255, 0.92);
  white-space: nowrap;
}
.cm-pill--pendiente {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.14);
}
.cm-pill--en-trámite, .cm-pill--en-tramite {
  border-color: color-mix(in srgb, var(--brand-color) 35%, transparent);
  background: color-mix(in srgb, var(--brand-color) 14%, transparent);
}
.cm-pill--aceptada {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.12);
}
.cm-pill--rechazada {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.12);
}
.cm-pill--info {
  border-color: color-mix(in srgb, var(--brand-color) 35%, transparent);
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
}
.cm-pill--warning {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.12);
}
.cm-pill--critical {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
}

/* Requests panel */
.cm-requests-panel {
  padding-bottom: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.cm-requests-panel .cm-panel-body {
  flex: 1;
}

.cm-requests-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.cm-requests-block-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: calc(0.16em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.cm-requests-bars {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-requests-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 26px;
  gap: 10px;
  align-items: center;
}

a.cm-requests-bar-row--link {
  color: inherit;
  text-decoration: none;
  padding: 4px 6px;
  margin: -4px -6px;
  border-radius: 8px;
  transition: background-color 0.12s ease;
}
a.cm-requests-bar-row--link:hover {
  background: rgba(255, 255, 255, 0.06);
}
a.cm-requests-bar-row--link:hover .cm-requests-bar-label {
  text-decoration: underline;
}

.cm-requests-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
}

.cm-requests-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.cm-requests-bar-fill {
  height: 100%;
  border-radius: 999px;
  box-shadow: 0 0 16px color-mix(in srgb, var(--brand-color) 15%, transparent);
}

.cm-requests-bar-value {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: rgba(240, 249, 255, 0.98);
}

.cm-requests-mini-table {
  margin-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--brand-color) 12%, transparent);
  padding-top: 12px;
}

.cm-requests-mini-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: calc(0.16em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
  margin-bottom: 10px;
}

@media (max-width: 560px) {
  .cm-requests-bar-row {
    grid-template-columns: 1fr;
  }
  .cm-requests-bar-value {
    text-align: left;
  }
}
/* Course detail */
.cm-course-detail {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 14%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 16%, transparent);
  min-width: 0;
}

@media (max-width: 720px) {
  .cm-table-scroll {
    /* On mobile the max-height must actually cap; the previous min-height:400px
       (> max-height) overrode it (min wins over max). Bug fixed 2026-07-10. */
    max-height: min(360px, 52vh);
  }
}
.cm-course-detail-body {
  margin-top: 10px;
}

.cm-course-title {
  font-weight: 900;
  letter-spacing: calc(0.02em + var(--ms-a11y-letter-add, 0em));
  color: rgba(240, 249, 255, 0.98);
}

.cm-course-sub {
  margin-top: 2px;
  color: rgba(148, 163, 184, 0.92);
  font-size: 13px;
}

.cm-course-kpis {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.cm-course-kpi {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 12%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 22%, transparent);
}

.cm-course-kpi-value {
  font-size: 18px;
  font-weight: 900;
  color: rgba(240, 249, 255, 0.98);
}

.cm-course-kpi-value--ok {
  color: #34d399;
}

.cm-course-kpi-label {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: calc(0.18em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.cm-course-meta {
  margin-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--brand-color) 12%, transparent);
  padding-top: 12px;
}

.cm-course-meta-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  padding: 6px 0;
}

.cm-course-meta-key {
  color: rgba(148, 163, 184, 0.92);
  font-size: 12px;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
}

.cm-course-meta-val {
  color: rgba(226, 232, 240, 0.92);
  font-size: 13px;
}

@media (max-width: 1040px) {
  .cm-course-kpis {
    grid-template-columns: 1fr;
  }
  .cm-course-meta-row {
    grid-template-columns: 1fr;
  }
}
.cm-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}

.cm-h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  font-size: 18px;
  letter-spacing: calc(0.06em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
}
.cm-h2 .cm-h2-icon {
  flex: 0 0 auto;
  font-size: 20px;
  color: var(--ms-orange);
}

.cm-card-meta {
  text-align: right;
  font-size: 13px;
  color: rgba(148, 163, 184, 0.92);
  margin-top: 16px;
}

.cm-meta-line {
  white-space: nowrap;
}

.cm-card--map {
  overflow: hidden;
}

.cm-empty {
  padding: 16px 18px;
  color: rgba(148, 163, 184, 0.92);
  font-size: 14px;
}

/* ── Dining chart ─────────────────────────────────────────────────────────── */
.cm-dining-section {
  padding-bottom: 18px;
}

.cm-dining-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cm-dining-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 22%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 35%, transparent);
  color: rgb(186, 230, 253);
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  transition: background 120ms ease, border-color 120ms ease;
  padding: 0;
}
.cm-dining-nav-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand-color) 18%, transparent);
  border-color: color-mix(in srgb, var(--brand-color) 44%, transparent);
}
.cm-dining-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.cm-dining-period {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: calc(0.06em + var(--ms-a11y-letter-add, 0em));
  color: rgba(226, 232, 240, 0.92);
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.cm-dining-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.cm-dining-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 12%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 22%, transparent);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, opacity 120ms ease;
  font-family: inherit;
  color: inherit;
}
.cm-dining-legend-item:hover {
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand-color) 28%, transparent);
}
.cm-dining-legend-item.is-hidden {
  opacity: 0.55;
  border-color: rgba(148, 163, 184, 0.12);
  background: color-mix(in srgb, var(--cm-panel) 12%, transparent);
}
.cm-dining-legend-item--total {
  border-color: color-mix(in srgb, var(--brand-color) 28%, transparent);
  background: color-mix(in srgb, var(--brand-color) 10%, transparent);
  cursor: default;
  pointer-events: none;
  transition: none;
}

.cm-dining-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.cm-dining-legend-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.cm-dining-legend-value {
  font-size: 13px;
  font-weight: 600;
  color: rgba(240, 249, 255, 0.98);
}

/* ── Dining transitions ──────────────────────────────────────────────────────
   Changing the range (or week/month) refetches and repaints the SVG from scratch. Instead of the
   repaint landing hard, the card dims while loading and the new series fades up while its lines
   draw themselves in. Only fresh data replays it — the hover crosshair repaints too, and animating
   there would flicker under the pointer (see playEnterAnimation in _CmDining.cshtml). */
.cm-dining-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  flex-direction: column;
  gap: 10px;
  background: color-mix(in srgb, var(--cm-panel) 72%, transparent);
  backdrop-filter: blur(4px);
  border-radius: 14px;
  color: rgba(148, 163, 184, 0.92);
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.cm-dining-section.is-loading .cm-dining-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms ease;
}

.cm-dining-section .cm-dining-summary,
.cm-dining-section .cm-dining-chart-wrap {
  transition: opacity 180ms ease;
}

.cm-dining-section.is-loading .cm-dining-summary,
.cm-dining-section.is-loading .cm-dining-chart-wrap {
  opacity: 0.35;
}

.cm-dining-svg.is-entering {
  animation: cmDiningEnter 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cm-dining-svg.is-entering .cm-dining-line {
  animation: cmDiningDraw 560ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cmPaneEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes cmPaneRowEnter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-cm-operation-pane].is-entering,
  [data-cm-operation-pane].is-entering tbody tr {
    animation: none;
  }
}
@keyframes cmDiningEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Each line carries pathLength="1", so the dash length is normalised and no measuring is needed. */
@keyframes cmDiningDraw {
  from {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }
  to {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cm-dining-svg.is-entering,
  .cm-dining-svg.is-entering .cm-dining-line {
    animation: none;
  }
}
.cm-dining-chart-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.cm-dining-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  overflow: hidden;
}

@media (max-width: 720px) {
  .cm-dining-nav {
    justify-content: center;
  }
  .cm-dining-period {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cm-dining-legend-row {
    gap: 8px;
  }
  .cm-courses-search {
    width: 100%;
    max-width: 100%;
  }
}
/* ── Tabs + events list ───────────────────────────────────────────────────── */
.cm-tabs-panel {
  margin-top: 14px;
}
.cm-tabs-panel--embedded {
  margin-top: 0;
  padding-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.cm-tabs-panel--embedded .cm-panel-body {
  flex: 1;
  display: flex;
  padding: 0;
  min-width: 0;
  min-height: 0;
}
.cm-tabs-panel--embedded .cm-table-scroll {
  flex: 1;
  border: 0;
  border-radius: 0;
  min-width: 0;
  min-height: 0;
  max-height: none;
}

.cm-events {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cm-event-row {
  display: flex;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 12%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 18%, transparent);
}

.cm-event-date {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 18%, transparent);
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
  flex-direction: column;
}

.cm-event-month {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: calc(0.12em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  color: rgb(125, 211, 252);
}

.cm-event-day {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  color: rgba(240, 249, 255, 0.98);
}

.cm-event-main {
  flex: 1 1 auto;
  min-width: 0;
}

.cm-event-title {
  font-weight: 600;
  letter-spacing: calc(0.02em + var(--ms-a11y-letter-add, 0em));
  color: rgba(240, 249, 255, 0.98);
}

.cm-event-desc {
  margin-top: 2px;
  color: rgba(148, 163, 184, 0.92);
  font-size: 13px;
}

.cm-tab-empty {
  color: rgba(148, 163, 184, 0.92);
  font-size: 14px;
}

/* ── Spain Map Viewer (Leaflet) ─────────────────────────────────────────────── */
/* On a phone the map needs the room; the height belongs to the BOX the tabs share, so both maps get it
   and the viewer inside simply fills its panel. */
@media (max-width: 768px) {
  .cm-map-panels {
    min-height: 650px !important;
  }
}
.spain-map-viewer .leaflet-container {
  background: color-mix(in srgb, var(--cm-panel) 92%, #000) !important;
}
.spain-map-viewer:fullscreen, .spain-map-viewer.is-pseudo-fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  background: color-mix(in srgb, var(--cm-panel) 92%, #000);
}
.spain-map-viewer:fullscreen .spain-map-leaflet, .spain-map-viewer.is-pseudo-fullscreen .spain-map-leaflet {
  border-radius: 0 !important;
}
.spain-map-viewer:fullscreen .spain-map-controls, .spain-map-viewer.is-pseudo-fullscreen .spain-map-controls {
  top: 18px;
  right: 18px;
}
.spain-map-viewer:fullscreen .spain-map-legend, .spain-map-viewer.is-pseudo-fullscreen .spain-map-legend {
  top: 18px;
  right: 68px;
}
.spain-map-viewer:fullscreen .spain-map-info-panel, .spain-map-viewer.is-pseudo-fullscreen .spain-map-info-panel {
  top: 18px;
  left: 18px;
  max-height: calc(100vh - 36px);
}
.spain-map-viewer:fullscreen .spain-map-academy-card, .spain-map-viewer.is-pseudo-fullscreen .spain-map-academy-card {
  bottom: 18px;
  left: 18px;
}
.spain-map-viewer.is-pseudo-fullscreen {
  height: 100%;
  min-height: 0;
}
.spain-map-viewer.is-pseudo-fullscreen .spain-map-info-panel {
  max-height: calc(100% - 36px);
}

/* iPhone's stand-in for full screen: the CARD takes the window, as the weather tab's «ampliar» does, and
   its header steps aside so the map is all there is. Not the viewer itself: fixed inside the card, WebKit
   still clipped it to the card's box. dvh, not vh: Safari's vh counts the space its bars hide. */
.cm-card--map.is-map-pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1040; /* over the panel, under Bootstrap's modals (1055) */
  height: 100dvh;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}
.cm-card--map.is-map-pseudo-fullscreen > .cm-card-header {
  display: none;
}
.cm-card--map.is-map-pseudo-fullscreen .cm-map-panels {
  flex: 1 1 auto;
  min-height: 0 !important;
}

html.cm-map-pseudo-fullscreen {
  overflow: hidden;
}

.spain-map-interaction-guard {
  position: absolute;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 24px;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--cm-panel) 24%, transparent);
  color: rgba(226, 232, 240, 0.92);
  cursor: pointer;
  font: inherit;
  text-align: left;
  touch-action: pan-y pinch-zoom;
  /* The scrim fades; the card inside it also lifts (below). The guard used to appear and vanish
     with the `hidden` attribute alone, which reads as the map blinking. `hidden` still does the
     real hiding -- out of the tab order, invisible to assistive tech -- but the script only applies
     it once this fade has run. */
  transition: opacity 180ms ease;
}
.spain-map-interaction-guard[hidden] {
  display: none;
}
.spain-map-interaction-guard {
  /* The out-state. The visible state is the default so a guard rendered before the map script runs
     still reads as the locked overlay. Not hit-testable while fading out, or a click meant for the
     map would land on a scrim that is already on its way out. */
}
.spain-map-interaction-guard.is-guard-out {
  opacity: 0;
  pointer-events: none;
}
.spain-map-interaction-guard.is-guard-out .spain-map-interaction-prompt {
  opacity: 0;
  transform: translateY(6px) scale(0.98);
}
.spain-map-interaction-guard {
  /* No hover reaction on purpose: the guard covers the whole map, so any movement reads as the map
     itself twitching under the pointer. */
}
.spain-map-interaction-guard:focus-visible {
  outline: none;
}
.spain-map-interaction-guard:focus-visible .spain-map-interaction-prompt {
  outline-offset: 3px;
}

/* Dressed as a card of the app (surface + border + soft shadow), not as a floating tooltip. The
   --ms-* tokens are theme-aware, so light and dark need no separate declarations. */
.spain-map-interaction-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(430px, 100%);
  padding: 12px 14px;
  border: 1px solid var(--ms-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--ms-surface) 94%, transparent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  transform: translateY(0) scale(1);
  transform-origin: center;
  transition: opacity 180ms ease, transform 180ms ease;
}
.spain-map-interaction-prompt > .material-symbols-outlined {
  flex: 0 0 auto;
  /* NOT --brand-color: that is the school's colour, and on the dark map the navy schools paint
     this padlock nearly into the card. The section-icon orange is theme-independent and reads in
     both modes. */
  color: var(--ms-orange);
  font-size: 20px;
}

.spain-map-interaction-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.spain-map-interaction-copy strong {
  color: var(--ms-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: calc(0em + var(--ms-a11y-letter-add, 0em));
}
.spain-map-interaction-copy span {
  color: var(--ms-text-muted);
  font-size: 12px;
  line-height: 1.35;
}

/* The overlays still fade (what is being avoided is the blink) but nothing travels: they appear in
   place. */
@media (prefers-reduced-motion: reduce) {
  .spain-map-interaction-prompt,
  .spain-map-info-panel,
  .spain-map-academy-card {
    transition-property: opacity;
    transform: none;
  }
  .spain-map-interaction-guard.is-guard-out .spain-map-interaction-prompt,
  .spain-map-info-panel.is-float-out,
  .spain-map-academy-card.is-float-out {
    transform: none;
  }
}
.spain-map-viewer:not(.is-interaction-locked) .spain-map-leaflet:focus-visible,
.wx-map-component:not(.wx-map-component--embedded):not(.is-interaction-locked) #wx-map:focus-visible {
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--brand-color) 65%, transparent);
}

.spain-map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-map-transfer-btn {
  border: 1px solid color-mix(in srgb, var(--brand-color) 22%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 25%, transparent);
  color: rgba(148, 163, 184, 0.92);
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: calc(0.12em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.cm-map-transfer-btn:hover {
  border-color: color-mix(in srgb, var(--brand-color) 45%, transparent);
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
  color: rgba(226, 232, 240, 0.92);
}
.cm-map-transfer-btn.is-active {
  border-color: color-mix(in srgb, var(--ms-branch-armada) 55%, transparent);
  color: color-mix(in srgb, var(--ms-branch-armada) 50%, #fff);
}

/* The legend belongs to the ENLARGED map only. At card size it covers the very corner of the map it is
   explaining — and with six arsenals listed it covers rather more than a corner — so it waits for full
   screen, where there is room for it. It fades rather than blinks in, and it is kept out of the tab order
   and off the accessibility tree while hidden (`visibility`, not just `opacity`). */
.spain-map-legend {
  position: absolute;
  top: 12px;
  right: 60px;
  max-width: min(22rem, 100% - 6rem);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 22%, transparent);
  background: color-mix(in srgb, var(--cm-panel) 60%, transparent);
  backdrop-filter: blur(12px);
  color: rgba(226, 232, 240, 0.92);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.spain-map-viewer:fullscreen .spain-map-legend,
.spain-map-viewer.is-pseudo-fullscreen .spain-map-legend {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
  .spain-map-legend,
  .spain-map-viewer:fullscreen .spain-map-legend,
  .spain-map-viewer.is-pseudo-fullscreen .spain-map-legend {
    transform: none;
    transition-property: opacity, visibility;
  }
}
.spain-map-legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: calc(0.02em + var(--ms-a11y-letter-add, 0em));
}

.spain-map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cm-panel) 60%, transparent);
}

/* The logistics command in the legend, matching its marker: bigger and white-ringed, not one more colour
   from the arsenals' palette. */
.spain-map-legend-dot--command {
  width: 12px;
  height: 12px;
  background: var(--ms-map-command);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ms-map-command) 45%, transparent);
}

.spain-map-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  /* Without this the user agent's default button border paints a black outline over the map. */
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cm-panel) 55%, transparent);
  color: rgb(186, 230, 253);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  padding: 0;
}
.spain-map-ctrl-btn > .material-symbols-outlined {
  font-size: 18px;
}
.spain-map-ctrl-btn:hover {
  background: color-mix(in srgb, var(--brand-color) 20%, transparent);
  transform: translateY(-1px);
}
.spain-map-ctrl-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.spain-map-info-panel {
  border: 1px solid var(--ms-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ms-surface) 94%, transparent);
  color: var(--ms-text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  transform: translateY(0) scale(1);
  transition: opacity 160ms ease, transform 160ms ease;
}
.spain-map-info-panel[hidden] {
  display: none;
}
.spain-map-info-panel.is-float-out {
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  pointer-events: none;
}
.spain-map-info-panel {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: min(260px, 100vw - 24px);
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 14px;
}

.spain-map-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  /* Room for the close button, which is positioned against the panel, not laid out in this row. */
  padding-right: 30px;
  margin-bottom: 12px;
}
.spain-map-info-header h3 {
  margin: 0;
  color: var(--ms-text);
  font-size: 14px;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
}

/* The count keeps the school's colour as its tint, but the FIGURE is body ink: the old
   rgba(14,165,233) cyan was off-palette and, on a pale blue tint, barely readable. */
.spain-map-info-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
  color: var(--ms-text);
  white-space: nowrap;
}

.spain-map-info-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--brand-color) 12%, transparent);
  margin-bottom: 12px;
}

.spain-map-stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--ms-text);
}

.spain-map-stat-label {
  display: block;
  font-size: 11px;
  letter-spacing: calc(0.18em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  color: var(--ms-text-muted);
  margin-top: 2px;
}

.spain-map-stat-readiness {
  color: var(--ms-success);
}

.spain-map-info-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spain-map-academy-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--ms-border);
  background: color-mix(in srgb, var(--ms-bg) 55%, transparent);
  color: var(--ms-text);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.spain-map-academy-btn:hover {
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand-color) 24%, transparent);
}
.spain-map-academy-btn.is-active {
  background: color-mix(in srgb, var(--brand-color) 18%, transparent);
  border-color: color-mix(in srgb, var(--brand-color) 44%, transparent);
}
.spain-map-academy-btn.is-active .spain-map-academy-dot {
  background: var(--ms-branch-armada);
}

.spain-map-academy-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-color);
  flex: 0 0 auto;
}

/* An empty community used to be a bare line of text in a half-empty card. The icon gives the
   sentence something to sit against and reads as a state, not as a missing list. */
.spain-map-info-empty {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--ms-text-muted);
  font-size: 13px;
  line-height: 1.35;
}
.spain-map-info-empty > .material-symbols-outlined {
  flex: 0 0 auto;
  color: var(--ms-orange);
  font-size: 20px;
}

.spain-map-academy-card {
  border: 1px solid var(--ms-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ms-surface) 94%, transparent);
  color: var(--ms-text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  transform: translateY(0) scale(1);
  transition: opacity 160ms ease, transform 160ms ease;
}
.spain-map-academy-card[hidden] {
  display: none;
}
.spain-map-academy-card.is-float-out {
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  pointer-events: none;
}
.spain-map-academy-card {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 1000;
  width: min(300px, 100vw - 24px);
  padding: 16px;
}
.spain-map-academy-card h4 {
  margin: 0 0 12px;
  color: var(--ms-text);
  font-size: 14px;
  letter-spacing: calc(0.02em + var(--ms-a11y-letter-add, 0em));
  padding-right: 22px;
}

/* One close button for both cards over the map (.spain-map-academy-close is kept as an alias so
   the academy card's existing markup is unaffected). */
.spain-map-float-close,
.spain-map-academy-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--ms-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ms-bg) 55%, transparent);
  color: var(--ms-text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.spain-map-float-close:hover,
.spain-map-academy-close:hover {
  color: var(--ms-text);
  border-color: color-mix(in srgb, var(--brand-color) 32%, transparent);
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
}

.spain-map-academy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .spain-map-info-panel {
    left: 10px;
    top: 10px;
    right: 58px;
    width: auto;
    max-width: calc(100% - 68px);
    box-sizing: border-box;
    max-height: calc(100% - 20px);
  }
  .spain-map-legend {
    top: 10px;
    right: 58px;
    padding: 8px 10px;
    gap: 6px;
  }
  .spain-map-legend-row {
    font-size: 11px;
  }
  .spain-map-academy-card {
    left: 10px;
    bottom: 10px;
    right: 10px;
    width: auto;
    max-width: calc(100% - 20px);
    box-sizing: border-box;
  }
  .spain-map-info-stats {
    grid-template-columns: 1fr;
  }
  .spain-map-academy-grid {
    grid-template-columns: 1fr;
  }
}
.spain-map-tooltip {
  background: color-mix(in srgb, var(--cm-panel) 88%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--brand-color) 35%, transparent) !important;
  border-radius: 10px !important;
  color: rgba(240, 249, 255, 0.98) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 6px 10px !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4) !important;
}
.spain-map-tooltip--community {
  text-transform: uppercase !important;
  letter-spacing: calc(0.1em + var(--ms-a11y-letter-add, 0em)) !important;
}

@keyframes mapPulse {
  0% {
    transform: scale(0.5);
    opacity: 0.6;
  }
  70% {
    transform: scale(1.8);
    opacity: 0;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
.connection-line-animated {
  animation: connectionDash 1.5s linear infinite;
}

@keyframes connectionDash {
  to {
    stroke-dashoffset: -36;
  }
}
/* ── Global app loader ────────────────────────────────────────────────────── */
.cm-global-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 18px;
  background: radial-gradient(circle at 16% 18%, rgba(34, 211, 238, 0.12), transparent 36%), radial-gradient(circle at 86% 76%, rgba(239, 68, 68, 0.09), transparent 42%), linear-gradient(140deg, var(--cm-panel) 0%, var(--cm-panel-2) 52%, var(--cm-panel-3) 100%);
}

.cm-global-loader-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: calc(0.18em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.cm-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid color-mix(in srgb, var(--brand-color) 18%, transparent);
  border-top-color: color-mix(in srgb, var(--brand-color) 85%, transparent);
  border-radius: 50%;
  animation: cmSpin 0.7s linear infinite;
}

.cm-spinner--sm {
  width: 22px;
  height: 22px;
  border-width: 2px;
}

@keyframes cmSpin {
  to {
    transform: rotate(360deg);
  }
}
/* ── Table inline loader ──────────────────────────────────────────────────── */
.cm-table-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  color: rgba(148, 163, 184, 0.92);
  font-size: 13px;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
}

/* ══════════════════════════════════════════════════════════════════════════ */
/* ══ LIGHT THEME ═══════════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════════════════════════════ */
html:not(.dark) .cm-shell {
  color: rgba(15, 23, 42, 0.92);
  background: radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--brand-color) 8%, transparent), transparent 36%), radial-gradient(circle at 86% 76%, rgba(239, 68, 68, 0.05), transparent 42%), linear-gradient(140deg, #f8fafc 0%, #e2e8f0 52%, #f1f5f9 100%);
}
html:not(.dark) .cm-kicker {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-title {
  color: rgba(15, 23, 42, 0.95);
}
html:not(.dark) .cm-subtitle {
  color: rgba(71, 85, 105, 0.9);
}
html:not(.dark) .cm-live {
  border: 1px solid color-mix(in srgb, var(--brand-color) 25%, transparent);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(15, 23, 42, 0.9);
}
html:not(.dark) .cm-card {
  border: 1px solid color-mix(in srgb, var(--brand-color) 18%, transparent);
  background: radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--brand-color) 6%, transparent), transparent 34%), radial-gradient(circle at 82% 72%, rgba(248, 113, 113, 0.04), transparent 38%), linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.92));
  box-shadow: inset 0 0 40px color-mix(in srgb, var(--brand-color) 5%, transparent), 0 10px 40px rgba(15, 23, 42, 0.08);
}
html:not(.dark) .cm-courses-section-title {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-courses-donut {
  border: 1px solid color-mix(in srgb, var(--brand-color) 15%, transparent);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--brand-color) 5%, transparent);
}
html:not(.dark) .cm-donut {
  filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--brand-color) 10%, transparent));
}
html:not(.dark) .cm-donut ellipse {
  fill: rgba(180, 180, 180, 0.15) !important;
}
html:not(.dark) .cm-donut path {
  filter: brightness(1.05);
}
html:not(.dark) .cm-donut-center-value {
  color: rgba(15, 23, 42, 0.95);
}
html:not(.dark) .cm-donut-center-label {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-donut-center-sub {
  color: rgba(51, 65, 85, 0.92);
}
html:not(.dark) .cm-donut-legend-row {
  border: 1px solid color-mix(in srgb, var(--brand-color) 10%, transparent);
  background: rgba(255, 255, 255, 0.6);
  color: rgba(51, 65, 85, 0.92);
}
html:not(.dark) .cm-donut-legend-row:hover {
  background: color-mix(in srgb, var(--brand-color) 8%, transparent);
  border-color: color-mix(in srgb, var(--brand-color) 20%, transparent);
}
html:not(.dark) .cm-donut-legend-row.is-active {
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand-color) 35%, transparent);
}
html:not(.dark) .cm-donut-legend-value {
  color: rgba(15, 23, 42, 0.95);
}
html:not(.dark) .cm-courses-table {
  border: 1px solid color-mix(in srgb, var(--brand-color) 12%, transparent);
  background: rgba(255, 255, 255, 0.5);
}
html:not(.dark) .cm-courses-search {
  border: 1px solid color-mix(in srgb, var(--brand-color) 15%, transparent);
  background: rgba(255, 255, 255, 0.8);
  color: rgba(15, 23, 42, 0.92);
}
html:not(.dark) .cm-courses-search::placeholder {
  color: rgba(100, 116, 139, 0.7);
}
html:not(.dark) .cm-table-scroll {
  border: 1px solid color-mix(in srgb, var(--brand-color) 10%, transparent);
}
html:not(.dark) .cm-table-scroll::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--brand-color) 5%, transparent);
}
html:not(.dark) .cm-table-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand-color) 30%, transparent);
}
html:not(.dark) .cm-table-scroll::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--brand-color) 50%, transparent);
}
html:not(.dark) .cm-table thead th {
  background: rgba(241, 245, 249, 0.95);
  color: rgba(71, 85, 105, 0.92);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-color) 10%, transparent);
}
html:not(.dark) .cm-table tbody td {
  border-bottom: 1px solid color-mix(in srgb, var(--brand-color) 6%, transparent);
  color: rgba(51, 65, 85, 0.92);
}
html:not(.dark) .cm-table tbody tr:hover {
  background: color-mix(in srgb, var(--brand-color) 6%, transparent);
}
html:not(.dark) .cm-table tbody tr.is-selected {
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
}
html:not(.dark) .cm-table-empty {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-pill {
  border: 1px solid color-mix(in srgb, var(--brand-color) 15%, transparent);
  background: rgba(255, 255, 255, 0.8);
  color: rgba(15, 23, 42, 0.92);
}
html:not(.dark) .cm-requests-block-title {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-requests-bar-label {
  color: rgba(51, 65, 85, 0.92);
}
html:not(.dark) .cm-requests-bar-track {
  background: rgba(148, 163, 184, 0.2);
}
html:not(.dark) .cm-requests-bar-value {
  color: rgba(15, 23, 42, 0.95);
}
html:not(.dark) .cm-course-detail {
  border: 1px solid color-mix(in srgb, var(--brand-color) 12%, transparent);
  background: rgba(255, 255, 255, 0.5);
}
html:not(.dark) .cm-course-title {
  color: rgba(15, 23, 42, 0.95);
}
html:not(.dark) .cm-course-sub {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-course-kpi {
  border: 1px solid color-mix(in srgb, var(--brand-color) 10%, transparent);
  background: rgba(255, 255, 255, 0.7);
}
html:not(.dark) .cm-course-kpi-value {
  color: rgba(15, 23, 42, 0.95);
}
html:not(.dark) .cm-course-kpi-label {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-course-meta {
  border-top: 1px solid color-mix(in srgb, var(--brand-color) 10%, transparent);
}
html:not(.dark) .cm-course-meta-key {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-course-meta-val {
  color: rgba(51, 65, 85, 0.92);
}
html:not(.dark) .cm-card-meta {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-h2 {
  color: rgba(15, 23, 42, 0.95);
}
html:not(.dark) .cm-empty {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-dining-nav-btn {
  border: 1px solid color-mix(in srgb, var(--brand-color) 20%, transparent);
  background: rgba(255, 255, 255, 0.7);
  color: rgb(14, 165, 233);
}
html:not(.dark) .cm-dining-nav-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand-color) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand-color) 35%, transparent);
}
html:not(.dark) .cm-dining-period {
  color: rgba(51, 65, 85, 0.92);
}
html:not(.dark) .cm-dining-legend-item {
  border: 1px solid color-mix(in srgb, var(--brand-color) 10%, transparent);
  background: rgba(255, 255, 255, 0.6);
}
html:not(.dark) .cm-dining-legend-item:hover {
  background: color-mix(in srgb, var(--brand-color) 8%, transparent);
  border-color: color-mix(in srgb, var(--brand-color) 20%, transparent);
}
html:not(.dark) .cm-dining-legend-item.is-hidden {
  border-color: rgba(148, 163, 184, 0.15);
  background: rgba(241, 245, 249, 0.5);
}
html:not(.dark) .cm-dining-legend-item--total {
  border-color: color-mix(in srgb, var(--brand-color) 20%, transparent);
  background: color-mix(in srgb, var(--brand-color) 8%, transparent);
}
html:not(.dark) .cm-dining-legend-label {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-dining-legend-value {
  color: rgba(15, 23, 42, 0.95);
}
html:not(.dark) .cm-dining-overlay {
  background: rgba(241, 245, 249, 0.85);
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-event-row {
  border: 1px solid color-mix(in srgb, var(--brand-color) 10%, transparent);
  background: rgba(255, 255, 255, 0.6);
}
html:not(.dark) .cm-event-date {
  border: 1px solid color-mix(in srgb, var(--brand-color) 15%, transparent);
  background: color-mix(in srgb, var(--brand-color) 8%, transparent);
}
html:not(.dark) .cm-event-month {
  color: rgb(14, 165, 233);
}
html:not(.dark) .cm-event-day {
  color: rgba(15, 23, 42, 0.95);
}
html:not(.dark) .cm-event-title {
  color: rgba(15, 23, 42, 0.95);
}
html:not(.dark) .cm-event-desc {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-tab-empty {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .spain-map-viewer .leaflet-container {
  background: var(--ms-secondaryRowColor) !important;
}
html:not(.dark) .spain-map-viewer:fullscreen,
html:not(.dark) .spain-map-viewer.is-pseudo-fullscreen {
  background: var(--ms-secondaryRowColor);
}
html:not(.dark) .spain-map-interaction-guard {
  background: rgba(15, 23, 42, 0.18);
  color: rgba(51, 65, 85, 0.92);
}
html:not(.dark) {
  /* The prompt itself now runs on theme-aware --ms-* tokens; only the scrim differs per theme. */
}
html:not(.dark) .spain-map-viewer:not(.is-interaction-locked) .spain-map-leaflet:focus-visible {
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--brand-color) 55%, transparent);
}
html:not(.dark) .cm-map-transfer-btn {
  border: 1px solid color-mix(in srgb, var(--brand-color) 20%, transparent);
  background: rgba(255, 255, 255, 0.8);
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-map-transfer-btn:hover {
  border-color: color-mix(in srgb, var(--brand-color) 40%, transparent);
  background: color-mix(in srgb, var(--brand-color) 10%, transparent);
  color: rgba(15, 23, 42, 0.92);
}
html:not(.dark) .cm-map-transfer-btn.is-active {
  border-color: color-mix(in srgb, var(--ms-branch-armada) 60%, transparent);
  background: color-mix(in srgb, var(--ms-branch-armada) 10%, transparent);
  color: color-mix(in srgb, var(--ms-branch-armada) 70%, #000);
}
html:not(.dark) .spain-map-legend {
  border: 1px solid color-mix(in srgb, var(--brand-color) 20%, transparent);
  background: rgba(255, 255, 255, 0.85);
  color: rgba(51, 65, 85, 0.92);
}
html:not(.dark) .spain-map-legend-dot {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}
html:not(.dark) .spain-map-ctrl-btn {
  background: rgba(255, 255, 255, 0.85);
  color: rgb(14, 165, 233);
}
html:not(.dark) .spain-map-ctrl-btn:hover {
  background: color-mix(in srgb, var(--brand-color) 15%, transparent);
}
html:not(.dark) {
  /* The two cards over the map and their contents now run on theme-aware --ms-* tokens
     (see @mixin spain-map-float-card), so there is nothing left to redeclare per theme here. */
}
html:not(.dark) .spain-map-info-stats {
  border-bottom: 1px solid color-mix(in srgb, var(--brand-color) 10%, transparent);
}
html:not(.dark) .spain-map-tooltip {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid color-mix(in srgb, var(--brand-color) 25%, transparent) !important;
  color: rgba(15, 23, 42, 0.95) !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12) !important;
}
html:not(.dark) .cm-global-loader {
  background: radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--brand-color) 8%, transparent), transparent 36%), radial-gradient(circle at 86% 76%, rgba(239, 68, 68, 0.05), transparent 42%), linear-gradient(140deg, #f8fafc 0%, #e2e8f0 52%, #f1f5f9 100%);
}
html:not(.dark) .cm-global-loader-text {
  color: rgba(71, 85, 105, 0.92);
}
html:not(.dark) .cm-spinner {
  border: 3px solid color-mix(in srgb, var(--brand-color) 15%, transparent);
  border-top-color: color-mix(in srgb, var(--brand-color) 85%, transparent);
}
html:not(.dark) .cm-table-loader {
  color: rgba(71, 85, 105, 0.92);
}

/* ── spain-map: reconciliation with dashboard.scss (2026-07-10) ────────────
   These declarations lived in dashboard.scss (loaded globally) and "bled"
   onto the Home/Index map because this file did not define them and loads
   later. On moving the map to a single source (here) they are absorbed
   literally so as not to change a single pixel. dashboard.scss no longer carries spain-map. */
.spain-map-viewer {
  position: relative;
  isolation: isolate;
  z-index: 0;
}

.spain-map-viewer .leaflet-container {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.spain-map-viewer .leaflet-container:focus,
.spain-map-viewer .leaflet-interactive:focus,
.spain-map-viewer path.leaflet-interactive:focus-visible,
.spain-map-viewer path:focus {
  outline: none !important;
}

.spain-map-viewer:fullscreen,
.spain-map-viewer.is-pseudo-fullscreen {
  border-radius: 0;
}

.spain-map-viewer:fullscreen #map,
.spain-map-viewer:fullscreen > div:first-child,
.spain-map-viewer.is-pseudo-fullscreen > div:first-child {
  height: 100% !important;
}

.spain-map-ctrl-btn {
  font-size: 18px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  line-height: 1;
}

.dark .spain-map-ctrl-btn:hover {
  color: #e0f2fe;
}

.spain-map-tooltip {
  letter-spacing: calc(0.04em + var(--ms-a11y-letter-add, 0em)) !important;
}

.dark .spain-map-tooltip::before {
  border-top-color: color-mix(in srgb, var(--cm-panel) 92%, transparent) !important;
}

.spain-map-info-badge {
  font-weight: 600;
}

.spain-map-info-header h3 {
  font-weight: 700;
}

.spain-map-info-panel {
  overflow-y: auto;
  font-size: 13px;
}

.spain-map-stat-value {
  line-height: 1.1;
}

.spain-map-academy-btn {
  font-size: 12px;
}

.spain-map-academy-btn.is-active .spain-map-academy-dot {
  box-shadow: 0 0 6px color-mix(in srgb, var(--ms-branch-armada) 50%, transparent);
}

.spain-map-academy-dot {
  flex-shrink: 0;
}

/* The per-theme ink of these two cards (.dark ... #e0f2fe / #f0f9ff) is gone: both now take
   var(--ms-text), which already differs per theme. The academy card's `animation: fadeSlideIn
   forwards` is gone too -- it fought the open/close transition of @mixin spain-map-float-card,
   whose end state `forwards` would have pinned, and the script drives both cards alike now. */
.spain-map-academy-card h4 {
  font-weight: 700;
}

.spain-map-float-close, .spain-map-academy-close {
  font-size: 14px;
}

/* The host owns the page background and spacing; keep the dashboard shell transparent inside it. */
.ms-theme #ms-content > .cm-shell {
  background: transparent !important;
  min-height: 0 !important;
  padding: 4px 2px 24px !important;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ── Institutional dashboard refresh (reference: examples/dash.html) ───────
   The persistent sidebar/topbar remain owned by the host. Dashboard cards use
   the same frame, header and table treatment as the Students list; Leaflet and
   every .spain-map-* rule above remain untouched. */
.ms-theme .cm-shell {
  --cm-dashboard-primary: var(--brand-color);
  --cm-dashboard-primary-soft: color-mix(in srgb, var(--brand-color) 55%, #fff);
  /* Headings and other dashboard copy no longer follow the brand colour. */
  --cm-dashboard-heading: #5c5c5c;
  --cm-dashboard-text: #191c1e;
  --cm-dashboard-muted: #444651;
  --cm-dashboard-border: var(--ms-border);
  --cm-dashboard-surface: #ffffff;
  --cm-dashboard-surface-low: #f2f4f6;
  --cm-dashboard-surface-high: #e6e8ea;
  --cm-dashboard-success: #22a874;
  --cm-dashboard-shadow: var(--ms-shadow-card);
  color: var(--cm-dashboard-text);
  font-family: var(--ms-font-sans);
}
.ms-theme .cm-shell .ms-switch__option:active:not(:disabled) {
  transform: scale(0.9);
}
.ms-theme .cm-shell > .cm-section {
  margin-bottom: 32px;
}
.ms-theme .cm-shell .cm-header {
  align-items: flex-end;
  margin: 0 0 32px;
  padding: 4px 0 0;
}
.ms-theme .cm-shell .cm-header-left {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.ms-theme .cm-shell.cm-shell--home .cm-header-left {
  gap: 0;
}
.ms-theme .cm-shell .cm-header .cm-kicker,
.ms-theme .cm-shell .cm-card--panel .cm-kicker,
.ms-theme .cm-shell .cm-card--map .cm-kicker,
.ms-theme .cm-shell .cm-dashboard-panel .cm-kicker,
.ms-theme .cm-shell .cm-counters .cm-counter-label {
  color: var(--cm-dashboard-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: calc(0.16em + var(--ms-a11y-letter-add, 0em));
  line-height: 16px;
}
.ms-theme .cm-shell .cm-title {
  margin: 2px 0 0;
  color: var(--cm-dashboard-heading);
  font-size: clamp(28px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: calc(-0.02em + var(--ms-a11y-letter-add, 0em));
  line-height: 1.25;
}
.ms-theme .cm-shell:where(:not(.cm-shell--home)) .cm-subtitle {
  margin: 2px 0 0;
  color: var(--cm-dashboard-muted);
  font-size: 14px;
  line-height: 20px;
}
.ms-theme .cm-shell .cm-live {
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--cm-dashboard-primary) 12%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--cm-dashboard-primary) 7%, var(--cm-dashboard-surface));
  box-shadow: none;
  color: var(--cm-dashboard-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
}
.ms-theme .cm-shell {
  /* The way back, beside the chip and skinned from the same two tokens: a grey the panel already uses,
     seen through, and a border of the same colour at the faint end. Its size and its sentence case stay
     its own — it is a thing to press, not a label. */
}
.ms-theme .cm-shell .cm-home-btn {
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border: 1px solid color-mix(in srgb, var(--cm-dashboard-primary) 12%, transparent);
  background: color-mix(in srgb, var(--cm-dashboard-primary) 7%, var(--cm-dashboard-surface));
  box-shadow: none;
  color: var(--cm-dashboard-primary);
  /* The chip's type as well as its palette. The colours matched already and the two still read as
     different things, because one was 13px sentence case beside 11px spaced capitals — which is what
     the eye was actually telling them apart by. */
  font-size: 11px;
  font-weight: 600;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
}
.ms-theme .cm-shell .cm-home-btn .material-symbols-outlined {
  font-size: 0.95rem;
}
.ms-theme .cm-shell .cm-home-btn:hover {
  border-color: color-mix(in srgb, var(--cm-dashboard-primary) 26%, transparent);
  background: color-mix(in srgb, var(--cm-dashboard-primary) 14%, var(--cm-dashboard-surface));
}
.ms-theme .cm-shell .cm-live-dot {
  width: 8px;
  height: 8px;
  background: var(--cm-dashboard-success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cm-dashboard-success) 14%, transparent);
}
.ms-theme .cm-shell .cm-card--panel,
.ms-theme .cm-shell .cm-card--map,
.ms-theme .cm-shell .cm-dashboard-panel {
  border: 0;
  border-radius: var(--ms-radius);
  background: var(--ms-surface);
  box-shadow: var(--cm-dashboard-shadow);
  color: var(--ms-text);
}
.ms-theme .cm-shell .cm-card--panel,
.ms-theme .cm-shell .cm-card--map,
.ms-theme .cm-shell .cm-dashboard-panel {
  padding-bottom: 0;
  overflow: hidden;
}
.ms-theme .cm-shell .cm-card--panel > .cm-card-header,
.ms-theme .cm-shell .cm-card--map > .cm-card-header,
.ms-theme .cm-shell .cm-dashboard-panel > .cm-widget-header {
  align-items: center;
  flex-wrap: wrap;
  min-height: 4rem;
  margin: 0;
  padding: 0.75rem 1.5rem;
  border-bottom: 0;
  background: transparent;
}
.ms-theme .cm-shell .cm-card--panel > .cm-panel-body {
  padding: 1.5rem;
}
.ms-theme .cm-shell .cm-card--panel .cm-h2,
.ms-theme .cm-shell .cm-card--map .cm-h2,
.ms-theme .cm-shell .cm-dashboard-panel .cm-h2 {
  margin: 2px 0 0;
  color: var(--cm-dashboard-heading);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: calc(0em + var(--ms-a11y-letter-add, 0em));
  line-height: 24px;
}
.ms-theme .cm-shell .cm-card--panel .cm-card-meta,
.ms-theme .cm-shell .cm-card--map .cm-card-meta {
  margin-top: 0;
  color: var(--cm-dashboard-muted);
}
.ms-theme .cm-shell {
  /* Counter chip: shape of .cm-live, palette of the brand's yellow accent (--ms-chip-counter-*,
     defined once in app.scss and shared with the listing pages' .pl-total). */
}
.ms-theme .cm-shell .cm-status-badge {
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--ms-chip-counter-bg);
  color: var(--ms-chip-counter-text);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: calc(0.08em + var(--ms-a11y-letter-add, 0em));
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.ms-theme .cm-shell {
  /* Courses: the table is the only dashboard card in this section. */
}
.ms-theme .cm-shell .cm-courses-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.ms-theme .cm-shell .cm-dashboard-panel {
  min-width: 0;
  padding: 0;
}
.ms-theme .cm-shell .cm-widget-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  /* The height every listing gives its toolbar controls. .dt-cardsearch reads it with a 2rem
     fallback, and only .person-list declared it — so the very same search component came out
     5.6px shorter here than on Alumnos, which is exactly how it read: a smaller box. */
  --pl-toolbar-control: 2.35rem;
}
.ms-theme .cm-shell .cm-courses-donut,
.ms-theme .cm-shell .cm-courses-table,
.ms-theme .cm-shell .cm-course-detail {
  border: 0;
  background: var(--cm-dashboard-surface);
  box-shadow: var(--cm-dashboard-shadow);
}
.ms-theme .cm-shell {
  /* "Cursos activos" is a card like "Eventos y avisos": on the light page its white surface only
     reads as a panel if it keeps the card shadow. */
}
.ms-theme .cm-shell .cm-courses-table {
  box-shadow: var(--cm-dashboard-shadow);
}
.ms-theme .cm-shell .cm-courses-donut {
  display: flex;
  flex-direction: column;
}
.ms-theme .cm-shell .cm-course-detail {
  border-left: 1px solid var(--cm-dashboard-border);
}
.ms-theme .cm-shell .cm-courses-donut > .cm-donut-wrap {
  width: auto;
  padding: 1.5rem;
}
.ms-theme .cm-shell .cm-courses-donut > .cm-donut-legend {
  flex: 1 1 auto;
  width: 100%;
  padding: 0;
}
.ms-theme .cm-shell .cm-courses-donut .cm-donut-legend-row {
  flex: 1 1 0;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0;
}
.ms-theme .cm-shell .cm-course-detail > #cmCourseDetailContent {
  padding: 1.25rem 1.5rem 1.5rem;
}
.ms-theme .cm-shell {
  /* The search pill is a well, in both themes: it takes the page ground, not the card's surface,
     and has no border at rest (the primary border shows on focus). */
}
.ms-theme .cm-shell .cm-courses-filter {
  position: relative;
  display: flex;
  align-items: center;
  width: min(160px, 100%);
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 30px;
  background: var(--cm-dashboard-surface-low);
  color: var(--cm-dashboard-muted);
  cursor: text;
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, transform 0.25s ease;
}
.ms-theme .cm-shell .cm-courses-filter:focus-within {
  width: min(260px, 100%);
  border-color: var(--cm-dashboard-primary-soft);
  transform: translateY(-1px);
}
.ms-theme .cm-shell .cm-courses-filter:focus-within > .material-symbols-outlined {
  color: var(--cm-dashboard-heading);
}
.ms-theme .cm-shell .cm-courses-filter > .material-symbols-outlined {
  flex: 0 0 auto;
  font-size: 16px;
  pointer-events: none;
  transition: color 0.2s ease;
}
.ms-theme .cm-shell .cm-courses-search {
  width: 100%;
  min-width: 0;
  padding: 6px 34px 6px 4px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--cm-dashboard-text);
  font: inherit;
  font-size: 11px;
  outline: 0;
}
.ms-theme .cm-shell .cm-courses-search:focus {
  border: 0;
}
.ms-theme .cm-shell .cm-courses-search::placeholder {
  color: var(--cm-dashboard-muted);
  opacity: 0.72;
}
.ms-theme .cm-shell .cm-courses-search::-webkit-search-cancel-button {
  appearance: none;
}
.ms-theme .cm-shell .cm-donut-wrap {
  min-height: 218px;
  margin: 0 0 18px;
}
.ms-theme .cm-shell .cm-donut {
  max-width: 204px;
  filter: none;
}
.ms-theme .cm-shell .cm-donut path {
  filter: none;
}
.ms-theme .cm-shell .cm-donut-center {
  inset: 0;
}
.ms-theme .cm-shell .cm-donut-center-value {
  color: var(--cm-dashboard-heading);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: calc(-0.03em + var(--ms-a11y-letter-add, 0em));
  line-height: 1;
}
.ms-theme .cm-shell .cm-donut-center-label,
.ms-theme .cm-shell .cm-donut-center-sub {
  color: var(--cm-dashboard-muted);
}
.ms-theme .cm-shell .cm-donut-center-label {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: calc(0.12em + var(--ms-a11y-letter-add, 0em));
}
.ms-theme .cm-shell .cm-donut-legend {
  gap: 0;
  padding-top: 10px;
  border-top: 1px solid var(--cm-dashboard-border);
}
.ms-theme .cm-shell .cm-donut-legend-row {
  padding: 8px 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--cm-dashboard-muted);
}
.ms-theme .cm-shell .cm-donut-legend-row:hover, .ms-theme .cm-shell .cm-donut-legend-row.is-active {
  border: 0;
  background: color-mix(in srgb, var(--cm-dashboard-primary) 7%, var(--cm-dashboard-surface));
}
.ms-theme .cm-shell .cm-donut-legend-dot {
  width: 8px;
  height: 8px;
  box-shadow: none;
}
.ms-theme .cm-shell .cm-donut-legend-name {
  font-size: 12px;
  font-weight: 500;
}
.ms-theme .cm-shell .cm-donut-legend-value {
  color: var(--cm-dashboard-heading);
  font-size: 13px;
}
.ms-theme .cm-shell .cm-table-scroll {
  border: 0;
  border-radius: 0;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--brand-color) 35%, transparent) transparent;
}
.ms-theme .cm-shell .cm-courses-table > .cm-table-scroll {
  border-top: 0;
  flex: 0 1 auto;
  max-height: none;
}
.ms-theme .cm-shell .cm-table {
  /* A cell is READ, not weighed. Bootstrap's fw-* utilities arrive at 600/700 and the panel has no
     voice that heavy any more; the row's own columns and the header above them already order it. */
}
.ms-theme .cm-shell .cm-table tbody :is(.fw-semibold, .fw-bold, strong, b) {
  font-weight: 400;
}
.ms-theme .cm-shell .cm-table {
  /* The name column is the row label, not a highlight: keep it at body weight. */
}
.ms-theme .cm-shell .cm-table tbody td:first-child a {
  font-weight: 400;
}
.ms-theme .cm-shell .cm-table {
  /* One header design across the app: the same band the listing tables use (tables.scss,
     .js-datatable thead th) — #F0F5FA, uppercase body ink, 0.8rem/500. */
}
.ms-theme .cm-shell .cm-table thead th {
  --bs-table-bg: var(--ms-primaryRowColor);
  background: var(--ms-primaryRowColor);
  color: var(--ms-text);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: calc(0.04em + var(--ms-a11y-letter-add, 0em));
  text-transform: uppercase;
  padding: 0.75rem;
  border-bottom: 0;
  white-space: nowrap;
  vertical-align: middle;
}
.ms-theme .cm-shell .cm-table tbody td {
  padding: 0.7rem 0.75rem;
  height: calc(2 * 1.5 * 1em + 2 * 0.7rem);
  color: var(--ms-text);
  font-size: 0.875rem;
  vertical-align: middle;
  /* A hairline per row, and NOT a stripe: the note below still holds — a zebra repaints the
     panel in a greyer material than the card holding it — but seven columns with nothing
     between them left the eye to track a row on spacing alone. Mixed off --ms-text so the one
     declaration is right in both themes: dark ink on the light card, light ink on the night
     one, which is the inversion the dark palette needs (--ms-border is DARKER than the night
     card and would draw a shadow into it instead of a line on it). */
  border-bottom: 1px solid color-mix(in srgb, var(--ms-text) 10%, transparent);
}
.ms-theme .cm-shell .cm-table tbody tr:last-child > td {
  border-bottom: 0;
}
.ms-theme .cm-shell .cm-table {
  /* The edge columns line up with the card's own header, which is inset 1.5rem
     (.cm-dashboard-panel > .cm-widget-header). The header band and the rows run edge to edge, so
     with the plain 0.75rem cell padding the first column started 12px to the left of the panel
     title and the table read as detached from the card it lives in. The right edge gets the same
     treatment or the card comes out lopsided. */
}
.ms-theme .cm-shell .cm-table thead th:first-child,
.ms-theme .cm-shell .cm-table tbody td:first-child {
  padding-left: 1.5rem;
}
.ms-theme .cm-shell .cm-table thead th:last-child,
.ms-theme .cm-shell .cm-table tbody td:last-child {
  padding-right: 1.5rem;
}
.ms-theme .cm-shell .cm-table {
  /* No zebra here: the dashboard tables are the card's white all the way down. Rows separate by
     their spacing and by the header band above them — a stripe made the panel read as a different,
     greyer material than the card holding it. */
}
.ms-theme .cm-shell .cm-table tbody tr:hover > td {
  background: var(--ms-table-hover);
}
.ms-theme .cm-shell .cm-table tbody tr.is-selected > td {
  background: color-mix(in srgb, var(--cm-dashboard-primary) 9%, var(--cm-dashboard-surface));
}
.ms-theme .cm-shell {
  /* A code is the quietest thing in its row: the panel's smallest size, at body weight. 11px and
     500 were off the scale in both directions at once. */
}
.ms-theme .cm-shell .cm-td-mono {
  color: var(--cm-dashboard-heading) !important;
  font-size: 0.72rem !important;
  font-weight: 400;
}
.ms-theme .cm-shell .cm-table-empty {
  color: var(--cm-dashboard-muted) !important;
}
.ms-theme .cm-shell .cm-course-detail-body {
  margin-top: 0;
}
.ms-theme .cm-shell .cm-course-title,
.ms-theme .cm-shell .cm-course-kpi-value {
  color: var(--cm-dashboard-heading);
}
.ms-theme .cm-shell .cm-course-title {
  font-size: 15px;
  font-weight: 600;
}
.ms-theme .cm-shell .cm-course-sub,
.ms-theme .cm-shell .cm-course-meta-key,
.ms-theme .cm-shell .cm-course-meta-val,
.ms-theme .cm-shell .cm-course-kpi-label {
  color: var(--cm-dashboard-muted);
}
.ms-theme .cm-shell .cm-course-kpis {
  grid-template-columns: 1fr;
}
.ms-theme .cm-shell .cm-course-kpi {
  border-color: var(--cm-dashboard-border);
  border-radius: 6px;
  background: var(--cm-dashboard-surface-low);
}
.ms-theme .cm-shell .cm-course-meta {
  border-top-color: var(--cm-dashboard-border);
}
.ms-theme .cm-shell .cm-course-meta-row {
  grid-template-columns: 1fr;
  gap: 2px;
}
.ms-theme .cm-shell .cm-course-detail .cm-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  padding: 16px 4px;
  color: var(--cm-dashboard-muted);
  font-size: 12px;
  font-style: italic;
  line-height: 18px;
  text-align: center;
}
.ms-theme .cm-shell .cm-course-detail .cm-empty::before {
  content: "info";
  display: block;
  margin-right: 8px;
  color: var(--cm-dashboard-border);
  font-family: "Material Symbols Outlined";
  font-size: 28px;
  font-style: normal;
}
.ms-theme .cm-shell {
  /* Requests and notices. */
}
.ms-theme .cm-shell .cm-mid-grid {
  gap: 24px;
  margin-bottom: 32px;
}
.ms-theme .cm-shell .cm-requests-panel,
.ms-theme .cm-shell .cm-tabs-panel--embedded {
  height: 340px;
}
.ms-theme .cm-shell .cm-requests-panel--monthly,
.ms-theme .cm-shell .cm-requests-panel--scales {
  height: auto;
}
.ms-theme .cm-shell .cm-requests-chart {
  position: relative;
  height: 380px;
}
.ms-theme .cm-shell #cm-operation-panel:has([data-cm-operation-pane]:not([style*="display: none"]) td.dt-empty) {
  height: auto;
  min-height: 400px;
}
.ms-theme .cm-shell #cm-operation-panel:has([data-cm-operation-pane]:not([style*="display: none"]) td.dt-empty) .table-responsive {
  flex-shrink: 0;
}
.ms-theme .cm-shell {
  /* Beside the geostrategic map — the arsenal's units, where a school charts its dining hall — the row's
     height is the map's, which is taller than 340px. Same pair as the weather row below, for the same
     reason: a declared height of zero stops the table deciding the row, and min-height grows the card back
     to whatever the map made it. */
}
.ms-theme .cm-shell .cm-map-dining-row .cm-tabs-panel--embedded {
  height: 0;
  min-height: 100%;
  overflow: hidden;
}
.ms-theme .cm-shell .cm-requests-bars {
  gap: 22px;
  margin-top: 2px;
}
.ms-theme .cm-shell .cm-requests-bar-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.ms-theme .cm-shell .cm-requests-bar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ms-theme .cm-shell {
  /* Bucket rows read like table rows now: sentence case at body size instead of the cramped
     uppercase micro-label, which competed with the card's own kicker. */
}
.ms-theme .cm-shell .cm-requests-bar-label,
.ms-theme .cm-shell .cm-requests-bar-value {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: calc(0em + var(--ms-a11y-letter-add, 0em));
  line-height: 20px;
  text-transform: none;
}
.ms-theme .cm-shell .cm-requests-bar-label {
  color: var(--cm-dashboard-text);
}
.ms-theme .cm-shell .cm-requests-bar-value {
  color: var(--cm-dashboard-muted);
  font-variant-numeric: tabular-nums; /* counters stay aligned as digits change */
}
.ms-theme .cm-shell .cm-requests-bar-track {
  height: 8px;
  background: var(--cm-dashboard-surface-low);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cm-dashboard-border) 30%, transparent);
}
.ms-theme .cm-shell .cm-requests-bar-fill {
  box-shadow: none;
}
.ms-theme .cm-shell .cm-tabs-panel {
  margin-top: 0;
}
.ms-theme .cm-shell .cm-tabs-panel--embedded > .cm-panel-body {
  padding: 0;
}
.ms-theme .cm-shell {
  /* The card in the band is not embedded, so it was keeping the panel's own body padding: a rem and a
     half of it on each side, insetting the table while the summary beside it runs from edge to edge. The
     table IS the card here, and the head above it already holds the horizontal rhythm. */
}
.ms-theme .cm-shell .cm-units-band > .cm-panel-body {
  padding: 0;
}
.ms-theme .cm-shell {
  /* Switching Eventos ⇄ Avisos swaps one whole table for another. Without this the new one simply
     appears in place of the old, which reads as a glitch rather than as a change of view: the pane
     fades up as it slides in, and its first rows follow one after the other so the eye is led down
     the new table instead of being handed it all at once. Replayed by _CmRequests.cshtml on every
     switch — the class is added after a reflow, or the second switch back would not animate. */
}
.ms-theme .cm-shell [data-cm-operation-pane].is-entering {
  animation: cmPaneEnter 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ms-theme .cm-shell [data-cm-operation-pane].is-entering tbody tr {
  animation: cmPaneRowEnter 260ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
.ms-theme .cm-shell [data-cm-operation-pane].is-entering tbody tr:nth-child(1) {
  animation-delay: 0ms;
}
.ms-theme .cm-shell [data-cm-operation-pane].is-entering tbody tr:nth-child(2) {
  animation-delay: 35ms;
}
.ms-theme .cm-shell [data-cm-operation-pane].is-entering tbody tr:nth-child(3) {
  animation-delay: 70ms;
}
.ms-theme .cm-shell [data-cm-operation-pane].is-entering tbody tr:nth-child(4) {
  animation-delay: 105ms;
}
.ms-theme .cm-shell [data-cm-operation-pane].is-entering tbody tr:nth-child(5) {
  animation-delay: 140ms;
}
.ms-theme .cm-shell [data-cm-operation-pane].is-entering tbody tr:nth-child(6) {
  animation-delay: 175ms;
}
.ms-theme .cm-shell {
  /* A populated panel is a fixed 340px card holding a full listing table — rows plus the generated bottom bar
     (length + info + paging). So the card is a flex column all the way down and the ROWS take the
     leftover: the bar stays visible at the foot whatever the table holds, and the rows scroll behind
     it. The old rules split thead/tbody into independent row tables to get the same effect by hand;
     .table-responsive, which datatable.js already wraps the table in, is the scroller now. */
}
.ms-theme .cm-shell .cm-tabs-panel .cm-panel-body {
  display: flex;
  min-height: 0;
}
.ms-theme .cm-shell .cm-tabs-panel [data-cm-operation-pane] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  /* Only the pane on screen is a flex column; the hidden one keeps its inline display:none. The
     switch clears that inline value, which lands the pane back on this rule. */
}
.ms-theme .cm-shell .cm-tabs-panel [data-cm-operation-pane]:not([style*="display: none"]) {
  display: flex;
  flex-direction: column;
}
.ms-theme .cm-shell .cm-tabs-panel .dt-container {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.ms-theme .cm-shell .cm-tabs-panel .table-responsive {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--brand-color) 35%, transparent) transparent;
}
.ms-theme .cm-shell .cm-tabs-panel .table-responsive::-webkit-scrollbar {
  width: 8px;
}
.ms-theme .cm-shell .cm-tabs-panel .table-responsive::-webkit-scrollbar-track {
  background: transparent;
}
.ms-theme .cm-shell .cm-tabs-panel .table-responsive::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: color-mix(in srgb, var(--brand-color) 35%, transparent);
}
.ms-theme .cm-shell .cm-tabs-panel .table-responsive::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--brand-color) 60%, transparent);
}
.ms-theme .cm-shell .cm-tabs-panel .dt-bottombar {
  flex: 0 0 auto;
}
.ms-theme .cm-shell {
  /* Column widths per pane: kept from the hand-built table, so switching Eventos ⇄ Avisos does not
     also reshuffle the columns. table-layout:fixed is what makes the percentages bind. */
}
.ms-theme .cm-shell .cm-tabs-panel table.js-datatable-client {
  table-layout: fixed;
}
.ms-theme .cm-shell [data-cm-operation-pane=events] :is(th, td):nth-child(1) {
  width: 18%;
}
.ms-theme .cm-shell [data-cm-operation-pane=events] :is(th, td):nth-child(2) {
  width: 34%;
}
.ms-theme .cm-shell [data-cm-operation-pane=events] :is(th, td):nth-child(3) {
  width: 48%;
}
.ms-theme .cm-shell [data-cm-operation-pane=notices] :is(th, td):nth-child(1) {
  width: 20%;
}
.ms-theme .cm-shell [data-cm-operation-pane=notices] :is(th, td):nth-child(2) {
  width: 56%;
}
.ms-theme .cm-shell [data-cm-operation-pane=notices] :is(th, td):nth-child(3) {
  width: 24%;
}
.ms-theme .cm-shell {
  /* The notice title is one line: the column is 56% of a half-width card and a long headline used to
     push the date out of the panel. Was an inline style on the cell. */
}
.ms-theme .cm-shell .cm-notice-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-theme .cm-shell {
  /* Dining. */
}
.ms-theme .cm-shell .cm-dining-section {
  padding-bottom: 0;
}
.ms-theme .cm-shell .cm-dining-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.ms-theme .cm-shell .cm-dining-legend-row {
  gap: 22px;
  margin: 0;
}
.ms-theme .cm-shell .cm-dining-legend-item {
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.ms-theme .cm-shell .cm-dining-legend-item:hover {
  border: 0;
  background: transparent;
}
.ms-theme .cm-shell .cm-dining-legend-item--total {
  padding-left: 20px;
  border-left: 1px solid var(--cm-dashboard-border);
}
.ms-theme .cm-shell button.cm-dining-legend-item {
  padding: 6px 12px;
  border: 1px solid var(--cm-dashboard-border);
  border-radius: 30px;
  background: var(--cm-dashboard-surface);
}
.ms-theme .cm-shell button.cm-dining-legend-item:hover {
  border: 1px solid var(--cm-dashboard-border);
  background: var(--cm-dashboard-surface-low);
}
.ms-theme .cm-shell .cm-dining-legend-dot {
  width: 10px;
  height: 10px;
}
.ms-theme .cm-shell {
  /* Same treatment as the request buckets: sentence case at body size, no forced uppercase. */
}
.ms-theme .cm-shell .cm-dining-legend-label {
  color: var(--cm-dashboard-muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: calc(0em + var(--ms-a11y-letter-add, 0em));
  text-transform: none;
}
.ms-theme .cm-shell .cm-dining-legend-value {
  color: var(--cm-dashboard-primary);
  font-size: 13px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.ms-theme .cm-shell .cm-dining-nav {
  flex: 0 0 auto;
  gap: 6px;
}
.ms-theme .cm-shell .cm-dining-nav-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cm-dashboard-heading);
}
.ms-theme .cm-shell .cm-dining-nav-btn:hover:not(:disabled) {
  border: 0;
  background: var(--cm-dashboard-surface-high);
}
.ms-theme .cm-shell .cm-dining-nav-btn > .material-symbols-outlined {
  font-size: 20px;
}
.ms-theme .cm-shell .cm-dining-period {
  min-width: 160px;
  color: var(--cm-dashboard-heading);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: calc(0em + var(--ms-a11y-letter-add, 0em));
  text-transform: none;
  font-variant-numeric: tabular-nums; /* the range keeps its width as the dates change */
}
.ms-theme .cm-shell .cm-dining-chart-wrap {
  padding: 8px 8px 0;
}
.ms-theme .cm-shell .cm-dining-grid-line {
  stroke: color-mix(in srgb, var(--cm-dashboard-muted) 22%, transparent);
}
.ms-theme .cm-shell .cm-dining-axis-label {
  fill: color-mix(in srgb, var(--cm-dashboard-muted) 68%, transparent);
}
.ms-theme .cm-shell .cm-dining-axis-label.is-active {
  fill: var(--cm-dashboard-heading);
}
.ms-theme .cm-shell .cm-dining-overlay {
  border-radius: 8px;
  background: color-mix(in srgb, var(--cm-dashboard-surface) 88%, transparent);
  color: var(--cm-dashboard-muted);
}

[data-bs-theme=dark] .ms-theme .cm-shell {
  --cm-dashboard-primary: color-mix(in srgb, var(--brand-color) 30%, #fff);
  --cm-dashboard-primary-soft: color-mix(in srgb, var(--brand-color) 55%, #fff);
  /* Same neutral heading colour, lightened so it stays readable on the dark surface. */
  --cm-dashboard-heading: #c9c8c8;
  --cm-dashboard-text: #eff1f3;
  --cm-dashboard-muted: #b7c8e1;
  --cm-dashboard-border: var(--ms-border);
  /* The dark palette's own surfaces (2026-08 dark redesign, same set as the profile): cards over the
     page ground, wells sinking back to the ground, raised elements one shade above. */
  --cm-dashboard-surface: var(--ms-cardBgDark);
  --cm-dashboard-surface-low: var(--ms-bodyBgDark);
  --cm-dashboard-surface-high: var(--ms-raisedBgDark);
  --cm-dashboard-success: #4edea3;
  --cm-dashboard-shadow: var(--ms-shadow-card);
}

/* Dark dashboard adopts the profile's night treatment: borderless cards, headers merged into
   their bodies. (The glowing #101A30 ground is GLOBAL now — app.scss paints it on #ms-content
   for every screen.) */
[data-bs-theme=dark] .ms-theme .cm-shell,
html.dark .ms-theme .cm-shell {
  /* Scrollers inside the panels, at night. The page scrollbar already had this fix and stated the
     reason (app.scss): --brand-color is a NAVY, so a thumb mixed from it at 35% over the night
     surface is not there. White at low strength is, and it is the ink the sidebar's own scrollers
     use. Both the standard property and the WebKit pseudo-elements are restated, because when
     scrollbar-color is honoured it WINS over ::-webkit-scrollbar-thumb and the two must describe
     the same bar. */
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-table-scroll,
[data-bs-theme=dark] .ms-theme .cm-shell .cm-tabs-panel .cm-table tbody,
html.dark .ms-theme .cm-shell .cm-table-scroll,
html.dark .ms-theme .cm-shell .cm-tabs-panel .cm-table tbody {
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-table-scroll::-webkit-scrollbar-track,
[data-bs-theme=dark] .ms-theme .cm-shell .cm-tabs-panel .cm-table tbody::-webkit-scrollbar-track,
html.dark .ms-theme .cm-shell .cm-table-scroll::-webkit-scrollbar-track,
html.dark .ms-theme .cm-shell .cm-tabs-panel .cm-table tbody::-webkit-scrollbar-track {
  background: transparent;
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-table-scroll::-webkit-scrollbar-thumb,
[data-bs-theme=dark] .ms-theme .cm-shell .cm-tabs-panel .cm-table tbody::-webkit-scrollbar-thumb,
html.dark .ms-theme .cm-shell .cm-table-scroll::-webkit-scrollbar-thumb,
html.dark .ms-theme .cm-shell .cm-tabs-panel .cm-table tbody::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-table-scroll::-webkit-scrollbar-thumb:hover,
[data-bs-theme=dark] .ms-theme .cm-shell .cm-tabs-panel .cm-table tbody::-webkit-scrollbar-thumb:hover,
html.dark .ms-theme .cm-shell .cm-table-scroll::-webkit-scrollbar-thumb:hover,
html.dark .ms-theme .cm-shell .cm-tabs-panel .cm-table tbody::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.34);
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-card--panel,
[data-bs-theme=dark] .ms-theme .cm-shell .cm-card--map,
[data-bs-theme=dark] .ms-theme .cm-shell .cm-dashboard-panel,
html.dark .ms-theme .cm-shell .cm-card--panel,
html.dark .ms-theme .cm-shell .cm-card--map,
html.dark .ms-theme .cm-shell .cm-dashboard-panel {
  border: 0;
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-card--panel > .cm-card-header,
[data-bs-theme=dark] .ms-theme .cm-shell .cm-card--map > .cm-card-header,
[data-bs-theme=dark] .ms-theme .cm-shell .cm-dashboard-panel > .cm-widget-header,
html.dark .ms-theme .cm-shell .cm-card--panel > .cm-card-header,
html.dark .ms-theme .cm-shell .cm-card--map > .cm-card-header,
html.dark .ms-theme .cm-shell .cm-dashboard-panel > .cm-widget-header {
  background: transparent;
  border-bottom: 0;
}
[data-bs-theme=dark] .ms-theme .cm-shell,
html.dark .ms-theme .cm-shell {
  /* Counter tiles (Usuarios / Alumnos / Profesores…): borderless like every other dark card;
     the hover moves to a surface lift instead of the border it no longer has. */
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-counters .cm-counter-card,
html.dark .ms-theme .cm-shell .cm-counters .cm-counter-card {
  border-color: transparent;
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-counters a.cm-counter-card:hover,
html.dark .ms-theme .cm-shell .cm-counters a.cm-counter-card:hover {
  border-color: transparent;
  background: var(--cm-dashboard-surface-high);
}
[data-bs-theme=dark] .ms-theme .cm-shell,
html.dark .ms-theme .cm-shell {
  /* "Planes del centro": the table on the night surfaces. The search chrome is the FILTER pill
     (the input inside is borderless): it becomes a page-tone well like the profile's inputs —
     borderless at rest, primary border on focus. */
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-courses-filter,
html.dark .ms-theme .cm-shell .cm-courses-filter {
  border-color: transparent;
  background: var(--cm-dashboard-surface-low);
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-courses-filter:focus-within,
html.dark .ms-theme .cm-shell .cm-courses-filter:focus-within {
  border-color: var(--cm-dashboard-primary);
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-courses-filter > .material-symbols-outlined,
html.dark .ms-theme .cm-shell .cm-courses-filter > .material-symbols-outlined {
  color: var(--cm-dashboard-muted);
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-courses-search,
html.dark .ms-theme .cm-shell .cm-courses-search {
  background: transparent;
  color: var(--cm-dashboard-text);
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-courses-search::placeholder,
html.dark .ms-theme .cm-shell .cm-courses-search::placeholder {
  color: var(--cm-dashboard-muted);
}
[data-bs-theme=dark] .ms-theme .cm-shell,
html.dark .ms-theme .cm-shell {
  /* Course names in the body ink, not link-blue: the whole row already reads as clickable. */
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-courses-table tbody a,
html.dark .ms-theme .cm-shell .cm-courses-table tbody a {
  color: var(--cm-dashboard-text);
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-courses-table tbody a:hover,
html.dark .ms-theme .cm-shell .cm-courses-table tbody a:hover {
  color: var(--cm-dashboard-primary);
}
[data-bs-theme=dark] .ms-theme .cm-shell,
html.dark .ms-theme .cm-shell {
  /* Dining series chips: ACTIVE must read at a glance — lifted surface and full ink; a hidden
     series sinks to the page tone and dims. The old cm-panel mix left both states nearly equal. */
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-dining-legend-item,
html.dark .ms-theme .cm-shell .cm-dining-legend-item {
  border-color: transparent;
  background: var(--cm-dashboard-surface-high);
  color: var(--cm-dashboard-text);
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-dining-legend-item:hover,
html.dark .ms-theme .cm-shell .cm-dining-legend-item:hover {
  background: color-mix(in srgb, var(--brand-color) 35%, var(--cm-dashboard-surface-high));
  border-color: transparent;
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-dining-legend-item.is-hidden,
html.dark .ms-theme .cm-shell .cm-dining-legend-item.is-hidden {
  background: var(--cm-dashboard-surface-low);
  color: var(--cm-dashboard-muted);
}
[data-bs-theme=dark] .ms-theme .cm-shell,
html.dark .ms-theme .cm-shell {
  /* The Total figure is a readout, not a toggle: no pill chrome. */
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-dining-legend-item--total,
[data-bs-theme=dark] .ms-theme .cm-shell .cm-dining-legend-item--total:hover,
html.dark .ms-theme .cm-shell .cm-dining-legend-item--total,
html.dark .ms-theme .cm-shell .cm-dining-legend-item--total:hover {
  background: transparent;
  border-color: transparent;
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-table thead th,
html.dark .ms-theme .cm-shell .cm-table thead th {
  background: var(--cm-dashboard-surface);
  color: var(--cm-dashboard-muted);
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-table tbody td,
html.dark .ms-theme .cm-shell .cm-table tbody td {
  color: var(--cm-dashboard-text);
}
[data-bs-theme=dark] .ms-theme .cm-shell .cm-table tbody tr.is-selected > td,
html.dark .ms-theme .cm-shell .cm-table tbody tr.is-selected > td {
  background: color-mix(in srgb, var(--brand-color) 30%, var(--cm-dashboard-surface));
}

/* Column headers in dark. --ms-primaryRowColor resolves to the near-black --ms-surface-dark-800 there,
   which reads as a different material from the rows below it — the same problem the people lists had.
   The header takes the SAME treatment as the listing tables in dark (tables.scss): the card surface
   lifted 4% towards white, so the column names separate from the rows without leaving the card's
   material. */
[data-bs-theme=dark] .ms-theme .cm-shell .cm-table thead th,
html.dark .ms-theme .cm-shell .cm-table thead th {
  --bs-table-bg: color-mix(in srgb, #ffffff 4%, var(--cm-dashboard-surface));
  background: color-mix(in srgb, #ffffff 4%, var(--cm-dashboard-surface));
  color: var(--cm-dashboard-text);
}

.ms-theme #ms-content > .cm-shell {
  background: transparent !important;
  min-height: 0 !important;
  padding: 8px 4px 200px !important;
}

@media (max-width: 1180px) {
  .ms-theme .cm-shell .cm-courses-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .ms-theme .cm-shell > .cm-section {
    margin-bottom: 24px;
  }
  .ms-theme .cm-shell .cm-header {
    align-items: flex-start;
    margin-bottom: 24px;
  }
  .ms-theme .cm-shell .cm-header-right {
    width: 100%;
  }
  .ms-theme .cm-shell .cm-live {
    width: 100%;
    justify-content: center;
  }
  .ms-theme .cm-shell .cm-card--panel > .cm-card-header,
  .ms-theme .cm-shell .cm-card--map > .cm-card-header,
  .ms-theme .cm-shell .cm-dashboard-panel > .cm-widget-header {
    padding: 0.75rem 1.25rem;
  }
  .ms-theme .cm-shell .cm-counters .card-body {
    padding: 1.5rem 1.25rem;
  }
  .ms-theme .cm-shell .cm-card--panel > .cm-panel-body {
    padding: 1.25rem;
  }
  .ms-theme .cm-shell .cm-courses-donut > .cm-donut-wrap {
    margin-right: 1.25rem;
    margin-left: 1.25rem;
  }
  .ms-theme .cm-shell .cm-courses-donut > .cm-donut-legend {
    margin: 0;
  }
  .ms-theme .cm-shell .cm-course-detail > #cmCourseDetailContent {
    padding: 1.25rem;
  }
  .ms-theme .cm-shell .cm-dashboard-panel > .cm-widget-header--courses,
  .ms-theme .cm-shell .cm-dining-summary {
    align-items: stretch;
    flex-direction: column;
  }
  .ms-theme .cm-shell .cm-courses-filter {
    width: 100%;
  }
  .ms-theme .cm-shell .cm-courses-filter:focus-within {
    width: 100%;
  }
  .ms-theme .cm-shell .cm-dining-summary {
    gap: 18px;
  }
  .ms-theme .cm-shell .cm-dining-nav {
    justify-content: space-between;
  }
  .ms-theme .cm-shell .cm-dining-period {
    min-width: 0;
  }
}
/* The dashboard cards are pinned to 340px so the two of a row end up the same height. On a phone the
   row is one column, so equal heights buy nothing and the cap only takes space away: the notices
   scroller was left 115px for 219px of content, which cut the empty state down to the top of its
   icon and read as a blank card. Below the tablet breakpoint the cards take the height they need. */
@media (max-width: 767.98px) {
  .ms-theme .cm-shell .cm-requests-panel,
  .ms-theme .cm-shell .cm-tabs-panel--embedded {
    height: auto;
  }
}
@media (max-width: 520px) {
  .ms-theme .cm-shell .cm-card--panel > .cm-card-header,
  .ms-theme .cm-shell .cm-card--map > .cm-card-header {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .ms-theme .cm-shell .cm-card--panel .cm-card-meta,
  .ms-theme .cm-shell .cm-card--map .cm-card-meta {
    width: 100%;
    text-align: left;
  }
  .ms-theme .cm-shell .cm-card--panel .cm-status-badge,
  .ms-theme .cm-shell .cm-card--map .cm-status-badge {
    display: inline-flex;
  }
  .ms-theme .cm-shell .cm-dining-legend-item--total {
    padding-left: 0;
    border-left: 0;
  }
}
/* ── The vocabulary without the dashboard ──────────────────────────────────
   .cm-shell carries two things at once: the --cm-dashboard-* token set and the typography
   (cm-kicker / cm-title / cm-subtitle / cm-h2 / cm-card-meta) on one hand, and the dashboard's own
   hero on the other — a rounded padded frame, a full-bleed gradient and light ink.

   A panel screen that wants the first and not the second says so with this modifier. Before it
   existed the only way was to undo the frame from the screen's own stylesheet, which is what
   profile.css does with `background: transparent !important`; one copy of that per screen is one
   copy too many.

   The selector repeats the class on purpose: `html:not(.dark) .cm-shell` (0,2,1) outweighs a plain
   `.cm-shell--plain`, and would repaint the gradient in the light theme. The tokens are untouched —
   the cascade is per property, so `.ms-theme .cm-shell` still defines every --cm-dashboard-* here. */
.cm-shell.cm-shell--plain,
html:not(.dark) .cm-shell.cm-shell--plain {
  max-width: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  background: none;
  font-family: var(--ms-font-sans);
}

/* The profile's card treatment, as a modifier instead of a per-screen copy: borders carry the card and
   nothing else does, so no elevation and no inner glow. profile.css gets there with a list of
   `box-shadow: none !important` — a screen that wants the same look now says so here. */
.cm-card--flat,
html:not(.dark) .cm-card.cm-card--flat {
  box-shadow: none;
}

/* The profile's FIELD label — the small bold uppercase rubric over every input of "Mi perfil" — as a
   shared class, the same way .cm-card--flat lifted its card treatment out of profile.css. Meant to ride
   on .form-label so a screen keeps Bootstrap's spacing and swaps only the lettering. */
.cm-field-label,
html:not(.dark) .cm-field-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ms-text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: calc(0.055em + var(--ms-a11y-letter-add, 0em));
  line-height: 1rem;
  text-transform: uppercase;
}

/* A card whose first child is a full-bleed picture rather than a .cm-card-header. The image has to be
   clipped to the card's own radius: left alone it paints its square corners over the rounded frame,
   because .card-img-top takes its radius from --bs-card-inner-border-radius, a variable that only
   exists inside a Bootstrap .card. */
.cm-card.cm-card--media {
  overflow: hidden;
}

/* A cm-h2 that is a HEADLINE rather than a label. The uppercase and the wide letter-spacing exist for
   the short rubrics of the dashboard ("SOLICITUDES DE USUARIO"); a two-line news headline set that way
   is slower to read, and it stops being the words the source actually published. Size, weight and
   colour are kept, so it is still the same heading in the same system. */
.cm-h2.cm-h2--plain {
  letter-spacing: calc(0em + var(--ms-a11y-letter-add, 0em));
  text-transform: none;
}

/* The axis labels are the quietest thing on the dashboard's dining chart: on a wide card, 68% of the
   muted ink reads as a whisper beside the series. On a phone the same ink over a chart half the size
   stops reading at all, so there they take the muted colour whole. The size that goes with this lives
   in the chart's geometry (_CmDining.cshtml), because it is measured in SVG units, not pixels. */
@media (max-width: 767.98px) {
  .ms-theme .cm-shell .cm-dining-axis-label {
    fill: var(--cm-dashboard-muted);
  }
}
.cm-fleet-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.cm-fleet-stats__courses {
  grid-column: 1;
}
.cm-fleet-stats__types {
  grid-column: 2;
  align-self: start;
}
.cm-fleet-stats__teachers {
  grid-column: 1/-1;
}
@media (max-width: 991.98px) {
  .cm-fleet-stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .cm-fleet-stats__courses, .cm-fleet-stats__types {
    grid-column: 1;
  }
}

.cm-fleet-meter {
  display: grid;
  grid-template-columns: minmax(6rem, 1fr) 2fr auto;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.cm-fleet-meter__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-fleet-meter__track {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--bs-secondary-bg);
  overflow: hidden;
}
.cm-fleet-meter__fill {
  display: block;
  height: 100%;
  width: calc(var(--share, 0) * 1%);
  background: var(--bs-primary);
}
.cm-fleet-meter__value {
  font-variant-numeric: tabular-nums;
}

.cm-fleet-subjects {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.cm-fleet-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.25rem 0 0.75rem;
}
.cm-fleet-card__counts {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.cm-fleet-card__count {
  flex: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  text-align: center;
  text-decoration: none;
  font-size: 0.8rem;
}
.cm-fleet-card__count--passed {
  background: var(--bs-success-bg-subtle);
  color: var(--bs-success-text-emphasis);
}
.cm-fleet-card__count--failed {
  background: var(--bs-danger-bg-subtle);
  color: var(--bs-danger-text-emphasis);
}
.cm-fleet-card__figures {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.5rem;
  margin-bottom: 0.75rem;
}
.cm-fleet-card__figures dt {
  font-weight: 400;
  color: var(--bs-secondary-color);
}
.cm-fleet-card__figures dd {
  margin: 0;
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.cm-fleet-card__value--good {
  color: var(--bs-success-text-emphasis);
}
.cm-fleet-card__value--fair {
  color: var(--bs-warning-text-emphasis);
}
.cm-fleet-card__value--poor {
  color: var(--bs-danger-text-emphasis);
}

.cm-fleet-convs {
  display: flex;
  height: 1.25rem;
  border-radius: 0.375rem;
  overflow: hidden;
  font-size: 0.7rem;
}
.cm-fleet-convs__segment {
  width: calc(var(--share, 0) * 1%);
  min-width: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-body-bg);
  background: var(--bs-primary);
}
.cm-fleet-convs__segment:nth-child(2n) {
  background: var(--bs-info);
}
.cm-fleet-convs__segment:last-child:not(:first-child) {
  background: var(--bs-secondary);
}

.cm-dining-point {
  transition: r 120ms ease, opacity 120ms ease;
}

.cm-dining-axis-label--x {
  transition: fill 120ms ease;
}
