@charset "UTF-8";
/* ⚠ GENERATED from wwwroot/scss/variables.scss by AspNetCore.SassCompiler.
   Do NOT edit this .css by hand — edit the .scss and recompile (dotnet build). */
/*
  ============================================================================
  Minerva design system → tokens + Bootstrap 5 overrides
  ============================================================================
  Source of truth: @theme block (+ html.dark) of
    minerva-panel/src/index.css  (Tailwind v4, CSS-first engine)
  Ref.: Minerva/docs/FASE1-ANALISIS.md §1.1 "Sistema de diseño"
        Minerva/docs/FASE2-CONVENCIONES.md (Bootstrap 5, no Tailwind)

  Structure:
    1. :root              → --ms-* tokens (1:1 copy of @theme) + semantic ones
    2. Bootstrap mapping  → --bs-* (light)
    3. --color-* aliases  → compat with the CSS ported from React (Sidebar.css,
                            ToastNotification.css, cloudminerva.css, maps…),
                            which references var(--color-*) as-is.
    4. [data-bs-theme=dark] → real dark-theme tokens from index.css
    5. Component overrides (.btn-primary, inputs, cards, badges)
    6. Icon font (Material Symbols) + animated @property

  NOTE: ALWAYS load after bootstrap.min.css. Do not touch bootstrap.min.css.

  ------------------------------------------------------------------------------
  TYPOGRAPHY / FONTS
  ------------------------------------------------------------------------------
  - Body: SYSTEM stack (system-ui, -apple-system, …). Requires NO
    <link>/@import: they are OS fonts. Mapped to --bs-body-font-family.
  - Icons: "Material Symbols Outlined" is the MAIN icon system, SELF-HOSTED
    (no Google Fonts at runtime → works on a closed network). Font vendored in
    wwwroot/lib/material-symbols/ and linked in _Layout.cshtml:

      <link rel="stylesheet" href="~/lib/material-symbols/material-symbols.css" />
  ============================================================================
*/
/* ===========================================================================
   1. --ms-* TOKENS  (1:1 copy of the @theme block of index.css)
   =========================================================================== */
:root {
  /* --- Typography ------------------------------------------------------- */
  --ms-font-sans: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  /* --- Base text --------------------------------------------------------- */
  --ms-primaryTextLM: #032442;
  --ms-primaryTextDM: #032442;
  --ms-greyTextLM: #718096;
  --ms-greyTextDM: #718096;
  /* --- Brand (brand core) ------------------------------------------------ */
  --ms-primaryColor: #032442; /* main navy blue */
  --ms-secondaryColor: #032542; /* secondary brand (dark override: #3B82F6) */
  --ms-primaryButtonColor: #A1A9BC; /* bluish grey */
  --ms-terciaryColor: #fccf46; /* yellow accent (CTA / link hover) */
  --ms-dangerColor: #C9353D; /* destructive actions */
  /* --- Layout & surfaces ------------------------------------------------ */
  --ms-bodyBg: #fcfcfc;
  --ms-bodyBgDark: #081434;
  --ms-cardBgDark: #1D3248; /* fallback; the brand block sets the real one */
  --ms-primaryRowColor: #F0F5FA; /* primary table row / soft surface */
  --ms-secondaryRowColor: #eaeaea; /* secondary table row / border */
  /* --- Text & links ------------------------------------------------------ */
  --ms-textBase: #032442;
  --ms-linkBase: #ffffff; /* link on dark context (sidebar) */
  --ms-linkHover: #05162B;
  --ms-rootTextLight: #213547;
  /* --- Header / theme-color --------------------------------------------- */
  --ms-headerThemeDarkBg: #0A1433;
  /* --- Buttons ----------------------------------------------------------- */
  --ms-buttonBg: #063764;
  --ms-buttonBgLight: #A1A9BC;
  /* --- Neutrals ---------------------------------------------------------- */
  --ms-neutralWhite: #ffffff;
  --ms-neutralBlack: #000000;
  /* --- Sidebar ----------------------------------------------------------- */
  --ms-sidebarGradientFrom: #031a33;
  --ms-sidebarGradientVia: #032542;
  --ms-sidebarGradientTo: #020817;
  --ms-sidebarActiveText: #333333;
  /* --- Login / toast theme ---------------------------------------------- */
  --ms-mainNavy: #08143B;
  --ms-loginTextLight: #2C3E4F;
  --ms-loginBorderLight: #cccccc;
  --ms-loginPlaceholderLight: #999999;
  --ms-loginButtonHoverLight: #06143B;
  --ms-loginPrimaryDark: #1a73e8;
  --ms-loginBgDark: #081434;
  --ms-loginTextDark: #f5f5f5;
  --ms-loginBorderDark: #ffffff60;
  --ms-loginPlaceholderDark: #aaaaaa;
  --ms-loginButtonHoverDark: #4285f4;
  /* --- PWA / pull-to-refresh -------------------------------------------- */
  --ms-pwaAccent: #1976d2;
  --ms-pwaBackground: rgba(255, 255, 255, 0.95);
  --ms-pwaText: #000000;
  /* --- Toast progress ---------------------------------------------------- */
  --ms-toastProgressTrack: rgba(255, 255, 255, 0.35);
  --ms-toastProgressFill: #ffffff;
  --ms-toast-success: var(--ms-success);
  --ms-toast-info: var(--ms-info);
  --ms-toast-error: var(--ms-error);
  --ms-toast-warning: var(--ms-accent);
  --ms-toast-other: #4b5563;
  --ms-toast-foreground: var(--ms-neutralWhite);
  --ms-toast-success-foreground: var(--ms-mainNavy);
  --ms-toast-warning-foreground: var(--ms-mainNavy);
  /* --- Misc -------------------------------------------------------------- */
  --ms-logoGlow: #ffffffaa;
  --ms-reactLogoGlow: #61dafbaa;
  --ms-readDocsText: #888888;
  /* =======================================================================
     Short semantic aliases (point to the canonical tokens above).
     Consumed by the component overrides and the shell code.
     ======================================================================= */
  --ms-primary: var(--ms-primaryColor);
  --ms-primary-hover: var(--ms-linkHover); /* darker navy */
  --ms-secondary: var(--ms-secondaryColor);
  --ms-accent: var(--ms-terciaryColor); /* CTA yellow */
  --ms-bg: var(--ms-bodyBg);
  --ms-surface: var(--ms-neutralWhite);
  --ms-text: var(--ms-textBase);
  --ms-text-muted: var(--ms-greyTextLM);
  --ms-border: var(--ms-secondaryRowColor);
  /* A hairline INSIDE a card — a row divider, a rule between two blocks of one card. Not the same
     thing as --ms-border, which outlines a control against the page: on the night palette
     --ms-border (#1f2937) is DARKER than the card it would be drawn on (#1D3248), so a divider set
     from it draws a shadow into the surface instead of a line on it and simply disappears. Mixed
     off the text, so it is always lighter than its ground whichever way the theme runs. */
  --ms-rule: var(--ms-border);
  --ms-danger: var(--ms-dangerColor);
  /* =======================================================================
     ADDED semantic tokens (currently hardcoded in the React CSS;
     see FASE1-ANALISIS §1.1 points 2 and 4, section B of the plan).
     ======================================================================= */
  --ms-success: #36D98B; /* GlobalTextfield success */
  --ms-warning: #d97706; /* toast / input warning */
  --ms-info: #1d4ed8; /* toast info */
  --ms-error: #dc2626;
  --ms-orange: #fe7930; /* accent for detail/profile section icons */ /* input error */
  /* Requests: the SEVEN colours October uses for a solicitud, kept verbatim so the panel and the old
     backoffice say the same thing with the same paint. Fixed and tenant-independent — a status is a fact
     about the paperwork, not a school's livery, so these never take --brand-color.

     The four STATUSES are what October washes the row with (controllers/userrequest/index.htm), stated at
     full opacity here: it composites them over white at .8, and a token that already carried the alpha
     could not sit on a dark panel. Consumed by the listing dot (.pl-verdict-dot) and the status chip
     (.mn-req-status).

     The three REPORTS are the intermediary's verdict (models/UserRequest.php →
     getIntermediateAnswerColorAttribute), on its own column. Orange and not red on purpose: a reparo is an
     opinion the office may still overrule, not a cancellation. Consumed by .mn-req-report. */
  --mn-req-waiting: #fbfdaa; /* "Pendiente decisión intermediario" — pale yellow */
  --mn-req-in-progress: #fdefc0; /* "Pendiente de tramitar Oficina"    — cream */
  --mn-req-accepted: #b3c7ac; /* "Tramitada por oficina"            — muted green */
  --mn-req-rejected: #f69fa4; /* "Tramitación cancelada"            — pink */
  --mn-req-report-approved: #008000; /* "Conforme" */
  --mn-req-report-objected: #ff6f36; /* "No conforme" */
  --mn-req-report-pending: #c3c2ee; /* "Sin contestar" */
  /* Military branches (semantic per armed service; fixed, tenant-independent).
     Consumed by the map legend and the branch badges. */
  --ms-branch-armada: #fbbf24; /* Armada (Navy)      — amber */
  --ms-branch-aire: #38bdf8; /* Air Force          — sky */
  --ms-branch-tierra: #22c55e; /* Army               — green */
  --ms-branch-neutral: #94a3b8; /* No army declared   — slate */
  --ms-map-command: #ffffff; /* Logistics command  — white */
  --ms-input-border: #d1d5db;
  --ms-input-focus: #3b82f6;
  --ms-input-text: #374151;
  --ms-input-placeholder: #9ca3af;
  --ms-surface-dark-800: #001235; /* .bg-slate-800 dark ad-hoc (index.css:153) */
  /* --- Radii (real scale found in the React CSS) ----------------------- */
  --ms-radius-sm: 0.375rem; /* rounded-md */
  --ms-radius: 0.5rem; /* rounded-lg / buttons (button { border-radius: 8px }) */
  --ms-radius-lg: 0.75rem; /* rounded-xl */
  --ms-radius-xl: 0.85rem;
  --ms-radius-pill: 9999px;
  /* --- Shadows (real values, FASE1-ANALISIS §1.1 point 4) --------------- */
  --ms-shadow-sidebar: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --ms-shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --ms-shadow-dropdown: 0 18px 35px rgba(15, 23, 42, 0.22);
  --ms-shadow-toast: 0 14px 30px rgba(0, 0, 0, 0.18);
  /* Cards sit on the ground with a soft, wide halo rather than a heavy drop. --black-05 is the
     ink of that halo, shared by every card shadow. */
  --black-05: rgba(0, 0, 0, 0.05);
  /* Two layers: a tight contact shadow plus a wide diffuse one, closed by a hairline RING drawn
     with a spread shadow instead of a border (no layout shift, no double line on nested cards).
     Every card in the app takes it through --ms-shadow-card, so the ring travels with them. */
  --ms-shadow-card-drop: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -4px rgba(0, 0, 0, 0.06);
  --ms-shadow-card-ring: 0 0 0 1px rgba(0, 0, 0, 0.03);
  --ms-shadow-card: var(--ms-shadow-card-drop), var(--ms-shadow-card-ring);
  /* --- Tables ----------------------------------------------------------
     Rows separate by ZEBRA, not by hairlines: a page of fifteen records drawn with a rule under
     every cell reads as a grid. The stripe is a NEUTRAL grey, not a fraction of the header tone:
     that tone derives from the school's colour, so on a white card the stripe came out visibly
     blue and the table stopped reading as white. Barely there on purpose: the stripe only has to
     help the eye track a row, and the table has to keep reading as the card's white. The hover
     does carry the school's colour. */
  --ms-table-zebra: color-mix(in srgb, #000 1%, var(--ms-surface));
  /* One step above the stripe, and NEUTRAL: at 8% of the school's colour the hover came out
     stronger than the header band itself, so a row under the pointer read as "this table is
     tinted" instead of "you are on this row". */
  --ms-table-hover: color-mix(in srgb, #000 4%, var(--ms-surface));
  --ms-focus-ring: 0 0 0 2px rgba(59, 130, 246, 0.1); /* React input focus */
  /* --- Layout (fixed widths) -------------------------------------------- */
  --ms-sidebar-width: 16rem; /* 256px (desktop) */
  --ms-sidebar-collapsed-width: 4rem; /* 64px (collapsed) */
  --ms-navbar-height: 56px; /* canonical shell navbar height (fixed layout constant, no upstream token) */
  /* =======================================================================
     2. BOOTSTRAP MAPPING  (--bs-*, light theme)
     ======================================================================= */
  /* Brand / semantic colors */
  --bs-primary: var(--ms-primaryColor);
  --bs-primary-rgb: 3, 36, 66;
  --bs-secondary: var(--ms-secondaryColor);
  --bs-secondary-rgb: 3, 37, 66;
  --bs-success: var(--ms-success);
  --bs-success-rgb: 25, 135, 84;
  --bs-danger: var(--ms-dangerColor);
  --bs-danger-rgb: 201, 53, 61;
  --bs-warning: var(--ms-warning);
  --bs-warning-rgb: 217, 119, 6;
  --ms-warning-text: #92400e;
  --bs-info: var(--ms-info);
  --bs-info-rgb: 29, 78, 216;
  /* Body */
  --bs-body-bg: var(--ms-bodyBg);
  --bs-body-color: var(--ms-textBase);
  --bs-body-color-rgb: 3, 36, 66;
  --bs-secondary-color: var(--ms-greyTextLM);
  --bs-tertiary-bg: var(--ms-primaryRowColor);
  --bs-emphasis-color: var(--ms-primaryColor);
  /* Typography */
  --bs-body-font-family: var(--ms-font-sans);
  --bs-body-font-size: 1rem;
  --bs-body-font-weight: 400;
  /* Borders & radii */
  --bs-border-color: var(--ms-secondaryRowColor);
  --bs-border-radius: var(--ms-radius);
  --bs-border-radius-sm: var(--ms-radius-sm);
  --bs-border-radius-lg: var(--ms-radius-lg);
  --bs-border-radius-xl: var(--ms-radius-xl);
  --bs-border-radius-pill: var(--ms-radius-pill);
  /* Shadows */
  --bs-box-shadow-sm: var(--ms-shadow-dropdown);
  --bs-box-shadow: var(--ms-shadow-card);
  --bs-box-shadow-lg: var(--ms-shadow-modal);
  /* Links (in light body we use the brand navy; the white --ms-linkBase
     is specific to the dark sidebar, not a generic link). */
  --bs-link-color: var(--ms-primaryColor);
  --bs-link-color-rgb: 3, 36, 66;
  --bs-link-hover-color: var(--ms-linkHover);
  --bs-link-hover-color-rgb: 5, 22, 43;
  /* =======================================================================
     3. --color-* ALIASES  (compat with the CSS ported from React)
     Sidebar.css / ToastNotification.css / cloudminerva.css / maps use
     var(--color-*) as-is. They point to the canonical --ms-* tokens.
     ======================================================================= */
  --color-primaryTextLM: var(--ms-primaryTextLM);
  --color-primaryTextDM: var(--ms-primaryTextDM);
  --color-greyTextLM: var(--ms-greyTextLM);
  --color-greyTextDM: var(--ms-greyTextDM);
  --color-primaryColor: var(--ms-primaryColor);
  --color-secondaryColor: var(--ms-secondaryColor);
  --color-primaryButtonColor: var(--ms-primaryButtonColor);
  --color-terciaryColor: var(--ms-terciaryColor);
  --color-dangerColor: var(--ms-dangerColor);
  --color-bodyBg: var(--ms-bodyBg);
  --color-bodyBgDark: var(--ms-bodyBgDark);
  --color-cardBgDark: var(--ms-cardBgDark);
  --color-primaryRowColor: var(--ms-primaryRowColor);
  --color-secondaryRowColor: var(--ms-secondaryRowColor);
  --color-textBase: var(--ms-textBase);
  --color-linkBase: var(--ms-linkBase);
  --color-linkHover: var(--ms-linkHover);
  --color-rootTextLight: var(--ms-rootTextLight);
  --color-headerThemeDarkBg: var(--ms-headerThemeDarkBg);
  --color-buttonBg: var(--ms-buttonBg);
  --color-buttonBgLight: var(--ms-buttonBgLight);
  --color-neutralWhite: var(--ms-neutralWhite);
  --color-neutralBlack: var(--ms-neutralBlack);
  --color-sidebarGradientFrom: var(--ms-sidebarGradientFrom);
  --color-sidebarGradientVia: var(--ms-sidebarGradientVia);
  --color-sidebarGradientTo: var(--ms-sidebarGradientTo);
  --color-sidebarActiveText: var(--ms-sidebarActiveText);
  --color-mainNavy: var(--ms-mainNavy);
  --color-loginTextLight: var(--ms-loginTextLight);
  --color-loginBorderLight: var(--ms-loginBorderLight);
  --color-loginPlaceholderLight: var(--ms-loginPlaceholderLight);
  --color-loginButtonHoverLight: var(--ms-loginButtonHoverLight);
  --color-loginPrimaryDark: var(--ms-loginPrimaryDark);
  --color-loginBgDark: var(--ms-loginBgDark);
  --color-loginTextDark: var(--ms-loginTextDark);
  --color-loginBorderDark: var(--ms-loginBorderDark);
  --color-loginPlaceholderDark: var(--ms-loginPlaceholderDark);
  --color-loginButtonHoverDark: var(--ms-loginButtonHoverDark);
  --color-pwaAccent: var(--ms-pwaAccent);
  --color-pwaBackground: var(--ms-pwaBackground);
  --color-pwaText: var(--ms-pwaText);
  --color-toastProgressTrack: var(--ms-toastProgressTrack);
  --color-toastProgressFill: var(--ms-toastProgressFill);
  --color-logoGlow: var(--ms-logoGlow);
  --color-reactLogoGlow: var(--ms-reactLogoGlow);
  --color-readDocsText: var(--ms-readDocsText);
  /* Alias of the original font family (--font-sans in @theme) */
  --font-sans: var(--ms-font-sans);
  /* =======================================================================
     PER-TENANT BRAND — derivation moved here from the inline <style> of
     _Layout.cshtml. `--brand-color` is the tenant base color; its fallback
     is the brand navy (literal, to avoid a circular reference with
     --ms-primaryColor). The mixin derives the sidebar gradients from it and
     REASSIGNS primary/buttonBg/bs-primary (hence it re-declares those tokens
     at the end of :root). _Layout.cshtml now only sets --brand-color to the
     tenant color, which wins the cascade by being in a later <style>.
     ======================================================================= */
  --brand-color: #032442;
  --ms-sidebarGradientFrom: color-mix(in srgb, var(--brand-color) 90%, #000);
  --ms-sidebarGradientVia: color-mix(in srgb, var(--brand-color) 72%, #000);
  --ms-sidebarGradientTo: color-mix(in srgb, var(--brand-color) 50%, #000);
  --ms-sidebarLogoBg: color-mix(in srgb, var(--brand-color) 62%, #000);
  --ms-primaryColor: var(--brand-color);
  --ms-primary: var(--brand-color);
  --ms-buttonBg: var(--brand-color);
  --bs-primary: var(--brand-color);
  --ms-onBrand: #fff;
  --ms-onPrimary: #fff;
  --ms-bodyBg: #fcfcfc;
  --ms-primaryRowColor: color-mix(in srgb, var(--brand-color) 7%, #fff);
  --ms-secondaryRowColor: color-mix(in srgb, var(--brand-color) 12%, #fff);
  --ms-textBase: color-mix(in srgb, var(--brand-color) 22%, #000);
  --ms-linkHover: color-mix(in srgb, var(--brand-color) 28%, #000);
  --ms-rootTextLight: color-mix(in srgb, var(--brand-color) 28%, #000);
  --ms-greyTextLM: color-mix(in srgb, var(--brand-color) 22%, #6b7280);
  --ms-greyTextDM: color-mix(in srgb, var(--brand-color) 22%, #6b7280);
  --ms-bodyBgDark: #101A30;
  --ms-chromeBgDark: #14213F;
  --ms-headerThemeDarkBg: color-mix(in srgb, var(--brand-color) 26%, #000);
  --ms-cardBgDark: #1D3248;
  --ms-raisedBgDark: #26415C;
  --ms-titleRampDark: #65abff;
  --ms-surface-dark-800: color-mix(in srgb, var(--ms-bodyBgDark) 55%, #000);
  /* --- Hemeroteca: the two origins of a press note ------------------------
     The SCHOOL's own colour, twice: kept as it is for what the school wrote,
     and lightened and turned towards cyan for what came from outside. Derived
     and not fixed because the pair has to say "de fuera / de casa": a fixed
     blue pair sitting inside a green school would read as a third thing the
     screen never explains.

     ONE token per origin, used for BOTH the title in the list and the day
     circle in the calendar — that is what makes a colour mean the same thing
     in the two views, and it is why the tones are picked to work as ink on
     the page AND as a filled circle. The circle's number is the only extra:
     --ms-cal-ink.

     ONE value each, shared by both themes — see the @supports block for what
     that costs and why it is paid.

     These declarations are the fallback for a browser without relative
     colour syntax; the real derivation is the @supports block below. A
     custom property cannot fall back declaration-by-declaration — an invalid
     one only fails when it is SUBSTITUTED, by which time it has already
     overwritten the good one — so support has to be asked about up front. */
  /* The pivot the externas' hue is turned TOWARDS — not the destination. Each
     school's colour is dragged 29% of the way here along the short arc, which
     lands a navy on #9AC9F3's hue (254° → 246°) and an olive on Green Ash's
     (117° → 149°). A FIXED turn of so many degrees cannot do both: −45°
     reaches cyan from a blue and ochre from an olive, and ochre is not a green.
     Only the hue of this colour is used; its lightness and chroma are thrown
     away and re-pinned below. */
  --ms-news-turn: #26b4e3;
  --ms-news-external: color-mix(in oklab, var(--brand-color) 20%, #9ac9f3);
  --ms-news-own: color-mix(in oklab, var(--brand-color) 78%, #ffffff);
  /* Avisos' day circle: the school's own colour, a tone below. The colour AS IT IS cannot be a filled
     circle here — the number on top is dark ink, and over a navy that is 1.2:1. Same lightness and
     chroma as the Hemeroteca's fills, and the school's own hue with NO turn, because this calendar
     counts one kind of thing and has nothing to tell apart. (Fallback; real derivation below.) */
  --ms-notice-day: color-mix(in oklab, var(--brand-color) 45%, #ffffff);
  /* The number inside a day circle, on any calendar (it stopped being the
     Hemeroteca's the day the component became shared, hence the name). */
  --ms-cal-ink: #ffffff;
}

/* ===========================================================================
   4. DARK THEME  [data-bs-theme="dark"]
   Real dark-theme tokens from index.css:
     bodyBgDark #081434, cardBgDark #151E3C, secondaryColor → #3B82F6 (html.dark:120),
     .bg-slate-800 → #001235, dark borders #1f2937, dark datepicker text #e5e7eb / #9ca3af.
   The SURFACES (bodyBgDark / cardBgDark / surface-dark-800) are no longer those
   literals: brand-derived() derives them from --brand-color so the dark-theme
   background shares a hue with the tenant sidebar. Do not re-declare them here:
   this block matches :root in specificity and comes after, so a fixed value
   here would win over the brand derivation.
   html.dark is also included for compatibility with the CSS ported from React.
   =========================================================================== */
[data-bs-theme=dark],
html.dark {
  /* Surfaces / text (real) */
  --ms-bg: var(--ms-bodyBgDark); /* derived from --brand-color */
  --ms-surface: var(--ms-cardBgDark); /* derived from --brand-color */
  /* The light theme's contact shadow + hairline ring is a DAY effect (black ink on white); at
     night the cards separate by tone, so the shadow goes back to the old quiet halo. */
  --ms-shadow-card: -1px 0 13px 2px var(--black-05);
  --ms-border: #1f2937; /* dark border (dropdown/datepicker) */
  /* A row divider only has to separate; anything heavier turns a quiet list into a table. */
  --ms-rule: color-mix(in srgb, var(--ms-text) 14%, transparent);
  --ms-text: #e5e7eb; /* dark text (dark datepicker) */
  --ms-text-muted: #9ca3af; /* dark datepicker th */
  --ms-primaryRowColor: var(--ms-surface-dark-800);
  /* Night: stripes and hover drawn with LIGHT, not with the day theme's greys. */
  --ms-table-zebra: color-mix(in srgb, #ffffff 3%, var(--ms-surface));
  --ms-table-hover: color-mix(in srgb, var(--ms-primary) 12%, var(--ms-surface));
  --ms-secondaryRowColor: var(--ms-border);
  /* Real secondary-brand override in dark (index.css:120) */
  --ms-secondaryColor: #3B82F6;
  /* Dark theme has no dedicated primary upstream (primaryColor #032442 would be
     unreadable over #081434), so it reuses the brand's visible blue in dark
     (#3B82F6 = secondaryColor dark). */
  --ms-primary: #3B82F6;
  --ms-primary-hover: color-mix(in srgb, var(--ms-primary) 82%, #000); /* darker shade of the dark-theme primary */
  /* Inputs in dark */
  --ms-input-border: var(--ms-border);
  --ms-input-text: #e5e7eb;
  /* Bootstrap (dark) */
  --bs-primary: var(--ms-primary);
  --bs-primary-rgb: 59, 130, 246;
  --bs-secondary: var(--ms-secondaryColor);
  --bs-secondary-rgb: 59, 130, 246;
  --bs-body-bg: var(--ms-bg);
  --bs-body-color: var(--ms-text);
  --bs-body-color-rgb: 229, 231, 235;
  --bs-secondary-color: var(--ms-text-muted);
  --bs-tertiary-bg: var(--ms-surface);
  --bs-emphasis-color: var(--ms-text);
  --bs-border-color: var(--ms-border);
  --bs-link-color: var(--ms-primary);
  --bs-link-color-rgb: 59, 130, 246;
  --bs-link-hover-color: var(--ms-primary-hover);
  --bs-link-hover-color-rgb: 37, 99, 235;
}

/* ===========================================================================
   4b. DARK PALETTES  html[data-brand-preset="…"]
   Whose dark theme this is. The layout prints the preset (BrandDefaults.Resolve):

     aire | generic | (no attribute)  → the night navy above, untouched.
     tierra | armada                  → a palette drawn by hand for that service.
     custom                           → the school chose its own colour, and the
                                        palette is DERIVED from it.

   Each palette is the same eight tokens: ground, chrome, card, raised, the title
   ramp, border, primary and its hover. The surfaces are declared for both themes (they are
   only READ in dark, as the base ones in :root are); border and primary are
   theme tokens, so they are set under the dark selector.
   =========================================================================== */
/* --- Tierra: the olive, taken down to a ground that is still green ------- */
html[data-brand-preset=tierra] {
  --ms-bodyBgDark: #14180F;
  --ms-chromeBgDark: #1A2013;
  --ms-cardBgDark: #262E1C;
  --ms-raisedBgDark: #333D26;
  --ms-titleRampDark: #B4C96A;
}

html[data-brand-preset=tierra][data-bs-theme=dark],
html.dark[data-brand-preset=tierra] {
  --ms-border: #46513A;
  --ms-primary: #7C9138;
  --ms-primary-hover: #6A7D2E;
  --ms-secondaryColor: #7C9138;
  --bs-primary-rgb: 124, 145, 56;
  --bs-secondary-rgb: 124, 145, 56;
  --bs-link-color-rgb: 124, 145, 56;
  --bs-link-hover-color-rgb: 106, 125, 46;
}

/* --- Armada: closer to ink than the Air Force's navy, so the two are told apart */
html[data-brand-preset=armada] {
  --ms-bodyBgDark: #070D1F;
  --ms-chromeBgDark: #0A1330;
  --ms-cardBgDark: #13203F;
  --ms-raisedBgDark: #1C2D55;
  --ms-titleRampDark: #7FA9F7;
}

html[data-brand-preset=armada][data-bs-theme=dark],
html.dark[data-brand-preset=armada] {
  --ms-border: #31426B;
  --ms-primary: #4C7FE6;
  --ms-primary-hover: #3B6BD0;
  --ms-secondaryColor: #4C7FE6;
  --bs-primary-rgb: 76, 127, 230;
  --bs-secondary-rgb: 76, 127, 230;
  --bs-link-color-rgb: 76, 127, 230;
  --bs-link-hover-color-rgb: 59, 107, 208;
}

/* --- Custom: the school's own colour, taken to fixed depths ---------------
   The hue is the school's; the LIGHTNESS is pinned per token and the chroma is
   scaled and capped. Pinning the lightness is what makes this safe for any
   colour: --ms-text and --ms-text-muted clear AA on the ground and on the card
   whatever the hue, because the surfaces never get lighter than these numbers.
   The lightnesses and the caps are the night navy's own (#101A30 is 0.22 /
   0.046, #1D3248 is 0.31 / 0.048, #3B82F6 is 0.62), so a blue school lands
   almost where the fixed palette is. The chroma is MULTIPLIED rather than set
   so that a grey brand gives neutral surfaces instead of an invented tint.

   Behind @supports for the reason given on the block below: a custom property
   cannot fall back declaration by declaration. A browser without relative
   colour syntax keeps the night navy. */
/* --- Borders under a bright brand ------------------------------------------
   The day theme's border is the school's colour at 12% over white, which is a
   visible line for a navy or an olive and no line at all for a yellow: 12% of a
   colour that is already almost white IS white, and every card, field and
   button loses its edge at once. So the tint keeps its hue and its lightness is
   capped at what a dark brand gives (0.935) — nothing changes for the schools
   that already had a border, and a bright one gets the same line they have.
   Light theme only: in dark the border is a palette token. */
@supports (color: oklch(from white l c h)) {
  :root:not([data-bs-theme=dark]):not(.dark) {
    --ms-secondaryRowColor: oklch(from color-mix(in srgb, var(--brand-color) 12%, #fff) min(l, 0.935) c h);
  }
}
/* --- The ink ON a fill ------------------------------------------------------
   ONE ink for everything that sits on the school's colour — a button's label,
   the chosen option of a switch, the current page, today's date — so a bright
   brand turns all of them at once and never some.

   White, until the school's colour is too bright to carry it: past a lightness
   of 0.62 white text on the fill drops under 3:1 and the control reads as an
   empty pill. From there the ink is a near-black of the school's own hue. The
   clamp is a switch, not a ramp — (0.62 − l) × 1000 is far above 1 or far
   below 0.2 for any real colour — because a mid-grey ink is legible on nothing.

   Two names for it because there are two fills. --ms-onBrand goes on
   --brand-color, which is the same colour in both themes. --ms-onPrimary goes
   on --ms-primary, which is the brand by day and a fixed-lightness tone that
   white clears by night — so it follows --ms-onBrand in light and stays white
   in dark. */
@supports (color: oklch(from white l c h)) {
  :root {
    --ms-onBrand: oklch(from var(--brand-color) clamp(0.2, (0.62 - l) * 1000, 1) min(c, 0.04) h);
  }
}
:root:not([data-bs-theme=dark]):not(.dark) {
  --ms-onPrimary: var(--ms-onBrand);
}

@supports (color: oklch(from white l c h)) {
  html[data-brand-preset=custom] {
    --ms-bodyBgDark: oklch(from var(--brand-color) 0.22 min(c * 0.5, 0.046) h);
    --ms-chromeBgDark: oklch(from var(--brand-color) 0.255 min(c * 0.6, 0.060) h);
    --ms-cardBgDark: oklch(from var(--brand-color) 0.31 min(c * 0.5, 0.048) h);
    --ms-raisedBgDark: oklch(from var(--brand-color) 0.367 min(c * 0.5, 0.057) h);
    --ms-titleRampDark: oklch(from var(--brand-color) 0.73 min(c * 1.6, 0.14) h);
  }
  html[data-brand-preset=custom][data-bs-theme=dark],
  html.dark[data-brand-preset=custom] {
    --ms-border: oklch(from var(--brand-color) 0.43 min(c * 0.4, 0.040) h);
    --ms-primary: oklch(from var(--brand-color) 0.63 min(c * 1.6, 0.16) h);
    --ms-primary-hover: oklch(from var(--brand-color) 0.55 min(c * 1.6, 0.16) h);
    --ms-secondaryColor: var(--ms-primary);
  }
  /* Bootstrap reads the primary and the link colour as "r, g, b" triplets, and a triplet cannot be
     taken out of a computed colour. So for a derived palette the utilities that go through one are
     re-stated on the colour itself. :where() keeps the link rule at Bootstrap's own specificity. */
  :where(html[data-brand-preset=custom][data-bs-theme=dark]) a,
  :where(html.dark[data-brand-preset=custom]) a {
    color: color-mix(in srgb, var(--bs-link-color) calc(var(--bs-link-opacity, 1) * 100%), transparent);
    text-decoration-color: color-mix(in srgb, var(--bs-link-color) calc(var(--bs-link-underline-opacity, 1) * 100%), transparent);
  }
  :where(html[data-brand-preset=custom][data-bs-theme=dark]) a:hover,
  :where(html.dark[data-brand-preset=custom]) a:hover {
    --bs-link-color: var(--bs-link-hover-color);
  }
  html[data-brand-preset=custom][data-bs-theme=dark] .text-primary, html[data-brand-preset=custom][data-bs-theme=dark] .text-secondary,
  html.dark[data-brand-preset=custom] .text-primary,
  html.dark[data-brand-preset=custom] .text-secondary {
    color: color-mix(in srgb, var(--ms-primary) calc(var(--bs-text-opacity, 1) * 100%), transparent) !important;
  }
  html[data-brand-preset=custom][data-bs-theme=dark] .bg-primary, html[data-brand-preset=custom][data-bs-theme=dark] .bg-secondary, html[data-brand-preset=custom][data-bs-theme=dark] .text-bg-primary, html[data-brand-preset=custom][data-bs-theme=dark] .text-bg-secondary,
  html.dark[data-brand-preset=custom] .bg-primary,
  html.dark[data-brand-preset=custom] .bg-secondary,
  html.dark[data-brand-preset=custom] .text-bg-primary,
  html.dark[data-brand-preset=custom] .text-bg-secondary {
    background-color: color-mix(in srgb, var(--ms-primary) calc(var(--bs-bg-opacity, 1) * 100%), transparent) !important;
  }
  html[data-brand-preset=custom][data-bs-theme=dark] .border-primary, html[data-brand-preset=custom][data-bs-theme=dark] .border-secondary,
  html.dark[data-brand-preset=custom] .border-primary,
  html.dark[data-brand-preset=custom] .border-secondary {
    border-color: color-mix(in srgb, var(--ms-primary) calc(var(--bs-border-opacity, 1) * 100%), transparent) !important;
  }
  html[data-brand-preset=custom][data-bs-theme=dark] .link-primary, html[data-brand-preset=custom][data-bs-theme=dark] .link-secondary,
  html.dark[data-brand-preset=custom] .link-primary,
  html.dark[data-brand-preset=custom] .link-secondary {
    color: color-mix(in srgb, var(--ms-primary) calc(var(--bs-link-opacity, 1) * 100%), transparent) !important;
  }
  html[data-brand-preset=custom][data-bs-theme=dark] .btn-primary:focus-visible, html[data-brand-preset=custom][data-bs-theme=dark] .btn-outline-primary:focus-visible,
  html.dark[data-brand-preset=custom] .btn-primary:focus-visible,
  html.dark[data-brand-preset=custom] .btn-outline-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--ms-primary) 50%, transparent);
  }
}
/* The pair, said properly: the school's own colour for what the school wrote,
   and that same colour turned towards --ms-news-turn for what came from outside.

   The turn is the whole signal. Two tones of ONE hue sitting side by side — a
   title next to a title, half a circle against the other half — read as one
   colour that happens to be lit differently; turning one of them is what makes
   the pair tell itself apart.

   Turned TOWARDS a pivot, not BY a fixed number of degrees, and that is the
   whole reason the pivot exists. A fixed turn has to be measured from somewhere,
   and every school starts somewhere different: −45° took a navy to cyan and an
   olive to ochre. Dragging each colour two thirds of the way to 165° instead
   lands the blues on cyan's own hue (254° → 195°) and the greens on Green Ash's
   (117° → 149°) — every school ends up beside its own colour rather than in
   somebody else's family.

   ONE value each, the SAME in both themes. That is a deliberate choice and it
   has a price worth knowing before touching these numbers. A single colour has
   to be legible on white AND on the night card (#14213F), and the best any
   colour can do against both at once is 3.99:1 — arithmetic, not a matter of
   picking better ones. So these lightnesses sit at that crossing point and the
   set lands between 3.55:1 and 4.5:1: above the 3:1 that AA asks of large text
   and of a graphical object like the day circle, below the 4.5:1 it asks of
   body text. Per-theme values cleared 4.5:1 everywhere, and were dropped
   because a colour that changes with the theme is not the same colour — the
   same origin was reading as a deep teal by day and a bright cyan by night,
   which is two colour codes for one thing.

   The chroma floor is for the muted brands: without it Logística's colour
   separates by lightness alone and reads as two greys.

   This block matches the fallback in :root at the SAME specificity, so it only
   wins by coming after it. Moving it up puts the fallback back on screen.

   Verified across the dev set (aga, armada, navy, aclog's olive, emacot). */
@supports (color: oklch(from white l c h)) {
  :root {
    /* The mix supplies the HUE and nothing else: lightness and chroma are
       re-pinned to #9AC9F3's own (0.818 / 0.077), the blue this screen was
       designed around. So a school whose colour turns to 246° comes out AS
       that blue — AGA lands on #9ac9f3 exactly — and one that turns to 149°
       comes out at the same brightness in its own family (#a1d2a8). The turn
       keeps each school in its colour; these two numbers are what make it
       the vivid one rather than a muted cousin.

       The pivot and this pair are one setting: move the pivot and the blues
       stop landing on the cyan; move these and every school dulls at once.

       This is a fill colour that also has to serve as a title on a white
       page, and at 0.818 it cannot: 1.75:1. The circle is what it is for
       (10.7:1 for its number, 9.1:1 against the night card); the title is
       the price, paid on purpose. */
    --ms-news-external:
        oklch(from color-mix(in oklch, var(--brand-color) 71%, var(--ms-news-turn))
              0.818 0.077 h);
    --ms-news-own: oklch(from var(--brand-color) 0.60 calc(c + 0.05) h);
    /* Same height as the fills above so the dark number reads on it too. */
    --ms-notice-day: oklch(from var(--brand-color) 0.818 0.077 h);
  }
}
/* ===========================================================================
   5. BOOTSTRAP COMPONENT OVERRIDES (brand fidelity)
   (Bootstrap compiles .btn-* colors as literals: we must re-map
    --bs-btn-* per class to recolor them.)
   =========================================================================== */
/* --- Primary button (kept + completed) ---------------------------------- */
.btn-primary {
  --bs-btn-color: var(--ms-onPrimary);
  --bs-btn-bg: var(--ms-primary);
  --bs-btn-border-color: var(--ms-primary);
  --bs-btn-hover-color: var(--ms-onPrimary);
  --bs-btn-hover-bg: var(--ms-primary-hover);
  --bs-btn-hover-border-color: var(--ms-primary-hover);
  --bs-btn-active-color: var(--ms-onPrimary);
  --bs-btn-active-bg: var(--ms-primary-hover);
  --bs-btn-active-border-color: var(--ms-primary-hover);
  --bs-btn-disabled-color: var(--ms-onPrimary);
  --bs-btn-disabled-bg: var(--ms-primary);
  --bs-btn-disabled-border-color: var(--ms-primary);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}

.btn-outline-primary {
  --bs-btn-color: var(--ms-primary);
  --bs-btn-border-color: var(--ms-primary);
  --bs-btn-hover-color: var(--ms-onPrimary);
  --bs-btn-hover-bg: var(--ms-primary);
  --bs-btn-hover-border-color: var(--ms-primary);
  --bs-btn-active-color: var(--ms-onPrimary);
  --bs-btn-active-bg: var(--ms-primary);
  --bs-btn-active-border-color: var(--ms-primary);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}

/* --- CTA / brand yellow accent (--ms-terciaryColor) --------------------- */
.btn-accent {
  --bs-btn-color: var(--ms-primaryColor);
  --bs-btn-bg: var(--ms-accent);
  --bs-btn-border-color: var(--ms-accent);
  --bs-btn-hover-color: var(--ms-primaryColor);
  --bs-btn-hover-bg: #f5c020;
  --bs-btn-hover-border-color: #f5c020;
  --bs-btn-active-color: var(--ms-primaryColor);
  --bs-btn-active-bg: #f5c020;
  --bs-btn-active-border-color: #f5c020;
}

/* --- Inputs / selects / textarea ---------------------------------------- */
.form-control,
.form-select {
  border-color: var(--ms-input-border);
  border-radius: var(--ms-radius);
  color: var(--ms-input-text);
}

/* Keep compact file inputs vertically aligned without overriding native text layout. */
.form-control.form-control-sm[type=file] {
  min-height: calc(1.5em + 0.5rem + 2px);
  height: auto;
  padding: 0.25rem 0.5rem;
  line-height: 1.5;
  overflow: hidden;
}
.form-control.form-control-sm[type=file]::file-selector-button {
  box-sizing: border-box;
  min-height: calc(1.5em + 0.5rem);
  margin: -0.25rem -0.5rem;
  margin-inline-end: 0.5rem;
  padding: 0.25rem 0.5rem;
  line-height: 1.5;
}
.form-control.form-control-sm[type=file]::-webkit-file-upload-button {
  box-sizing: border-box;
  min-height: calc(1.5em + 0.5rem);
  margin: -0.25rem -0.5rem;
  margin-inline-end: 0.5rem;
  padding: 0.25rem 0.5rem;
  line-height: 1.5;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ms-input-focus);
  box-shadow: var(--ms-focus-ring);
}

.form-control::placeholder {
  color: var(--ms-input-placeholder);
  opacity: 1;
}

.form-control:disabled,
.form-select:disabled {
  background-color: var(--ms-input-disabled-bg);
}

.form-control.is-invalid,
.form-select.is-invalid,
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: var(--ms-error);
}

.form-control.is-valid,
.form-select.is-valid,
.was-validated .form-control:valid,
.was-validated .form-select:valid {
  border-color: var(--ms-success);
}

[data-bs-theme=dark] .form-control,
[data-bs-theme=dark] .form-select {
  background-color: var(--ms-surface);
  color: var(--ms-text);
}

/* --- Checks / switches --------------------------------------------------- */
.form-check-input:checked {
  background-color: var(--ms-primary);
  border-color: var(--ms-primary);
}

.form-check-input:focus {
  border-color: var(--ms-input-focus);
  box-shadow: var(--ms-focus-ring);
}

/* --- Cards --------------------------------------------------------------- */
.card {
  --bs-card-bg: var(--ms-surface);
  --bs-card-color: var(--ms-text);
  /* Borderless: a card separates from the ground by its shadow, not by a hairline. */
  --bs-card-border-color: transparent;
  --bs-card-border-width: 0;
  /* Cards are the one surface at --ms-radius (0.5rem); --ms-radius-lg stays what it is for the
     panels, dropdowns and wells that are not cards. */
  --bs-card-border-radius: var(--ms-radius);
  --bs-card-inner-border-radius: calc(var(--ms-radius) - 1px);
  /* A card is ONE material: the header is the same surface as the body, with no divider between
     them. This was already the night treatment; both themes now read the same. */
  --bs-card-cap-bg: transparent;
  box-shadow: var(--ms-shadow-card);
}

.card > .card-header {
  border-bottom: 0;
}

/* --- Badges -------------------------------------------------------------- */
/* .bg-primary / .text-bg-primary already follow --bs-*-rgb (RGBA utilities).
   Here we only force the pill shape and add the brand accent. */
.badge {
  --bs-badge-border-radius: var(--ms-radius-pill);
  border-radius: var(--ms-radius-pill);
}

.badge.bg-accent,
.text-bg-accent {
  color: var(--ms-primaryColor) !important;
  background-color: var(--ms-accent) !important;
}

/* ===========================================================================
   6. ICON FONT + animated @property (from index.css)
   =========================================================================== */
/* Main icon system (Material Symbols Outlined).
   The font <link> goes in _Layout.cshtml (see header). */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined", serif;
  font-weight: normal;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  letter-spacing: calc(0em + var(--ms-a11y-letter-add, 0em));
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  -webkit-font-smoothing: antialiased;
}

.sidebar-nav-icon {
  font-size: 25px;
}

/* animated @property (copy from index.css; used in dashboard charts).
   --toast-percent lives with the toast CSS (ToastNotification.css). */
@property --bar-height {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 60%;
}
@property --bar-delay {
  syntax: "<time>";
  inherits: false;
  initial-value: 0.5s;
}
@property --pass-height {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 80%;
}
@property --segment-delay {
  syntax: "<time>";
  inherits: false;
  initial-value: 0s;
}
