/* ============================================================================
   COLOUR SCHEME - "Navy"

   A second complete palette for the app: navy wherever the default scheme has
   plum. Brand reference: the CollectPlus logo and www.collectplus.com (navy
   #17335F, deep navy #0C1F3D).

   ONE BRAND HUE, as in the default scheme. The green of the logo's plus sign
   is deliberately NOT part of it. On screen green means "valid / done" and
   orange means "this needs you"; a menu drawn in either reads as a column of
   statuses (owner, 2026-10-01). So the rail icons are the navy one step
   lighter - the move app.css makes with plum - and ColorSchemeTests holds
   every scheme to it: a brand colour must stay clear of the hue of every
   colour that carries a meaning.

   THIS FILE REDEFINES TOKENS AND NOTHING ELSE. app.css is still loaded first
   and still holds every rule; it defines each --app-* token for the default
   plum scheme, and the blocks below give the same tokens other values. No
   selector other than :root, no property other than an --app-* token. A rule
   in here would be a second place where the app is styled, and the next scheme
   would not have it.

   HOW IT IS SWITCHED ON. Services/Content/ColorSchemeService links this file
   after the app's own stylesheets when the installation's scheme is "navy": a
   one-word wwwroot\CUSTOM\theme.txt, or the product default. See that class.

   THE SAME THREE BLOCKS AS app.css, for the same reason: light on :root; dark
   under the prefers-color-scheme media query for the "system" setting, and
   again under [data-theme="dark"] for an explicit choice. The two dark blocks
   must stay identical. A token missing from a block is not an error - the app
   falls back to the plum value for that token in that theme - but it is a plum
   fleck on a navy screen, so ColorSchemeTests fails on it.

   WHAT THE SCHEME KEEPS FROM app.css, on purpose:
   - Success (green), attention (orange), warning and danger. "Valid", "this
     needs you" and the two severities are not brand colours; they mean the
     same thing, and so look the same, in any scheme.
   - The SQL editor's syntax colours (SSMS's scheme), except the operator grey
     and the active-line wash, which are neutrals.
   - The radii, and in dark mode the shadows (black is black).

   WHAT IT CHANGES BESIDES THE BRAND COLOUR:
   - Every neutral. Same lightness as the plum scheme's, step for step, with
     the hue turned from warm to the navy's - so each grey still belongs to the
     accent, and every contrast ratio is carried over rather than re-won.
   - Info, the one status that moves: from blue to teal. Beside a navy primary
     the default scheme's info blue reads as a second primary (26 degrees of
     hue from the navy; the teal is 54).
   - Tertiary ink (--app-ink-3) is still text, here as in app.css: 4.5:1 on
     every surface a caption or a hint sits on, a grid header included.

   Every foreground/background pair the app paints clears WCAG AA in BOTH
   themes: 4.5:1 for text, 3:1 for icons and control parts. ColorSchemeTests
   (ICCOBlazorApp1.Tests) measures the pairs for app.css and for every file in
   this folder, so a value changed here that breaks one fails the suite.
   ============================================================================ */
:root {
  /* --- Brand ------------------------------------------------------------- */
  --app-primary:         #17335F;    /* navy: actions, links, selection */
  --app-primary-rgb:     23, 51, 95;
  --app-primary-hover:   #0D264B;
  --app-primary-darker:  #0C1F3D;    /* the deep navy of the marketing site */
  --app-primary-light:   #204278;
  --app-primary-tint:    rgba(23, 51, 95, 0.14);
  --app-primary-soft:    #D6E4F8;    /* selected nav row, selected grid row */
  --app-primary-softer:  #E8EEF6;
  --app-primary-ink:     #102950;    /* text/icon ON a soft navy surface */
  --app-on-primary:      #FFFFFF;    /* 12.5:1 on --app-primary */
  --app-on-status:       #FFFFFF;    /* ink on a status FILL; flips in dark */

  /* --- Surfaces ---------------------------------------------------------- */
  --app-ground:          #F4F7FA;
  --app-surface:         #FFFFFF;
  --app-surface-2:       #EDF0F5;
  --app-surface-2-rgb:   237, 240, 245;
  --app-header:          #FFFFFF;
  --app-rail:            #F0F3F8;
  --app-rail-ink:        #303947;
  --app-rail-hover:      #DFE7F5;

  /* --- Grid rows with a meaning (the payment schedule's past and closed points) */
  --app-row-past:        #E9EEF5;
  --app-row-closed:      #E2E4E8;

  /* --- Ink and rules ----------------------------------------------------- */
  --app-ink:             #212732;
  --app-ink-rgb:         33, 39, 50;
  --app-ink-2:           #52627A;
  --app-ink-2-rgb:       82, 98, 122;
  --app-ink-3:           #636D7D;    /* 4.6:1 on --app-surface-2; #6C7787 was 4.0:1 there */
  --app-rule:            #D9E1EB;
  --app-rule-strong:     #C9D1DE;

  --app-base-50:         #FFFFFF;
  --app-base-400:        #C4CBD5;
  --app-base-500:        #99A1AF;
  --app-base-900:        #151C26;

  /* --app-neutral itself is var(--app-ink-2) in app.css and follows it; these are its literals. */
  --app-neutral-rgb:     82, 98, 122;
  --app-neutral-dark:    #445267;
  --app-neutral-darker:  #344053;
  --app-neutral-tint:    rgba(82, 98, 122, 0.16);

  /* --- Status: only info moves (teal); the rest is app.css's --------------- */
  --app-info: #0D6F78; --app-info-rgb: 13, 111, 120;
  --app-info-dark: #025F67; --app-info-light: #12848E;
  --app-info-soft: #DCF1F3; --app-info-ink: #035259;
  --app-info-tint:       rgba(13, 111, 120, 0.14);

  /* --- Duotone icon tones ------------------------------------------------- */
  --app-icon-1:          #384354;    /* content icons: quiet, cool neutral */
  --app-icon-2:          #B7C0D0;
  --app-rail-icon-1:     #3D5B8A;    /* rail icons: the navy, one step lighter */
  --app-rail-icon-2:     #B7C0D0;

  /* --- Chart series: the navy first, then the same cool hues as app.css ---- */
  --app-chart-1:         #3662A7;    /* blue, the brand hue        6.1:1 */
  --app-chart-2:         #0A999F;    /* teal                       3.5:1 */
  --app-chart-3:         #872566;    /* magenta                    8.4:1 */
  --app-chart-4:         #8F7CE3;    /* lavender                   3.4:1 */
  --app-chart-5:         #613897;    /* violet                     8.3:1 */
  --app-chart-6:         #D270B8;    /* pink                       3.1:1 */
  --app-chart-7:         #30AFF8;    /* sky                        2.4:1 */
  --app-chart-8:         #A84484;    /* magenta, a step lighter    5.5:1 */

  /* --- SQL editor: only its two neutrals ----------------------------------- */
  --app-sql-operator:    #52627A;
  --app-sql-activeline:  rgba(33, 39, 50, 0.05);

  /* --- Effects ------------------------------------------------------------ */
  --app-focus-ring:      0 0 0 3px rgba(23, 51, 95, 0.22);
  --app-shadow-card:     0 1px 2px rgba(33, 39, 50, 0.06), 0 8px 24px -16px rgba(33, 39, 50, 0.28);
  --app-shadow-hover:    0 2px 4px rgba(33, 39, 50, 0.08), 0 12px 28px -14px rgba(33, 39, 50, 0.34);
}

/* ============================================================================
   DARK THEME

   As in app.css, the navy inverts rather than dims: #17335F on a dark ground
   is unreadable, so dark uses #A8C9FD and flips --app-on-primary to the deep
   navy for text sitting ON that fill.

   #A8C9FD is two steps lighter than the first cut (#90B3EA), and the whole
   family moved with it (owner, 2026-10-01): the menu titles and icons wanted
   more presence on the dark rail. It is the action colour too, so links and
   filled buttons are that much lighter.
   ============================================================================ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --app-primary:         #A8C9FD;
    --app-primary-rgb:     168, 201, 253;
    --app-primary-hover:   #CADEFE;
    --app-primary-darker:  #DBE9FF;
    --app-primary-light:   #8FB4ED;
    --app-primary-tint:    rgba(168, 201, 253, 0.18);
    --app-primary-soft:    #203250;
    --app-primary-softer:  #19263A;
    --app-primary-ink:     #D9E8FF;
    --app-on-primary:      #0C1F3D;
    --app-on-status:       #11161E;

    --app-ground:          #10151D;
    --app-surface:         #161D28;
    --app-surface-2:       #1C2532;
    --app-surface-2-rgb:   28, 37, 50;
    --app-header:          #161D28;
    --app-rail:            #18202C;
    --app-rail-ink:        #CAD2DD;
    --app-rail-hover:      #1E2B3F;

    --app-row-past:        #1B2431;
    --app-row-closed:      #232A35;

    --app-ink:             #E3E8EE;
    --app-ink-rgb:         227, 232, 238;
    --app-ink-2:           #99A4B6;
    --app-ink-2-rgb:       153, 164, 182;
    --app-ink-3:           #818D9F;
    --app-rule:            #263040;
    --app-rule-strong:     #344155;

    --app-base-50:         #161D28;
    --app-base-400:        #39465A;
    --app-base-500:        #5C697E;
    --app-base-900:        #EFF2F7;

    --app-neutral:         #99A4B6;
    --app-neutral-rgb:     153, 164, 182;
    --app-neutral-dark:    #AFB8C7;
    --app-neutral-darker:  #C6CED9;
    --app-neutral-tint:    rgba(153, 164, 182, 0.18);

    --app-info: #5FBDC7; --app-info-rgb: 95, 189, 199;
    --app-info-dark: #83CED6; --app-info-light: #49A5B0;
    --app-info-soft: #0C2D30; --app-info-ink: #A3DBE1;
    --app-info-tint:       rgba(95, 189, 199, 0.18);

    --app-icon-1:          #A9B3C3;
    --app-icon-2:          #485466;
    --app-rail-icon-1:     #A8C9FD;
    --app-rail-icon-2:     #4C586C;

    --app-chart-1:         #709FE9;
    --app-chart-2:         #03D4DC;
    --app-chart-3:         #D36CAC;
    --app-chart-4:         #725EC2;
    --app-chart-5:         #ADB3FF;
    --app-chart-6:         #A74990;
    --app-chart-7:         #3A6FC4;
    --app-chart-8:         #FD91D2;

    --app-sql-operator:    #99A4B6;

    --app-focus-ring:      0 0 0 3px rgba(168, 201, 253, 0.30);
  }
}

:root[data-theme="dark"] {
  --app-primary:         #A8C9FD;
  --app-primary-rgb:     168, 201, 253;
  --app-primary-hover:   #CADEFE;
  --app-primary-darker:  #DBE9FF;
  --app-primary-light:   #8FB4ED;
  --app-primary-tint:    rgba(168, 201, 253, 0.18);
  --app-primary-soft:    #203250;
  --app-primary-softer:  #19263A;
  --app-primary-ink:     #D9E8FF;
  --app-on-primary:      #0C1F3D;
  --app-on-status:       #11161E;

  --app-ground:          #10151D;
  --app-surface:         #161D28;
  --app-surface-2:       #1C2532;
  --app-surface-2-rgb:   28, 37, 50;
  --app-header:          #161D28;
  --app-rail:            #18202C;
  --app-rail-ink:        #CAD2DD;
  --app-rail-hover:      #1E2B3F;

  --app-row-past:        #1B2431;
  --app-row-closed:      #232A35;

  --app-ink:             #E3E8EE;
  --app-ink-rgb:         227, 232, 238;
  --app-ink-2:           #99A4B6;
  --app-ink-2-rgb:       153, 164, 182;
  --app-ink-3:           #818D9F;
  --app-rule:            #263040;
  --app-rule-strong:     #344155;

  --app-base-50:         #161D28;
  --app-base-400:        #39465A;
  --app-base-500:        #5C697E;
  --app-base-900:        #EFF2F7;

  --app-neutral:         #99A4B6;
  --app-neutral-rgb:     153, 164, 182;
  --app-neutral-dark:    #AFB8C7;
  --app-neutral-darker:  #C6CED9;
  --app-neutral-tint:    rgba(153, 164, 182, 0.18);

  --app-info: #5FBDC7; --app-info-rgb: 95, 189, 199;
  --app-info-dark: #83CED6; --app-info-light: #49A5B0;
  --app-info-soft: #0C2D30; --app-info-ink: #A3DBE1;
  --app-info-tint:       rgba(95, 189, 199, 0.18);

  --app-icon-1:          #A9B3C3;
  --app-icon-2:          #485466;
  --app-rail-icon-1:     #A8C9FD;
  --app-rail-icon-2:     #4C586C;

  --app-chart-1:         #709FE9;
  --app-chart-2:         #03D4DC;
  --app-chart-3:         #D36CAC;
  --app-chart-4:         #725EC2;
  --app-chart-5:         #ADB3FF;
  --app-chart-6:         #A74990;
  --app-chart-7:         #3A6FC4;
  --app-chart-8:         #FD91D2;

  --app-sql-operator:    #99A4B6;

  --app-focus-ring:      0 0 0 3px rgba(168, 201, 253, 0.30);
}
