/* Resqon theme: Night.
   The same token names as light.css, scoped to [data-theme="night"] (set on <html> by js/theme.js
   from the member's choice: Light, Night or follow the device). Navy nights rather than black, as the
   phone's dark theme (app_colors.dart RqColors.dark): change both together. Statuses turn light on
   dark tints, so a filled status colour carries dark text (--rq-on-status); the *-fill tokens are the
   ones that stay deep enough for white text. */
[data-theme="night"] {
    color-scheme: dark;

    /* Ground and surfaces */
    --rq-bg: #0b1722;
    --rq-surface: #111f2d;
    --rq-surface-alt: #162636;
    --rq-surface-sunk: #0a1520;
    --rq-border: #24384d;
    --rq-border-soft: #1c2e41;
    --rq-border-strong: #33495f;

    /* Text */
    --rq-text: #e6edf3;
    --rq-text-rgb: 230, 237, 243;
    --rq-text-muted: #9aabbd;
    --rq-text-muted-rgb: 154, 171, 189;
    --rq-placeholder: #6b7d90;
    --rq-on-strong: #ffffff;
    --rq-on-status: #0b1722;          /* text on a filled status colour (badges) */

    /* "Navy" is the strong ink: near-white at night. Navy surfaces with white text use --rq-hero. */
    --rq-navy: #e6edf3;
    --rq-navy-rgb: 230, 237, 243;
    --rq-navy-deep: #24384d;
    --rq-hero: #1c2e41;
    --rq-hero-deep: #142333;
    --rq-alert: #7e0e23;
    --rq-primary: #e6edf3;
    --rq-primary-rgb: 230, 237, 243;
    --rq-primary-hover: #ffffff;
    --rq-on-primary: #0b1722;
    --rq-check: #3b82f6;              /* ticked checkboxes and radios (white tick on it) */

    /* Brand red */
    --rq-brand: #ff4d62;
    --rq-brand-rgb: 255, 77, 98;
    --rq-brand-strong: #c81e33;
    --rq-brand-strong-rgb: 200, 30, 51;
    --rq-brand-pressed: #9b1529;
    --rq-brand-text: #ff6b7d;
    --rq-brand-tint: #372b3a;
    --rq-brand-tint-rgb: 55, 43, 58;
    --rq-brand-border: #6b3c4b;

    /* Links and focus */
    --rq-link: #7cb4fb;
    --rq-link-rgb: 124, 180, 251;
    --rq-link-hover: #a5cbfd;
    --rq-link-hover-rgb: 165, 203, 253;
    --rq-focus: #60a5fa;
    --rq-focus-ring: 0 0 0 3px rgba(96, 165, 250, .4);
    --rq-focus-ring-color: rgba(96, 165, 250, .4);

    /* States: text / tint (+ rgb for Tabler); tints are opaque mixes over the surface */
    --rq-success: #4ade80;  --rq-success-rgb: 74, 222, 128;   --rq-success-bg: #1a3e3a; --rq-success-bg-rgb: 26, 62, 58;
    --rq-success-strong: #bbf7d0;  --rq-success-border: #27684d;  --rq-success-line: #30885b;
    --rq-success-fill: #15803d;
    --rq-info: #60a5fa;     --rq-info-rgb: 96, 165, 250;      --rq-info-bg: #1e344e;    --rq-info-bg-rgb: 30, 52, 78;
    --rq-info-strong: #bfdbfe;     --rq-info-border: #2f527b;     --rq-info-line: #3c699e;
    --rq-pending: #fbbf24;  --rq-pending-rgb: 251, 191, 36;   --rq-pending-bg: #36392c; --rq-pending-bg-rgb: 54, 57, 44;
    --rq-pending-soft: #262d2c;  --rq-pending-line: #927728;  --rq-pending-strong: #fde68a;
    --rq-info-soft: #182b3f;
    --rq-warning: #fb923c;  --rq-warning-rgb: 251, 146, 60;   --rq-warning-bg: #36312f; --rq-warning-bg-rgb: 54, 49, 47;
    --rq-warning-pressed: #9a3412; --rq-warning-strong: #fed7aa;  --rq-warning-border: #6a4b33;
    --rq-warning-fill: #c2410c;
    --rq-danger: #f87171;   --rq-danger-rgb: 248, 113, 113;   --rq-danger-bg: #362c38;  --rq-danger-bg-rgb: 54, 44, 56;
    --rq-danger-pressed: #991b1b;  --rq-danger-strong: #fecaca;   --rq-danger-border: #693e47;
    --rq-danger-fill: #dc2626;  --rq-danger-fill-pressed: #b91c1c;  --rq-danger-deep: #7f1d1d;
    --rq-neutral: #94a3b8;  --rq-neutral-bg: #263443;         --rq-neutral-bg-rgb: 38, 52, 67;
    --rq-special: #c084fc;  --rq-special-rgb: 192, 132, 252;  --rq-special-bg: #2d2f4e; --rq-special-bg-rgb: 45, 47, 78;
    --rq-hosted-tint: #123f3d; --rq-hosted-ink: #5eead4;  /* a joint activity another station hosts */

    /* Tabler's other named colours */
    --rq-azure: #38bdf8;  --rq-azure-rgb: 56, 189, 248;   --rq-azure-bg: #17384d;  --rq-azure-bg-rgb: 23, 56, 77;
    --rq-lime: #a3e635;   --rq-lime-rgb: 163, 230, 53;    --rq-lime-bg: #283f2e;   --rq-lime-bg-rgb: 40, 63, 46;
    --rq-teal: #2dd4bf;   --rq-teal-rgb: 45, 212, 191;    --rq-teal-bg: #153c44;   --rq-teal-bg-rgb: 21, 60, 68;
    --rq-cyan: #22d3ee;   --rq-cyan-rgb: 34, 211, 238;    --rq-cyan-bg: #143c4c;   --rq-cyan-bg-rgb: 20, 60, 76;
    --rq-indigo: #818cf8; --rq-indigo-rgb: 129, 140, 248; --rq-indigo-bg: #23304d; --rq-indigo-bg-rgb: 35, 48, 77;
    --rq-pink: #f472b6;   --rq-pink-rgb: 244, 114, 182;   --rq-pink-bg: #352c43;   --rq-pink-bg-rgb: 53, 44, 67;
    --rq-event: #fb923c;

    /* Ranks and mission roles: the same as by day, but the leader's navy would vanish on navy */
    --rq-rank-beginner: #94a3b8;
    --rq-rank-searcher: #16a34a;
    --rq-rank-intern: #2563eb;
    --rq-rank-rescuer: #dc2626;
    --rq-rank-instructorcandidate: #7c3aed;
    --rq-rank-instructor: #ca8a04;
    --rq-role-leader: #33495f;
    --rq-role-coordinator: #0e7490;
    --rq-role-recorder: #475569;

    /* Shadows */
    --rq-shadow-float: 0 16px 36px -12px rgba(0, 0, 0, .7);
    --rq-shadow-control: 0 1px 3px rgba(0, 0, 0, .5);
    --rq-shadow-map: 0 1px 4px rgba(0, 0, 0, .5);
    --rq-backdrop: #000000;

    /* The rail (sidebar) */
    --rq-sidebar-bg: #0e1b28;
    --rq-sidebar-ink: #ffffff;
    --rq-sidebar-text: rgba(255, 255, 255, .72);
    --rq-sidebar-label: rgba(255, 255, 255, .45);
    --rq-sidebar-line: rgba(255, 255, 255, .08);
    --rq-sidebar-hover: rgba(255, 255, 255, .06);
    --rq-sidebar-field: rgba(255, 255, 255, .06);
    --rq-sidebar-field-border: rgba(255, 255, 255, .12);
    --rq-sidebar-active: rgba(255, 77, 98, .16);
    --rq-sidebar-badge-bg: rgba(255, 77, 98, .18);
    --rq-sidebar-badge-text: #ffb3bd;
    --rq-sidebar-contour: rgba(255, 255, 255, .05);
    --rq-sidebar-scroll: rgba(255, 255, 255, .18);

    /* On the navy cards */
    --rq-on-navy-muted: rgba(255, 255, 255, .74);
    --rq-on-navy-line: rgba(255, 255, 255, .08);
    --rq-on-navy-border: rgba(255, 255, 255, .3);
    --rq-on-navy-fill: rgba(255, 255, 255, .12);
    --rq-running-row: #23202d;
}
