/* ============================================================
   hubdix-light Demo Theme v2.0 — Bootstrap 5 Custom Layer
   "hubdix structure + light workspace" — kein generisches helles
   SaaS-Dashboard, sondern ein erkennbares hubdix-Schwesterprodukt:
   dunkle, markante Navigation (identisch zu hubdix' Navy-Ton) +
   heller, ruhiger Arbeitsbereich, kompakte technische Panels statt
   grosser weicher SaaS-Cards.

   Load order (system/includes/header.inc.php):
     1. css/bootstrap/bootstrap.min.css
     2. css/style.css                  (Legacy-Utilities, kein Branding mehr)
     3. css/hubdix-light-theme.css      <- diese Datei (Demo-Theme, Core)
     4. css/branding/theme.css          <- optionaler Kunden-Override (gitignored)

   Herkunft: Farb-/Radius-/Motion-Tokens direkt vom hubdix-Schwester-
   projekt uebernommen (system/public/css/hubdix-theme.css), siehe
   docs/design/hubdix-light-design-system.md fuer den vollstaendigen
   Vergleich "hubdix vs. hubdix-light v1 vs. hubdix-light v2". Zwei
   bewusste Abweichungen von hubdix: (1) Radius-Skala kleiner/technischer
   statt hubdix' recht runder Formsprache (§8/§19 der Design-Vorgabe),
   (2) System-Font-Stack statt Google-Fonts-Import (CSP SEC-010 erlaubt
   kein fonts.googleapis.com).
   ============================================================ */

/* ============================================================
   1. Design Tokens
   ============================================================ */
:root {
  /* Workspace (hell, "sehr helles Slate/Blue-Grey") */
  --hdx-page-bg:       #EEF2F7;
  --hdx-bg:            var(--hdx-page-bg); /* Alias, historisch verwendet */
  --hdx-bg-soft:       #E4EAF2;
  --hdx-surface:       #FFFFFF;
  --hdx-surface-alt:   #F5F8FB;
  --hdx-border:        #DDE3EC;
  --hdx-border-strong: #C4CEDC;

  /* Text (Workspace) */
  --hdx-text:          #0F172A;
  --hdx-text-muted:    #64748B;
  --hdx-text-soft:     #334155;

  /* Brand — identischer Gradient wie hubdix; auf hellem Grund ist Blau
     (statt Cyan) die besser lesbare Primaerfarbe fuer Text/Icons/Border,
     daher primary/primary-2 gegenueber hubdix vertauscht (Gradient bleibt
     gleich, s. Design-Doku). */
  --hdx-primary:       #2563FF;
  --hdx-primary-2:     #19D3FF;
  --hdx-primary-hover: #1D4ED8;
  --hdx-gradient:      linear-gradient(135deg, #19D3FF 0%, #2563FF 100%);

  /* Semantic — gleiche Farbfamilie wie hubdix, fuer helle Flaechen etwas
     vertieft (bessere Textlesbarkeit auf Weiss als hubdix' hellere Toene
     auf Dunkel), "ruhiges Gruen" statt knalligem Gruen (Vorgabe §7). */
  --hdx-success:       #16A34A;
  --hdx-warning:       #D97706;
  --hdx-danger:        #DC2626;
  --hdx-info:          #0EA5E9;

  /* Navigation — identisch zu hubdix' Navy-Ton (echte hubdix-DNA, nicht
     nur "angelehnt"), unabhaengig vom hellen Workspace. */
  --hdx-nav-bg:          #0F1B2D;
  --hdx-nav-bg-soft:     #0A1324;
  --hdx-nav-border:      #25334A;
  --hdx-nav-text:        #F8FAFC;
  --hdx-nav-text-soft:   #CBD5E1;
  --hdx-nav-text-muted:  #94A3B8;
  --hdx-nav-active-bg:   rgba(25, 211, 255, .14);
  --hdx-nav-active-text: #19D3FF;

  /* Radius — bewusst kompakter/technischer als hubdix' eigene (recht
     runde) Skala: klare Panel-Grenzen statt "cute SaaS"-Bubbles. */
  --hdx-radius-sm: 6px;
  --hdx-radius-md: 8px;
  --hdx-radius-lg: 10px;
  --hdx-radius-xl: 14px;

  /* Shadows — dezent, technisch statt "schwebende Card" */
  --hdx-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --hdx-shadow-md: 0 8px 24px rgba(15, 23, 42, .14);

  /* Motion — zentrale Timings statt verstreuter Werte pro View (Vorgabe §30) */
  --hdx-transition-fast:   120ms ease;
  --hdx-transition-normal: 180ms ease;

  /* Logo-Hoehe in der Navbar (ueberschreibbar per branding/theme.css) */
  --hdx-logo-max-height: 30px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   2. Bootstrap Light Mode Variable Overrides
   ============================================================ */
[data-bs-theme="light"],
[data-bs-theme="light"] * {
  --bs-body-bg:                    var(--hdx-page-bg);
  --bs-body-color:                 var(--hdx-text);

  --bs-border-color:               var(--hdx-border);
  --bs-border-color-translucent:   rgba(196, 206, 220, 0.6);

  --bs-secondary-bg:               var(--hdx-surface-alt);
  --bs-tertiary-bg:                var(--hdx-bg-soft);
  --bs-secondary-color:            var(--hdx-text-muted);
  --bs-tertiary-color:             var(--hdx-text-soft);
  --bs-emphasis-color:             var(--hdx-text);

  --bs-link-color:                 var(--hdx-primary);
  --bs-link-hover-color:           var(--hdx-primary-hover);

  --bs-heading-color:              var(--hdx-text);

  --bs-primary:                    var(--hdx-primary);
  --bs-primary-rgb:                37, 99, 255;

  --bs-card-bg:                    var(--hdx-surface);
  --bs-card-border-color:          var(--hdx-border);
  --bs-card-cap-bg:                var(--hdx-surface-alt);

  --bs-modal-bg:                   var(--hdx-surface);
  --bs-modal-header-border-color:  var(--hdx-border);
  --bs-modal-footer-border-color:  var(--hdx-border);

  --bs-table-bg:                   transparent;
  --bs-table-striped-bg:           rgba(228, 234, 242, .55);
  --bs-table-hover-bg:             var(--hdx-surface-alt);
  --bs-table-border-color:         var(--hdx-border);
  --bs-table-color:                var(--hdx-text-soft);

  --bs-input-bg:                   var(--hdx-surface);
  --bs-input-border-color:         var(--hdx-border);
  --bs-input-color:                var(--hdx-text);
  --bs-input-focus-border-color:   var(--hdx-primary);

  --bs-dropdown-bg:                var(--hdx-surface);
  --bs-dropdown-border-color:      var(--hdx-border);
  --bs-dropdown-link-color:        var(--hdx-text-soft);
  --bs-dropdown-link-hover-bg:     rgba(37, 99, 255, .08);
  --bs-dropdown-link-hover-color:  var(--hdx-text);
  --bs-dropdown-link-active-bg:    rgba(37, 99, 255, .12);
  --bs-dropdown-link-active-color: var(--hdx-primary);
  --bs-dropdown-divider-bg:        var(--hdx-border);

  --bs-navbar-color:               var(--hdx-nav-text-soft);
  --bs-navbar-hover-color:         var(--hdx-nav-text);
  --bs-navbar-active-color:        var(--hdx-nav-active-text);
  --bs-navbar-brand-color:         var(--hdx-nav-text);
  --bs-navbar-toggler-border-color: var(--hdx-nav-border);

  --bs-toast-background-color:     var(--hdx-surface);
  --bs-toast-border-color:         var(--hdx-border);
  --bs-toast-header-bg:            var(--hdx-surface-alt);
  --bs-toast-color:                var(--hdx-text);

  --bs-offcanvas-bg:               var(--hdx-surface);
  --bs-offcanvas-color:            var(--hdx-text);
  --bs-offcanvas-border-color:     var(--hdx-border);

  --bs-list-group-bg:              var(--hdx-surface);
  --bs-list-group-border-color:    var(--hdx-border);
  --bs-list-group-color:           var(--hdx-text-soft);
  --bs-list-group-action-hover-bg: var(--hdx-surface-alt);
  --bs-list-group-active-bg:       rgba(37, 99, 255, .1);
  --bs-list-group-active-border-color: var(--hdx-primary);
  --bs-list-group-active-color:    var(--hdx-primary);

  --bs-pagination-bg:              var(--hdx-surface);
  --bs-pagination-border-color:    var(--hdx-border);
  --bs-pagination-color:           var(--hdx-text-muted);
  --bs-pagination-hover-bg:        var(--hdx-surface-alt);
  --bs-pagination-hover-border-color: var(--hdx-border);
  --bs-pagination-hover-color:     var(--hdx-text);
  --bs-pagination-active-bg:       var(--hdx-primary);
  --bs-pagination-active-border-color: transparent;
  --bs-pagination-disabled-bg:     var(--hdx-surface);
  --bs-pagination-disabled-color:  var(--hdx-border);
}

/* ============================================================
   3. Body & Base Typography
   ============================================================ */
body {
  /* Bewusst keine externe Schriftart (Google Fonts o.ae.) - hubdix-lights
     CSP (SEC-010) erlaubt style-src nur 'self'/cdn.jsdelivr.net/
     code.jquery.com; ein zusaetzlicher fonts.googleapis.com-Host waere
     eine bewusste CSP-Lockerung nur fuer eine Schriftart. Die System-
     Schriftstapel sehen auf allen Plattformen bereits modern/klar aus. */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--hdx-page-bg);
  color: var(--hdx-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--hdx-text);
}
h5.modal-title { font-weight: 600; }

small,
.text-muted,
.form-text { color: var(--hdx-text-muted) !important; }

a { color: var(--hdx-primary); transition: color var(--hdx-transition-fast); }
a:hover { color: var(--hdx-primary-hover); }

hr { border-color: var(--hdx-border); opacity: 1; }

code {
  color: var(--hdx-primary);
  background: rgba(37, 99, 255, .07);
  border-radius: 4px;
  padding: .1em .35em;
}

::selection { background: rgba(37, 99, 255, .18); color: var(--hdx-text); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--hdx-bg-soft); }
::-webkit-scrollbar-thumb { background: var(--hdx-border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--hdx-text-muted); }

/* Page title, rendered by menu.inc.php (<h1 class="mx-2 my-3">) direkt
   nach der Navbar - kompakte technische Ueberschrift statt grosser
   SaaS-Headline, mit duenner Trennlinie zur klaren Hierarchie-Trennung
   Titel/Inhalt (Vorgabe §11 "klare visuelle Hierarchie"). */
h1.mx-2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--hdx-text);
  letter-spacing: -.01em;
  margin: .85rem .5rem .9rem !important;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--hdx-border);
}

/* ============================================================
   4. Navbar / Topbar — dunkles Navy wie hubdix (echte hubdix-DNA),
   unabhaengig vom hellen Workspace darunter.
   ============================================================ */
.navbar {
  background: var(--hdx-nav-bg) !important;
  border-bottom: 1px solid var(--hdx-nav-border);
  box-shadow: var(--hdx-shadow-sm);
  padding-top: .45rem;
  padding-bottom: .45rem;
}

.navbar-brand { display: inline-flex; align-items: center; }
.navbar-brand img { max-height: var(--hdx-logo-max-height); width: auto; }

.navbar-toggler { border-color: var(--hdx-nav-border); padding: .25rem .5rem; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(248,250,252,.85)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E");
}

.navbar-nav .nav-link {
  position: relative;
  color: var(--hdx-nav-text-soft);
  font-weight: 500;
  font-size: .875rem;
  padding: .4rem .75rem;
  border-radius: var(--hdx-radius-sm);
  transition: color var(--hdx-transition-fast), background var(--hdx-transition-fast);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--hdx-nav-text);
  background: rgba(25, 211, 255, .08);
}
.navbar-nav .nav-link.active,
.navbar-nav .nav-item.active > .nav-link,
.navbar-nav .nav-link.show {
  color: var(--hdx-nav-active-text);
  background: var(--hdx-nav-active-bg);
}
/* Kurzer Akzent-Balken unter dem aktiven Menuepunkt (Vorgabe §22) - liegt
   INNERHALB der Link-Box (kein Overflow/Clipping-Risiko), transitioniert
   zusammen mit Hintergrund/Textfarbe. */
.navbar-nav .nav-link.active::after,
.navbar-nav .nav-item.active > .nav-link::after {
  content: '';
  position: absolute;
  left: 10px; right: 10px; bottom: 1px;
  height: 2px;
  background: var(--hdx-gradient);
  border-radius: 2px;
}

.navbar-nav .dropdown-toggle::after { border-top-color: var(--hdx-nav-text-muted); }

.navbar .nav-link i,
.navbar .nav-link .bi,
.navbar-nav .nav-link i,
.navbar-nav .nav-link .bi {
  color: var(--hdx-nav-text-muted);
  transition: color var(--hdx-transition-fast);
}
.navbar .nav-link:hover i,
.navbar .nav-link:hover .bi,
.navbar-nav .nav-link:hover i,
.navbar-nav .nav-link:hover .bi,
.navbar .nav-link.active i,
.navbar .nav-link.active .bi,
.navbar-nav .nav-link.active i,
.navbar-nav .nav-link.active .bi,
.navbar-nav .nav-item.active > .nav-link i,
.navbar-nav .nav-item.active > .nav-link .bi {
  color: var(--hdx-nav-active-text);
}

/* ============================================================
   5. Cards / Panels — klare Kanten statt grosser weicher SaaS-Cards:
   kleinerer Radius, klarer Rahmen, minimaler Schatten.
   ============================================================ */
.card {
  background: var(--hdx-surface);
  border: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius-md);
  box-shadow: var(--hdx-shadow-sm);
}
.card-header {
  background: var(--hdx-surface-alt);
  border-bottom: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius-md) var(--hdx-radius-md) 0 0 !important;
  font-weight: 600;
  font-size: .85rem;
  color: var(--hdx-text-soft);
  padding: .6rem .9rem;
}
.card-footer {
  background: var(--hdx-surface-alt) !important;
  border-top: 1px solid var(--hdx-border);
  border-radius: 0 0 var(--hdx-radius-md) var(--hdx-radius-md) !important;
  color: var(--hdx-text-soft);
}
.card-title { font-weight: 600; color: var(--hdx-text); }
.card-text  { color: var(--hdx-text-soft); }

/* Optionale interaktive Cards (nicht global - nur wo .hdx-card-interactive
   bewusst gesetzt ist, s. Design-Doku §"Motion") */
.hdx-card-interactive { transition: border-color var(--hdx-transition-normal), box-shadow var(--hdx-transition-normal); }
.hdx-card-interactive:hover { border-color: var(--hdx-border-strong); box-shadow: var(--hdx-shadow-md); }

/* Wiederverwendbare KPI-/Stat-Card (an hubdix' .hdx-stat-card angelehnt) -
   fuer zukuenftige Dashboard-Ueberarbeitungen bereits verfuegbar. */
.hdx-stat-card {
  background: var(--hdx-surface);
  border: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius-md);
  box-shadow: var(--hdx-shadow-sm);
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
}
.hdx-stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--hdx-gradient);
}
.hdx-stat-card .hdx-stat-label {
  font-size: .72rem; font-weight: 600; color: var(--hdx-text-muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.hdx-stat-card .hdx-stat-value { font-size: 1.6rem; font-weight: 700; color: var(--hdx-text); line-height: 1.15; }

/* Compact modifier (Vendor UX Consistency Fix, docs/reviews/vendor-ux-
   consistency-hardening.md "KPI Compactness") - purely additive on top of
   .hdx-stat-card above, never redefines it, so every other caller of
   renderListStats() (Hotels stats bar, Defects/Contracts/Maintenance/
   Inspections mini-KPIs, Projects tabs, Approvals) is completely
   unaffected. Drops the padding/shadow/gradient-bar/oversized value font
   that make the base card read as a dashboard tile, so a KPI row reads as a
   compact figure instead - used only where renderListStats() is called with
   $compact=true (currently only the Vendor Firmenprofil Performance area). */
.hdx-stat-card.hdx-stat-card-compact {
  padding: .4rem .6rem;
  box-shadow: none;
}
.hdx-stat-card.hdx-stat-card-compact::before { display: none; }
.hdx-stat-card.hdx-stat-card-compact .hdx-stat-label {
  font-size: .62rem; letter-spacing: .03em; margin-bottom: .1rem;
}
.hdx-stat-card.hdx-stat-card-compact .hdx-stat-value { font-size: 1.05rem; line-height: 1.2; }

/* ============================================================
   6. Buttons
   ============================================================ */
.btn {
  border-radius: var(--hdx-radius-sm);
  font-weight: 600;
  font-size: .875rem;
  transition: filter var(--hdx-transition-fast), transform var(--hdx-transition-fast),
              background var(--hdx-transition-fast), border-color var(--hdx-transition-fast),
              box-shadow var(--hdx-transition-fast);
}
.btn:active { transform: translateY(0) !important; }
.btn:not(:disabled):hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--hdx-gradient);
  border: none;
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:focus-visible,
.btn-primary:active {
  background: var(--hdx-gradient);
  filter: brightness(1.06);
  color: #fff;
  border: none;
}

.btn-outline-primary {
  border-color: var(--hdx-primary);
  color: var(--hdx-primary);
  background: transparent;
}
.btn-outline-primary:hover {
  background: rgba(37, 99, 255, .1);
  border-color: var(--hdx-primary);
  color: var(--hdx-primary);
}

.btn-outline-secondary {
  border-color: var(--hdx-border-strong);
  color: var(--hdx-text-soft);
  background: transparent;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:focus-visible {
  background: var(--hdx-surface-alt);
  color: var(--hdx-text);
  border-color: var(--hdx-text-muted);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, .12);
}
.btn-outline-secondary:active,
.btn-outline-secondary.active {
  background: var(--hdx-surface-alt);
  color: var(--hdx-text);
  border-color: var(--hdx-text-muted);
}

.btn-outline-light {
  border-color: var(--hdx-border);
  color: var(--hdx-text-soft);
  background: transparent;
}
.btn-outline-light:hover {
  background: var(--hdx-surface-alt);
  color: var(--hdx-text);
  border-color: var(--hdx-border);
}

.btn-outline-warning { border-color: var(--hdx-warning); color: var(--hdx-warning); background: transparent; }
.btn-outline-warning:hover { background: rgba(217, 119, 6, .1); border-color: var(--hdx-warning); color: var(--hdx-warning); }

.btn-outline-danger { border-color: var(--hdx-danger); color: var(--hdx-danger); background: transparent; }
.btn-outline-danger:hover { background: rgba(220, 38, 38, .1); border-color: var(--hdx-danger); color: var(--hdx-danger); }

.btn-outline-success { border-color: var(--hdx-success); color: var(--hdx-success); background: transparent; }
.btn-outline-success:hover { background: rgba(22, 163, 74, .1); border-color: var(--hdx-success); color: var(--hdx-success); }

.btn-success { background: var(--hdx-success); border-color: var(--hdx-success); color: #fff; }
.btn-success:hover { background: var(--hdx-success); border-color: var(--hdx-success); filter: brightness(1.08); color: #fff; }
.btn-warning { background: var(--hdx-warning); border-color: var(--hdx-warning); color: #fff; }
.btn-warning:hover { background: var(--hdx-warning); border-color: var(--hdx-warning); filter: brightness(1.06); color: #fff; }
.btn-danger  { background: var(--hdx-danger); border-color: var(--hdx-danger); color: #fff; }
.btn-danger:hover  { background: var(--hdx-danger); border-color: var(--hdx-danger); filter: brightness(1.08); color: #fff; }
.btn-info    { background: var(--hdx-info); border-color: var(--hdx-info); color: #fff; }

.btn-soft-primary {
  background: rgba(37, 99, 255, .1);
  color: var(--hdx-primary);
  border: 1px solid rgba(37, 99, 255, .18);
}
.btn-soft-primary:hover {
  background: rgba(37, 99, 255, .16);
  color: var(--hdx-primary);
  border-color: var(--hdx-primary);
}

/* Kompakte Action-Gruppen in Tabellenzeilen (btn-group btn-group-sm) -
   Radius nur an den Aussenkanten, dazwischen eckig ("technische
   Button-Reihe" statt einzelner runder Pillen).
   :first-of-type/:last-of-type statt :first-child/:last-child (Fund, s.
   docs/reviews/maintenance-inspections-polish.md "Legacy Button Group"):
   Bootstraps btn-check-Muster (versteckte <input class="btn-check"> VOR
   jedem sichtbaren <label class="btn">, z.B. "Maengel beseitigt/nicht
   beseitigt") macht das sichtbar ERSTE .btn-Element real zum ZWEITEN
   Kind-Element im DOM - :first-child traf dort nie zu, die linke
   Aussenkante blieb eckig. :first-of-type/:last-of-type zaehlen nur unter
   Geschwistern DESSELBEN Tag-Namens (hier <label>), treffen daher sowohl
   fuer reine <button>-Gruppen (unveraendertes Verhalten, da dort
   :first-of-type==:first-child) als auch fuer das input+label-Muster
   korrekt zu. */
.btn-group .btn,
.btn-group-vertical .btn { border-radius: 0; }
.btn-group > .btn:first-of-type { border-radius: var(--hdx-radius-sm) 0 0 var(--hdx-radius-sm); }
.btn-group > .btn:last-of-type  { border-radius: 0 var(--hdx-radius-sm) var(--hdx-radius-sm) 0; }
/* UX Consistency Mini-Pass (s. docs/reviews/projects-ux-consistency-and-regression-fixes.md
   "btn-group single-button rounding"): reproduced regression - a .btn-group
   that effectively renders exactly one visible action (rights-/status-
   filtered rows across Projects/Translation/etc.) lost its LEFT rounding.
   Root cause: the two rules above are both full border-radius SHORTHAND
   declarations (all 4 corners each), not per-corner longhands. A single
   button matches :first-of-type AND :last-of-type at once, so both rules
   apply to the very same element - CSS does not merge shorthand corners
   across separate same-specificity rules, the LATER declaration in source
   order (:last-of-type, "right side round, left side square") wins
   completely, silently squaring off the left edge that :first-of-type had
   just rounded. Fix: an explicit :first-of-type:last-of-type rule for the
   "only child" case, fully rounded - its combined selector is inherently
   higher-specificity than either single-pseudo-class rule above, so it wins
   regardless of source order (kept after them here only for readability). */
.btn-group > .btn:first-of-type:last-of-type { border-radius: var(--hdx-radius-sm); }
.btn-group-sm > .btn { font-size: .78rem; padding: .3rem .55rem; }

/* ============================================================
   7. Forms
   ============================================================ */
.form-control,
.form-select {
  background: var(--hdx-surface);
  border: 1px solid var(--hdx-border);
  color: var(--hdx-text);
  border-radius: var(--hdx-radius-sm);
  font-size: .875rem;
  transition: border-color var(--hdx-transition-fast), box-shadow var(--hdx-transition-fast);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--hdx-primary);
  color: var(--hdx-text);
  box-shadow: 0 0 0 3px rgba(37, 99, 255, .12);
  outline: none;
}
.form-control::placeholder { color: var(--hdx-text-muted); }
.form-select option { background: var(--hdx-surface); color: var(--hdx-text); }

.form-control-sm, .form-select-sm { border-radius: var(--hdx-radius-sm); }

.form-floating > label { color: var(--hdx-text-muted); font-size: .875rem; }
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label { color: var(--hdx-text-muted); }

.form-label,
.form-label-sm {
  font-weight: 500;
  font-size: .8rem;
  color: var(--hdx-text-soft);
  margin-bottom: .3rem;
}

.form-check-input {
  background-color: var(--hdx-surface);
  border-color: var(--hdx-border-strong);
  transition: background-color var(--hdx-transition-fast), border-color var(--hdx-transition-fast);
}
.form-check-input:checked {
  background-color: var(--hdx-primary);
  border-color: var(--hdx-primary);
}
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(37, 99, 255, .12); border-color: var(--hdx-primary); }
.form-check-label { font-size: .875rem; color: var(--hdx-text-soft); }

.input-group-text {
  background: var(--hdx-surface-alt);
  border-color: var(--hdx-border);
  color: var(--hdx-text-muted);
  border-radius: var(--hdx-radius-sm);
}

.form-control.is-valid { border-color: var(--hdx-success); }
.form-control.is-invalid { border-color: var(--hdx-danger); }

/* ============================================================
   8. Selectpicker (bootstrap-select)
   Nur visuelle Anpassung an das Theme - der destroy()+rebuild()-
   Lifecycle bleibt unveraendert, s. docs/development/project-rules.md
   ("Dynamic selectpicker updates").

   Doppelrahmen-Fix: dieser bootstrap-select-Build kopiert die Klasse
   `form-select` des urspruenglichen <select> sowohl auf den WRAPPER
   (`.bootstrap-select`, ein <div class="dropdown ... form-select">) als
   auch bringt die BUTTON-Toggle-Klasse ihre eigene Box mit - beide
   erhielten dadurch parallel Rahmen/Hintergrund/Padding von `.form-select`
   (Zeile ~488) UND von den `.dropdown-toggle`-Regeln unten, sichtbar als
   zwei ineinander verschachtelte Rahmen. Der Wrapper wird deshalb explizit
   auf "unsichtbare Box" zurueckgesetzt - einzig der Button traegt Rahmen/
   Hintergrund/Radius/Padding, exakt wie ein normales `.form-select`.
   ============================================================ */
.bootstrap-select.form-select,
.bootstrap-select.form-select-sm {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  height: auto !important;
}
.bootstrap-select > .dropdown-toggle {
  background: var(--hdx-surface) !important;
  border: 1px solid var(--hdx-border) !important;
  color: var(--hdx-text) !important;
  border-radius: var(--hdx-radius-sm) !important;
  font-size: .875rem;
  line-height: 1.5;
  padding: .375rem 2.25rem .375rem .75rem;
  box-shadow: none !important;
  transition: border-color var(--hdx-transition-fast), box-shadow var(--hdx-transition-fast);
}
.bootstrap-select.form-select-sm > .dropdown-toggle {
  font-size: .8rem;
  padding: .25rem 1.75rem .25rem .5rem;
  border-radius: var(--hdx-radius-sm) !important;
}
.bootstrap-select > .dropdown-toggle:focus,
.bootstrap-select.show > .dropdown-toggle {
  border-color: var(--hdx-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 255, .12) !important;
}
.bootstrap-select > .dropdown-toggle .filter-option-inner-inner {
  color: var(--hdx-text);
}
.bootstrap-select > .dropdown-toggle .bs-placeholder .filter-option-inner-inner,
.bootstrap-select > select.bs-placeholder + .dropdown-toggle .filter-option-inner-inner {
  color: var(--hdx-text-muted);
}
.bootstrap-select.disabled > .dropdown-toggle,
.bootstrap-select > .dropdown-toggle:disabled,
.bootstrap-select > .dropdown-toggle.disabled {
  background: var(--hdx-surface-alt) !important;
  color: var(--hdx-text-muted) !important;
  border-color: var(--hdx-border) !important;
  opacity: 1;
  cursor: not-allowed;
}
.bootstrap-select .dropdown-menu {
  background: var(--hdx-surface);
  border: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius-md);
  box-shadow: var(--hdx-shadow-md);
}
.bootstrap-select .dropdown-menu .dropdown-item {
  color: var(--hdx-text-soft);
  font-size: .875rem;
}
.bootstrap-select .dropdown-menu .dropdown-item:hover,
.bootstrap-select .dropdown-menu .dropdown-item:focus {
  background: rgba(37, 99, 255, .08);
  color: var(--hdx-text);
}
.bootstrap-select .dropdown-menu .dropdown-item.active,
.bootstrap-select .dropdown-menu .dropdown-item.selected {
  background: rgba(37, 99, 255, .12) !important;
  color: var(--hdx-primary) !important;
}
.bootstrap-select .bs-searchbox .form-control {
  border-radius: var(--hdx-radius-sm);
}

/* ============================================================
   9. Tables — kompakt, technisch, gut scanbar statt grosser weisser
   Tabelle in runder SaaS-Card.
   ============================================================ */
.table {
  color: var(--hdx-text-soft);
  border-color: var(--hdx-border);
  font-size: .85rem;
  --bs-table-color: var(--hdx-text-soft);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--hdx-border);
  --bs-table-hover-bg: var(--hdx-surface-alt);
}
.table thead,
.table thead tr,
.table thead th {
  background: var(--hdx-surface-alt) !important;
  color: var(--hdx-text-muted) !important;
  font-weight: 600;
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid var(--hdx-border-strong);
  padding: .5rem .65rem;
  white-space: nowrap;
}
.table tbody tr { border-bottom: 1px solid var(--hdx-border); transition: background var(--hdx-transition-fast); }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--hdx-surface-alt); }
.table tbody td { padding: .4rem .65rem; vertical-align: middle; }
.table-bordered, .table-bordered th, .table-bordered td { border-color: var(--hdx-border); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: rgba(228, 234, 242, .5); }
.table-responsive { border-radius: var(--hdx-radius-md); overflow: hidden; }

/* ============================================================
   10. DataTables — Toolbar/Suche/Laenge kompakt; Pagination bewusst
   zurueckhaltend gestylt (wie im hubdix-Original: kein zusaetzlicher
   Radius/Padding auf einzelnen Seitenzahlen, nur die aktive Seite
   erhaelt den Marken-Gradient) statt durchgestylter Pill-Buttons.
   ============================================================ */
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label { color: var(--hdx-text-muted); font-size: .8rem; }

.dataTables_wrapper .dataTables_filter input {
  background: var(--hdx-surface);
  border: 1px solid var(--hdx-border);
  color: var(--hdx-text);
  border-radius: var(--hdx-radius-sm);
  padding: .3rem .6rem;
  font-size: .85rem;
  margin-left: .5rem;
  transition: border-color var(--hdx-transition-fast), box-shadow var(--hdx-transition-fast);
}
.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: var(--hdx-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 255, .1);
}
.dataTables_wrapper .dataTables_length select {
  background: var(--hdx-surface);
  border: 1px solid var(--hdx-border);
  color: var(--hdx-text);
  border-radius: var(--hdx-radius-sm);
  font-size: .85rem;
  padding: .22rem .45rem;
  margin: 0 .4rem;
}
.dataTables_wrapper .dataTables_info { color: var(--hdx-text-muted) !important; font-size: .8rem; }

.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--hdx-text-muted) !important;
  font-size: .82rem;
  transition: background var(--hdx-transition-fast), color var(--hdx-transition-fast);
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
  background: var(--hdx-surface-alt) !important;
  border-color: var(--hdx-border) !important;
  color: var(--hdx-text) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--hdx-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: var(--hdx-border-strong) !important;
  background: transparent !important;
}

.dt-button {
  background: var(--hdx-surface-alt) !important;
  border: 1px solid var(--hdx-border) !important;
  color: var(--hdx-text-soft) !important;
  border-radius: var(--hdx-radius-sm) !important;
  font-size: .78rem !important;
  font-weight: 600 !important;
  padding: .3rem .65rem !important;
  box-shadow: none !important;
  transition: background var(--hdx-transition-fast), border-color var(--hdx-transition-fast),
              color var(--hdx-transition-fast), transform var(--hdx-transition-fast) !important;
}
.dt-button:hover {
  background: rgba(37, 99, 255, .08) !important;
  border-color: var(--hdx-primary) !important;
  color: var(--hdx-primary) !important;
  transform: translateY(-1px);
}

/* ============================================================
   11. Badges / Status — klein und klar statt grosser Pills (Vorgabe
   §19): kleiner Radius statt volltoenendem Pill-Radius, weiterhin
   sanfte Tönungsfarben (hubdix-Sprache), aber kompakter.
   ============================================================ */
.badge {
  border-radius: var(--hdx-radius-sm);
  font-weight: 600;
  font-size: .7rem;
  padding: .3em .55em;
  letter-spacing: .01em;
}
.badge.bg-primary   { background: var(--hdx-gradient) !important; color: #fff; border: none; }
.badge.bg-success   { background: rgba(22, 163, 74, .13)  !important; color: var(--hdx-success); border: 1px solid rgba(22, 163, 74, .3); }
.badge.bg-warning   { background: rgba(217, 119, 6, .14)  !important; color: var(--hdx-warning); border: 1px solid rgba(217, 119, 6, .32); }
.badge.bg-danger    { background: rgba(220, 38, 38, .12)  !important; color: var(--hdx-danger);  border: 1px solid rgba(220, 38, 38, .3); }
.badge.bg-info      { background: rgba(14, 165, 233, .13) !important; color: var(--hdx-info); border: 1px solid rgba(14, 165, 233, .3); }
.badge.bg-secondary { background: var(--hdx-surface-alt) !important; color: var(--hdx-text-muted); border: 1px solid var(--hdx-border); }
.badge.bg-light     { background: var(--hdx-surface-alt) !important; color: var(--hdx-text-soft); border: 1px solid var(--hdx-border); }
.badge.bg-dark      { background: var(--hdx-text) !important; color: #fff; border: 1px solid var(--hdx-text); }

/* Traffic-light status circles (getTwoLight()/getTripleLight() in javascript.js) */
.badge.rounded-circle { width: 16px; height: 16px; padding: 0; display: inline-block; border-radius: 50%; }

/* Optionaler kurzer Hervorhebungs-Effekt fuer per AJAX aktualisierte
   Status-Badges (Vorgabe §27) - Utility-Klasse, wird nicht automatisch
   gesetzt; bei Bedarf per JS nach einem erfolgreichen Status-Update
   kurz hinzufuegen/wieder entfernen. */
@keyframes hdx-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 99, 255, .35); }
  70%  { box-shadow: 0 0 0 6px rgba(37, 99, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 255, 0); }
}
.hdx-pulse { animation: hdx-pulse 550ms ease-out 1; }

/* ============================================================
   12. Alerts
   ============================================================ */
.alert { border-radius: var(--hdx-radius-md); font-size: .875rem; border-width: 1px; }
.alert-success { background: rgba(22, 163, 74, .1); border-color: rgba(22, 163, 74, .3); color: var(--hdx-success); }
.alert-warning { background: rgba(217, 119, 6, .12); border-color: rgba(217, 119, 6, .32); color: var(--hdx-warning); }
.alert-danger  { background: rgba(220, 38, 38, .1); border-color: rgba(220, 38, 38, .3); color: var(--hdx-danger); }
.alert-info    { background: rgba(14, 165, 233, .12); border-color: rgba(14, 165, 233, .3); color: var(--hdx-info); }
.alert-primary { background: rgba(37, 99, 255, .1); border-color: rgba(37, 99, 255, .28); color: var(--hdx-primary); }

/* ============================================================
   13. Modals / Offcanvas / Dropdowns — Offcanvas dient projektweit
   auch als "Filterpanel" (z.B. Dashboard-Hotelfilter) - technisch
   wirkender Panel-Header statt schmuckloser Standardleiste.
   ============================================================ */
.modal-content {
  background: var(--hdx-surface);
  border: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius-lg);
  box-shadow: var(--hdx-shadow-md);
}
.modal-header, .modal-footer { border-color: var(--hdx-border); }

.offcanvas { background: var(--hdx-surface); border-color: var(--hdx-border); }
.offcanvas-header {
  background: var(--hdx-surface-alt);
  border-bottom: 1px solid var(--hdx-border);
  padding: .7rem 1rem;
}
.offcanvas-title { font-size: .92rem; font-weight: 700; color: var(--hdx-text); }
.offcanvas-body { font-size: .875rem; }

.dropdown-menu {
  background: var(--hdx-surface);
  border: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius-md);
  box-shadow: var(--hdx-shadow-md);
}
.dropdown-item { color: var(--hdx-text-soft); font-size: .875rem; transition: background var(--hdx-transition-fast), color var(--hdx-transition-fast); }
.dropdown-item:hover, .dropdown-item:focus { background: rgba(37, 99, 255, .08); color: var(--hdx-text); }
.dropdown-item.active, .dropdown-item:active { background: var(--hdx-primary); color: #fff; }

/* ============================================================
   13b. Hotel-Zugriffs-Popover (Users-Liste/Create-Edit) - strukturierte
   Abschnitte statt roher Debug-Liste, begrenzte Hoehe bei vielen Eintraegen.
   ============================================================ */
.popover { max-width: 300px; }
.popover-body { padding: .7rem .85rem; }
.hdx-hotel-popover { font-size: .8rem; color: var(--hdx-text-soft); }
.hdx-popover-section-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--hdx-text-muted);
  border-bottom: 1px solid var(--hdx-border);
  padding-bottom: .2rem;
  margin-bottom: .3rem;
}
.hdx-popover-section-title:not(:first-child) { margin-top: .55rem; }
.hdx-popover-list {
  list-style: none;
  margin: 0 0 .1rem;
  padding: 0;
  max-height: 140px;
  overflow-y: auto;
}
.hdx-popover-list li { padding: .12rem 0; }
.hdx-popover-total {
  margin-top: .5rem;
  padding-top: .4rem;
  border-top: 1px solid var(--hdx-border);
  font-weight: 600;
  color: var(--hdx-text);
}

/* ============================================================
   14. Tabs / Pills / List Groups / Accordion
   ============================================================ */
.nav-tabs { border-color: var(--hdx-border); }
.nav-tabs .nav-link {
  color: var(--hdx-text-muted);
  border: 1px solid transparent;
  border-radius: var(--hdx-radius-sm) var(--hdx-radius-sm) 0 0;
  font-weight: 500;
  font-size: .875rem;
  transition: color var(--hdx-transition-fast), border-color var(--hdx-transition-fast);
}
.nav-tabs .nav-link:hover { color: var(--hdx-primary); border-color: var(--hdx-border) var(--hdx-border) transparent; }
.nav-tabs .nav-link.active {
  color: var(--hdx-primary);
  background: var(--hdx-surface);
  border-color: var(--hdx-border) var(--hdx-border) var(--hdx-surface);
  font-weight: 600;
}

.nav-pills .nav-link { color: var(--hdx-text-soft); font-weight: 500; transition: background var(--hdx-transition-fast), color var(--hdx-transition-fast); }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--hdx-primary); color: #fff; }
.nav-pills .nav-link:hover { color: var(--hdx-primary); }
.nav-pills .nav-link.active:hover { color: #fff; }

.list-group-item { background: var(--hdx-surface); border-color: var(--hdx-border); color: var(--hdx-text-soft); }
.list-group-item.active { background: rgba(37, 99, 255, .1); border-color: var(--hdx-primary); color: var(--hdx-primary); font-weight: 600; }
.list-group-item-action { transition: background var(--hdx-transition-fast); }
.list-group-item-action:hover { background: var(--hdx-surface-alt); }

.accordion-item { background: var(--hdx-surface); border-color: var(--hdx-border); }
.accordion-button {
  background: var(--hdx-surface);
  color: var(--hdx-text);
  font-weight: 600;
  font-size: .875rem;
  transition: background var(--hdx-transition-normal), color var(--hdx-transition-normal);
}
.accordion-button:not(.collapsed) {
  background: rgba(37, 99, 255, .06);
  color: var(--hdx-primary);
  box-shadow: inset 0 -1px 0 var(--hdx-border);
}
.accordion-button:focus { border-color: var(--hdx-primary); box-shadow: 0 0 0 3px rgba(37, 99, 255, .12); }
/* Pfeil-Rotation ist bereits natives Bootstrap-5-Verhalten
   (accordion-button::after transform + transition) - hier nur die
   Timing-Funktion an die zentralen Motion-Tokens angeglichen. */
.accordion-button::after { transition: transform var(--hdx-transition-normal); }

.page-link, .nav-link { color: var(--hdx-primary); }
.page-link:hover { color: var(--hdx-primary-hover); }

/* ============================================================
   15. Login / Public Pages — dunkler Marken-Bereich (identisch zur
   Navy-Navbar) + heller Formular-Bereich, ruhig statt verspielt.
   Login-Views setzen den Seiten-Hintergrund selbst (inline <style>),
   da header.inc.php allen Seiten dasselbe <body class="body"> gibt.
   ============================================================ */
.form-signin .card {
  background: var(--hdx-surface);
  border: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius-xl);
  box-shadow: var(--hdx-shadow-md);
  overflow: hidden; /* fuer den eckigen dunklen Header oben in der runden Card */
}
.hdx-login-brand {
  background: var(--hdx-nav-bg) !important;
  border-bottom: none !important;
  border-radius: var(--hdx-radius-lg);
  padding: 1.5rem 1.5rem 1.3rem !important;
  text-align: center;
}
.hdx-login-brand img { max-height: 32px; width: auto; }
/* Innerhalb der Login-Card (index/passwordforgot/passwordreset) liegt der
   Marken-Bereich flush oben, geclippt durch .form-signin .card { overflow:
   hidden }. Auf registration.tpl (kein Card-Wrapper, breiteres Formular
   direkt auf dem Seitenhintergrund) bleibt der volle Radius als eigenstaendiger
   dunkler "Chip" erhalten, sonst waere das helle Logo auf hellem Grund kaum
   lesbar. */
.card > .hdx-login-brand:first-child { border-radius: 0; padding: 1.4rem 1.5rem 1.2rem !important; }
.hdx-login-brand.hdx-login-brand-inline { display: inline-block; padding: .85rem 1.75rem !important; }

/* ============================================================
   16. jQuery UI (datepicker)
   ============================================================ */
.ui-widget { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .875rem; }
.ui-widget-content { background: var(--hdx-surface); border-color: var(--hdx-border); color: var(--hdx-text); }
.ui-widget-header { background: var(--hdx-surface-alt); border-color: var(--hdx-border); color: var(--hdx-text); }
.ui-state-default, .ui-widget-content .ui-state-default {
  background: var(--hdx-surface); border-color: var(--hdx-border); color: var(--hdx-text-soft);
  transition: background var(--hdx-transition-fast), border-color var(--hdx-transition-fast);
}
.ui-state-hover, .ui-widget-content .ui-state-hover {
  background: rgba(37, 99, 255, .08); border-color: var(--hdx-primary); color: var(--hdx-text);
}
.ui-state-active, .ui-widget-content .ui-state-active {
  background: var(--hdx-gradient); border-color: transparent; color: #fff;
}
.ui-datepicker { z-index: 2051 !important; box-shadow: var(--hdx-shadow-md); border-radius: var(--hdx-radius-md); }

/* ============================================================
   17. Loading States — dezentes Feedback bei AJAX-Requests (Vorgabe
   §28), keine Skeleton-Library, nur Utility-Klassen fuer Buttons.
   Bootstraps eigener .spinner-border bringt seine Animation bereits
   mit (kein eigenes @keyframes noetig).
   ============================================================ */
.btn.hdx-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.hdx-loading::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: hdx-spin .6s linear infinite;
}
.btn-outline-primary.hdx-loading::after,
.btn-outline-secondary.hdx-loading::after,
.btn-outline-danger.hdx-loading::after,
.btn-outline-warning.hdx-loading::after,
.btn-outline-success.hdx-loading::after {
  border-color: rgba(37, 99, 255, .35);
  border-top-color: var(--hdx-primary);
}
@keyframes hdx-spin { to { transform: rotate(360deg); } }

/* ============================================================
   18b. Startpage Operations Cockpit (s.
   docs/reviews/startpage-operations-cockpit-v1.md)
   Die Startseite ist das "Gesicht des Portals" - visuell etwas mehr Tiefe
   als Statistik (Hero-Flaeche, Statuspunkte, Hover-Lift), aber weiterhin
   ausschliesslich bestehende CI-Tokens (--hdx-*), keine neue Palette.
   ============================================================ */

/* Hero: dezenter Navy/Primary-Gradient statt reinem --hdx-nav-bg, damit er
   sich von der Navbar UND von normalen Cards unterscheidet, aber die CI
   nicht verlaesst - subtiles Punktmuster per radial-gradient, kein Bild. */
.hdx-cockpit-hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(25,211,255,.16) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(37,99,255,.22) 0%, transparent 50%),
    linear-gradient(135deg, var(--hdx-nav-bg) 0%, #142238 100%);
  color: var(--hdx-nav-text);
  border-radius: var(--hdx-radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--hdx-shadow-md);
  position: relative;
  overflow: hidden;
}
.hdx-cockpit-hero h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 .3rem;
  color: #fff;
}
.hdx-cockpit-hero .hdx-cockpit-hero-date {
  color: var(--hdx-nav-text-muted);
  font-size: .78rem;
}
.hdx-cockpit-hero-summary {
  font-size: .92rem;
  color: var(--hdx-nav-text-soft);
  margin-top: .5rem;
}
.hdx-cockpit-hero-summary strong { color: #fff; font-weight: 700; }
.hdx-cockpit-hero-summary .hdx-cockpit-hero-sep { margin: 0 .5rem; color: var(--hdx-nav-text-muted); }
.hdx-cockpit-hero-summary.hdx-cockpit-hero-clear { color: var(--hdx-nav-text-soft); }

/* KPI cards: .hdx-stat-card wird als Basis wiederverwendet - Statusvariante
   ueberschreibt nur die ::before-Akzentfarbe + fuegt ein Icon hinzu, keine
   neue Kartenstruktur. */
.hdx-cockpit-kpi {
  cursor: pointer;
  transition: transform var(--hdx-transition-fast), box-shadow var(--hdx-transition-fast);
  text-decoration: none;
  display: block;
}
.hdx-cockpit-kpi:hover, .hdx-cockpit-kpi:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--hdx-shadow-md);
}
.hdx-cockpit-kpi:focus-visible { outline: 2px solid var(--hdx-primary); outline-offset: 2px; }
.hdx-cockpit-kpi .hdx-stat-icon {
  position: absolute; top: .9rem; right: 1rem; font-size: 1.15rem; opacity: .5;
}
.hdx-cockpit-kpi.hdx-kpi-critical::before { background: var(--hdx-danger); }
.hdx-cockpit-kpi.hdx-kpi-attention::before { background: var(--hdx-warning); }
.hdx-cockpit-kpi.hdx-kpi-neutral::before { background: var(--hdx-gradient); }
.hdx-cockpit-kpi.hdx-kpi-critical .hdx-stat-value { color: var(--hdx-danger); }
.hdx-cockpit-kpi.hdx-kpi-attention .hdx-stat-value { color: #B45309; }

/* UI Regression & Overview Polish Pass (s. docs/reviews/
   projects-ui-regression-overview-polish.md "Startpage notification
   scrollbar root cause"): "Meine Benachrichtigungen" zeigte zwei
   uebereinanderliegende vertikale Scrollbars. Root cause: der Fragment-Body
   (#hdx_cockpit_notifications_body, start/index.tpl) trug frueher SELBST
   ein inline max-height:420px;overflow:auto - UND das darin per Ajax
   geladene Fragment (notifications/latest.tpl, .list-group) traegt schon
   immer sein eigenes max-height:400px;overflow-y:auto (dort noetig, weil
   dasselbe Fragment auch das Header-Glocken-Dropdown befuellt, dessen
   Container KEINE eigene Hoehenbegrenzung hat - dort bleibt es unveraendert
   die einzige/richtige Scrollgrenze). Zwei geschachtelte scrollende
   Container fuer denselben Inhalt = doppelte Scrollbar plus (durch die
   .card.h-100-Angleichung an die oft hoehere Situationsmatrix-Karte
   daneben) eine grosse leere Flaeche unterhalb der 400px-gedeckelten Liste.
   Fix: NUR fuer den Cockpit-Kontext (per ID gescoped, das Dropdown bleibt
   unberuehrt) wird der aeussere Container zu einer Flex-Spalte, die
   .list-group darin fuellt exakt den verfuegbaren (h-100-gestreckten)
   Platz per flex:1 1 auto - genau EIN Scroll-Owner, keine leere Flaeche,
   kein overflow:hidden das Inhalt abschneiden wuerde. */
#hdx_cockpit_notifications_body {
	display: flex;
	flex-direction: column;
	min-height: 0;
}
#hdx_cockpit_notifications_body .hdx-notification-list {
	max-height: none;
	flex: 1 1 auto;
	min-height: 0;
}

/* Technisches Lagebild: kompakte Status-Matrix statt DataTable. */
.hdx-matrix-row {
  display: grid;
  grid-template-columns: minmax(160px,1.6fr) 100px repeat(4, 84px);
  align-items: center;
  gap: .4rem;
  padding: .55rem .75rem;
  border-radius: var(--hdx-radius-sm);
  transition: background var(--hdx-transition-fast);
}
.hdx-matrix-row:hover { background: var(--hdx-surface-alt); }
.hdx-matrix-row + .hdx-matrix-row { border-top: 1px solid var(--hdx-border); }
.hdx-matrix-header { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--hdx-text-muted); padding: 0 .75rem .4rem; }
.hdx-matrix-hotel-name { font-weight: 600; color: var(--hdx-text); cursor: pointer; }
.hdx-matrix-hotel-name:hover { color: var(--hdx-primary); }
.hdx-matrix-hotel-state { color: var(--hdx-text-muted); font-size: .74rem; }
.hdx-matrix-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.hdx-matrix-dot.state-critical { background: var(--hdx-danger); }
.hdx-matrix-dot.state-attention { background: var(--hdx-warning); }
.hdx-matrix-dot.state-good { background: var(--hdx-success); }
.hdx-matrix-dot.state-no_data { background: #94A3B8; }
.hdx-matrix-cell {
  display: inline-flex; align-items: center; justify-content: center; gap: .25rem;
  min-width: 52px; padding: .3rem .5rem; border-radius: var(--hdx-radius-sm);
  font-size: .82rem; font-weight: 600; color: var(--hdx-text-muted);
  background: var(--hdx-surface-alt); cursor: default;
}
.hdx-matrix-cell.has-value { cursor: pointer; }
.hdx-matrix-cell.cell-critical { background: rgba(220,38,38,.1); color: var(--hdx-danger); }
.hdx-matrix-cell.cell-attention { background: rgba(217,119,6,.12); color: #B45309; }
.hdx-matrix-cell.has-value:hover { filter: brightness(.95); }
.hdx-matrix-cell:focus-visible { outline: 2px solid var(--hdx-primary); outline-offset: 1px; }
.hdx-matrix-empty-dash { color: var(--hdx-border-strong); }
.hdx-matrix-cells-mobile { display: none; }

/* Vendor UI Polish (s. docs/reviews/vendor-ui-startpage-polish.md "Review
   Farbskala"): kompakte horizontale Bewertungs-Meter fuer die Review-
   Kategorien (vendors/view.tpl Uebersicht + vendors/reviewview.tpl Detail) -
   reine Praesentationsebene, KEINE neue Backend-Score-Klassifizierung (die
   1-5-Rundung fuer die Farbstufe passiert ausschliesslich im Template zur
   Anzeigezeit, nie gespeichert/persistiert). Nur die drei bereits
   bestehenden CI-Semantic-Farben (--hdx-danger/--hdx-warning/--hdx-success)
   - Stufe 2/4 sind ein per color-mix() abgeleiteter Zwischenton der beiden
   jeweils benachbarten Semantic-Farben (kein neuer, frei erfundener Hex-Wert
   - jeder Browser ohne color-mix()-Unterstuetzung faellt auf die zuerst
   deklarierte volle Semantic-Farbe zurueck, s. doppelte background-Deklaration
   je Stufe unten). Alle 5 Stufen volle Deckkraft (kein Opacity-Verblassen
   mehr - Korrektur nach Live-Review "Balken wirken zu blass").
   1 = gedaempft kritisch (danger)
   2 = warm orange (danger/warning-Mix)
   3 = neutral amber (warning)
   4 = positiv (success/warning-Mix, waermeres Gruen)
   5 = staerker positiv (success) */
.hdx-rating-meter-row { display: flex; align-items: center; gap: .6rem; padding: .25rem 0; }
.hdx-rating-meter-label { flex: 1 1 auto; min-width: 0; font-size: .82rem; color: var(--hdx-text); overflow-wrap: break-word; }
.hdx-rating-meter-track { flex: 1 1 70px; max-width: 130px; height: 9px; border-radius: 999px; background: var(--hdx-border); overflow: hidden; min-width: 40px; }
/* Root Cause (Live-Test gefunden): `.hdx-rating-meter-fill` ist ein <span>
   (inline per Default) - width/height greifen bei inline-Elementen nicht,
   der Balken war dadurch de facto unsichtbar (0x0 Box trotz gesetztem
   style="width:X%"). display:block macht die Box-Dimensionen wirksam. */
.hdx-rating-meter-fill { display: block; height: 100%; border-radius: 999px; }
.hdx-rating-meter-fill.level-1 { background: var(--hdx-danger); }
.hdx-rating-meter-fill.level-2 { background: var(--hdx-warning); background: color-mix(in srgb, var(--hdx-danger) 45%, var(--hdx-warning) 55%); }
.hdx-rating-meter-fill.level-3 { background: var(--hdx-warning); }
.hdx-rating-meter-fill.level-4 { background: var(--hdx-success); background: color-mix(in srgb, var(--hdx-success) 78%, var(--hdx-warning) 22%); }
.hdx-rating-meter-fill.level-5 { background: var(--hdx-success); }
.hdx-rating-meter-value { flex: 0 0 auto; font-size: .82rem; font-weight: 700; min-width: 2.8em; text-align: right; }
.hdx-rating-meter-value.level-1 { color: var(--hdx-danger); }
.hdx-rating-meter-value.level-2 { color: var(--hdx-danger); color: color-mix(in srgb, var(--hdx-danger) 45%, var(--hdx-warning) 55%); }
.hdx-rating-meter-value.level-3 { color: var(--hdx-warning); }
.hdx-rating-meter-value.level-4 { color: var(--hdx-success); color: color-mix(in srgb, var(--hdx-success) 78%, var(--hdx-warning) 22%); }
.hdx-rating-meter-value.level-5 { color: var(--hdx-success); }
/* §4 der Aufgabenstellung ("zu wenig Abstand zwischen den Kategorie-
   Spalten"): Root Cause war `g-0` (Bootstrap-Gutter explizit auf 0 gesetzt)
   auf dem umgebenden `.row row-cols-md-2`) - im Template (vendors/view.tpl/
   reviewview.tpl) jetzt durch Bootstraps eigene `gx-4 gy-1`-Utility-Klassen
   ersetzt (kein eigenes CSS noetig, bleibt reines Bootstrap-Grid). */
/* Kompaktes Overall-Badge (Firmenprofil-Uebersicht + Startseite Vendor
   Highlights) - identisches Level-Farbschema wie die Meter oben. §1 der
   Aufgabenstellung ("Summary auf eine Zeile"): Value gross+farbig, "/ 5"
   kleiner+neutral, beide auf derselben Grundlinie (align-items:baseline). */
.hdx-rating-badge { display: inline-flex; align-items: baseline; gap: .25rem; font-weight: 700; }
.hdx-rating-badge .hdx-rating-badge-value { font-size: 1.4rem; line-height: 1; }
.hdx-rating-badge .hdx-rating-badge-suffix { font-size: .78rem; font-weight: 400; color: var(--hdx-text-muted); }
.hdx-rating-badge.level-1 .hdx-rating-badge-value { color: var(--hdx-danger); }
.hdx-rating-badge.level-2 .hdx-rating-badge-value { color: var(--hdx-danger); color: color-mix(in srgb, var(--hdx-danger) 45%, var(--hdx-warning) 55%); }
.hdx-rating-badge.level-3 .hdx-rating-badge-value { color: var(--hdx-warning); }
.hdx-rating-badge.level-4 .hdx-rating-badge-value { color: var(--hdx-success); color: color-mix(in srgb, var(--hdx-success) 78%, var(--hdx-warning) 22%); }
.hdx-rating-badge.level-5 .hdx-rating-badge-value { color: var(--hdx-success); }

/* Handlungsbedarf-Timeline */
.hdx-timeline-pills .btn { font-size: .78rem; }
.hdx-timeline-bucket-title {
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  display: flex; align-items: center; gap: .4rem; margin-bottom: .5rem;
}
.hdx-timeline-bucket-title .badge { font-weight: 700; }
.hdx-timeline-item {
  display: flex; align-items: flex-start; gap: .55rem;
  padding: .5rem .6rem; border-radius: var(--hdx-radius-sm);
  border-left: 3px solid var(--hdx-border);
  background: var(--hdx-surface-alt);
  margin-bottom: .4rem;
  cursor: pointer;
  transition: background var(--hdx-transition-fast), border-color var(--hdx-transition-fast);
}
.hdx-timeline-item:hover, .hdx-timeline-item:focus-visible { background: #EAF0FB; outline: none; }
.hdx-timeline-item:focus-visible { box-shadow: 0 0 0 2px var(--hdx-primary); }
.hdx-timeline-item.bucket-overdue { border-left-color: var(--hdx-danger); }
.hdx-timeline-item.bucket-today { border-left-color: var(--hdx-warning); }
.hdx-timeline-item.bucket-week { border-left-color: var(--hdx-primary); }
.hdx-timeline-item.bucket-month { border-left-color: var(--hdx-primary-2); }
.hdx-timeline-item .hdx-timeline-icon { font-size: .95rem; color: var(--hdx-text-muted); margin-top: .1rem; }
.hdx-timeline-item .hdx-timeline-title { font-weight: 600; font-size: .85rem; color: var(--hdx-text); }
.hdx-timeline-item .hdx-timeline-meta { font-size: .74rem; color: var(--hdx-text-muted); }
.hdx-timeline-item .hdx-timeline-date { margin-left: auto; font-size: .74rem; color: var(--hdx-text-muted); white-space: nowrap; }
.hdx-timeline-empty { color: var(--hdx-text-muted); font-size: .8rem; padding: .5rem 0; }

/* Admin Attention */
.hdx-admin-attention-item {
  padding: .6rem .75rem; border-radius: var(--hdx-radius-sm);
  background: var(--hdx-surface-alt); margin-bottom: .5rem;
}
.hdx-admin-attention-item .hdx-admin-name { font-weight: 600; font-size: .85rem; }
.hdx-admin-attention-item .hdx-admin-reason { font-size: .78rem; color: var(--hdx-text-muted); }
.hdx-admin-clear { color: var(--hdx-success); font-size: .85rem; display: flex; align-items: center; gap: .4rem; }
/* Startpage Vendor Highlights (s. docs/reviews/vendor-ui-startpage-polish.md
   "Vendor Highlights"): wiederverwendet .hdx-admin-attention-item/-name/
   -reason 1:1 (identisches Exception-List-Muster wie Admin/Project
   Attention) - nur die interne Flex-Anordnung (Name/Meta links, Rating-Badge
   rechts) ist neu. */
.hdx-vendor-highlight-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.hdx-vendor-highlight-item .hdx-admin-name { cursor: pointer; }
.hdx-vendor-highlight-services { margin-top: .3rem; }

/* Quick Actions */
.hdx-quickaction-btn {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .8rem; border-radius: var(--hdx-radius-sm);
  border: 1px solid var(--hdx-border); background: var(--hdx-surface);
  font-size: .85rem; font-weight: 600; color: var(--hdx-text);
  transition: border-color var(--hdx-transition-fast), background var(--hdx-transition-fast);
  width: 100%; text-align: left;
}
.hdx-quickaction-btn:hover, .hdx-quickaction-btn:focus-visible { border-color: var(--hdx-primary); background: var(--hdx-surface-alt); }
.hdx-quickaction-btn i { color: var(--hdx-primary); font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
  .hdx-cockpit-kpi, .hdx-timeline-item, .hdx-quickaction-btn { transition: none; }
  .hdx-cockpit-kpi:hover { transform: none; }
}

/* Mobile: Matrix-Zeilen werden zu Cards (§97 der Aufgabenstellung) */
@media (max-width: 767px) {
  .hdx-matrix-header { display: none; }
  .hdx-matrix-row {
    grid-template-columns: 1fr;
    gap: .3rem;
    border: 1px solid var(--hdx-border);
    border-radius: var(--hdx-radius-md);
    margin-bottom: .5rem;
    padding: .75rem;
  }
  .hdx-matrix-row + .hdx-matrix-row { border-top: 1px solid var(--hdx-border); }
  .hdx-matrix-cell-desktop-wrap { display: none; }
  .hdx-matrix-cells-mobile { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
  .hdx-cockpit-hero h1 { font-size: 1.15rem; }
  .hdx-cockpit-hero-summary { font-size: .85rem; }
}

/* ============================================================
   18. Responsive
   ============================================================ */
@media (max-width: 767px) {
  .card-header { font-size: .8rem; }
  .navbar-nav .nav-link { padding: .55rem .8rem; }
  h1.mx-2 { font-size: 1.05rem; margin: .7rem .4rem .75rem !important; }
}

/* ============================================================
   19. Calendar V1 (s. docs/reviews/calendar-v1.md)
   Farbe = STATUS (ueberfaellig/faellig/geplant), nie Modul - Modul wird
   ausschliesslich ueber Icon/Label/Tooltip unterschieden (kein Regenbogen
   aus Modulfarben, s. project-rules.md "Calendar"). Kein neues Kalender-Grid-
   Framework vendored - handgebautes CSS-Grid auf der bestehenden Bootstrap-
   Basis (project-rules.md "Do not add another calendar/date library").
   ============================================================ */
.hdx-cal-daynames {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.hdx-cal-dayname {
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--hdx-text-muted);
  padding: .2rem 0;
}
.hdx-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.hdx-cal-grid-week .hdx-cal-day { min-height: 220px; }
.hdx-cal-day {
  background: var(--hdx-surface);
  border: 1px solid var(--hdx-border);
  border-radius: var(--hdx-radius-sm);
  min-height: 96px;
  padding: .3rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.hdx-cal-day.is-outside { background: var(--hdx-surface-alt); opacity: .55; }
.hdx-cal-day.is-today { border-color: var(--hdx-primary); box-shadow: inset 0 0 0 1px var(--hdx-primary); }
.hdx-cal-daynum { font-size: .78rem; font-weight: 600; color: var(--hdx-text-muted); }
.hdx-cal-day.is-today .hdx-cal-daynum { color: var(--hdx-primary); }
.hdx-cal-event {
  font-size: .7rem;
  line-height: 1.3;
  padding: .12rem .35rem;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  border: none;
}
.hdx-cal-event:focus-visible { outline: 2px solid var(--hdx-text); outline-offset: 1px; }
.hdx-cal-event.status-overdue { background: var(--hdx-danger); }
.hdx-cal-event.status-due, .hdx-cal-event.status-due_soon { background: var(--hdx-warning); }
.hdx-cal-event.status-planned { background: var(--hdx-primary); }
.hdx-cal-event.status-completed { background: var(--hdx-success); }
.hdx-cal-more { color: var(--hdx-text-muted); cursor: pointer; padding: 0 .2rem; }
.hdx-cal-more:hover { color: var(--hdx-primary); }
.hdx-cal-list-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .6rem;
  border: 1px solid var(--hdx-border);
  border-left: 4px solid var(--hdx-border-strong);
  border-radius: var(--hdx-radius-sm);
  margin-bottom: .35rem;
  cursor: pointer;
  background: var(--hdx-surface);
}
.hdx-cal-list-item:hover, .hdx-cal-list-item:focus-visible { background: var(--hdx-surface-alt); outline: none; }
.hdx-cal-list-item.status-overdue { border-left-color: var(--hdx-danger); }
.hdx-cal-list-item.status-due, .hdx-cal-list-item.status-due_soon { border-left-color: var(--hdx-warning); }
.hdx-cal-list-item.status-planned { border-left-color: var(--hdx-primary); }
.hdx-cal-list-item .hdx-cal-list-date { font-size: .74rem; color: var(--hdx-text-muted); min-width: 5.5rem; }
.hdx-cal-list-item .hdx-cal-list-title { font-weight: 600; font-size: .85rem; }
.hdx-cal-list-item .hdx-cal-list-hotel { margin-left: auto; font-size: .78rem; }
.hdx-cal-overdue-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .3rem;
  border-bottom: 1px solid var(--hdx-border);
  cursor: pointer;
  font-size: .8rem;
}
.hdx-cal-overdue-item:last-child { border-bottom: none; }
.hdx-cal-overdue-item:hover, .hdx-cal-overdue-item:focus-visible { background: var(--hdx-surface-alt); outline: none; }
.hdx-cal-overdue-item .hdx-cal-overdue-title { font-weight: 600; }
.hdx-cal-overdue-item .hdx-cal-overdue-date { margin-left: auto; font-size: .72rem; color: var(--hdx-danger); white-space: nowrap; }

@media (max-width: 767px) {
  .hdx-cal-day { min-height: 64px; font-size: .7rem; }
  .hdx-cal-dayname { font-size: .62rem; }
  .hdx-cal-event { font-size: .62rem; }
}
