/* KT-Catering – Farbschema ALB CATERING (Anthrazit + Gold, wie catering-ulm.com)
   Variablennamen bleiben (navy = dunkle Grundfarbe, teal = Hauptakzent, yellow = helles Gold fuer Icons) */
:root {
  --hc-navy:  #1F1F21;   /* Anthrazit */
  --hc-teal:  #C9A24A;   /* Gold (Hauptakzent, Buttons) */
  --hc-yellow:#E3C27A;   /* helles Gold (Icons auf dunklem Grund) */
  --hc-gold-dark: #B38D3A;
}

body {
  background: #F5F4F0;
  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;
}
/* 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%, #3a3a3e 100%); }
.hc-login-card { width: 100%; max-width: 420px; border-radius: 12px; }

/* Buttons */
.hc-btn-primary { background: var(--hc-teal); border: none; color: var(--hc-navy); font-weight: 600; }
.hc-btn-primary:hover { background: var(--hc-gold-dark); color: var(--hc-navy); }

/* 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: #f6efdc; }
.bg-yellow-soft { background: #fef6e0; }

/* 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.
   Zwei Klassen im Selektor (statt nur .hc-faktura-page), damit die Spezifitaet
   mit der Alt-Regel .container-fluid.mt-4 oben gleichzieht -- sonst gewinnt bei
   gleichem !important immer die hoehere Spezifitaet, unabhaengig von der
   Reihenfolge im File, und diese Regel hier greift nie (siehe Kommentar oben
   in der Datei). max-width jetzt bildschirmbreiten-abhaengig statt starr, damit
   auf grossen Monitoren nicht unnoetig viel Rand links/rechts frei bleibt. */
.container-fluid.hc-faktura-page {
  padding-left: 32px !important;
  padding-right: 32px !important;
  max-width: min(96vw, 2200px);
  margin-left: auto;
  margin-right: auto;
}

/* ── KT-Catering-Navbar (Anthrazit/Gold) ── */
.hc-faktura-navbar {
  background: var(--hc-navy);
  border-bottom: 3px solid var(--hc-teal);
  padding-top: 10px;
  padding-bottom: 10px;
}
.hc-faktura-navbar .navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-right: 1.25rem;
  color: #fff !important;
}
.hc-faktura-navbar .navbar-brand span { color: var(--hc-yellow) !important; }
.hc-faktura-navbar .navbar-brand i { color: var(--hc-yellow) !important; }
.hc-faktura-navbar .navbar-nav .nav-link {
  color: rgba(255,255,255,0.88) !important;
  font-size: 0.95rem;
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  margin-left: 1px;
  margin-right: 1px;
  white-space: nowrap;
  border-radius: 6px;
}
.hc-faktura-navbar .navbar-nav .nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.10);
}
.hc-faktura-navbar .navbar-nav .nav-link.active,
.hc-faktura-navbar .navbar-nav .nav-link.show {
  color: var(--hc-navy) !important;
  background: var(--hc-teal);
}
.hc-faktura-navbar .navbar-nav .nav-link i {
  color: var(--hc-yellow);
  margin-right: 0.35rem;
}
.hc-faktura-navbar .navbar-nav .nav-link.active i,
.hc-faktura-navbar .navbar-nav .nav-link.show i { color: var(--hc-navy); }
.hc-faktura-navbar .dropdown-menu {
  background: #2A2A2D;
  border: none;
  border-top: 2px solid var(--hc-teal);
  box-shadow: 0 6px 20px rgba(10,20,40,0.35);
}
.hc-faktura-navbar .dropdown-item {
  color: rgba(255,255,255,0.92);
  font-size: 0.9rem;
}
.hc-faktura-navbar .dropdown-item:hover,
.hc-faktura-navbar .dropdown-item.active {
  background: rgba(201,162,74,0.22);
  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.18); }
.hc-faktura-navbar .hc-nav-sep { background: rgba(255,255,255,0.18); }
.hc-faktura-navbar .navbar-text { color: rgba(255,255,255,0.85) !important; }
.hc-faktura-navbar .navbar-toggler { border-color: rgba(255,255,255,0.5) !important; }
.hc-faktura-navbar .navbar-toggler-icon { filter: invert(1); }
.hc-faktura-navbar .btn-outline-dark { color: #fff; border-color: rgba(255,255,255,0.55); }
.hc-faktura-navbar .btn-outline-dark:hover { background: #fff; border-color: #fff; color: var(--hc-navy); }


/* Umschalter Verwaltung <-> Küchenansicht (rechts in der Navbar) */
.hc-kueche-btn {
  background: var(--hc-yellow) !important;
  color: var(--hc-navy) !important;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hc-kueche-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); color: var(--hc-navy) !important; }
.hc-kueche-btn i { color: var(--hc-navy) !important; margin-right: 0.35rem; }

/* 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(201,162,74,.35); }
.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-logo-btn {
  border: none;
  padding: 0;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.hc-footer-logo-btn:hover { filter: brightness(0.93); transform: translateY(-1px); }
.hc-footer-logo-btn:focus-visible { outline: 2px solid var(--hc-teal); outline-offset: 2px; }

/* ── Kreativtanke-Kontakt-Modal (Footer-Logo) ── */
.hc-kt-modal-header { align-items: flex-start; border-bottom: 3px solid var(--hc-teal); }
.hc-kt-modal-brand { display: flex; align-items: center; gap: 14px; }
.hc-kt-modal-logo { height: 42px; width: auto; }
.hc-kt-modal-sub { font-size: 0.85rem; color: #6c757d; font-weight: 500; margin-top: 2px; }
.hc-kt-modal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.hc-kt-modal-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.95rem; line-height: 1.4; }
.hc-kt-modal-list i { color: var(--hc-navy); font-size: 1.15rem; margin-top: 2px; flex: 0 0 auto; }
.hc-kt-modal-list a { color: var(--hc-navy); text-decoration: none; font-weight: 600; }
.hc-kt-modal-list a:hover { text-decoration: underline; }
.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;
}

/* Durchsuchbares Kunden-Dropdown (09.09.2026) */
.kunden-search-wrap { position: relative; }
.kunden-search-list {
  position: absolute; z-index: 1071; top: 100%; left: 0; right: 0;
  margin-top: 2px; max-height: 320px; overflow-y: auto;
  background: #fff; border: 1px solid #ced4da; border-radius: .375rem;
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
}
.kunden-search-item {
  padding: .45rem .75rem; font-size: .95rem; cursor: pointer;
}
.kunden-search-item:hover, .kunden-search-item.active {
  background: var(--hc-teal); color: #fff;
}
.kunden-search-empty, .kunden-search-hint {
  padding: .45rem .75rem; font-size: .85rem; color: #6c757d; font-style: italic;
}

/* KI-Guthaben-Anzeige in der Navbar (views/faktura/partials/_nav.ejs). */
.hc-ki-credits {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid rgba(1, 87, 132, 0.15);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  font-size: 13px;
  color: var(--hc-navy);
  flex-shrink: 0;
  white-space: nowrap;
  transition: box-shadow .15s, border-color .15s;
}
.hc-ki-credits i.bi-stars { color: var(--hc-teal); font-size: 15px; }
.hc-ki-credits-label {
  color: #7a84a0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.hc-ki-credits-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.hc-ki-credits.is-niedrig { border-color: rgba(192, 57, 43, 0.45); box-shadow: 0 1px 4px rgba(192, 57, 43, 0.3); }
.hc-ki-credits.is-niedrig .hc-ki-credits-value { color: #c0392b; }
.hc-ki-credits-aufladen {
  margin-left: 2px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--hc-teal);
  color: #fff !important;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.hc-ki-credits-aufladen:hover { background: #009d96; }
@media (max-width: 576px) {
  .hc-ki-credits { padding: 4px 8px; gap: 5px; font-size: 12px; }
  .hc-ki-credits-label { display: none; }
}

/* KI-Credits im Footer (vor Datum/Uhr) */
.hc-footer-right { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.hc-footer-zeit { text-align: right; }

/* Kopfzeile bleibt beim Scrollen oben stehen (Wunsch Markus 13.10.2026) */
.hc-faktura-navbar { position: sticky; top: 0; z-index: 1030; }
html { scroll-padding-top: 76px; }   /* Sprungmarken (#mailarchiv usw.) nicht unter der Kopfzeile verstecken */
/* KI-Credits wieder in der Kopfzeile: kompakt, Beschriftung nur auf breiten Bildschirmen */
.hc-ki-credits-nav { padding: 3px 10px 3px 8px; font-size: 12px; box-shadow: none; }
@media (max-width: 1699px) { .hc-ki-credits-nav .hc-ki-credits-label { display: none; } }

/* Kennzeichnung vegetarisch (V) / vegan (VG) – Markus 17.10.2026 */
.ern { display: inline-block; font-size: .68rem; font-weight: 700; line-height: 1; padding: .18em .42em; border-radius: 999px; vertical-align: middle; margin-left: .35rem; letter-spacing: .02em; }
.ern-v  { color: #2e7d32; border: 1.5px solid #2e7d32; background: #fff; }
.ern-vg { color: #fff; background: #1b5e20; border: 1.5px solid #1b5e20; }
