/* Übersicht der LKL-Dienste — Spalten-Kacheln */
:root {
  --lkl-petrol: #0c3c42;
  --lkl-petrol-deep: #00252a;
  --lkl-petrol-tint: #a2ced5;
  --lkl-petrol-soft: #eef6f7;
  --lkl-muted: #404849;
  --lkl-border: #e5e7eb;
  --lkl-bg: #f9f9f9;
  --lkl-card: #ffffff;
  --lkl-on-surface: #1a1c1c;
  --lkl-radius: 10px;
  --lkl-radius-sm: 6px;
  --lkl-gutter: 1.5rem;
  --lkl-container-max: 1440px;
  --lkl-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --lkl-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --hub-tile-h: 10.75rem;
  --hub-bot-border: #229ED9;
  --hub-external-border: #94a3b8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--lkl-font);
  font-size: 14px;
  line-height: 1.43;
  color: var(--lkl-on-surface);
  background: var(--lkl-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lkl-petrol); }

.admin-header {
  background: var(--lkl-petrol);
  color: #fff;
  min-height: 3.25rem;
  border-bottom: 1px solid var(--lkl-petrol-deep);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header-inner {
  max-width: var(--lkl-container-max);
  margin: 0 auto;
  padding: 0.6rem var(--lkl-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-header-title { font-size: 0.9rem; font-weight: 600; }

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-header-user {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.9;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-header-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  border-radius: var(--lkl-radius-sm);
}

.admin-header-btn:hover { background: rgba(255, 255, 255, 0.1); }

.wrap {
  max-width: var(--lkl-container-max);
  margin: 0 auto;
  padding: var(--lkl-gutter);
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--lkl-petrol-deep);
}

.lkl-card {
  background: var(--lkl-card);
  border: 1px solid var(--lkl-border);
  border-radius: var(--lkl-radius);
  padding: 1.15rem 1.35rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.page-header { margin-bottom: 1.35rem; }

.page-header-lead {
  margin: 0;
  font-size: 0.9rem;
  color: var(--lkl-muted);
  max-width: 36rem;
  line-height: 1.5;
}

.page-header--list { box-shadow: 0 1px 3px rgba(0, 37, 42, 0.05); }

/* —— Spalten-Board (vertikal gefüllt) —— */
.hub-board {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.hub-column {
  flex: 1 1 0;
  min-width: 15.5rem;
  max-width: 20rem;
}

.hub-column-title {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lkl-muted);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--lkl-border);
}

.hub-column-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* —— Kachel (einheitliche Höhe, kein Side-Tab-Border) —— */
.hub-tile {
  position: relative;
  background: var(--lkl-card);
  border: 1px solid var(--lkl-border);
  border-radius: var(--lkl-radius);
  display: flex;
  flex-direction: column;
  height: var(--hub-tile-h);
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.hub-tile:has(.hub-tile-expand[open]) {
  height: auto;
  min-height: var(--hub-tile-h);
  overflow: visible;
}

.hub-tile:hover {
  box-shadow: 0 2px 8px rgba(0, 37, 42, 0.06);
}

/* Unterscheidung über dezente Fläche + Badge, nicht Seitenstreifen */
.hub-tile--core {
  background: var(--lkl-petrol-soft);
}

.hub-tile--external {
  border-style: dashed;
  background: #f8fafb;
}

.hub-tile--bot {
  background: #f7fafb;
}

.hub-tile--pilot {
  background: #fffbeb;
}

.hub-tile--admin {
  background: #fef8f8;
}

.hub-tile-head {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 2.25rem 0.65rem 1rem;
  flex: 1;
  min-height: 0;
}

.hub-tile-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--lkl-radius-sm);
  background: var(--icon-bg, var(--lkl-petrol));
  color: var(--icon-fg, #fff);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  font-family: var(--lkl-mono);
}

.hub-tile-icon--bot {
  background: transparent;
  border: none;
}

.hub-tile-icon--img {
  background: #fff;
  border: 1px solid var(--lkl-border);
  padding: 0.35rem;
}

.hub-tile-icon--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hub-tile-icon--bot.hub-tile-icon--img {
  padding: 0;
  border: none;
  background: transparent;
}

.hub-tile-icon--bot.hub-tile-icon--img img {
  object-fit: cover;
  border-radius: calc(var(--lkl-radius-sm) - 1px);
}

.hub-tile-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hub-tile-related {
  font-size: 0.75rem;
  color: var(--lkl-muted);
  margin-bottom: 0.15rem;
}

.hub-tile-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
}

.hub-tile-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--lkl-petrol-deep);
  line-height: 1.25;
}

.hub-tile-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--lkl-border);
  background: #fff;
  color: var(--lkl-muted);
}

.hub-tile-badge--bot {
  border-color: #b8d4e8;
  color: #0c5d7a;
  background: #eef6fb;
}

.hub-tile-badge--extern {
  border-style: dashed;
}

.hub-tile-badge--pilot {
  border-color: #e8d48b;
  color: #8a6508;
  background: #fff9e8;
}

.hub-tile-badge--zentral {
  border-color: var(--lkl-petrol-tint);
  color: var(--lkl-petrol);
  background: #fff;
}

.hub-tile-badge--admin {
  border-color: #e8b8b8;
  color: #7a1c1c;
  background: #fff5f5;
}

.hub-tile-sub {
  margin: 0.25rem 0 0.4rem;
  font-size: 0.8rem;
  color: var(--lkl-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-tile-link {
  display: inline-block;
  margin-top: auto;
  font-family: var(--lkl-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lkl-petrol);
  text-decoration: none;
  padding: 0.15rem 0.4rem;
  margin-left: -0.4rem;
  border-radius: var(--lkl-radius-sm);
  background: var(--lkl-petrol-soft);
  word-break: break-all;
  transition: background 0.15s ease, color 0.15s ease;
}

.hub-tile--external .hub-tile-link { background: #eef2f6; }

.hub-tile--bot .hub-tile-link {
  background: rgba(255, 255, 255, 0.85);
  color: #0c5d7a;
}

.hub-tile-link:hover {
  background: var(--lkl-petrol);
  color: #fff;
}

/* Aufklappen — nur ⌄ */
.hub-tile-expand {
  position: absolute;
  right: 0;
  bottom: 0;
  margin: 0;
}

.hub-tile-expand-btn {
  list-style: none;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  color: var(--lkl-muted);
  border-radius: var(--lkl-radius-sm) 0 var(--lkl-radius-sm) 0;
  user-select: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.hub-tile-expand-btn::-webkit-details-marker { display: none; }

.hub-tile-expand-btn:hover {
  color: var(--lkl-petrol);
  background: var(--lkl-petrol-soft);
}

.hub-tile-expand[open] .hub-tile-expand-btn {
  position: static;
  width: 100%;
  border-radius: 0;
  border-top: 1px solid var(--lkl-border);
  transform: rotate(180deg);
}

.hub-tile-expand[open] {
  position: static;
  width: 100%;
}

.hub-tile-body {
  padding: 0 1rem 1rem;
  font-size: 0.84rem;
  border-top: 1px solid var(--lkl-border);
}

.hub-tile-summary {
  margin: 0.75rem 0 0.5rem;
  color: var(--lkl-muted);
  line-height: 1.45;
}

.hub-tile-body-label {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lkl-on-surface);
}

.hub-steps, .hub-tips {
  margin: 0;
  padding-left: 1.1rem;
}

.hub-steps li, .hub-tips li { margin-bottom: 0.3rem; }

.hub-docs-link {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
}

.hub-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--lkl-border);
  font-size: 0.8rem;
  color: var(--lkl-muted);
}

@media (max-width: 1100px) {
  .hub-board { flex-wrap: wrap; }
  .hub-column {
    flex: 1 1 calc(50% - 0.5rem);
    max-width: none;
  }
}

@media (max-width: 600px) {
  .hub-column { flex: 1 1 100%; min-width: 0; }
  .wrap { padding: 1rem; }
}
