/* KfzRegie – Brand Colors (Navy / Blau / Hellblau) */
:root {
  --hc-navy:  #0B2145; /* Navy (Sidebar/Struktur) */
  --hc-teal:  #0B5FEE; /* Blau (Primaer/Akzent) */
  --hc-yellow:#6EA8FF; /* Hellblau (Sekundaer-Akzent, z.B. Icons auf Navy) */
  --kr-sidebar-width: 280px;
  --kr-topbar-height: 60px;
}

body {
  background: #F4F6FB;
  font-family: 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.hc-navbar {
  background: var(--hc-navy);
  border-bottom: 3px solid var(--hc-yellow);
  padding-top: 10px;
  padding-bottom: 10px;
}
.hc-navbar .navbar-brand {
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  margin-right: 3.5rem;
}
.hc-navbar .navbar-nav .nav-link {
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  font-size: 0.95rem;
}
/* Nav-Icons in Yellow einfärben + Luft zum Text */
.hc-navbar .navbar-nav .nav-link i {
  color: var(--hc-yellow);
  margin-right: 0.35rem;
}
/* Hover/aktiv-Zustand für normale Nav-Links + Dropdown-Trigger (vereinheitlichte Nav) */
.hc-navbar .navbar-nav .nav-link:hover,
.hc-navbar .navbar-nav .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
}
/* Aktiver Zustand beim orangen "Dokumente"-Button etwas absetzen (der ist immer orange, auch inaktiv) */
.hc-navbar .navbar-nav .nav-link.hc-faktura-btn.active {
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.3);
}
/* Subtile Trennlinie zwischen Nav-Gruppen */
.hc-nav-sep {
  width: 1px;
  background: rgba(255,255,255,0.18);
  margin: 4px 0.6rem;
  align-self: stretch;
  display: flex;
}

/* Login */
.hc-login-bg { background: linear-gradient(135deg, var(--hc-navy) 0%, #6b6b6b 100%); }
.hc-login-card { width: 100%; max-width: 420px; border-radius: 12px; }

/* Buttons */
.hc-btn-primary { background: var(--hc-teal); border: none; color: #fff; }
.hc-btn-primary:hover { background: #C94E1F; color: #fff; }

/* Colors */
.hc-navy   { color: var(--hc-navy) !important; }
.hc-teal   { color: var(--hc-teal) !important; }
.hc-yellow { color: var(--hc-yellow) !important; }

/* Ampel-Dot (farbiger Kreis für Ablaufdaten) */
.hc-ampel-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Stat Cards */
.hc-stat-card { border-radius: 10px; transition: transform .15s; }
.hc-stat-card:hover { transform: translateY(-2px); }
.hc-stat-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.bg-teal-soft   { background: #fce8df; }
.bg-yellow-soft { background: #e3f1ee; }

/* Table */
.hc-table-head th { background: var(--hc-navy); color: #fff; font-weight: 600; border: none; }

/* Card headers – zwei Varianten */
.hc-card-header       { background: #eef1f7; font-weight: 600; color: var(--hc-navy); border-bottom: 1px solid #dee2e6; }
/* Dunkle Variante für Cards mit Action-Buttons im Header */
.hc-card-header-dark  { background: var(--hc-navy); color: #fff; font-weight: 600; border-bottom: none; }

/* Seitenränder – alle Content-Seiten (nicht Navbar) */
.container-fluid.mt-4 { padding-left: 100px !important; padding-right: 100px !important; }

/* Faktura: breiter Content-Bereich, weniger Rand */
.hc-faktura-page { padding-left: 40px !important; padding-right: 40px !important; max-width: 1700px; margin-left: auto; margin-right: auto; }

/* Im Sidebar-Layout ist der Content-Bereich bereits schmaler (Sidebar nimmt links Platz weg) –
   die alten, für volle Bildschirmbreite gedachten Seitenränder wären hier zu groß. */
body.kr-shell .container-fluid.mt-4 { padding-left: 32px !important; padding-right: 32px !important; }
body.kr-shell .hc-faktura-page { padding-left: 24px !important; padding-right: 24px !important; max-width: 100%; }

/* Faktura-Button in Hosting-Navbar */
.hc-faktura-btn {
  background: var(--hc-teal) !important;
  color: #fff !important;
  border-radius: 6px;
  padding: 4px 14px !important;
  font-weight: 600;
}
.hc-faktura-btn:hover { background: #C94E1F !important; color: #fff !important; }
.hc-faktura-btn i { color: #fff !important; }

/* ── Faktura-Navbar (Teal) ── */
.hc-faktura-navbar {
  background: var(--hc-teal);
  border-bottom: 3px solid var(--hc-yellow);
  padding-top: 10px;
  padding-bottom: 10px;
}
.hc-faktura-navbar .navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-right: 2.5rem;
  color: #fff !important;
}
.hc-faktura-navbar .navbar-brand span { color: var(--hc-navy); }
.hc-faktura-navbar .navbar-nav .nav-link {
  color: rgba(255,255,255,0.92) !important;
  font-size: 0.95rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  margin-left: 2px;
  margin-right: 2px;
}
.hc-faktura-navbar .navbar-nav .nav-link:hover,
.hc-faktura-navbar .navbar-nav .nav-link.active {
  color: #fff !important;
  background: rgba(0,0,0,0.13);
  border-radius: 6px;
}
.hc-faktura-navbar .navbar-nav .nav-link i {
  color: var(--hc-navy);
  margin-right: 0.35rem;
}
.hc-faktura-navbar .dropdown-menu {
  background: #C94E1F;
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.hc-faktura-navbar .dropdown-item {
  color: rgba(255,255,255,0.92);
  font-size: 0.9rem;
}
.hc-faktura-navbar .dropdown-item:hover {
  background: rgba(0,0,0,0.15);
  color: #fff;
}
.hc-faktura-navbar .dropdown-item i { color: var(--hc-yellow); margin-right: 0.4rem; }
.hc-faktura-navbar .dropdown-divider { border-color: rgba(255,255,255,0.2); }
.hc-faktura-navbar .hc-nav-sep {
  background: rgba(255,255,255,0.25);
}

/* Faktura zurück-Button */
.hc-back-btn {
  background: rgba(0,0,0,0.15);
  color: #fff !important;
  border-radius: 6px;
  padding: 4px 12px !important;
  font-size: 0.88rem;
}
.hc-back-btn:hover { background: rgba(0,0,0,0.25); color: #fff !important; }

/* Faktura Kacheln */
.hc-faktura-tile {
  border-radius: 12px;
  transition: transform .15s, box-shadow .15s;
  border: none;
  text-decoration: none;
}
.hc-faktura-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}
.hc-faktura-kpi { border-left: 4px solid var(--hc-teal); }
.hc-faktura-kpi.danger { border-left-color: #dc3545; }
.hc-faktura-kpi.warning { border-left-color: var(--hc-yellow); }

/* ── Kunden-Detail: moderner Tab-Stil ─────────────────────────────────────── */
.hc-detail-tabs {
  border-bottom: 2px solid #e5e7eb;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
  padding-bottom: 0;
}
.hc-detail-tabs::-webkit-scrollbar { display: none; }
.hc-detail-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #6b7280;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  margin-bottom: -2px;
}
.hc-detail-tabs .nav-link:hover { color: var(--hc-teal); border-bottom-color: rgba(0,189,181,.3); }
.hc-detail-tabs .nav-link.active { color: var(--hc-teal); border-bottom-color: var(--hc-teal); font-weight: 600; }
.hc-detail-tabs .nav-link .hc-tab-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2em 0.5em;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  margin-left: 0.3rem;
  vertical-align: middle;
  transition: background .15s;
}
.hc-detail-tabs .nav-link.active .hc-tab-badge { background: var(--hc-teal); color: #fff; }

/* KPI-Strip */
.hc-kpi-strip {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.5rem;
}
.hc-kpi-strip .hc-kpi-item { border-right: 1px solid #e5e7eb; padding-right: 1.5rem; }
.hc-kpi-strip .hc-kpi-item:last-child { border-right: none; padding-right: 0; }
.hc-kpi-val { font-size: 1.4rem; font-weight: 700; color: var(--hc-navy); line-height: 1.1; }
.hc-kpi-lbl { font-size: 0.72rem; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; margin-top: .15rem; }

/* Tab-Content Panels */
.hc-tab-panel { padding-top: 1.25rem; }
.hc-placeholder-tab {
  padding: 3rem 1rem;
  text-align: center;
  color: #9ca3af;
}
.hc-placeholder-tab i { font-size: 2rem; display: block; margin-bottom: .75rem; }

/* Kommentar-Box */
.hc-kommentar-item { border-left: 3px solid #e5e7eb; padding-left: 1rem; margin-bottom: 1rem; }
.hc-kommentar-item:last-child { margin-bottom: 0; }

/* Footer */
.hc-footer {
  background: #13131F;
  border-top: 3px solid var(--hc-yellow);
  padding: 11px 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  user-select: none;
  flex-shrink: 0;
}
.hc-footer-left { display: flex; align-items: center; gap: 16px; }
.hc-footer-logo-box {
  background: #ffffff;
  border-radius: 8px;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
}
.hc-footer-logo { height: 54px; width: auto; display: block; }
.hc-footer-appname {
  color: #c8cfe0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: block;
}
.hc-footer-version { color: #7a84a0; font-size: 13px; letter-spacing: 0.05em; display: block; }
.hc-footer-center { display: flex; align-items: center; }
.hc-footer-right { text-align: right; }
#hc-footer-date { color: #7a84a0; font-size: 14px; display: block; }
#hc-footer-time {
  color: var(--hc-teal);
  font-size: 16px;
  font-weight: 500;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  display: block;
}

/* ══════════════════════════════════════════════════════════════════════════
   Sidebar-Layout (KfzRegie, 06.07.2026)
   ══════════════════════════════════════════════════════════════════════════ */

body.kr-shell {
  padding-left: var(--kr-sidebar-width);
  padding-top: var(--kr-topbar-height);
}
@media (max-width: 991.98px) {
  body.kr-shell { padding-left: 0; }
}

.kr-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--kr-sidebar-width);
  background: var(--hc-navy);
  display: flex;
  flex-direction: column;
  z-index: 1030;
  overflow-y: auto;
  transition: transform .2s ease;
}
@media (max-width: 991.98px) {
  .kr-sidebar { transform: translateX(-100%); }
  .kr-sidebar.kr-open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.3); }
}

.kr-sidebar-brand {
  padding: 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.kr-sidebar-logo-box {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.kr-sidebar-logo { height: 60px; width: auto; max-width: 100%; display: block; }

.kr-sidebar-nav { padding: 12px 12px; flex: 1; }

.kr-nav-group-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  padding: 14px 10px 6px;
}
.kr-nav-group-label:first-child { padding-top: 4px; }

.kr-nav-link, .kr-nav-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: rgba(255,255,255,0.82);
  font-size: 13.5px;
  text-decoration: none;
  margin-bottom: 2px;
}
.kr-nav-link i, .kr-nav-toggle i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.kr-nav-link:hover, .kr-nav-toggle:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.kr-nav-link.active, .kr-nav-toggle.active { background: var(--hc-teal); color: #fff; }
.kr-nav-chevron { font-size: 11px !important; width: auto !important; transition: transform .15s; }
.kr-nav-toggle[aria-expanded="true"] .kr-nav-chevron { transform: rotate(180deg); }

.kr-nav-sublink {
  display: block;
  padding: 7px 10px 7px 38px;
  border-radius: 8px;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 1px;
}
.kr-nav-sublink:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.kr-nav-sublink.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; }

.kr-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.kr-sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--hc-teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.kr-sidebar-user-name { font-size: 12.5px; color: #fff; font-weight: 500; line-height: 1.3; }
.kr-sidebar-logout {
  background: none; border: none; padding: 0;
  font-size: 11px; color: rgba(255,255,255,0.5);
  display: flex; align-items: center; gap: 4px;
}
.kr-sidebar-logout:hover { color: #fff; }

.kr-sidebar-toggle {
  position: fixed;
  top: 14px; left: 14px;
  z-index: 1031;
  background: var(--hc-navy);
  color: #fff;
  border: none;
  width: 38px; height: 38px;
  border-radius: 8px;
  font-size: 18px;
}

.kr-topbar {
  position: fixed;
  top: 0;
  left: var(--kr-sidebar-width);
  right: 0;
  height: var(--kr-topbar-height);
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1020;
  gap: 16px;
}
@media (max-width: 991.98px) {
  .kr-topbar { left: 0; padding-left: 62px; }
}

.kr-topbar-search {
  position: relative;
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  background: #f4f6fb;
  border-radius: 8px;
  padding: 0 12px;
  height: 36px;
}
.kr-topbar-search i { color: #9ca3af; font-size: 14px; margin-right: 8px; flex-shrink: 0; }
.kr-topbar-search input {
  border: none; background: transparent; outline: none;
  font-size: 13.5px; width: 100%; color: var(--hc-navy);
}

.kr-topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

body.kr-shell .hc-footer { padding: 11px 32px; }
