/* Sapera web's look, the default skin: the colours of Core/core-ui/theme/theme.css (light and dark), Bootstrap 3's
   controls, the blue header, Sapera's blue screen header on a panel. Loaded after app.css; only tokens and the few rules
   that are Sapera's own. The dark theme follows the browser unless the user picked one (data-theme on <html>, set by
   theme.js). skin-app.css, loaded after this file, overrides the tokens where <html> has data-skin="app"; theme.js then
   sets data-theme="light", so the dark blocks below never apply to it. */

:root {
    /* Sapera's font stack and sizes (measured in Sapera web 20-11-2026: body 12.22 px, fields 13 px, 30 px rows). */
    --st-font: raleway, helvetica, verdana, sans-serif;
    --st-font-size: 12.22px;
    --st-control-font-size: 13px;
    --st-input-pad: 4px 8px;
    --st-button-pad: 4px 10px;
    --st-tab-pad: 5px 12px 4px;
    --st-tab-font-size: 12px;
    --st-tab-mark: 2px;
    --st-cell-pad: 6px 8px;
    --st-grid-head-weight: normal;
    --st-mono: "Cascadia Mono", Consolas, Menlo, "DejaVu Sans Mono", "Courier New", monospace;
    --st-radius: 0;
    --st-control-radius: 4px;

    --st-bg: #dbdbdb;
    --st-surface: #ffffff;
    --st-panel: #f5f5f5;
    --st-text: #333333;
    --st-label: #4b5563;
    --st-muted: #777777;
    --st-text-disabled: #9b9b9b;
    --st-border: #dddddd;
    --st-border-strong: #cccccc;
    --st-card-border: transparent;
    --st-divider: #eeeeee;
    --st-input-bg: #ffffff;
    --st-input-border: #cccccc;
    --st-input-disabled-bg: #eeeeee;
    --st-input-inset: inset 0 1px 1px rgba(0, 0, 0, .075);
    --st-focus: #66afe9;
    --st-focus-ring: 0 0 8px rgba(102, 175, 233, .6);
    --st-button-bg: #ffffff;
    --st-button-hover: #e6e6e6;
    --st-button-hover-border: #adadad;

    --st-accent: #337ab7;
    --st-accent-border: #bcd3f5;
    --st-accent-fill: #337ab7;
    --st-accent-fill-border: #2e6da4;
    --st-accent-fill-hover: #286090;
    --st-on-accent: #ffffff;
    --st-link: #337ab7;
    --st-link-hover: #23527c;
    --st-selected: #d5e2ed;
    --st-hover: #f3f6f9;
    --st-zebra: #ffffff;

    --st-header-bg: #2f6da4;
    --st-header-text: #ffffff;
    --st-header-muted: rgba(255, 255, 255, .8);
    --st-header-border: transparent;
    --st-header-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    --st-header-sep: rgba(255, 255, 255, .35);
    --st-header-chip: rgba(255, 255, 255, .14);
    --st-header-chip-border: rgba(255, 255, 255, .3);
    --st-header-button: transparent;
    --st-header-button-border: transparent;
    --st-header-button-text: #ffffff;
    --st-header-button-hover: rgba(255, 255, 255, .15);
    --st-header-primary: #ffffff;
    --st-header-primary-text: #2f6da4;
    --st-header-primary-hover: #e6e6e6;

    /* A panel's heading as Bootstrap's panel-default; the blue is the header and the screen's toolbar strip. */
    --st-card-head-bg: #f5f5f5;
    --st-card-head-text: #333333;
    --st-card-head-border: #dddddd;
    --st-card-head-size: 14px;
    --st-card-head-weight: 600;
    --st-dialog-head-bg: #428bca;
    --st-dialog-head-text: #ffffff;

    --st-grid-head-bg: #ffffff;
    --st-grid-head-line: #cfd6dd;
    --st-grid-line: #e5e5e5;

    --st-good: #3c763d;
    --st-good-bg: #e7f4ea;
    --st-good-border: #b9dfc2;
    --st-good-fill: #3c763d;
    --st-bad: #a94442;
    --st-bad-bg: #f2dede;
    --st-bad-border: #ebccd1;
    --st-bad-fill: #d9534f;
    --st-bad-fill-hover: #c9302c;
    --st-warn: #8a6d3b;
    --st-warn-bg: #fcf8e3;
    --st-warn-border: #faebcc;
    --st-changed-bg: #fbf3d0;

    /* The desktop's StatusBrushes. */
    --st-row-new: #20b2aa;
    --st-row-changed: #fafad2;
    --st-row-unchanged: #808080;
    --st-row-failed: #f08080;
    --st-inactive: #d3d3d3;

    --st-shadow: 2px 2px 6px rgba(0, 0, 0, .18);
    --st-shadow-raised: 3px 3px 10px 1px rgba(0, 0, 0, .25);
    --st-popup-shadow: 0 6px 12px rgba(0, 0, 0, .175);
    --st-backdrop: rgba(0, 0, 0, .5);
    --st-tooltip-bg: #333333;
    --st-tooltip-text: #ffffff;
    --st-code-bg: #eeeeee;
    --st-band-blend: multiply;

    --st-login-bg: linear-gradient(160deg, #f5f8fb 0%, #e7edf3 60%, #dde6ee 100%);
    --st-login-card-bg: #ffffff;
    --st-login-radius: 14px;
    --st-login-shadow: 0 18px 45px rgba(31, 45, 57, .10), 0 2px 8px rgba(31, 45, 57, .06);
    --st-login-accent: #54a0e0;
    --st-login-accent-hover: #3f8ed3;
    --st-login-accent-ring: rgba(84, 160, 224, .18);
    --st-login-accent-glow: rgba(84, 160, 224, .35);
}

/* Sapera's dark theme (theme.css :root.cr-theme-dark), twice: chosen, and as the browser when nothing is chosen. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --st-bg: #1b1e21;
    --st-surface: #24282c;
    --st-panel: #2b3035;
    --st-text: #dee2e6;
    --st-label: #a9b4bf;
    --st-muted: #98a1a9;
    --st-text-disabled: #6d757d;
    --st-border: #3a4047;
    --st-border-strong: #4a525a;
    --st-divider: #343a40;
    --st-input-bg: #2b3035;
    --st-input-border: #4a525a;
    --st-input-disabled-bg: #24282c;
    --st-input-inset: none;
    --st-focus: #4a90d9;
    --st-focus-ring: 0 0 0 3px rgba(74, 144, 217, .3);
    --st-button-bg: #2b3035;
    --st-button-hover: #32383e;
    --st-button-hover-border: #4a525a;
    --st-accent: #4a90d9;
    --st-accent-border: #3d6f9e;
    --st-accent-fill: #2a5580;
    --st-accent-fill-border: #2a5580;
    --st-accent-fill-hover: #326495;
    --st-link: #6aa9e6;
    --st-link-hover: #8cbdee;
    --st-selected: #22384c;
    --st-hover: #32383e;
    --st-zebra: #24282c;
    --st-header-bg: #22303c;
    --st-header-shadow: 0 1px 3px rgba(0, 0, 0, .6);
    --st-header-button: transparent;
    --st-header-button-border: transparent;
    --st-header-button-text: #dee2e6;
    --st-header-button-hover: rgba(255, 255, 255, .1);
    --st-header-primary: #2a5580;
    --st-header-primary-text: #ffffff;
    --st-header-primary-hover: #326495;
    --st-card-head-bg: #2b3035;
    --st-card-head-text: #dee2e6;
    --st-card-head-border: #3a4047;
    --st-dialog-head-bg: #2c5f8f;
    --st-grid-head-bg: #24282c;
    --st-grid-head-line: #4a525a;
    --st-grid-line: #343a40;
    --st-good: #81c784;
    --st-good-bg: #27401f;
    --st-good-border: #3d5a34;
    --st-good-fill: #3a7d3d;
    --st-bad: #e57373;
    --st-bad-bg: #4d2424;
    --st-bad-border: #6b3a3a;
    --st-bad-fill: #a33f3c;
    --st-bad-fill-hover: #b84a46;
    --st-warn: #e0b252;
    --st-warn-bg: #473a1d;
    --st-warn-border: #63512c;
    --st-changed-bg: #473a1d;
    --st-row-new: #1d6b66;
    --st-row-changed: #4a4626;
    --st-row-unchanged: #4b5157;
    --st-row-failed: #7a2c2c;
    --st-inactive: #3a3f44;
    --st-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    --st-shadow-raised: 0 4px 14px rgba(0, 0, 0, .7);
    --st-popup-shadow: 0 6px 16px rgba(0, 0, 0, .6);
    --st-backdrop: rgba(0, 0, 0, .65);
    --st-tooltip-bg: #dee2e6;
    --st-tooltip-text: #1b1e21;
    --st-code-bg: #32383e;
    --st-band-blend: screen;
    --st-login-bg: linear-gradient(160deg, #22282e 0%, #1b1e21 60%, #16191c 100%);
    --st-login-card-bg: #2f353b;
    --st-login-shadow: 0 18px 45px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
    --st-login-accent: #3a78b5;
    --st-login-accent-hover: #4586c6;
    --st-login-accent-ring: rgba(74, 144, 217, .3);
    --st-login-accent-glow: rgba(74, 144, 217, .25);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --st-bg: #1b1e21;
        --st-surface: #24282c;
        --st-panel: #2b3035;
        --st-text: #dee2e6;
        --st-label: #a9b4bf;
        --st-muted: #98a1a9;
        --st-text-disabled: #6d757d;
        --st-border: #3a4047;
        --st-border-strong: #4a525a;
        --st-divider: #343a40;
        --st-input-bg: #2b3035;
        --st-input-border: #4a525a;
        --st-input-disabled-bg: #24282c;
        --st-input-inset: none;
        --st-focus: #4a90d9;
        --st-focus-ring: 0 0 0 3px rgba(74, 144, 217, .3);
        --st-button-bg: #2b3035;
        --st-button-hover: #32383e;
        --st-button-hover-border: #4a525a;
        --st-accent: #4a90d9;
        --st-accent-border: #3d6f9e;
        --st-accent-fill: #2a5580;
        --st-accent-fill-border: #2a5580;
        --st-accent-fill-hover: #326495;
        --st-link: #6aa9e6;
        --st-link-hover: #8cbdee;
        --st-selected: #22384c;
        --st-hover: #32383e;
        --st-zebra: #24282c;
        --st-header-bg: #22303c;
        --st-header-shadow: 0 1px 3px rgba(0, 0, 0, .6);
        --st-header-button: transparent;
        --st-header-button-border: transparent;
        --st-header-button-text: #dee2e6;
        --st-header-button-hover: rgba(255, 255, 255, .1);
        --st-header-primary: #2a5580;
        --st-header-primary-text: #ffffff;
        --st-header-primary-hover: #326495;
        --st-card-head-bg: #2b3035;
        --st-card-head-text: #dee2e6;
        --st-card-head-border: #3a4047;
        --st-dialog-head-bg: #2c5f8f;
        --st-grid-head-bg: #24282c;
        --st-grid-head-line: #4a525a;
        --st-grid-line: #343a40;
        --st-good: #81c784;
        --st-good-bg: #27401f;
        --st-good-border: #3d5a34;
        --st-good-fill: #3a7d3d;
        --st-bad: #e57373;
        --st-bad-bg: #4d2424;
        --st-bad-border: #6b3a3a;
        --st-bad-fill: #a33f3c;
        --st-bad-fill-hover: #b84a46;
        --st-warn: #e0b252;
        --st-warn-bg: #473a1d;
        --st-warn-border: #63512c;
        --st-changed-bg: #473a1d;
        --st-row-new: #1d6b66;
        --st-row-changed: #4a4626;
        --st-row-unchanged: #4b5157;
        --st-row-failed: #7a2c2c;
        --st-inactive: #3a3f44;
        --st-shadow: 0 1px 4px rgba(0, 0, 0, .6);
        --st-shadow-raised: 0 4px 14px rgba(0, 0, 0, .7);
        --st-popup-shadow: 0 6px 16px rgba(0, 0, 0, .6);
        --st-backdrop: rgba(0, 0, 0, .65);
        --st-tooltip-bg: #dee2e6;
        --st-tooltip-text: #1b1e21;
        --st-code-bg: #32383e;
        --st-band-blend: screen;
        --st-login-bg: linear-gradient(160deg, #22282e 0%, #1b1e21 60%, #16191c 100%);
        --st-login-card-bg: #2f353b;
        --st-login-shadow: 0 18px 45px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
        --st-login-accent: #3a78b5;
        --st-login-accent-hover: #4586c6;
        --st-login-accent-ring: rgba(74, 144, 217, .3);
        --st-login-accent-glow: rgba(74, 144, 217, .25);
    }
}

/* Inside Sapera (?embed=sapera): Sapera's own blue header and menu stand around the frame, so the toolbar becomes the
   screen's toolbar - Sapera's lighter blue strip of context buttons (--cr-toolbar-bg), not a second header. */
:root[data-embed]:not([data-skin="app"]) .toolbar {
    --st-header-bg: #3c7bc3;
    --st-header-button: transparent;
    --st-header-button-border: transparent;
    --st-header-button-text: #ffffff;
    --st-header-button-hover: #5894d8;
    --st-header-primary: transparent;
    --st-header-primary-text: #ffffff;
    --st-header-primary-hover: #5894d8;
    min-height: 40px;
    padding: 0 8px;
    gap: 2px;
    box-shadow: none;
}
/* Sapera's toolbar labels: white text on the strip, no box, a lighter blue under the mouse. */
:root[data-embed]:not([data-skin="app"]) .toolbar button, :root[data-embed]:not([data-skin="app"]) .toolbar a.button { min-height: 40px; padding: 1px 7px; border-radius: 0; font-size: var(--st-font-size); }
:root[data-embed][data-theme="dark"]:not([data-skin="app"]) .toolbar { --st-header-bg: #2a4a6b; --st-header-button-hover: #35597d; --st-header-primary-hover: #35597d; }
@media (prefers-color-scheme: dark) { :root[data-embed]:not([data-theme="light"]):not([data-skin="app"]) .toolbar { --st-header-bg: #2a4a6b; --st-header-button-hover: #35597d; --st-header-primary-hover: #35597d; } }

/* Sapera's logo for the dark theme on the login card (its own file, as Sapera's login). */
:root[data-theme="dark"]:not([data-skin="app"]) .login-logo-light { display: none; }
:root[data-theme="dark"]:not([data-skin="app"]) .login-logo-dark { display: inline; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]):not([data-skin="app"]) .login-logo-light { display: none; }
    :root:not([data-theme="light"]):not([data-skin="app"]) .login-logo-dark { display: inline; }
}
