/*
 * AgentCivil's brand (AGENTCIVIL-2 D3, D4, AC6 A1), one file for every host that wears it: the product
 * site, the licence portal (after tokens.css) and its administrator pages (after the admin kit's
 * admin.css). First its colours as the website's --bc-* tokens, light and dark (tokens.css keeps Barlow,
 * the type scale, spacing, radii and Bootstrap's mapping): a blueprint ink and the Britech add-in's own
 * blue, with one warm survey accent; each tool keeps the accent of its own window (--ac-britech,
 * --ac-bridge). Then the administrator kit's own tokens, then the brand's pieces: the mark, the wordmark,
 * the tools menu, the footer's. Each text colour meets 4.5:1 on its ground (AgentCivilBrandTest).
 */

:root {
    --bc-primary: #2e65d1;
    --bc-primary-hover: #2453b3;
    --bc-on-primary: #ffffff;
    --bc-primary-rgb: 46, 101, 209;
    --bc-brand: #f5a524;
    --bc-brand-strong: #8a5a00;
    --bc-brand-hover: #f7b84a;
    --bc-on-brand: #1f1400;
    --bc-primary-soft: #e9effb;
    --bc-link: #2553b5;
    --bc-link-hover: #1a3f8c;
    --bc-link-rgb: 37, 83, 181;
    --bc-link-hover-rgb: 26, 63, 140;
    --bc-bg: #ffffff;
    --bc-bg-soft: #f3f6fa;
    --bc-surface: #ffffff;
    --bc-surface-raised: #ffffff;
    --bc-border: #dbe2ec;
    --bc-border-strong: #c2ccda;
    --bc-band: #0e2240;
    --bc-band-text: #e8eefa;
    --bc-input-border: #c9d2df;
    --bc-text: #121a26;
    --bc-muted: #536074;
    --bc-dark: #0a1527;
    --bc-dark-text: #d2dae7;
    --bc-focus: rgba(46, 101, 209, 0.4);
    --bc-focus-outline: #2e65d1;
    --bc-header-bg: #ffffff;
    --bc-star-empty: #d4dae3;
    --bc-shadow-1: 0 1px 2px rgba(15, 25, 45, 0.06);
    --bc-shadow-2: 0 1px 2px rgba(15, 25, 45, 0.04), 0 12px 32px rgba(15, 25, 45, 0.08);
    --bc-shadow-3: 0 2px 4px rgba(15, 25, 45, 0.06), 0 20px 48px rgba(15, 25, 45, 0.16);
    --bc-photo-scrim-rgb: 6, 12, 24;
    --bc-on-photo-soft: #edf2fb;
    --bc-shadow-rgb: 15, 25, 45;
    --bc-switch-rgb: 118, 130, 150;
    --bc-banner-scrim-rgb: 10, 20, 38;
    --bc-tile-scrim-rgb: 8, 16, 32;
    --bc-footer-scrim-rgb: 6, 12, 24;
    --bc-footer-muted-rgb: 210, 218, 232;
    --bc-contact-scrim-rgb: 8, 15, 28;
    --bc-lightbox-bg: #080e1a;
    --bc-lightbox-text: #e4eaf5;
    --bc-lightbox-scrim-rgb: 6, 10, 18;
    --bc-lightbox-button-rgb: 9, 14, 26;

    /* AgentCivil's own: the blueprint band (the same ink in both themes), the logo's tile, and each tool. */
    --ac-ink: #0b1a33;
    --ac-ink-raised: #12264a;
    --ac-ink-text: #eef3fc;
    --ac-ink-muted: #aebbd1;
    --ac-ink-line: rgba(174, 187, 209, 0.14);
    --ac-ink-border: rgba(174, 187, 209, 0.24);
    --ac-accent: #f5a524;
    --ac-accent-rgb: 245, 165, 36;
    --ac-mark-tile: #0e2240;
    --ac-mark-line: #ffffff;
    --ac-britech: #2e65d1;
    --ac-britech-text: #2553b5;
    --ac-britech-soft: #e9effb;
    --ac-bridge: #c6613f;
    --ac-bridge-text: #a84f30;
    --ac-bridge-soft: #fbece5;
    --ac-bridge-button: #a84f30;
    --ac-bridge-button-hover: #8e4228;
    --ac-on-bridge: #ffffff;
    /* On the ink and on the footer, the same in both themes. */
    --ac-on-dark-accent: #8db2f4;
    --ac-mark-tile-on-dark: #1b3566;
}

[data-bs-theme="dark"] {
    --bc-primary: #6b9bf0;
    --bc-primary-hover: #8db2f4;
    --bc-on-primary: #07142c;
    --bc-primary-rgb: 107, 155, 240;
    --bc-primary-soft: #13223e;
    --bc-brand-strong: #f7b84a;
    --bc-link: #8db2f4;
    --bc-link-hover: #b4cdf8;
    --bc-link-rgb: 141, 178, 244;
    --bc-link-hover-rgb: 180, 205, 248;
    --bc-bg: #0b111d;
    --bc-bg-soft: #101828;
    --bc-surface: #131c2c;
    --bc-surface-raised: #192335;
    --bc-border: #243046;
    --bc-border-strong: #34425c;
    --bc-band: #0f1f3a;
    --bc-band-text: #e2e9f5;
    --bc-input-border: #33405a;
    --bc-text: #e3e9f3;
    --bc-muted: #98a4b8;
    --bc-dark: #070b14;
    --bc-dark-text: #c3ccdb;
    --bc-focus: rgba(107, 155, 240, 0.35);
    --bc-focus-outline: #6b9bf0;
    --bc-header-bg: #0b111d;
    --bc-star-empty: #33405a;

    --ac-ink: #070f1e;
    --ac-ink-raised: #0e1c36;
    --ac-mark-tile: #1b3566;
    --ac-britech: #6b9bf0;
    --ac-britech-text: #8db2f4;
    --ac-britech-soft: #13223e;
    --ac-bridge: #e8906f;
    --ac-bridge-text: #eea486;
    --ac-bridge-soft: #33221b;
    --ac-bridge-button: #e8906f;
    --ac-bridge-button-hover: #eea486;
    --ac-on-bridge: #2a1209;
}

/*
 * The administrator kit's own tokens (admin.css: a soft page under white cards, the sidebar, the hover),
 * on the licence server's administrator pages, whose body is .admin; the website's own admin loads none
 * of this. The kit sets the sidebar per theme on <html>, so these are set per theme on the body.
 */
[data-bs-theme="light"] body.admin {
    --bc-bg: #f3f6fa;
    --bc-surface-2: #f8fafd;
    --bc-hover: #edf1f7;
    --bc-sidebar: #ffffff;
    --bc-sidebar-text: #3a4558;
    --bc-sidebar-muted: #5e6a80;
    --bc-sidebar-strong: #121a26;
    --bc-sidebar-hover: rgba(15, 25, 45, 0.05);
    --bc-sidebar-active: #e9effb;
    --bc-sidebar-scroll: rgba(15, 25, 45, 0.2);
}

[data-bs-theme="dark"] body.admin {
    --bc-surface-2: #0f1726;
    --bc-hover: #1b2436;
    --bc-sidebar: #070f1e;
    --bc-sidebar-text: #c3cde0;
    --bc-sidebar-muted: #8995ad;
    --bc-sidebar-hover: rgba(255, 255, 255, 0.06);
    --bc-sidebar-active: rgba(107, 155, 240, 0.18);
}

/* The sign-in card's rings, drawn in the kit's lime and green inline: the accent and the primary here. */
.auth-ring-lime { stroke: var(--ac-accent); }
.auth-ring-green { stroke: var(--bc-primary); }

/*
 * The brand's own pieces, wherever AgentCivil is worn (the product site, the licence portal and its
 * administrator pages): the mark, the wordmark, the header's tools menu, each tool's accent, the footer's.
 */

/* ---- The mark and the wordmark ---------------------------------------------------------------- */
.ac-logo { display: inline-flex; align-items: center; gap: 0.625rem; color: var(--bc-text); text-decoration: none; }
.ac-mark { flex: none; display: block; }
.ac-mark-tile { fill: var(--ac-mark-tile); }
.ac-mark-line { fill: none; stroke: var(--ac-mark-line); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.ac-mark-line-inner { stroke-width: 2.6; stroke-opacity: 0.6; }
.ac-mark-node { fill: var(--ac-accent); }
.ac-wordmark { font-size: 1.375rem; font-weight: 500; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.ac-wordmark span { font-weight: 700; color: var(--bc-primary); }

/* ---- The header ---------------------------------------------------------------------------- */
.ac-header-sign-in { display: none; align-items: center; min-height: 44px; padding: 0 0.75rem; border-radius: var(--bc-radius-sm); color: var(--bc-text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.ac-header-sign-in:hover { color: var(--bc-primary); }
@media (min-width: 576px) {
    .ac-header-sign-in { display: inline-flex; }
}
.ac-tools-menu { min-width: 340px; }
.bc-menu a.ac-tools-menu-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem; }
.ac-tools-menu-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--ac-tool-soft); color: var(--ac-tool-text); }
.ac-tools-menu-item strong { display: block; color: var(--bc-text); font-weight: 700; }
.ac-tools-menu-item small { display: block; margin-top: 0.125rem; color: var(--bc-muted); font-size: 0.875rem; font-weight: 400; }
.bc-menu a.ac-tools-menu-item:hover strong { color: var(--ac-tool-text); }

/* Each tool's accent, for whatever sits inside it. */
.ac-tool-britech { --ac-tool: var(--ac-britech); --ac-tool-text: var(--ac-britech-text); --ac-tool-soft: var(--ac-britech-soft); }
.ac-tool-bridge {
    --ac-tool: var(--ac-bridge); --ac-tool-text: var(--ac-bridge-text); --ac-tool-soft: var(--ac-bridge-soft);
    --bc-focus-outline: var(--ac-bridge-text);
}
.ac-tool-bridge .btn-primary {
    --bs-btn-bg: var(--ac-bridge-button); --bs-btn-border-color: var(--ac-bridge-button); --bs-btn-color: var(--ac-on-bridge);
    --bs-btn-hover-bg: var(--ac-bridge-button-hover); --bs-btn-hover-border-color: var(--ac-bridge-button-hover); --bs-btn-hover-color: var(--ac-on-bridge);
    --bs-btn-active-bg: var(--ac-bridge-button-hover); --bs-btn-active-border-color: var(--ac-bridge-button-hover); --bs-btn-active-color: var(--ac-on-bridge);
}

/* ---- The footer ----------------------------------------------------------------------------- */
.ac-footer { border-top: 1px solid var(--ac-ink-border); }
.ac-footer .bc-footer-links { columns: 1; margin: 0; padding: 0; list-style: none; }
.ac-footer-logo { margin-bottom: 1rem; color: var(--bc-on-photo); }
.ac-footer .ac-wordmark span { color: var(--ac-on-dark-accent); }
.ac-footer .ac-mark-tile { fill: var(--ac-mark-tile-on-dark); }
.ac-footer-trademarks { margin: 2rem 0 0; color: rgba(var(--bc-footer-muted-rgb), 0.72); font-size: var(--bc-text-xs); }
