@charset "UTF-8";
/* ==========================================================================
   KontaktBrücke v2 — App & Dashboard Styles
   Login-View & Portal-Shell mit KPI-Cards, Charts, Tooltip, Tabellen
   ========================================================================== */

/* ---------------- Login Page ---------------- */
.login-view {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: radial-gradient(circle at 50% 30%, rgba(46, 91, 255, 0.15) 0%, transparent 60%),
              linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 100%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-xl);
}

.login-head {
  text-align: center;
  margin-bottom: 24px;
}

.login-head h1 {
  font-size: 1.5rem;
  margin-top: 10px;
}

.login-demo-box {
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--brand-ink);
  line-height: 1.4;
}

.login-demo-box code {
  font-family: var(--font-mono);
  font-weight: 700;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--brand-line);
}

.login-back {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------------- Dashboard Portal Shell ---------------- */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height));
  background: var(--bg);
}

/* Mobile App Topbar */
.app-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-topbar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-meta-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-tabs-mobile {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 150ms ease;
}

.tab-btn:hover {
  background: var(--bg);
}

.tab-btn.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Desktop App Layout with Sidebar */
@media (min-width: 1024px) {
  .app-shell {
    flex-direction: row;
  }

  .app-sidebar {
    width: 260px;
    background: var(--hero-a);
    color: #fff;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
  }

  .app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 28px;
  }

  .app-sidebar .tab-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--faint);
    padding: 10px 14px;
  }

  .app-sidebar .tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
  }

  .app-sidebar .tab-btn.is-active {
    background: var(--brand);
    color: #fff;
  }

  .app-sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
    font-size: 0.85rem;
  }

  .app-sidebar-footer a {
    color: var(--faint);
  }
  .app-sidebar-footer a:hover {
    color: #fff;
  }

  .app-topbar {
    display: none;
  }

  .app-content {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
  }
}

@media (max-width: 1023px) {
  .app-sidebar {
    display: none;
  }

  .app-content {
    padding: 20px 16px;
  }
}

.app-view {
  display: none;
}

.app-view.is-active {
  display: block;
}

/* ---------------- KPI Cards Grid ---------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (min-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}

.kpi-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.kpi-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------------- Charts & Cards ---------------- */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
}

.chart-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chart-card-head h3 {
  font-size: 1.15rem;
}

.chart-container {
  width: 100%;
  position: relative;
}

.chart-tip {
  position: absolute;
  pointer-events: none;
  background: rgba(16, 24, 40, 0.94);
  color: #fff;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  white-space: nowrap;
  z-index: 100;
  transform: translate(-50%, -100%);
  margin-top: -8px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 150ms ease;
}

.chart-tip.is-visible {
  opacity: 1;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  font-size: 0.8125rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ---------------- Funnel Components ---------------- */
.funnel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.funnel-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.funnel-label-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
}

.funnel-bar-bg {
  width: 100%;
  height: 14px;
  background: var(--bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.funnel-bar {
  height: 100%;
  background: var(--brand);
  border-radius: var(--radius-full);
  transition: width 400ms ease;
}

/* ---------------- Filter Toolbar ---------------- */
.filter-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .filter-toolbar {
    flex-direction: row;
    align-items: center;
  }
}

.filter-input {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: #fff;
  flex: 1;
}

.filter-select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: #fff;
}

/* ---------------- Demo Banner & Account Bar ---------------- */
.demo-banner {
  background: linear-gradient(135deg, #0b1437 0%, #1e293b 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .demo-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.demo-banner-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #38bdf8;
}

.demo-banner-text {
  font-size: 0.925rem;
  color: #e2e8f0;
  line-height: 1.4;
}

.portal-account-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .portal-account-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .portal-account-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.account-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.account-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.account-val.text-ok {
  color: var(--ok);
}

/* ---------------- Table & Clickable Rows ---------------- */
.lead-row-clickable {
  cursor: pointer;
  transition: background 120ms ease;
}

.lead-row-clickable:hover {
  background: var(--brand-soft) !important;
}

.lead-row-clickable td {
  vertical-align: middle;
}

.table-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--slate-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.785rem;
  font-weight: 600;
  color: var(--brand-ink);
  cursor: pointer;
  transition: all 120ms ease;
}

.table-action-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ---------------- Outreach Templates ---------------- */
.outreach-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .outreach-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.outreach-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.outreach-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.outreach-box {
  background: var(--slate-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.825rem;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 12px 0;
  white-space: pre-line;
  max-height: 160px;
  overflow-y: auto;
}

/* ---------------- Modal Specifics ---------------- */
.lead-dossier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 18px 0;
}

@media (min-width: 600px) {
  .lead-dossier-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dossier-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dossier-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.dossier-val {
  font-size: 0.925rem;
  color: var(--ink);
  font-weight: 500;
}

.check-pill-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--ok-soft);
  color: #065f46;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

