/**!
 * @file    staff_palette.css
 * @desc    THE color settings for the admin and teachers sites: every color their stylesheets use comes from here, by
 *          job (page, card, line, text, button fill, success, ...), never as a written-in value. Uses the same role
 *          names as the students palette (students/css/sw_palette.css), so the shared stylesheets and scripts, which
 *          read var(--c-...), work on all three sites.
 *          Loaded first by every page head, followed by the site's own css/staff_brand.css (its brand roles: admin
 *          slate blue, teachers purple). Symlinked into admin/css and teachers/css.
 *          Two palettes: light (the default, :root) and dark (html[data-theme="dark"], screen only, so printing always
 *          uses the light palette). Each site turns dark mode on with its own switch (shared/ssi/StaffThemeBoot.php;
 *          Site Settings admin_ / teachers_dark_mode_enabled and _theme_default; Light / Dark / Same as device in the user menu).
 *          Light values are the colors admin shows today, with near-duplicate greys merged into one per job.
 *          Shadows: rgba(var(--c-shadow-rgb), <strength>) so their tint follows the palette.
 * @version v7 2026-12-02 - Initial version (admin + teachers dark mode, step 1: role audit of admin's colors).
 * @version v7 2026-12-02 - Hard-to-read colors fixed (owner): --c-text-mute #616d77, the coral hover a brick coral
 *          #b8443f (split into --c-hover, a fill, and --c-hover-text), --c-site-admin #597589; the students marker
 *          --c-site-student is the students teal (#017f78) instead of the old green.
 * @version v7 2026-12-03 - Comment only: the description says dark mode is live on both sites (it said "not switched on yet").
 * @author  Charlie Samra, Eigo Hanasou LLC
 * @see     admin/css/staff_brand.css, teachers/css/staff_brand.css (brand roles), students/css/sw_palette.css
 */

/* ---- LIGHT (default) ------------------------------------------------------------------------------------------- */
:root {
    /* surfaces */
    --c-page:         #e9eef2;   /* behind the cards, every page (the older pages had #eaeded, the newer #e9eef2: merged) */
    --c-surface:      #ffffff;   /* cards, panels, menus, inputs */
    --c-surface-2:    #f4f7f9;   /* quiet boxes inside a card, table heads, off-white rows (was #f4f7f9 / #f6f8fa / #f7f9fa / #fafbfc / #f5f8fa) */
    --c-surface-3:    #e9eef2;   /* light grey fills: chips, disabled, tracks, pressed (was #e6edf2 / #e8edf2 / #eef0f2 / #f0f3f5 / #e5e5e5) */
    --c-surface-old:  #e8e8e8;   /* the plain grey boxes on older pages (was #e8e8e8 / #e5e8e8 / #f2f2f2 / #f3f3f3) */
    --c-track:        #c3ccd6;   /* the track of an off switch, a progress bar (was #c3ccd6 / #777) */

    /* lines */
    --c-line-faint:   #eef1f3;   /* dividers inside a card (was #eef1f3 / #eef1f4 / #eef1f6) */
    --c-line:         #e1e6eb;   /* card and panel borders (was #e1e6eb / #e5e9ec / #e4e8eb / #e2e8f0 / #dddddd) */
    --c-line-mid:     #d4dce2;   /* table and section rules a step stronger (was #dae1e7 / #d9e0e6 / #d8dde2 / #d4dde3) */
    --c-line-strong:  #cccccc;   /* form fields, tables on older pages */
    --c-field-line:   #b8c2c9;   /* the edge of modern text boxes and selects */
    --c-line-bold:    #999999;   /* darker grey borders and rules (was #999 / #8c8b8b / #777 / #808080) */
    --c-line-ink:     #000000;   /* the black boxes and rules on older pages */

    /* text */
    --c-text:         #2c3e50;   /* headings and body text (slate) */
    --c-text-strong:  #1f2937;   /* near-black text (was #000 / #111 / #1f2937 / #222 / #26323b / #2f3a44) */
    --c-text-soft:    #3d5464;   /* intros, descriptions, table text (was #3d5464 / #34434f / #2f3e4a / #475467) */
    --c-text-faint:   #5a6b76;   /* labels, hints, meta (was #5a6b76 / #526879) */
    --c-text-mute:    #616d77;   /* lightest readable grey: footnotes, captions; 4.5:1 even on the grey page (was #6c7a85 / #6b7a85 / #6c757d / #6b7280, 3.8 to 4.4) */
    --c-text-pale:    #8a99a3;   /* deliberately pale: disabled, empty states, eyebrows (was #8a99a3 / #8a98a3 / #9aa6ae / #97a3ad / #8a9aa6) */
    --c-on-fill:      #ffffff;   /* text and icons on a colored fill (buttons, header, footer, badges) */
    --c-on-fill-rgb:  255, 255, 255;   /* see-through white on fills (header / footer links, menu hovers) */

    /* the coral accent: link and button hovers, rules under headings. A brick coral so it reads as text and carries
       white text (the old #eb7c7c / #eb7d7d was 2.7:1 either way; owner 2026-12-02: fix it) */
    --c-hover:        #b8443f;   /* hover FILL with white text: buttons (5.3:1) */
    --c-hover-text:   #b8443f;   /* hover as TEXT: links (5.3:1 on white, 4.5 on the grey page) */
    --c-accent:       #e54c4c;   /* stronger red-coral: tab and box tops (was #e54c4c / #ff5757 / #d96b6b) */
    --c-link:         #1565c0;   /* plain blue links (was #1565c0 / blue) */

    /* the menu bar under the header (white text on it) */
    --c-menubar:       #b8443f;
    --c-menubar-text:  #ffffff;
    --c-menubar-hover: #9c3631;

    /* status */
    --c-success:      #1e6636;   /* success text (was #1e6636 / #0e6630 / #24714a / #2e8b57) */
    --c-success-bg:   #f0f7f2;   /* (was #f0f7f2 / #f3faf5 / #e7f5ec / #e6f4ec / #e8f3ec) */
    --c-success-line: #b7dfc5;   /* (was #b7dfc5 / #c0e0cd / #cfe9d7) */
    --c-success-fill: #1e6636;   /* filled success buttons / badges, white text */
    --c-warn:         #8a5a08;   /* warning text (was #8a5a08 / #8a5200 / #b86d00) */
    --c-warn-bg:      #fdf3e0;   /* (was #fdf3e0 / #fff3d4 / #fff8e6 / #fffaf0 / #fff9ef) */
    --c-warn-line:    #f0d8a8;   /* (was #f0d8a8 / #fde6b8 / #ffe1a8) */
    --c-warn-fill:    #b45309;   /* filled warning badges, white text */
    --c-error:        #c0392b;   /* error text, required marks (was #c0392b / #b91c1c / #b42318 / red) */
    --c-error-deep:   #a83232;   /* dark red text in error boxes (was #a83232 / #a32a1f / #9b1c1c) */
    --c-error-bg:     #fff3f3;   /* (was #fff3f3 / #fff5f5 / #fef2f2 / #fff7f7 / #fdecea / #ffeaea) */
    --c-error-line:   #f5c6cb;   /* (was #f5c6cb / #f5c4c4 / #fbcaca / #f5cfca) */
    --c-danger:       #b03737;   /* delete / remove buttons, white text */
    --c-danger-hover: #8c2929;
    --c-mark:         rgba(255, 204, 0, 0.8);   /* highlighted text */
    --c-selection:    #b3d4fc;   /* text the reader selects with the mouse */

    /* the three sites: a fill with white text (the site badges in admin's Recent Activity) and a text color
       (the docs pages color each site's column and labels) */
    --c-site-admin:        #597589;   /* (was #5f7d92, 4.3:1) */
    --c-site-teacher:      #5134f1;
    --c-site-student:      #017f78;   /* the students teal, deep enough for white text (was the old green #0e6630; owner 2026-12-02) */
    --c-site-admin-text:   #597589;
    --c-site-teacher-text: #5134f1;
    --c-site-student-text: #017f78;

    /* the blog (Recent Activity and page-table badges) */
    --c-blog:         #a3175a;   /* text */
    --c-blog-bg:      #fdeaf3;
    --c-blog-line:    #f3c2da;

    /* category badges by hue (Recent Activity categories, traffic classes, error kinds): a text color and its pale
       background. Red / amber / green / grey categories use the status roles (error, warn, success, surface-3). */
    --c-cat-blue:       #1f4e8a;
    --c-cat-blue-bg:    #dde8f6;
    --c-cat-purple:     #5b21b6;
    --c-cat-purple-bg:  #ede9fe;
    --c-cat-pink:       #9f1239;
    --c-cat-pink-bg:    #fbd5de;
    --c-cat-orange:     #8a3b07;
    --c-cat-orange-bg:  #fdebd3;
    --c-cat-teal:       #0f766e;
    --c-cat-teal-bg:    #d1f5f0;

    /* severity strips (left edge of a finding): high = --c-error, medium and low below */
    --c-sev-medium:   #f59e0b;
    --c-sev-low:      #3b82f6;
    --c-star:         #f5a623;   /* the "most popular" star */

    /* a log console (dark in both palettes) */
    --c-console:      #0f172a;
    --c-console-text: #cbd5e1;

    /* message avatars: each sender's initial on one of these (picked from the name), white text; the same in dark */
    --c-avatar-1:  #5b7c99;
    --c-avatar-2:  #7c5b99;
    --c-avatar-3:  #995b7c;
    --c-avatar-4:  #5b9979;
    --c-avatar-5:  #996b5b;
    --c-avatar-6:  #5b9999;
    --c-avatar-7:  #7d8a5b;
    --c-avatar-8:  #8a5b7d;
    --c-avatar-9:  #4f6e88;
    --c-avatar-10: #88634f;

    /* chart series (Chart.js reads them with getComputedStyle): traffic classes and error kinds; the same in dark */
    --c-chart-human:    #18823e;
    --c-chart-attacker: #be123c;
    --c-chart-scraper:  #a21caf;
    --c-chart-stealth:  #b45309;
    --c-chart-good-bot: #2685cb;
    --c-chart-bad-bot:  #fc3026;
    --c-chart-scanner:  #fd8d14;
    --c-chart-tool:     #7c4dd6;
    --c-chart-unknown:  #9aa3ad;
    --c-chart-bug:      #dc2626;
    --c-chart-service:  #7c3aed;
    --c-chart-probe:    #f59e0b;
    --c-chart-auth:     #2685cb;
    --c-chart-info:     #9aa3ad;
    --c-chart-second:   #2685cb;   /* the second chart on a page (Top 5 Lessons; the first uses --c-brand) */

    /* the frame behind a diagram (Mermaid can't read the palette, so diagrams stay light like pictures; owner 2026-12-02) */
    --c-diagram:      #fbfcfd;

    /* other fills */
    --c-neutral-fill: #616d77;   /* grey badges with white text (5.3:1; was #6b7a85 / #888886) */
    --c-warn-on-fill: #f4d36a;   /* yellow text on a dark fill (table button hover) */

    /* tooltips */
    --c-tip:          #1f2937;   /* dark tooltip bubbles, white text */

    /* rich-text colors teachers can pick in the editor (.rt-*, read by the shared RichText.css): same as students */
    --c-rt-red:       #c0392b;
    --c-rt-green:     #1e7e34;
    --c-rt-blue:      #1565c0;
    --c-rt-orange:    #d35400;
    --c-rt-yellow:    #f5c518;
    --c-rt-purple:    #8e44ad;
    --c-rt-pink:      #d6336c;
    --c-rt-brown:     #8d5524;
    --c-rt-gray:      #6c757d;
    --c-rt-black:     #000000;
    --c-rt-white:     #ffffff;

    /* word usage pills (shared code, white text): same as students */
    --c-usage-common:   #01b9af;
    --c-usage-uncommon: #2b6cb0;
    --c-usage-rare:     #7a7f87;

    /* shadows and see-through twins: rgba(var(--c-x-rgb), alpha) */
    --c-shadow-rgb:   31, 52, 64;    /* a slate-leaning shadow (was 31,52,64 / 20,30,45 / 0,0,0 at low strength) */
    --c-black-rgb:    0, 0, 0;       /* backdrops behind pop-ups */
    --c-star-rgb:     180, 105, 14;
    --c-surface-rgb:  255, 255, 255;
    --c-text-rgb:     44, 62, 80;
    --c-error-rgb:    192, 57, 43;   /* see-through red: focus rings, delete-hover washes */
    --c-success-rgb:  30, 102, 54;   /* see-through green (the SweetAlert success ring) */
}

/* ---- DARK (draft; not switched on yet) -------------------------------------------------------------------------- */
@media screen {
html[data-theme="dark"] {
    color-scheme: dark;
    --c-page:         #0e1520;
    --c-surface:      #161f2b;
    --c-surface-2:    #1c2735;
    --c-surface-3:    #253241;
    --c-surface-old:  #1c2735;
    --c-track:        #3d4d61;
    --c-line-faint:   #212c3a;
    --c-line:         #2a3646;
    --c-line-mid:     #334253;
    --c-line-strong:  #3d4d61;
    --c-field-line:   #566b82;   /* 3:1 on the card */
    --c-line-bold:    #5f7187;
    --c-line-ink:     #7d8ea3;
    --c-text:         #e3e9f0;
    --c-text-strong:  #f1f5f9;
    --c-text-soft:    #bdc8d4;
    --c-text-faint:   #9fadbc;
    --c-text-mute:    #8e9cab;
    --c-text-pale:    #66768a;
    --c-on-fill:      #ffffff;
    --c-on-fill-rgb:  255, 255, 255;
    --c-hover:        #b8443f;   /* fill: white text 5.3:1 */
    --c-hover-text:   #f29a9a;   /* text: 7.8:1 on the card */
    --c-accent:       #e05555;
    --c-link:         #7fb0ff;
    --c-menubar:       #5a2523;
    --c-menubar-text:  #ffffff;
    --c-menubar-hover: #7a322f;
    --c-success:      #7fd6a0;
    --c-success-bg:   #15342a;
    --c-success-line: #2d5a43;
    --c-success-fill: #237245;
    --c-warn:         #f0c674;
    --c-warn-bg:      #342a14;
    --c-warn-line:    #6e5a2a;
    --c-warn-fill:    #a35a12;
    --c-error:        #ff9a8f;
    --c-error-deep:   #ffb0a8;
    --c-error-bg:     #3a1c1f;
    --c-error-line:   #6a2e33;
    --c-danger:       #b8404a;
    --c-danger-hover: #9c333c;
    --c-mark:         rgba(255, 204, 0, 0.35);
    --c-selection:    #2d4a6e;
    --c-site-admin:        #4f6b80;   /* fills: white text 5.6:1 or more */
    --c-site-teacher:      #5134f1;
    --c-site-student:      #0b6f6a;
    --c-site-admin-text:   #8fb0c6;   /* text: 4.5:1 or more on the card */
    --c-site-teacher-text: #a394ff;
    --c-site-student-text: #4fd6cd;
    --c-blog:         #f59ac4;
    --c-blog-bg:      #3a1a2b;
    --c-blog-line:    #6b2f4c;
    --c-cat-blue:       #93c5fd;
    --c-cat-blue-bg:    #172b48;
    --c-cat-purple:     #c4b5fd;
    --c-cat-purple-bg:  #2a2245;
    --c-cat-pink:       #f9a8c0;
    --c-cat-pink-bg:    #3d1a26;
    --c-cat-orange:     #fdba8c;
    --c-cat-orange-bg:  #3a2415;
    --c-cat-teal:       #5eead4;
    --c-cat-teal-bg:    #12302d;
    --c-sev-medium:   #f5b041;
    --c-sev-low:      #6ea8ff;
    --c-star:         #f8b84e;
    --c-console:      #0a0f1c;
    --c-diagram:      #e9eef3;   /* stays light: a soft panel so the light diagram is not glaring */
    --c-console-text: #cbd5e1;
    --c-neutral-fill: #55657a;
    --c-warn-on-fill: #f4d36a;
    --c-tip:          #3a4b60;
    --c-rt-red:       #ff8a7a;
    --c-rt-green:     #6fd08f;
    --c-rt-blue:      #6aa8ff;
    --c-rt-orange:    #ff9a4d;
    --c-rt-yellow:    #f5d040;
    --c-rt-purple:    #c58be0;
    --c-rt-pink:      #ff7aa8;
    --c-rt-brown:     #d6a070;
    --c-rt-gray:      #9aa8bb;
    --c-rt-black:     #f1f5f9;
    --c-rt-white:     #ffffff;
    --c-usage-common:   #01b9af;
    --c-usage-uncommon: #2f66b8;
    --c-usage-rare:     #5f6b7a;
    --c-shadow-rgb:   0, 0, 0;
    --c-black-rgb:    0, 0, 0;
    --c-star-rgb:     240, 192, 64;
    --c-surface-rgb:  22, 31, 43;
    --c-text-rgb:     227, 233, 240;
    --c-error-rgb:    255, 154, 143;
    --c-success-rgb:  127, 214, 160;
}
}
