/* LIRENO Cockpit — Web (hell), basierend auf lireno-cockpit-light-v2.html */

/* Helle Topbar (Mock light-v2) */
.ld-body--cockpit .ld-topbar {
  background: rgba(247, 245, 240, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ld-border);
  box-shadow: none;
}
.ld-body--cockpit .ld-topbar::after { display: none; }
.ld-body--cockpit .ld-greeting {
  font-size: 13px;
  font-weight: 700;
  color: var(--ld-ink);
  text-shadow: none;
}
.ld-body--cockpit .lc-topbar__date { color: var(--ld-muted); }
.ld-body--cockpit .lc-topbar__dot { color: #94a3b8; }
.ld-body--cockpit .ld-lang-switch {
  background: var(--ld-white);
  border-color: var(--ld-border);
  backdrop-filter: none;
}
.ld-body--cockpit .ld-lang-btn { color: var(--ld-muted); }
.ld-body--cockpit .ld-lang-btn:hover {
  color: var(--ld-ink);
  background: var(--ld-cream);
}
.ld-body--cockpit .ld-lang-btn.is-active {
  background: var(--ld-cream);
  color: var(--ld-ink);
  box-shadow: none;
}
.ld-body--cockpit .ld-mandant-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  background: var(--ld-white);
  border: 1px solid var(--ld-border);
  border-radius: 7px;
  font-size: 11px;
  color: var(--ld-muted);
  white-space: nowrap;
}
.ld-body--cockpit .ld-badge--ok {
  font-size: 10px;
  font-weight: 800;
  background: var(--ld-accent-l);
  color: var(--ld-accent);
  border-color: rgba(26, 107, 60, 0.35);
  padding: 2px 7px;
  border-radius: 5px;
}
.ld-body--cockpit .lc-qb {
  background: var(--ld-white);
  border-color: var(--ld-border);
  color: var(--ld-muted);
}
.ld-body--cockpit .lc-qb:hover {
  border-color: rgba(26, 107, 60, 0.35);
  color: var(--ld-accent);
  background: var(--ld-accent-l);
}
.ld-body--cockpit .lc-qb--primary {
  background: var(--ld-accent);
  color: #fff;
  border-color: var(--ld-accent);
}
.ld-body--cockpit .lc-qb--primary:hover {
  background: #155e32;
  color: #fff;
}
.ld-body--cockpit .lc-ib {
  background: var(--ld-white);
  border-color: var(--ld-border);
  color: var(--ld-muted);
}
.ld-body--cockpit .lc-ib:hover {
  border-color: rgba(26, 107, 60, 0.35);
  color: var(--ld-accent);
}
.ld-body--cockpit .lc-ib__dot {
  background: #c0392b;
  border-color: var(--ld-white);
}
.ld-body--cockpit .ld-hamburger {
  background: var(--ld-white);
  border-color: var(--ld-border);
}
.ld-body--cockpit .ld-hamburger span { background: var(--ld-ink); }

/* Sidebar Mandant + Footer (Mock) */
.ld-body--cockpit .ld-mandant-btn {
  flex-direction: row;
  align-items: center;
}
.ld-body--cockpit .ld-mandant-btn__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}
.ld-body--cockpit .ld-mandant-btn__name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.ld-body--cockpit .ld-mandant-btn__uid {
  font-size: 10px;
  color: var(--ld-muted);
  margin-top: 1px;
  line-height: 1.2;
}
.ld-body--cockpit .lc-sidebar-bot {
  margin-top: auto;
  border-top: 1px solid var(--ld-border);
  padding: 10px;
  flex-shrink: 0;
}
.ld-body--cockpit .lc-ki-sbtn {
  width: 100%;
  margin-bottom: 6px;
  padding: 8px;
  background: var(--ld-accent-l);
  border: 1px solid rgba(26, 107, 60, 0.35);
  border-radius: 7px;
  color: var(--ld-accent);
  font-family: var(--ld-font);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.14s;
}
.ld-body--cockpit .lc-ki-sbtn:hover {
  background: var(--ld-accent);
  color: #fff;
  border-color: var(--ld-accent);
}
.ld-body--cockpit .lc-sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 7px;
  cursor: default;
}
.ld-body--cockpit .lc-setup-btn {
  width: 100%;
  margin-top: 6px;
  padding: 7px;
  background: var(--ld-paper);
  border: 1px solid var(--ld-border);
  border-radius: 7px;
  color: var(--ld-muted);
  font-family: var(--ld-font);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.14s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ld-body--cockpit .lc-setup-btn:hover {
  border-color: rgba(26, 107, 60, 0.35);
  color: var(--ld-accent);
}
.ld-body--cockpit .lc-logout-btn {
  width: 100%;
  margin-top: 6px;
  padding: 7px;
  background: transparent;
  border: 1px solid var(--ld-border);
  border-radius: 7px;
  color: var(--ld-muted);
  font-family: var(--ld-font);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s;
}
.ld-body--cockpit .lc-logout-btn:hover {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fef2f2;
}

.ld-body--cockpit .ld-main {
  padding: 16px 20px;
  gap: 12px;
  background: var(--ld-paper, #f7f5f0);
}

.lc-cockpit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* display:flex überschreibt sonst das HTML-[hidden]-Attribut */
.lc-cockpit[hidden],
#ld-overview-panel[hidden] {
  display: none !important;
}

/* Topbar Quick Actions */
.lc-topbar__center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.lc-topbar__date {
  font-size: 12px;
  color: var(--ld-muted);
  white-space: nowrap;
}
.lc-topbar__dot { color: #94a3b8; margin: 0 2px; }
.lc-qbar { display: flex; gap: 5px; flex-wrap: wrap; margin-left: 10px; }
.lc-qb {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: var(--ld-white);
  border: 1px solid var(--ld-border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ld-muted);
  cursor: pointer;
  transition: all 0.14s;
  font-family: var(--ld-font);
}
.lc-qb:hover {
  border-color: rgba(26, 107, 60, 0.35);
  color: var(--ld-accent);
  background: var(--ld-accent-l);
}
.lc-qb--primary {
  background: var(--ld-accent);
  color: #fff;
  border-color: var(--ld-accent);
}
.lc-qb--primary:hover { background: #155e32; color: #fff; }
.lc-ib {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--ld-border);
  background: var(--ld-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ld-muted);
  font-size: 14px;
  position: relative;
  transition: all 0.14s;
  font-family: var(--ld-font);
  padding: 0;
}
.lc-ib:hover { border-color: rgba(26, 107, 60, 0.35); color: var(--ld-accent); }
.lc-ib__dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  background: #c0392b;
  border-radius: 50%;
  border: 2px solid var(--ld-white);
}

/* Sidebar: weitere Module */
.lc-modules-more {
  margin: 6px 10px 10px;
  padding: 8px 12px;
  background: var(--ld-paper);
  border: 1px dashed var(--ld-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lc-modules-more__dots { display: flex; gap: 3px; }
.lc-modules-more__dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ld-muted);
}
.lc-modules-more__dots span:nth-child(1) { opacity: 0.4; }
.lc-modules-more__dots span:nth-child(2) { opacity: 0.22; }
.lc-modules-more__dots span:nth-child(3) { opacity: 0.1; }
.lc-modules-more__text {
  font-size: 10px;
  color: var(--ld-muted);
  font-weight: 600;
  line-height: 1.3;
}
.ld-nav-item--dim { opacity: 0.45; pointer-events: none; }

.lc-cockpit__side,
.lc-cockpit__col {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  align-self: start;
}
.lc-cockpit__side .lc-panel,
.lc-cockpit__col .lc-panel {
  flex-shrink: 0;
  min-height: auto;
  position: relative;
  z-index: auto;
}
.lc-panel--flex { flex: none; min-height: auto; overflow: visible; }

/* Shell: Main + KI-Drawer nebeneinander (wie light-v2.html) */
.lc-shell__body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.ld-body--cockpit .lc-shell__body .ld-main {
  flex: 1;
  min-width: 0;
}

/* KI Focus Bar — Titel darf umbrechen (nicht ellipsis) */
.lc-kif {
  background: var(--ld-white);
  border: 1px solid rgba(26, 107, 60, 0.35);
  border-radius: 10px;
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 0 0 3px rgba(26, 107, 60, 0.08), 0 1px 3px rgba(13, 17, 23, 0.07);
  position: relative;
  overflow: hidden;
}
.lc-kif::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ld-accent);
}
.lc-kif__left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.lc-kif__pulse {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--ld-accent-l);
  border: 1px solid rgba(26, 107, 60, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: lc-kif-glow 3s ease-in-out infinite;
}
@keyframes lc-kif-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 107, 60, 0.25); }
  50% { box-shadow: 0 0 0 8px rgba(26, 107, 60, 0); }
}
.lc-kif__text { min-width: 0; flex: 1; }
.lc-kif__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.lc-kif__sub { font-size: 12px; color: var(--ld-muted); line-height: 1.4; }
.lc-kif__right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lc-kif__counts { display: flex; align-items: center; gap: 20px; }
.lc-kif__count-item { text-align: center; }
.lc-kif__num {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--ld-accent);
  line-height: 1;
}
.lc-kif__num--crit { color: #c0392b; }
.lc-kif__num-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-top: 3px;
}
.lc-kif__divider { width: 1px; height: 36px; background: var(--ld-border); }
.lc-btn-primary {
  padding: 10px 22px;
  background: var(--ld-accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-family: var(--ld-font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s;
  white-space: nowrap;
}
.lc-btn-primary:hover { background: var(--ld-accent-h, #155c32); }

/* Section headers */
.lc-sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.lc-sl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lc-sl::before {
  content: "";
  width: 12px;
  height: 2px;
  background: var(--ld-accent);
  border-radius: 2px;
}
.lc-slink {
  font-size: 11px;
  font-weight: 600;
  color: var(--ld-accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--ld-font);
  padding: 0;
}
.lc-slink:hover { text-decoration: underline; }

/* Grids */
.lc-g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lc-g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lc-g2l { display: grid; grid-template-columns: 1.9fr 1fr; gap: 12px; align-items: start; margin-top: 4px; }
.lc-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; margin-top: 10px; }
.lc-panel--wide { min-width: 0; }

/* Stat cards */
.lc-stat {
  background: var(--ld-white);
  border: 1px solid var(--ld-border);
  border-radius: 10px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 1px 3px rgba(13, 17, 23, 0.07);
  transition: all 0.14s;
}
.lc-stat:hover {
  border-color: rgba(26, 107, 60, 0.35);
  box-shadow: 0 4px 14px rgba(13, 17, 23, 0.1);
}
.lc-stat__top { display: flex; align-items: flex-start; justify-content: space-between; }
.lc-stat__lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
}
.lc-stat__val {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 19px;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1.2;
}
.lc-stat__val--alert { color: #c0392b; }
.lc-stat__val--warn { color: #b45309; }
.lc-stat__val--ki { color: var(--ld-accent); }
.lc-stat__sub { font-size: 11px; font-weight: 600; margin-top: 2px; }
.lc-stat__sub--up { color: var(--ld-accent); }
.lc-stat__sub--dn { color: #c0392b; }
.lc-stat__sub--wn { color: #b45309; }
.lc-stat__ico { font-size: 17px; opacity: 0.5; }
.lc-stat__hr { height: 1px; background: rgba(214, 208, 196, 0.45); }
.lc-stat__cta {
  font-size: 11px;
  font-weight: 700;
  color: var(--ld-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: var(--ld-font);
  padding: 0;
  text-align: left;
}
.lc-stat__cta:hover { gap: 7px; }

/* Action stack */
.lc-astack { display: flex; flex-direction: column; gap: 7px; }
.lc-ac {
  background: var(--ld-white);
  border: 1px solid var(--ld-border);
  border-radius: 10px;
  padding: 11px 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(13, 17, 23, 0.07);
  transition: all 0.14s;
  position: relative;
  overflow: hidden;
}
.lc-ac::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}
.lc-ac--crit::before { background: #c0392b; }
.lc-ac--warn::before { background: #b45309; }
.lc-ac--info::before { background: #1d4ed8; }
.lc-ac__ico {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.lc-ac__ico--crit { background: rgba(192, 57, 43, 0.09); }
.lc-ac__ico--warn { background: rgba(180, 83, 9, 0.09); }
.lc-ac__ico--info { background: rgba(29, 78, 216, 0.09); }
.lc-ac__body { flex: 1; min-width: 0; }
.lc-ac__title { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.lc-ac__sub { font-size: 11px; color: var(--ld-muted); line-height: 1.4; }
.lc-ac__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.lc-pb {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  border-radius: 4px;
}
.lc-pb--crit { background: rgba(192, 57, 43, 0.09); color: #c0392b; }
.lc-pb--warn { background: rgba(180, 83, 9, 0.09); color: #b45309; }
.lc-pb--info { background: rgba(29, 78, 216, 0.09); color: #1d4ed8; }
.lc-ac__btn {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--ld-border);
  background: var(--ld-paper);
  color: var(--ld-ink);
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--ld-font);
  white-space: nowrap;
}
.lc-ac__btn:hover {
  background: var(--ld-accent);
  border-color: var(--ld-accent);
  color: #fff;
}

/* Panels */
.lc-panel {
  background: var(--ld-white);
  border: 1px solid var(--ld-border);
  border-radius: 10px;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(13, 17, 23, 0.07);
}
/* Copilot-Widget nutzt ebenfalls `.lc-panel` — nur innerhalb #lireno-copilot-root fixieren */
.ld-body--cockpit .lc-cockpit .lc-panel {
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  width: auto !important;
  height: auto !important;
  overflow: visible;
  z-index: auto;
}
.lc-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lc-panel__title { font-size: 13px; font-weight: 700; }
.lc-panel__link {
  font-size: 11px;
  font-weight: 600;
  color: var(--ld-accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--ld-font);
  padding: 0;
}
.lc-panel__link:hover { text-decoration: underline; }

/* Verbindungen — kompakte Ampel-Leiste (kein großes Panel) */
.lc-conn-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 10px;
  margin: 0 0 2px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--ld-border);
  border-radius: 8px;
}
.lc-conn-strip__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ld-muted);
  flex-shrink: 0;
}
.lc-conn-strip__items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.lc-conn-strip__more {
  font-size: 11px;
  font-weight: 600;
  color: var(--ld-accent);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--ld-font);
  padding: 0;
  white-space: nowrap;
}
.lc-conn-strip__more:hover { text-decoration: underline; }
.lc-dev-fake{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 14px;
  margin:0 0 12px;padding:10px 12px;border-radius:10px;
  border:1px dashed #f59e0b;background:#fffbeb;color:#92400e;font-size:12px;line-height:1.35
}
.lc-dev-fake[hidden]{display:none!important}
.lc-dev-fake__btn{
  border:1px solid #f59e0b;background:#fff;color:#92400e;border-radius:8px;
  padding:6px 10px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap
}
.lc-dev-fake__btn:hover{background:#ffedd5}
.lc-conn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--ld-border);
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: var(--ld-ink);
  cursor: pointer;
  font-family: var(--ld-font);
  line-height: 1.2;
}
.lc-conn-chip:hover { border-color: rgba(26, 107, 60, 0.35); }
.lc-conn-chip__txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.lc-conn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.18);
}
/* Ampel: grün / gelb / rot (klassisch) */
.lc-conn-chip--ok .lc-conn-dot { background: #2e7d32; }
.lc-conn-chip--warn .lc-conn-dot { background: #f9a825; }
.lc-conn-chip--err .lc-conn-dot { background: #c62828; }
.lc-conn-chip--off .lc-conn-dot { background: #c62828; }
.lc-conn-chip--load .lc-conn-dot {
  background: #f9a825;
  animation: lc-conn-pulse 1.1s ease-in-out infinite;
}
.lc-conn-chip--ok { background: #e8f5e9; border-color: #2e7d32; color: #1b5e20; }
.lc-conn-chip--warn { background: #fff8e1; border-color: #f9a825; color: #f57f17; }
.lc-conn-chip--err { background: #ffebee; border-color: #c62828; color: #b71c1c; }
.lc-conn-chip--off { background: #ffebee; border-color: #c62828; color: #b71c1c; }
@keyframes lc-conn-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@media (max-width: 720px) {
  .lc-conn-chip__txt { max-width: 140px; }
}

/* KI Kontingent panel */
.lc-kk__head { margin-bottom: 0; }
.lc-kk__badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--ld-accent-l);
  color: var(--ld-accent);
  border: 1px solid rgba(26, 107, 60, 0.35);
  padding: 2px 8px;
  border-radius: 5px;
}
.lc-kk .ld-ai-quota__head { margin-bottom: 6px; }
.lc-kk .ld-ai-quota__table-wrap { margin-top: 8px; }
.lc-kk .ld-ai-quota__meta { font-size: 11px; }
.lc-kk .ld-ai-quota__lead { font-size: 12px; margin-bottom: 6px; color: var(--ld-muted); }
.lc-kk .ld-ai-quota__lead strong { color: var(--ld-ink); font-weight: 700; }
.lc-kk .ld-ai-quota__bar {
  height: 5px;
  border-radius: 3px;
  background: var(--ld-cream);
  overflow: hidden;
}
.lc-kk .ld-ai-quota__bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--ld-accent);
}
.lc-kk .ld-ai-quota__meta { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.lc-kk .ld-ai-quota__meta span { color: var(--ld-accent); font-weight: 600; }
.lc-kk .ld-ai-quota__tokens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 8px;
}
.lc-kk .ld-ai-quota__token {
  background: var(--ld-paper);
  border: 1px solid rgba(214, 208, 196, 0.45);
  border-radius: 7px;
  padding: 7px 9px;
}
.lc-kk .ld-ai-quota__token-lbl { font-size: 10px; color: #94a3b8; margin-bottom: 2px; }
.lc-kk .ld-ai-quota__token-val {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
}

/* Comply news tags */
.lc-ntrow { display: flex; gap: 4px; margin-bottom: 6px; }
.lc-ntag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}
.lc-ntag--u { background: rgba(29, 78, 216, 0.09); color: #1d4ed8; }
.lc-ntag--k { background: rgba(192, 57, 43, 0.09); color: #c0392b; }

/* MWST panel */
.lc-mwst-amt {
  font-family: ui-monospace, monospace;
  font-size: 21px;
  font-weight: 700;
  color: #c0392b;
}
.lc-mwst-per { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.lc-mwst-rows { display: flex; flex-direction: column; gap: 5px; }
.lc-mwst-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.lc-mwst-row .k { color: var(--ld-muted); }
.lc-mwst-row .v { font-family: ui-monospace, monospace; font-weight: 600; }
.lc-due {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(192, 57, 43, 0.09);
  color: #c0392b;
}
.lc-btn-danger {
  width: 100%;
  padding: 8px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-family: var(--ld-font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.lc-btn-danger:hover { background: #9b2c2c; }

/* Cashflow panel */
.lc-cf-net {
  font-family: ui-monospace, monospace;
  font-size: 21px;
  font-weight: 700;
  color: var(--ld-accent);
  margin-bottom: 10px;
}
.lc-cf-net--neg { color: #c0392b; }
.lc-cf-bars { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.lc-cf-bar-row { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--ld-muted); }
.lc-cf-bar-row span:first-child { width: 58px; flex-shrink: 0; font-weight: 700; }
.lc-cf-bar {
  flex: 1;
  height: 8px;
  background: var(--ld-paper, #ede9e0);
  border-radius: 4px;
  overflow: hidden;
}
.lc-cf-bar__fill { height: 100%; border-radius: 4px; }
.lc-cf-bar__fill--in { background: var(--ld-accent); }
.lc-cf-bar__fill--out { background: #c0392b; }
.lc-cf-warn {
  padding: 8px 10px;
  background: rgba(180, 83, 9, 0.09);
  border: 1px solid rgba(180, 83, 9, 0.25);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
  line-height: 1.4;
}

/* Debitoren */
.lc-deb-head,
.lc-deb-row {
  display: grid;
  grid-template-columns: 1fr 90px 70px 82px;
  align-items: center;
  gap: 5px;
}
.lc-deb-head {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--ld-border);
}
.lc-deb-row {
  padding: 6px 0;
  border-bottom: 1px solid rgba(214, 208, 196, 0.45);
  border-radius: 5px;
  transition: background 0.1s;
}
.lc-deb-row:hover { background: var(--ld-paper); }
.lc-deb-row:last-child { border-bottom: none; }
.lc-deb-name { font-size: 12px; font-weight: 600; }
.lc-deb-amt {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  text-align: right;
}
.lc-deb-days {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-align: center;
  font-weight: 700;
}
.lc-deb-days--ov { color: #c0392b; }
.lc-deb-days--so { color: #b45309; }
.lc-deb-btn {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--ld-border);
  background: none;
  color: var(--ld-muted);
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.lc-deb-btn:hover:not(:disabled) {
  border-color: #b45309;
  color: #b45309;
  background: rgba(180, 83, 9, 0.09);
}
.lc-deb-btn--muted {
  opacity: 0.35;
  cursor: default;
}
.lc-deb-remind:hover {
  border-color: var(--ld-accent);
  color: var(--ld-accent);
  background: var(--ld-accent-l);
}

/* Activity */
.lc-afeed { display: flex; flex-direction: column; }
.lc-ai {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(214, 208, 196, 0.45);
}
.lc-ai:last-child { border-bottom: none; }
.lc-ad {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}
.lc-ad--g { background: var(--ld-accent-l); }
.lc-ad--b { background: rgba(29, 78, 216, 0.09); }
.lc-ad--a { background: rgba(180, 83, 9, 0.09); }
.lc-ad--r { background: rgba(192, 57, 43, 0.09); }
.lc-ai__title { font-size: 12px; font-weight: 600; }
.lc-ai__sub { font-size: 11px; color: #94a3b8; margin-top: 1px; }
.lc-ai__time {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: #94a3b8;
  flex-shrink: 0;
  padding-top: 2px;
}

/* Comply in cockpit */
.lc-comply-widget .ld-comply-widget__item,
.lc-comply-widget .nitem {
  padding: 6px 0;
  border-bottom: 1px solid rgba(214, 208, 196, 0.45);
  font-size: 11px;
  color: var(--ld-muted);
}
.lc-comply-widget .nitem:last-child { border-bottom: none; }
.lc-comply-widget .ndate {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: #94a3b8;
  margin-bottom: 2px;
}

/* Notifications overlay */
.lc-notif-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
}
.lc-notif-overlay.is-open { display: block; }
.lc-notif-panel {
  position: fixed;
  top: 52px;
  right: 56px;
  width: min(310px, calc(100vw - 24px));
  background: var(--ld-white);
  border: 1px solid var(--ld-border);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(13, 17, 23, 0.1);
  z-index: 401;
  overflow: hidden;
}
.lc-notif-panel__head {
  padding: 11px 15px;
  border-bottom: 1px solid var(--ld-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lc-notif-panel__title { font-size: 13px; font-weight: 700; }
.lc-notif-panel__clear {
  font-size: 11px;
  font-weight: 600;
  color: var(--ld-accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--ld-font);
}
.lc-notif-row {
  padding: 9px 15px;
  border-bottom: 1px solid rgba(214, 208, 196, 0.45);
  display: flex;
  gap: 9px;
  align-items: flex-start;
  cursor: pointer;
  transition: background 0.1s;
}
.lc-notif-row:hover { background: var(--ld-paper); }
.lc-notif-row:last-child { border-bottom: none; }
.lc-notif-unread {
  width: 6px;
  height: 6px;
  background: var(--ld-accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.ld-body--cockpit .ld-mandant-dropdown li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.ld-mandant-dd__name { font-weight: 600; }
.ld-mandant-dd__uid { font-size: 10px; color: var(--ld-muted); }

/* KI Drawer — Flex-Sibling, nicht Overlay */
.lc-ki-drawer {
  width: 0;
  flex-shrink: 0;
  background: var(--ld-white);
  border-left: 1px solid var(--ld-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.26s ease;
}
.lc-ki-drawer.is-open { width: min(288px, 42vw); }
.lc-ki-drawer__head {
  padding: 13px 15px;
  border-bottom: 1px solid var(--ld-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.lc-ki-drawer__title { font-size: 13px; font-weight: 700; }
.lc-ki-drawer__close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--ld-border);
  background: var(--ld-paper);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--ld-text);
  padding: 0;
  flex-shrink: 0;
}
.lc-ki-drawer__close:hover { background: #ede9e0; }
.lc-ki-drawer__ctx {
  padding: 9px 14px;
  background: var(--ld-paper);
  border-bottom: 1px solid var(--ld-border);
  flex-shrink: 0;
}
.lc-ki-drawer__ctx-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 5px;
}
.lc-ki-drawer__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: var(--ld-accent-l);
  border: 1px solid rgba(26, 107, 60, 0.35);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ld-accent);
}
.lc-ki-drawer__msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.lc-ki-drawer__msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.lc-ki-drawer__msg-label { font-size: 10px; color: #94a3b8; font-weight: 600; }
.lc-ki-drawer__msg--user .lc-ki-drawer__msg-bubble {
  background: var(--ld-accent-l);
  border-color: rgba(26, 107, 60, 0.25);
  border-radius: 9px 9px 3px 9px;
  margin-left: auto;
  max-width: 92%;
}
.lc-ki-drawer__msg-bubble {
  background: var(--ld-paper);
  border: 1px solid var(--ld-border);
  border-radius: 9px 9px 9px 3px;
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.5;
}
.lc-ki-drawer__sugg {
  padding: 8px 14px;
  border-top: 1px solid rgba(214, 208, 196, 0.45);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.lc-ki-drawer__sugg-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.lc-ki-drawer__sugg-btn {
  padding: 6px 10px;
  background: var(--ld-paper);
  border: 1px solid var(--ld-border);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ld-muted);
  cursor: pointer;
  text-align: left;
  font-family: var(--ld-font);
}
.lc-ki-drawer__sugg-btn:hover {
  border-color: rgba(26, 107, 60, 0.35);
  color: var(--ld-accent);
  background: var(--ld-accent-l);
}
.lc-ki-drawer__foot {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--ld-border);
  background: var(--ld-white);
  flex-shrink: 0;
}
.lc-ki-drawer__input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--ld-border);
  border-radius: 7px;
  font-family: var(--ld-font);
  font-size: 12px;
  color: var(--ld-ink);
  background: var(--ld-paper);
}
.lc-ki-drawer__input:focus {
  outline: none;
  border-color: rgba(26, 107, 60, 0.45);
  box-shadow: 0 0 0 2px rgba(26, 107, 60, 0.12);
}
.lc-ki-drawer__send {
  flex-shrink: 0;
  width: 36px;
  border: none;
  border-radius: 7px;
  background: var(--ld-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.lc-ki-drawer__send:hover { filter: brightness(1.05); }
.lc-ki-drawer__body {
  padding: 8px 14px 12px;
  font-size: 11px;
  color: var(--ld-muted);
  border-top: 1px solid rgba(214, 208, 196, 0.45);
  flex-shrink: 0;
}
.lc-ki-drawer.is-open .lc-ki-drawer__ctx,
.lc-ki-drawer.is-open .lc-ki-drawer__sugg { display: block; }

@media (max-width: 1100px) {
  .lc-g2l { grid-template-columns: 1fr; }
  .lc-g4 { grid-template-columns: repeat(2, 1fr); }
  .lc-topbar__center .lc-qbar { display: none; }
  .lc-ki-drawer.is-open { width: min(288px, 100vw); position: fixed; top: 52px; right: 0; bottom: 0; z-index: 150; }
}
@media (max-width: 768px) {
  .lc-g4,
  .lc-g2 { grid-template-columns: 1fr; }
  .lc-kif {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .lc-kif__right { width: 100%; justify-content: space-between; }
  .lc-ki-drawer { display: none; }
  .lc-notif-panel { right: 12px; }
}



.lc-ac__main { display: flex; align-items: flex-start; gap: 10px; width: 100%; }
.lc-ac__freigabe {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--ld-border);
  width: 100%;
}
.lc-ac__freigabe-prompt {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ld-text, #0d1117);
}
.lc-ac__freigabe-blocked {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #b45309;
}
.lc-ac__freigabe-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.lc-ac__freigabe-yes,
.lc-ac__freigabe-no {
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--ld-border);
  background: var(--ld-white);
}
.lc-ac__freigabe-yes {
  background: var(--ld-accent, #1d9e75);
  border-color: var(--ld-accent, #1d9e75);
  color: #fff;
}
.lc-ac__freigabe-no:hover { background: #f8fafc; }
.lc-ac__freigabe-yes:hover { filter: brightness(0.95); }
.lc-ac__btn.is-done {
  background: rgba(29, 158, 117, 0.12);
  border-color: rgba(29, 158, 117, 0.35);
  color: var(--ld-accent, #1d9e75);
}
.lc-ac.is-freigabe { border-color: #cbd5e1; }
.lc-ac.is-executing { opacity: 0.85; pointer-events: none; }
.lc-ac--done { pointer-events: none; }
.lc-ac--done .lc-ac__btn.is-done { transition: background .35s ease, border-color .35s ease, color .35s ease; }
.lc-deb-btn.is-sent { color: var(--ld-accent, #1d9e75); border-color: rgba(29,158,117,.35); }

/* Firmenwerte / Charts — kompakt, ohne Leerlauf */
.lc-finance{margin:10px 0 6px}
.lc-finance__tabs{display:flex;gap:6px}
.lc-finance__tab{
  border:1px solid var(--ld-border,#e5e1d8);
  background:var(--ld-white,#fff);
  color:var(--ld-muted,#6b7280);
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
}
.lc-finance__tab.is-active{
  background:var(--ld-ink,#111827);
  color:#fff;
  border-color:transparent;
}
.lc-finance__grid{align-items:stretch;gap:10px}
.lc-finance__card{min-height:0}
.lc-finance__hint{font-size:11px;color:var(--ld-muted,#6b7280)}
.lc-finance__chart{min-height:112px;display:flex;align-items:flex-end}
.lc-finance__bars{
  display:grid;
  grid-template-columns:repeat(var(--lc-finance-cols, 6),minmax(0,1fr));
  gap:6px;
  width:100%;
  height:120px;
  align-items:end;
}
.lc-finance__barcol{display:flex;flex-direction:column;align-items:center;gap:4px;height:100%;justify-content:flex-end;cursor:pointer;transition:opacity .15s ease,transform .15s ease}
.lc-finance__bars.is-hovering .lc-finance__barcol{opacity:.42}
.lc-finance__bars.is-hovering .lc-finance__barcol.is-hover{opacity:1;transform:translateY(-2px)}
.lc-finance__barpair{display:flex;align-items:flex-end;gap:3px;height:96px;width:100%;justify-content:center}
.lc-finance__bar{
  width:42%;
  max-width:16px;
  border-radius:4px 4px 1px 1px;
  min-height:2px;
  transition:filter .15s ease,transform .15s ease;
  transform-origin:bottom center;
}
.lc-finance__barcol.is-hover .lc-finance__bar{filter:brightness(1.08);transform:scaleY(1.04)}
.lc-finance__bar--rev{background:#0f766e}
.lc-finance__bar--exp{background:#c4b5a0}
.lc-finance__barlbl{font-size:10px;color:var(--ld-muted,#6b7280);white-space:nowrap}
.lc-finance__legend{display:flex;gap:14px;margin-top:8px;font-size:12px;color:var(--ld-muted,#6b7280)}
.lc-finance__leg{display:inline-flex;align-items:center;gap:6px}
.lc-finance__leg i{width:10px;height:10px;border-radius:2px;display:inline-block}
.lc-finance__leg--rev i{background:#0f766e}
.lc-finance__leg--exp i{background:#c4b5a0}
.lc-finance__net{font-size:13px;font-weight:700;color:var(--ld-ink,#111827)}
.lc-finance__metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:6px 0 8px}
.lc-finance__metric{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--ld-muted,#6b7280)}
.lc-finance__metric strong{font-size:13px;color:var(--ld-ink,#111827)}
.lc-finance__spark{height:44px}
.lc-finance__spark svg{width:100%;height:44px;display:block}
.lc-finance__warn{margin:6px 0 0;font-size:12px;color:#b45309}
.lc-finance__empty{font-size:12px;color:var(--ld-muted,#6b7280);padding:8px 0}
.lc-finance__footer{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;
  gap:12px 20px;margin-top:10px;padding:10px 12px;
  border:1px solid var(--ld-border,#e5e1d8);border-radius:10px;
  background:var(--ld-white,#fff);
}
.lc-finance__forecast{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:6px 10px;min-width:0}
.lc-finance__forecast-label{font-size:12px;color:var(--ld-muted,#6b7280);font-weight:600}
.lc-finance__forecast strong{font-size:16px;color:var(--ld-ink,#111827)}
.lc-finance__ctas{display:flex;flex-wrap:wrap;gap:8px;margin-left:auto}
.lc-finance__cta{
  border:1px solid var(--ld-border,#e5e1d8);background:var(--ld-white,#fff);
  color:var(--ld-ink,#111827);border-radius:8px;padding:6px 10px;font-size:12px;
  font-weight:600;cursor:pointer;
}
.lc-finance__cta:hover{border-color:#0f766e;color:#0f766e}
.lc-chart-svg{width:100%;height:150px;display:block;cursor:crosshair}
.lc-chart-guide{stroke:#94a3b8;stroke-width:1;stroke-dasharray:3 3;opacity:0;pointer-events:none}
.lc-chart-dot{opacity:.35;transition:opacity .12s ease,r .12s ease;pointer-events:none}
.lc-chart-dot.is-active{opacity:1}
.lc-chart-focus{opacity:0;pointer-events:none;stroke:#fff;stroke-width:2}
.lc-chart-tip{
  position:fixed;z-index:99999;pointer-events:none;
  min-width:140px;max-width:220px;padding:8px 10px;border-radius:10px;
  background:#111827;color:#f9fafb;font-size:12px;line-height:1.35;
  box-shadow:0 8px 24px rgba(15,23,42,.22);
}
.lc-chart-tip[hidden]{display:none!important}
.lc-chart-tip__title{font-weight:700;margin-bottom:6px}
.lc-chart-tip__row{display:flex;justify-content:space-between;gap:12px;opacity:.95}
.lc-chart-tip__row + .lc-chart-tip__row{margin-top:3px}
.lc-chart-tip__row span{color:#cbd5e1}
.lc-chart-tip__row strong{font-weight:600;white-space:nowrap}
@media (max-width:900px){
  .lc-finance__metrics{grid-template-columns:1fr}
  .lc-finance__footer{flex-direction:column;align-items:stretch}
  .lc-finance__ctas{margin-left:0}
}

/* API-Keys Setup */
.ld-apikeys-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:8px 0 12px}
.ld-apikeys-name{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--ld-muted,#6b7280)}
.ld-apikeys-name input{min-width:200px;padding:8px 10px;border:1px solid var(--ld-border,#e5e1d8);border-radius:8px}
.ld-apikeys-once{margin:0 0 12px}
.ld-apikeys-once__box{border:1px solid #f59e0b;background:#fffbeb;border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:8px;font-size:13px}
.ld-apikeys-once__box code{display:block;margin-top:2px;word-break:break-all;font-size:12px}
.ld-apikey-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--ld-border,#e5e1d8);border-radius:10px;background:#fff;margin-bottom:8px}
.ld-apikey-row.is-revoked{opacity:.55}
.ld-apikey-row__main{display:flex;flex-direction:column;gap:2px;min-width:0}
.ld-apikey-row__main code{font-size:12px;word-break:break-all}
.ld-apikey-row__meta{font-size:11px;color:var(--ld-muted,#6b7280)}
.ld-apikeys-endpoint-hint{margin-top:14px;line-height:1.45}
.ld-apikey-endpoint-url{display:inline;word-break:break-all;font-size:12px;padding:1px 4px;background:#f3f4f6;border-radius:4px}
