/*
 * One look for the staff portal and the family app (owner, 26 Nov 2026: "the portal should look and feel the same way
 * the app does. It all has to flow and match.").
 *
 * Loaded after the other look files and just before buttons.css (which stays last, the one source of truth for
 * buttons). It copies the family app's design
 * language (public/family/family.css) into the portal; it does not change layout, behaviour or what any page shows:
 *   - the faded AI head from the banner behind every page (the family app has it behind every screen);
 *   - white cards with a 16px radius, a 1px #DDE3EE line and the app's soft shadow; card titles keep the owner's
 *     navy title bar (18 Nov 2026; the app's header is the same navy) in the app's sentence case;
 *   - page titles with the app's short orange bar under them;
 *   - the open menu item is marked with the app's orange, as the app marks the open tab;
 *   - number tiles are app cards with the app's small grey capital labels;
 *   - (the slanted "Staff portal" sign-in banner was removed on 28 Nov 2026: the sign-in screen is now the calm card in
 *     operations.css, owner: "not professional enough for a school login").
 * Light theme only: the dark theme keeps its own rules.
 */

html#mk4s:not([data-theme="dark"]) {
  --fam-navy: #0A1A4F;
  --fam-blue: #0570DB;
  --fam-accent: #D44416;
  --fam-ink: #0E1630;
  --fam-mut: #4A5468;
  --fam-line: #DDE3EE;
  --fam-bg: #F5F7FB;
  --fam-card-shadow: 0 6px 16px rgba(10, 26, 79, .06);
}

/* ---- The page: the app's light background with the faded AI head, fixed so it stays put while the page scrolls. */
html#mk4s:not([data-theme="dark"]) body:not(.signin-mode) #workspace { position: relative; isolation: isolate; background-color: var(--fam-bg); min-height: 100vh; min-height: 100dvh; }
html#mk4s:not([data-theme="dark"]) body:not(.signin-mode) #workspace::before {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  right: -4vw; bottom: -6vh; width: min(46vw, 720px); aspect-ratio: 1 / 1;
  background: url("/operations/assets/ai-head.webp") right bottom / contain no-repeat;
  opacity: .06;
}
@media print { html#mk4s body #workspace::before { display: none; } }
html#mk4s body.projector #workspace::before { display: none; }   /* wall screens stay plain */

/* ---- Cards: the app's .cd card. */
html#mk4s:not([data-theme="dark"]) body:not(.signin-mode) #workspace .panel {
  background: #fff; border: 1px solid var(--fam-line); border-radius: 16px; box-shadow: var(--fam-card-shadow); background-image: none;
}
/* Card titles keep the navy title bar the owner asked for on 18 Nov 2026 ("so you can tell they are a heading"): the
   family app's own header is the same navy. To match the app they take its sentence case and rounded corners. */
html#mk4s:not([data-theme="dark"]) body:not(.signin-mode) #workspace .panel > .panel-head { border-radius: 16px 16px 0 0; }
html#mk4s:not([data-theme="dark"]) body:not(.signin-mode) #workspace .panel > .panel-head :is(h2, h3) {
  text-transform: none; letter-spacing: 0; font-size: 1.1rem; font-weight: 800;
}

/* ---- Page titles: the app's short orange bar. */
html#mk4s:not([data-theme="dark"]) body:not(.signin-mode) .page-head h1 { color: var(--fam-navy); }
html#mk4s:not([data-theme="dark"]) body:not(.signin-mode) .page-head h1::after { background: var(--fam-accent); border-radius: 3px; box-shadow: none; }

/* ---- Buttons are NOT set here: buttons.css stays the one source of truth for buttons and is loaded after this file.
   Its raised blue primary and outlined secondary already match the app's buttons (blue, with a hard bottom edge). */

/* ---- The open menu item: marked in the app's orange, as the app marks the open tab. */
html#mk4s:not([data-theme="dark"]) body:not(.signin-mode) .sidebar .nav-item[aria-current="page"] {
  box-shadow: inset 4px 0 0 var(--fam-accent), 0 6px 14px rgba(0, 0, 0, .25);
}
html#mk4s:not([data-theme="dark"]) body:not(.signin-mode) .sidebar .nav-item[aria-current="page"] svg { color: #FF8A4C; }

/* ---- Number tiles: app cards, with the app's small grey capital label. The coloured left edge still shows the state. */
html#mk4s:not([data-theme="dark"]) body:not(.signin-mode) #workspace .stat-tile {
  background: #fff; border: 1px solid var(--fam-line); border-left-width: 4px; border-radius: 16px; box-shadow: var(--fam-card-shadow);
}
