/* Datandes over Palisade (themes/palisade/assets/src/scss/palisade.scss): the brand colours, the dark
   panels and the fonts of datandes.cl (site/public/assets/css/datandes.css). Loaded by
   html/partials/head.html.twig after Palisade's stylesheet; Palisade's own variables are kept, only
   their values change, so the admin's brand colour (Clientfence/Branding.php) still wins when set.
   Fonts: Plus Jakarta Sans (titles) and Source Sans 3 (text), both SIL Open Font License (fonts/). */

/* ---- Fonts (self-hosted, the same files as datandes.cl) */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/sourcesans3-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/sourcesans3-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/sourcesans3-400-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/sourcesans3-400-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/sourcesans3-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/sourcesans3-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/sourcesans3-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/sourcesans3-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/plusjakartasans-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/plusjakartasans-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/plusjakartasans-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/plusjakartasans-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/plusjakartasans-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/plusjakartasans-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/plusjakartasans-800-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/plusjakartasans-800-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---- Brand colours (datandes.css tokens: --primary #0b5fff, --primary-dark #083a9a, --dtd-noche #050e21,
   --dtd-tinta #0a1526, --dtd-texto #35465e, --dtd-suave #5b6b83, --dtd-linea #e4eaf2, --dtd-papel #f7f9fc). */
:root, [data-bs-theme="light"] {
  --dtd-azul: #0b5fff;
  --dtd-azul-osc: #083a9a;
  --dtd-azul-cl: #7fb0ff;
  --dtd-noche: #050e21;
  --dtd-tinta: #0a1526;
  --dtd-panel: #0b1a38;
  --dtd-linea-osc: #1b2c52;

  --pal-brand: var(--dtd-azul);
  --pal-brand-rgb: 11, 95, 255;
  --pal-brand-deep: var(--dtd-azul-osc);
  --pal-brand-deep-rgb: 8, 58, 154;
  --pal-accent: #3d82ff;
  --pal-accent-rgb: 61, 130, 255;

  --bs-primary: var(--dtd-azul);
  --bs-primary-rgb: 11, 95, 255;
  --bs-primary-text-emphasis: var(--dtd-azul-osc);
  --bs-primary-bg-subtle: #e7efff;
  --bs-primary-border-subtle: #b6cdff;
  --bs-link-color: var(--dtd-azul);
  --bs-link-color-rgb: 11, 95, 255;
  --bs-link-hover-color: var(--dtd-azul-osc);
  --bs-link-hover-color-rgb: 8, 58, 154;
  --bs-focus-ring-color: rgba(11, 95, 255, .25);
  --bf-brand: var(--dtd-azul);
  --bf-brand-hover: var(--dtd-azul-osc);

  --bs-body-bg: #f7f9fc;
  --bs-body-color: #35465e;
  --bs-body-color-rgb: 53, 70, 94;
  --bs-emphasis-color: var(--dtd-tinta);
  --bs-emphasis-color-rgb: 10, 21, 38;
  --bs-secondary-color: #5b6b83;
  --bs-secondary-color-rgb: 91, 107, 131;
  --bs-border-color: #e4eaf2;
  --bs-heading-color: var(--dtd-tinta);

  /* The side menu and the dark panels: Datandes night blue. */
  --bf-sidebar-bg: var(--dtd-noche);
  --bf-sidebar-border: var(--dtd-linea-osc);
  --bf-sidebar-text: #c9d4e8;
  --bf-sidebar-muted: #8b9ab8;
  --bf-topbar-bg: rgba(247, 249, 252, .88);

  --bs-font-sans-serif: "Source Sans 3", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
}

[data-bs-theme="dark"] {
  --bs-primary-text-emphasis: var(--dtd-azul-cl);
  --bs-primary-bg-subtle: #0c214f;
  --bs-primary-border-subtle: #16398a;
  --bs-link-color: var(--dtd-azul-cl);
  --bs-link-color-rgb: 127, 176, 255;
  --bs-link-hover-color: #a9c9ff;
  --bs-link-hover-color-rgb: 169, 201, 255;
  --bf-brand: var(--dtd-azul-cl);
  --bf-brand-hover: #a9c9ff;

  --bs-body-bg: var(--dtd-noche);
  --bs-body-color: #dbe4f3;
  --bs-secondary-color: #9fb0cc;
  --bs-border-color: var(--dtd-linea-osc);
  --bf-sidebar-bg: #030a19;
  --bf-surface: var(--dtd-panel);
  --bf-topbar-bg: rgba(5, 14, 33, .88);
}

[data-bs-theme="dark"] .card {
  --bs-card-bg: var(--dtd-panel);
}

[data-bs-theme="dark"] .dropdown-menu {
  --bs-dropdown-bg: #0e2048;
  --bs-dropdown-border-color: var(--dtd-linea-osc);
  --bs-dropdown-link-hover-bg: var(--dtd-linea-osc);
  --bs-dropdown-divider-bg: var(--dtd-linea-osc);
}

/* ---- Type: Plus Jakarta Sans for titles (as datandes.cl), Source Sans 3 for everything else. Palisade's
   Jakarta has 700 and 800 only, so it moves smaller headings to the body font; Datandes has 500-800. */
body {
  font-family: "Source Sans 3", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.page-title, .card-title, .auth-brand h2, .bf-logo-text {
  font-family: "Plus Jakarta Sans", "IBM Plex Sans Arabic", "Source Sans 3", system-ui, sans-serif;
  letter-spacing: -.015em;
}

h1, .h1, .page-title { font-weight: 800; }
h2, h3, .h2, .h3, .card-title { font-weight: 700; }
h4, h5, h6, .h4, .h5, .h6 { font-weight: 600; }

/* ---- Buttons: a flat Datandes blue instead of Palisade's teal gradient. */
.btn-primary, .btn-primary:hover, .btn-primary:focus {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--dtd-azul);
  --bs-btn-border-color: var(--dtd-azul);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--dtd-azul-osc);
  --bs-btn-hover-border-color: var(--dtd-azul-osc);
  --bs-btn-active-bg: var(--dtd-azul-osc);
  --bs-btn-active-border-color: var(--dtd-azul-osc);
  --bs-btn-focus-shadow-rgb: 11, 95, 255;
  background-image: none;
  border-color: var(--bs-btn-border-color);
  box-shadow: 0 6px 18px -8px rgba(11, 95, 255, .6);
}

.btn-primary:hover { box-shadow: 0 10px 26px -8px rgba(11, 95, 255, .7); }

.btn-outline-primary {
  --bs-btn-color: var(--dtd-azul);
  --bs-btn-border-color: var(--dtd-azul);
  --bs-btn-hover-bg: var(--dtd-azul);
  --bs-btn-hover-border-color: var(--dtd-azul);
  --bs-btn-active-bg: var(--dtd-azul-osc);
  --bs-btn-active-border-color: var(--dtd-azul-osc);
  --bs-btn-focus-shadow-rgb: 11, 95, 255;
}

.nav-tabs .nav-link.active {
  background: linear-gradient(90deg, var(--dtd-azul), var(--dtd-azul-cl)) bottom / 100% 2px no-repeat;
}

/* ---- Sign-in page: the brand panel in Datandes night blue, the glow in Datandes blue. */
.auth-brand {
  background:
    radial-gradient(circle at 20% 15%, rgba(61, 130, 255, .32), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(8, 58, 154, .7), transparent 50%),
    linear-gradient(160deg, #0b1a38, var(--dtd-noche));
  color: #e2eaf7;
}

/* ---- Logos: the Datandes wordmark is wide (1570 × 337), so it sits a little smaller than Palisade's 34 px. */
.sidebar-brand img { height: 30px; }
.auth-brand img { height: 36px; }
.auth-logo img, .topbar-logo img { height: 28px; }
