/* =====================================================================
   CUPRA tenant theme – loaded after site.css for tenant "cupra" only.
   Values from the CUPRA design system used on cupra.com ("cupra-diagonal",
   ds-assets.cupra.com/…/styles/cupra-diagonal/theme.css):
     moonslate background  #15181E   (--ds-color-bg-default; also Tenant.PrimaryColor)
     copper                #B2764D   (--ds-color-copper-80, selected states)
     primary button        #FAFAFA on #09090B text, hover #D3D6D9, pressed #AEAEB7
     focus ring            #6B8494   (--ds-color-enceladus-80)
     radius                6px interactions, 8px navigation surfaces; 2px button border
   cupra.com uses light buttons on a dark page. The portal's content area is light in light mode,
   so there the button is inverted (moonslate with light text); dark mode uses the original.
   ===================================================================== */

/* Cupra Screen (see NOTICE.md). Weights as in the design system: light 300, book 350, regular 400, medium 500, plus bold. */
@font-face { font-family: "Cupra Screen"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/CupraScreen-Light.woff2") format("woff2"); }
@font-face { font-family: "Cupra Screen"; font-style: normal; font-weight: 350; font-display: swap; src: url("fonts/CupraScreen-Book.woff2") format("woff2"); }
@font-face { font-family: "Cupra Screen"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/CupraScreen-Regular.woff2") format("woff2"); }
@font-face { font-family: "Cupra Screen"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/CupraScreen-Medium.woff2") format("woff2"); }
@font-face { font-family: "Cupra Screen"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/CupraScreen-Bold.woff2") format("woff2"); }

:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
  --bs-body-font-family: "Cupra Screen", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --portal-accent: #B2764D;
  --portal-accent-rgb: 178, 118, 77;
  --cupra-moonslate: #15181E;
  --cupra-ink: #09090B;
  --cupra-light: #FAFAFA;
  --bs-focus-ring-color: rgba(107, 132, 148, .45);
}

/* Moonslate navigation, copper highlights */
:root, [data-bs-theme="light"] { --ui-sidebar-bg: var(--cupra-moonslate); }
[data-bs-theme="dark"] {
  --ui-sidebar-bg: #0E1014;
  --ui-bg: var(--cupra-moonslate);
  --ui-surface: #1C2028;
  --ui-surface-2: #222731;
  --ui-border: #2C323D;
  --ui-border-strong: #3A414E;
}
.app-sidebar::before { background: radial-gradient(closest-side, rgba(var(--portal-accent-rgb), .18), transparent); }
.app-nav-link, .app-nav-sublink { border-radius: 8px; }
.app-brand-mark { background: var(--portal-accent); color: var(--cupra-ink); box-shadow: none; border-radius: 6px; }
.app-brand-wordmark svg { height: 20px; }
.auth-brand .app-brand-wordmark svg { height: 26px; }

/* Interactions: 6px corners, 2px borders, focus ring #6B8494 */
.btn { --bs-btn-border-radius: 6px; --bs-btn-border-width: 2px; letter-spacing: .01em; }
.btn-sm, .btn-lg { --bs-btn-border-radius: 6px; }
.btn-icon { --bs-btn-border-radius: 6px; }
.form-control, .form-select, .input-group, .ts-dropdown .dropdown-input { border-radius: 6px; }
.form-control:focus, .form-select:focus, .form-check-input:focus,
.input-group:focus-within, .ts-wrapper.form-select.focus, .ts-wrapper.plugin-dropdown_input.focus .ts-dropdown .dropdown-input { box-shadow: 0 0 0 3px rgba(107, 132, 148, .35); border-color: #6B8494; }
:focus-visible { outline-color: #6B8494; }

/* Primary button – light mode: moonslate with light text */
.btn-primary {
  --bs-btn-color: var(--cupra-light);
  --bs-btn-bg: var(--cupra-moonslate);
  --bs-btn-border-color: var(--cupra-moonslate);
  --bs-btn-hover-color: var(--cupra-light);
  --bs-btn-hover-bg: #2A2F38;
  --bs-btn-hover-border-color: #2A2F38;
  --bs-btn-active-color: var(--cupra-light);
  --bs-btn-active-bg: #3A414E;
  --bs-btn-active-border-color: #3A414E;
  --bs-btn-disabled-color: #5A5C67;
  --bs-btn-disabled-bg: #34353C;
  --bs-btn-disabled-border-color: #34353C;
  --bs-btn-focus-shadow-rgb: 107, 132, 148;
  box-shadow: none;
}
/* Primary button – dark mode and on dark surfaces: exactly as on cupra.com */
[data-bs-theme="dark"] .btn-primary,
.ui-hero .btn-light {
  --bs-btn-color: var(--cupra-ink);
  --bs-btn-bg: var(--cupra-light);
  --bs-btn-border-color: var(--cupra-light);
  --bs-btn-hover-color: #0E0E10;
  --bs-btn-hover-bg: #D3D6D9;
  --bs-btn-hover-border-color: #D3D6D9;
  --bs-btn-active-color: #18181B;
  --bs-btn-active-bg: #AEAEB7;
  --bs-btn-active-border-color: #AEAEB7;
}

/* Selected states in copper (as --ds-color-border-selected) */
.btn-check:checked + .btn-outline-secondary, .btn-check:checked + .btn-outline-primary {
  background: transparent; border-color: var(--portal-accent); color: var(--ui-text);
  box-shadow: inset 0 0 0 1px var(--portal-accent);
}
.form-check-input:checked, .form-check-input:indeterminate { background-color: var(--portal-accent); border-color: var(--portal-accent); }
.nav-tabs .nav-link.active { border-bottom-color: var(--portal-accent); color: var(--ui-text); }
th.ui-sort.is-sorted { color: var(--portal-accent); }
.form-check-card:has(.form-check-input:checked) { border-color: var(--portal-accent); background: rgba(var(--portal-accent-rgb), .08); }

/* Hero, login, public forms: moonslate with a copper glow */
.ui-hero, .auth-hero, .public-header {
  background: radial-gradient(90% 120% at 100% 0%, rgba(var(--portal-accent-rgb), .30) 0%, transparent 60%), var(--cupra-moonslate);
}
.ui-hero strong.text-white { color: #C49678 !important; }
.auth-hero-list .bi { background: rgba(var(--portal-accent-rgb), .18); color: #C49678; }

/* Copper on dark surfaces for links and active states; text stays light on copper-free areas */
[data-bs-theme="dark"] {
  --bs-link-color: #C49678;
  --bs-link-hover-color: #D9B49C;
  --ui-primary-strong: #C49678;
}
[data-bs-theme="dark"] .ui-bar.is-current .ui-bar-fill { background: var(--portal-accent); }

/* Typography as in the CUPRA design system: light headlines and figures, regular body,
   book for secondary text, medium for labels and interactive elements. */
h1, h2, h3, .h1, .h2, .h3, .ui-page-title, .ui-greeting, .auth-hero-title { font-weight: 300; letter-spacing: -.01em; }
.ui-stat-value, .ui-date-chip-d { font-weight: 300; }
h4, h5, h6, .h4, .h5, .h6, .card-header, .ui-table-title, .accordion-button, .alert-heading, .ui-empty-title { font-weight: 500; }
.form-label, .ui-fieldset > legend, .btn, .nav-tabs .nav-link, .app-nav-link, .app-nav-sublink, .dropdown-item,
.table > thead > tr > th, .badge, .ui-page-pretitle, .app-nav-heading { font-weight: 500; }
.text-body-secondary, .text-muted, .form-text, .ui-page-subtitle, .ui-card-subtitle, .ui-stat-label, .ui-stat-hint, .small { font-weight: 350; }
.app-nav-link.active, .app-nav-sublink.active, .table a:not(.btn) { font-weight: 500; }
.ui-page-pretitle, .app-nav-heading, .table > thead > tr > th { letter-spacing: .08em; }

/* Collapsed sidebar: the CUPRA emblem in copper on moonslate, as on cupra.com */
.app-brand-mark.has-symbol { background: transparent; color: var(--portal-accent); }
.app-brand-mark.has-symbol svg { width: 100%; height: 100%; }
