/* ──────────────────────────────────────────────────────────────
   Cockpit-Mockup für Public-Site
   (Helles CI · zeigt 1:1, wie das Assistry-Cockpit im Tool aussieht)
   Tokens kommen aus assistry.css (--blue, --gold, --text, …).
   ────────────────────────────────────────────────────────────── */

.cockpit-section {
  padding: 80px 0;
  background:
    radial-gradient(circle at 90% 20%, var(--blue-soft) 0%, transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(253,185,19,0.08) 0%, transparent 50%),
    var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cockpit-frame {
  max-width: 1080px;
  margin: 32px auto 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 8px 8px 8px;
  overflow: hidden;
  position: relative;
}
.cockpit-frame .cockpit-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.cockpit-frame .cockpit-bar .dot {
  width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0;
}
.cockpit-frame .cockpit-bar .dot.r { background: #fca5a5; }
.cockpit-frame .cockpit-bar .dot.y { background: #fcd34d; }
.cockpit-frame .cockpit-bar .dot.g { background: #86efac; }
.cockpit-frame .cockpit-bar .url {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-soft);
  padding: 4px 12px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── eigentliches Cockpit ── */

.dash-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 22px;
  font-family: 'Inter', system-ui, sans-serif;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-header > div { display: flex; flex-direction: column; gap: 2px; }
.dash-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.dash-title-name { color: var(--blue); }
.dash-date {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
}
.dash-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0f172a;
  background: var(--gold);
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

.dash-stats-bar {
  display: flex;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 0;
  box-shadow: 0 2px 12px rgba(15,23,42,0.04);
}
.dash-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dash-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.01em;
}
.dash-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}
.dash-stat-div {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.dash-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}
.dash-col-main, .dash-col-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(15,23,42,0.04);
}
.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dash-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.dash-card-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid rgba(0,87,163,0.18);
  padding: 3px 8px;
  border-radius: 20px;
}
.dash-card-count {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.dash-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  margin-bottom: 10px;
}
.dash-meter:last-of-type { margin-bottom: 12px; }
.dash-meter-lbl {
  font-size: 12px;
  color: var(--text-soft);
  grid-column: 1 / -1;
}
.dash-meter-bar {
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  overflow: hidden;
}
.dash-meter-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--blue);
  width: 0%;
  transition: width 1.2s cubic-bezier(.4,.0,.2,1);
}
.dash-fill-green { background: #22c55e; }
.dash-fill-amber { background: #f59e0b; }
.dash-meter-val {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  min-width: 32px;
  text-align: right;
}

.dash-kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-soft);
}
.dash-kv-row strong { color: #0f172a; }
.dash-warn { color: #dc2626; }

.dash-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 6px;
}
.dash-alert:last-child { margin-bottom: 0; }
.dash-alert-icon { flex-shrink: 0; font-size: 12px; margin-top: 1px; }
.dash-alert-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.dash-alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.dash-alert-ok   { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.dash-tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.dash-tool-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}
.dash-chip-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dash-chip-green { background: #22c55e; }
.dash-chip-amber { background: #f59e0b; }
.dash-chip-name {
  font-size: 11px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.04em;
}
.dash-chip-val {
  font-size: 10px;
  color: var(--text-soft);
  margin-left: auto;
}

.dash-timeline { display: flex; flex-direction: column; }
.dash-tl-item {
  display: flex; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.dash-tl-item:last-child { border-bottom: none; padding-bottom: 0; }
.dash-tl-time {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-soft);
  min-width: 34px;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.dash-tl-body {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}
.dash-tl-body strong {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.dash-ticker {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  margin-top: 2px;
}
.dash-ticker-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  text-transform: uppercase;
  flex-shrink: 0;
}
.dash-ticker-items {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.dash-ticker-item { display: flex; align-items: baseline; gap: 6px; }
.dash-ticker-name {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
}
.dash-ticker-val {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.dash-ticker-chg {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}
.dash-ticker-up   { color: #16a34a; background: #f0fdf4; }
.dash-ticker-down { color: #dc2626; background: #fef2f2; }

/* ── Hover-Demo: Footer ── */
.cockpit-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: center;
  align-items: center;
  margin-top: 28px;
  font-size: 0.88rem;
  color: var(--text-soft);
}
.cockpit-foot li {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cockpit-foot li::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* Animation: füllt Bars, sobald Cockpit ins Viewport scrollt */
.cockpit-section.is-visible .dash-meter-fill[data-w] {
  width: var(--w, 0%);
}

/* ── Responsive ── */
@media (max-width: 820px) {
  .dash-cols { grid-template-columns: 1fr; }
  .dash-stats-bar { flex-wrap: wrap; gap: 12px; padding: 12px; }
  .dash-stat { flex-basis: calc(50% - 8px); }
  .dash-stat-div { display: none; }
  .dash-ticker-items { gap: 12px 18px; }
}
@media (max-width: 540px) {
  .cockpit-section { padding: 56px 0; }
  .dash-container { padding: 16px; }
  .dash-tool-grid { grid-template-columns: 1fr; }
  .cockpit-frame .cockpit-bar .url { display: none; }
}
