/* ============================================================
   MEGA Schaltzentrale – CSS
   Tentacl CI: #faf9f7 bg, #e8540a primary, DM Sans
   ============================================================ */

:root {
  --bg: #faf9f7;
  --bg-card: #ffffff;
  --primary: #e8540a;
  --primary-light: rgba(232, 84, 10, 0.08);
  --primary-hover: #d04a08;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e8e8e8;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --font: 'DM Sans', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}
.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.sidebar-brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.sidebar-brand span {
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  padding-bottom: 1px;
}
.sidebar-brand small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 2px;
  vertical-align: baseline;
}
.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}
.sidebar-nav a:hover { background: var(--primary-light); color: var(--text); }
.sidebar-nav a.active { background: var(--primary); color: #fff; }
.sidebar-nav a.active i { color: #fff; }
.sidebar-nav a i { width: 18px; text-align: center; font-size: 14px; }
.sidebar-sep {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 12px 4px;
}
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-footer .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.sidebar-footer .info { font-size: 12px; line-height: 1.3; }
.sidebar-footer .info strong { display: block; color: var(--text); }
.sidebar-footer .info span { color: var(--text-muted); }

/* ── Main Content ── */
.main {
  margin-left: 240px;
  min-height: 100vh;
  padding: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h1 {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.topbar-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }
.dot-amber { background: var(--amber); }

.content { padding: 24px 32px; }

/* ── KPI Cards ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.2s;
}
.kpi-card:hover { box-shadow: var(--shadow-hover); }
.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
}
.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Projekt-Kacheln ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
}
.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.project-thumb {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
  position: relative;
  overflow: hidden;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.project-thumb iframe {
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: top left;
  border: none;
  pointer-events: none;
}
.project-thumb .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-muted);
  opacity: 0.3;
}
.project-status-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.project-body { padding: 16px; }
.project-domain {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-type {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
  margin-bottom: 8px;
}
.type-odoo { background: #dbeafe; color: #1d4ed8; }
.type-fastapi { background: #dcfce7; color: #16a34a; }
.type-static { background: #fef3c7; color: #d97706; }
.type-portal { background: #f3e8ff; color: #7c3aed; }
.type-ki { background: #ffe4e6; color: #e11d48; }
.type-schaltzentrale { background: var(--primary-light); color: var(--primary); }
.type-redirect { background: #f1f5f9; color: #64748b; }
.type-landing { background: #fff7ed; color: #ea580c; }
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.project-actions {
  display: flex;
  gap: 4px;
}
.project-actions button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: var(--font);
}
.project-actions button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Container Table ── */
.data-table {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.data-table table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.data-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--primary-light); }
.data-table .mono { font-family: var(--mono); font-size: 12px; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-amber { background: #fef3c7; color: #d97706; }
.badge-blue { background: #dbeafe; color: #2563eb; }

/* ── Log Viewer ── */
.log-viewer {
  background: #1a1a1a;
  border-radius: var(--radius);
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: #a0a0a0;
  margin-bottom: 24px;
}
.log-line { padding: 1px 0; }
.log-error { color: #f87171; }
.log-warn { color: #fbbf24; }
.log-info { color: #60a5fa; }
.log-success { color: #4ade80; }

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}
.btn-primary:hover { background: var(--primary-hover) !important; }
.btn-sm { padding: 5px 10px; font-size: 11px; }

/* ── Panels / Page Sections ── */
.page-section { display: none; }
.page-section.active { display: block; }

/* ── Progress Bar ── */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Projekt-Detail Seite ── */

.pd-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.pd-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pd-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--primary-light);
}
.pd-title { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.pd-domain { font-size: 13px; color: var(--text-muted); font-family: var(--mono); }
.pd-domain a { color: var(--primary); text-decoration: none; }
.pd-domain a:hover { text-decoration: underline; }

.pd-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.pd-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
}
.pd-tab:hover { color: var(--text); }
.pd-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.pd-panel { display: none; }
.pd-panel.active { display: block; }

.pd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.pd-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.pd-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.pd-stat-value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
}

.pd-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.pd-feature {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary);
}

.pd-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.pd-tech {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #dbeafe;
  color: #1d4ed8;
}

.pd-contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pd-contact-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}
.pd-contact-name { font-weight: 600; font-size: 14px; }
.pd-contact-role { font-size: 12px; color: var(--text-muted); }
.pd-contact-email { font-size: 12px; color: var(--primary); font-family: var(--mono); }

.pd-container-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.pd-container-name {
  font-weight: 600;
  font-size: 14px;
  min-width: 140px;
}
.pd-container-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-muted);
}
.pd-container-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pd-git-info {
  padding: 14px;
  background: #1a1a1a;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: #a0a0a0;
  line-height: 1.8;
}
.pd-git-info strong { color: #f0f0f0; }

.pd-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Gauges ── */
.gauge-grid { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.gauge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 160px;
  flex: 1;
}
.gauge-card-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 12px;
}
.gauge {
  position: relative; width: 110px; height: 110px;
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
}
.gauge-inner {
  position: absolute; width: 82px; height: 82px;
  border-radius: 50%; background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.gauge-value { font-size: 22px; font-weight: 700; font-family: var(--mono); }
.gauge-unit { font-size: 10px; color: var(--text-muted); }
.gauge-sub { font-size: 11px; color: var(--text-muted); margin-top: 8px; text-align: center; }

/* ── Bar Chart ── */
.bar-chart {
  display: flex; align-items: flex-end;
  gap: 3px; height: 90px; margin: 12px 0;
}
.bar-col {
  display: flex; flex-direction: column;
  align-items: center; flex: 1;
}
.bar-fill {
  width: 100%; max-width: 36px;
  border-radius: 4px 4px 0 0; min-height: 2px;
  background: var(--primary); transition: height .4s ease;
}
.bar-value { font-size: 9px; color: var(--text-muted); margin-bottom: 2px; font-family: var(--mono); }
.bar-label { font-size: 9px; color: var(--text-muted); margin-top: 4px; }

/* ── Today Strip ── */
.today-strip {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.today-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px; flex: 1; min-width: 120px;
}
.today-item i { color: var(--primary); font-size: 14px; }
.today-item strong { font-family: var(--mono); font-size: 16px; }

/* ── Online User ── */
.online-user {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.online-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 600;
  position: relative; flex-shrink: 0;
}
.online-dot {
  position: absolute; bottom: 0; right: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green); border: 2px solid var(--bg-card);
}
.online-name { font-weight: 600; font-size: 13px; }
.online-detail { font-size: 11px; color: var(--text-muted); }
.online-meta { margin-left: auto; text-align: right; }
.online-page { font-size: 11px; color: var(--primary); font-family: var(--mono); }
.online-time { font-size: 10px; color: var(--text-muted); }

/* ── Event Feed ── */
.event-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.event-item.new { background: var(--primary-light); margin: 0 -12px; padding: 8px 12px; border-radius: 6px; }
.event-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.event-text { font-size: 12px; line-height: 1.4; }
.event-time { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ── Ana Sub-Tabs ── */
.ana-sub-tabs {
  display: flex; gap: 2px; margin-bottom: 16px;
  background: var(--bg); border-radius: 8px; padding: 3px;
}
.ana-sub-tab {
  padding: 6px 14px; border-radius: 6px; font-size: 12px;
  font-weight: 500; cursor: pointer; color: var(--text-muted);
  transition: all 0.2s; background: none; border: none;
  font-family: var(--font);
}
.ana-sub-tab:hover { color: var(--text); }
.ana-sub-tab.active { background: var(--bg-card); color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.ana-sub-content { display: none; }
.ana-sub-content.active { display: block; }

.ana-filter-btn {
  padding: 4px 12px; border-radius: 6px; font-size: 11px;
  font-weight: 500; cursor: pointer; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-muted); font-family: var(--font);
  transition: all 0.2s;
}
.ana-filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease forwards; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.pulse { animation: pulse 2s ease infinite; }

@keyframes spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .mobile-menu-btn { display: flex !important; }
}
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
}

/* ── Overview Dashboard (Projekt-Detail Uebersicht) ── */
.ov-status-strip {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 16px;
}
.ov-status-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
}
.ov-status-item i { font-size: 8px; }
.ov-status-green { color: var(--green); }
.ov-status-green i { color: var(--green); }
.ov-status-amber { color: var(--amber); }
.ov-status-amber i { color: var(--amber); }
.ov-status-red { color: var(--red); }
.ov-status-red i { color: var(--red); }

.ov-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.ov-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; cursor: pointer;
  transition: all 0.2s ease;
}
.ov-section:hover {
  border-color: #d0d0d0; box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}
.ov-section:hover .ov-section-arrow { color: var(--primary); transform: translateX(2px); }
.ov-section-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.ov-section-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; flex-shrink: 0;
}
.ov-section-label { font-weight: 600; font-size: 13px; color: var(--text); flex: 1; }
.ov-section-arrow { color: var(--text-muted); font-size: 10px; transition: all 0.2s; }

.ov-kpi-row { display: flex; gap: 8px; }
.ov-kpi {
  flex: 1; text-align: center;
  padding: 8px 4px; background: var(--bg); border-radius: 8px;
}
.ov-kpi-value {
  display: block; font-size: 20px; font-weight: 700;
  font-family: var(--mono); color: var(--text); line-height: 1.2;
}
.ov-kpi-label {
  display: block; font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px;
}

.ov-green { color: var(--green) !important; }
.ov-red { color: var(--red) !important; }

.ov-mini-info {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 6px 10px;
  background: var(--bg); border-radius: 6px;
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ov-mini-info i { font-size: 10px; flex-shrink: 0; }

.ov-container-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ov-container-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; background: var(--bg); border-radius: 6px;
  font-size: 11px; font-family: var(--mono); color: var(--text);
}
.ov-container-down { opacity: 0.5; }
.ov-chip-stat { color: var(--text-muted); font-size: 10px; }

.ov-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ov-dot-green { background: var(--green); }
.ov-dot-red { background: var(--red); }

.ov-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ov-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; background: var(--bg); border-radius: 12px;
  font-size: 10px; font-weight: 500; color: var(--text);
}
.ov-tag-more { background: var(--primary); color: #fff; font-weight: 600; }

.ov-agent-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ov-agent-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; background: var(--bg); border-radius: 6px;
  font-size: 11px; color: var(--text);
}

/* Mini Bar Chart fuer Overview */
.ov-mini-chart {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 4px; margin-top: 10px; padding: 4px 0;
  height: 52px;
}
.ov-bar-col {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.ov-bar-val { font-size: 9px; font-family: var(--mono); color: var(--text-muted); }
.ov-bar-fill {
  width: 100%; max-width: 28px; border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, #6366f1, #818cf8);
  transition: height 0.4s ease;
}
.ov-bar-lbl { font-size: 9px; color: var(--text-muted); text-transform: uppercase; }

.ov-contact-mini { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.ov-contact-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #ff8a50);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}

@media (max-width: 700px) {
  .ov-kpi-grid { grid-template-columns: 1fr; }
}

/* ── Agenten-Seite ── */
.agents-filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.ag-filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: all 0.2s;
}
.ag-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.ag-filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ag-filter-count {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  background: rgba(255,255,255,0.2); padding: 1px 6px; border-radius: 8px;
}
.ag-filter-btn.active .ag-filter-count { background: rgba(255,255,255,0.3); }

.agents-network-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; margin-bottom: 16px;
  overflow: hidden;
}
.agents-network-wrap canvas { display: block; width: 100%; }
.agents-tooltip {
    position: absolute; pointer-events: none; z-index: 10;
    background: rgba(26,26,26,0.95); color: #e0e0e0; border-radius: 8px;
    padding: 8px 12px; font-size: 12px; line-height: 1.5;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3); max-width: 220px;
    backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1);
}

.agents-dupe-warn {
  background: #fef3c7; border: 1px solid #fbbf24; border-radius: 10px;
  padding: 16px; margin-bottom: 16px;
}
.agents-dupe-header {
  font-weight: 600; font-size: 13px; color: #92400e; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.agents-dupe-item {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 0; border-bottom: 1px solid rgba(251,191,36,0.2); font-size: 12px;
}
.agents-dupe-item:last-child { border-bottom: none; }
.agents-dupe-name { font-weight: 600; color: var(--text); }
.agents-dupe-project {
  font-size: 10px; font-family: var(--mono); color: var(--text-muted);
  background: var(--bg); padding: 2px 6px; border-radius: 4px;
}
.agents-dupe-reason { font-size: 10px; color: #92400e; margin-left: auto; }

.agents-group { margin-bottom: 20px; }
.agents-group-header {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: var(--text);
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.agents-group-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.agents-group-count {
  margin-left: auto; font-family: var(--mono); font-size: 11px;
  background: var(--bg); padding: 2px 8px; border-radius: 8px; color: var(--text-muted);
}

/* ── Ticket Kanban ── */
.ticket-kanban {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  min-height: 300px;
}
@media (max-width: 1100px) { .ticket-kanban { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .ticket-kanban { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .ticket-kanban { grid-template-columns: 1fr; } }
.tk-column {
  background: var(--bg); border-radius: 10px; padding: 10px;
  min-height: 200px;
}
.tk-column-header {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.tk-column-count {
  margin-left: auto; font-family: var(--mono); font-size: 10px;
  background: var(--bg-card); padding: 2px 6px; border-radius: 8px;
}
.tk-column-cards { display: flex; flex-direction: column; gap: 8px; }
.tk-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; cursor: pointer;
  transition: all 0.15s;
}
.tk-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.06); transform: translateY(-1px); }
.tk-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.tk-card-id { font-family: var(--mono); font-size: 10px; color: var(--text-muted); }
.tk-prio-dot { width: 8px; height: 8px; border-radius: 50%; }
.tk-card-title { font-weight: 600; font-size: 13px; line-height: 1.3; margin-bottom: 6px; }
.tk-card-meta {
  display: flex; gap: 8px; font-size: 10px; color: var(--text-muted); align-items: center;
}
.tk-card-project {
  font-family: var(--mono); font-size: 10px; background: var(--bg);
  padding: 1px 6px; border-radius: 4px;
}
.tk-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tk-tag {
  font-size: 9px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
  background: var(--primary-light); color: var(--primary);
}
.tk-empty { text-align: center; padding: 20px; font-size: 12px; color: var(--text-muted); }
/* Drag & Drop */
.tk-card[draggable="true"] { cursor: grab; }
.tk-card[draggable="true"]:active { cursor: grabbing; }
.tk-card-dragging { opacity: 0.4; transform: rotate(2deg); }
.tk-column-dragover { background: var(--primary-light); border: 2px dashed var(--primary); }

/* Ticket Detail Overlay */
.ticket-detail-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); z-index: 1000;
  display: flex; justify-content: center; align-items: flex-start;
  padding-top: 60px; overflow-y: auto;
}
.ticket-detail-modal {
  background: var(--bg-card); border-radius: 16px;
  width: 90%; max-width: 700px; padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  margin-bottom: 60px;
}

/* Mail Sub-Tabs */
.mail-sub { display: none; }
.mail-sub.active { display: block; }

/* ── Mail Center ── */
.mail-compose-form { max-width: 700px; }
.mail-field { margin-bottom: 14px; }
.mail-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.mail-field input, .mail-field textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  background: var(--bg-card); color: var(--text); transition: border-color 0.2s;
}
.mail-field input:focus, .mail-field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,84,10,0.1);
}
.mail-field textarea { resize: vertical; min-height: 120px; font-family: var(--mono); font-size: 13px; }

/* ── Changelog Timeline ── */
.cl-header {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.cl-version-big {
  font-size: 28px; font-weight: 700; font-family: var(--mono);
  color: var(--primary);
}
.cl-version-date { font-size: 13px; color: var(--text-muted); }
.cl-timeline { position: relative; padding-left: 24px; }
.cl-timeline::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.cl-entry { position: relative; margin-bottom: 24px; }
.cl-dot {
  position: absolute; left: -20px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--bg-card); box-shadow: 0 0 0 2px var(--border);
}
.cl-content { padding-left: 8px; }
.cl-entry-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.cl-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600;
  color: #fff; text-transform: uppercase; letter-spacing: 0.5px;
}
.cl-version-tag {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  color: var(--text); background: var(--bg); padding: 2px 6px; border-radius: 4px;
}
.cl-date { font-size: 11px; color: var(--text-muted); }
.cl-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.cl-changes {
  list-style: none; padding: 0; margin: 0;
}
.cl-changes li {
  font-size: 12px; color: var(--text-muted); padding: 2px 0 2px 16px;
  position: relative; line-height: 1.5;
}
.cl-changes li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--border);
}

/* ── Feature Kategorien ── */
.ft-category {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; margin-bottom: 12px;
  transition: box-shadow 0.2s;
}
.ft-category:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.ft-category-header {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.ft-count {
  margin-left: auto; background: var(--primary-light);
  color: var(--primary); font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px; font-family: var(--mono);
}
.ft-items { list-style: none; padding: 0; margin: 0; }
.ft-items li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 4px 0; color: var(--text);
}
.ft-tech-section { margin-top: 20px; }
.ft-tech-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ft-tech-badge {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-family: var(--mono);
}

/* ── Agent Cards (expandierbar) ── */
.ag-summary {
  display: flex; gap: 16px; margin-bottom: 20px;
  padding: 16px; background: var(--bg); border-radius: 10px;
}
.ag-summary-item { text-align: center; flex: 1; }
.ag-summary-value {
  display: block; font-size: 24px; font-weight: 700;
  font-family: var(--mono); color: var(--primary);
}
.ag-summary-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.ag-list { display: flex; flex-direction: column; gap: 12px; }
.ag-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; cursor: pointer; transition: all 0.25s ease;
  overflow: hidden;
}
.ag-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); border-color: #d0d0d0; }
.ag-card.ag-expanded { border-color: var(--primary); box-shadow: 0 4px 20px rgba(232,84,10,0.1); }
.ag-card-top { padding: 16px; }
.ag-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.ag-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; flex-shrink: 0;
}
.ag-info { flex: 1; min-width: 0; }
.ag-name { font-weight: 600; font-size: 15px; color: var(--text); }
.ag-type { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.ag-type-badge { font-size: 11px; font-weight: 600; }
.ag-expand-icon {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 11px; flex-shrink: 0;
  transition: all 0.25s ease;
}
.ag-card.ag-expanded .ag-expand-icon { transform: rotate(180deg); color: var(--primary); background: #fef0e7; }
.ag-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.ag-status-dot { width: 6px; height: 6px; border-radius: 50%; }
.ag-status-active { color: var(--green); }
.ag-status-active .ag-status-dot { background: var(--green); animation: pulse-dot 2s infinite; }
.ag-status-inactive { color: var(--text-muted); }
.ag-status-inactive .ag-status-dot { background: var(--text-muted); }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.ag-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 0 0 10px 0; }
.ag-meta {
  display: flex; gap: 12px; font-size: 11px; color: var(--text-muted);
  padding-top: 10px; border-top: 1px solid var(--border);
}
.ag-meta span { display: flex; align-items: center; gap: 4px; }
.ag-meta i { font-size: 10px; }

/* Detail-Bereich (collapsed by default) */
.ag-detail {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 16px; border-top: 0 solid var(--border);
}
.ag-card.ag-expanded .ag-detail {
  max-height: 800px; padding: 16px; border-top: 1px solid var(--border);
  background: linear-gradient(to bottom, var(--bg), transparent);
}
.ag-detail-section { margin-bottom: 16px; }
.ag-detail-title {
  font-weight: 600; font-size: 12px; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.ag-detail-title i { font-size: 11px; }
.ag-detail-text { font-size: 13px; color: var(--text); line-height: 1.7; margin: 0; }
.ag-workflow {
  list-style: none; padding: 0; margin: 0; counter-reset: step;
}
.ag-workflow li {
  position: relative; padding: 8px 0 8px 36px; font-size: 12px; color: var(--text);
  line-height: 1.5; border-left: 2px solid var(--border); margin-left: 11px;
  counter-increment: step;
}
.ag-workflow li:last-child { border-left-color: transparent; }
.ag-workflow li::before {
  content: counter(step); position: absolute; left: -12px; top: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 700; font-family: var(--mono);
  display: flex; align-items: center; justify-content: center;
}
.ag-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.ag-detail-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px;
}
.ag-detail-label {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.ag-detail-label i { font-size: 9px; }
.ag-detail-value { font-size: 12px; color: var(--text); line-height: 1.4; }

@media (max-width: 640px) {
  .ag-detail-grid { grid-template-columns: 1fr; }
}

/* ── Agent Monitor ── */
.agent-tab-content { animation: fadeIn 0.2s ease; }

.agent-bugs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.agent-bug-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    transition: box-shadow 0.2s;
}
.agent-bug-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.agent-bug-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.agent-bug-severity {
    font-size: 9px; font-weight: 700; color: #fff;
    padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.agent-bug-agent { font-size: 11px; color: var(--text-muted); }
.agent-bug-date { font-size: 10px; color: var(--text-muted); margin-left: auto; font-family: var(--mono); }
.agent-bug-issue { font-size: 13px; line-height: 1.5; margin-bottom: 8px; }
.agent-bug-file { font-family: var(--mono); font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.agent-bug-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.agent-fix-timeline { position: relative; padding-left: 24px; }
.agent-fix-timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}
.agent-fix-entry { position: relative; margin-bottom: 16px; }
.agent-fix-dot {
    position: absolute;
    left: -20px; top: 6px;
    width: 10px; height: 10px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--white);
}
.agent-fix-content {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
}
.agent-fix-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.agent-fix-time { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.agent-fix-agent { font-weight: 600; font-size: 12px; }
.agent-fix-change { font-size: 12px; line-height: 1.5; }
.agent-fix-file { font-family: var(--mono); font-size: 11px; color: var(--primary); margin-right: 8px; }

.empty-state {
    text-align: center; padding: 48px 24px; color: var(--text-muted);
}
.empty-state i { font-size: 36px; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { margin: 4px 0; font-size: 14px; }
.empty-state .sub { font-size: 12px; opacity: 0.6; }

.badge-muted { background: #e5e7eb; color: #6b7280; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.btn-sm { font-size: 11px; padding: 4px 10px; }

@media (max-width: 768px) {
    .agent-bugs-grid { grid-template-columns: 1fr; }
}

/* ── Projekt-KPI Grid ── */
.project-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.project-kpi-grid .kpi-card {
    position: relative;
    overflow: hidden;
}
.project-kpi-grid .kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
}
.project-kpi-grid .kpi-card:hover::before {
    opacity: 1;
}

/* ── SEO Engine ── */

.pd-tab-disabled {
    opacity: 0.5;
    cursor: pointer;
}
.pd-tab-disabled:hover {
    opacity: 0.8;
    color: var(--primary) !important;
}

.seo-scores {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 20px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.seo-gauge {
    text-align: center;
    min-width: 90px;
}
.seo-gauge-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}
.seo-gauge-inner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}
.seo-gauge-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.seo-score-meta {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}
.seo-score-meta i { width: 16px; text-align: center; }

.seo-subtabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}
.seo-subtab {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
}
.seo-subtab:hover { color: var(--text); }
.seo-subtab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.seo-sub { display: none; }
.seo-sub.active { display: block; }

.seo-severity {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}

.seo-intent {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    background: var(--bg);
    border: 1px solid var(--border);
}
.seo-intent-transactional { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.seo-intent-informational { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.seo-intent-navigational { background: #fff3e0; color: #e65100; border-color: #ffcc80; }

.seo-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.seo-content-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}
.seo-content-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 4px;
}
.seo-content-page {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.seo-content-current {
    background: #fff3e0;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 8px;
    word-break: break-word;
}
.seo-content-suggested {
    background: #e8f5e9;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 8px;
    word-break: break-word;
}
.seo-content-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.seo-content-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* Quick Win Badge */
.seo-qw-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    background: #e8f5e9;
    color: #2e7d32;
    margin-top: 4px;
}
.seo-quickwin { background: rgba(34,197,94,0.03); }

/* Kategorie Badge – farbig nach Kategorie */
.seo-cat-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    background: var(--bg);
    border: 1px solid var(--border);
    text-transform: capitalize;
}
.seo-cat-ai_crawler { background: #ede9fe; color: #7c3aed; border-color: #c4b5fd; }
.seo-cat-security { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.seo-cat-image_seo { background: #ecfdf5; color: #065f46; border-color: #6ee7b7; }
.seo-cat-structured_data { background: #eff6ff; color: #1e40af; border-color: #93c5fd; }
.seo-cat-performance { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
.seo-cat-meta { background: #fdf4ff; color: #86198f; border-color: #e879f9; }
.seo-cat-content { background: #f0fdf4; color: #166534; border-color: #86efac; }
.seo-cat-technical { background: #f8fafc; color: #334155; border-color: #cbd5e1; }

/* Priority Badge */
.seo-prio-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.seo-prio-high { background: var(--primary); }
.seo-prio-med { background: var(--amber); }
.seo-prio-low { background: var(--border); color: var(--text-muted); }

/* Cluster Badge */
.seo-cluster-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

/* Toolbar */
.seo-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.seo-toolbar-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.seo-toolbar-info {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
}

/* Section Title */
.seo-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}
.seo-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    background: var(--primary);
    color: #fff;
    padding: 0 6px;
    margin-left: 4px;
}

/* Applied Badge */
.seo-applied-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    color: #2e7d32;
}
.seo-card-done {
    opacity: 0.7;
    border-color: #a5d6a7;
}

/* Run Status */
.seo-run-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
}
.seo-run-done { background: #e8f5e9; color: #2e7d32; }
.seo-run-error { background: #ffebee; color: #c62828; }
.seo-run-running { background: #e3f2fd; color: #1565c0; }

/* Score Trend Chart */
.seo-trend-chart {
    margin-top: 8px;
    text-align: center;
}
.seo-trend-chart svg {
    display: block;
    margin: 0 auto;
}
.seo-trend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Empty State */
.seo-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.seo-empty-state i {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
    opacity: 0.3;
}
.seo-empty-state p {
    font-size: 13px;
}

/* ── Tentacl AI ── */
.kpi-card-clickable { cursor: pointer; transition: all 0.2s; }
.kpi-card-clickable:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.tai-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.tai-file-card {
    display: flex; gap: 12px; align-items: center;
    padding: 14px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer; transition: all 0.2s;
}
.tai-file-card:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); }
.tai-file-icon { font-size: 20px; width: 36px; text-align: center; }
.tai-file-name { font-weight: 600; font-size: 13px; }
.tai-file-meta { font-size: 11px; color: var(--text-muted); }

.tai-sev {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: 12px; font-weight: 600;
}
.tai-sev-critical { background: #fef2f2; color: #dc2626; }
.tai-sev-high { background: #fff7ed; color: #ea580c; }
.tai-sev-medium { background: #fffbeb; color: #d97706; }
.tai-sev-low { background: #f3f4f6; color: #6b7280; }

.tai-sev-badge {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
}

.tai-entry {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 8px; overflow: hidden;
    transition: all 0.2s; cursor: pointer;
}
.tai-entry:hover { border-color: var(--primary); }
.tai-entry-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; gap: 12px;
}
.tai-entry-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.tai-entry-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tai-entry-id { font-family: var(--mono); font-size: 11px; color: var(--primary); font-weight: 600; white-space: nowrap; }
.tai-entry-title { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tai-expand-icon { font-size: 10px; color: var(--text-muted); transition: transform 0.2s; }
.tai-entry.expanded .tai-expand-icon { transform: rotate(180deg); }

.tai-entry-body {
    display: none; padding: 0 16px 14px;
    font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border);
}
.tai-entry.expanded .tai-entry-body { display: block; padding-top: 12px; }
.tai-detail { padding: 4px 0; line-height: 1.5; }
.tai-detail strong { color: var(--text); }
.tai-preview { margin-top: 8px; padding: 10px; background: var(--bg); border-radius: 8px; font-family: var(--mono); font-size: 11px; line-height: 1.6; max-height: 200px; overflow-y: auto; }
.tai-source { margin-top: 8px; font-size: 11px; color: var(--text-muted); font-style: italic; }

@media (max-width: 768px) {
    .tai-files-grid { grid-template-columns: 1fr 1fr; }
    .tai-entry-header { flex-direction: column; align-items: flex-start; }
    .tai-entry-right { align-self: flex-end; }
}
@media (max-width: 480px) {
    .tai-files-grid { grid-template-columns: 1fr; }
}

/* ── Chat Ticket Input ── */
.chat-bubble-system {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 85%;
}
.chat-bubble-user {
  background: var(--primary);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
  margin-left: auto;
  word-break: break-word;
}
.chat-bubble-agent {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
  word-break: break-word;
}
.chat-project-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  margin-right: 4px;
}
#ticket-chat-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 84, 10, 0.1);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* === Agent Network Optimization === */
.optimization-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.opt-badge {
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.opt-badge-duplicates {
    color: var(--red);
}

.opt-badge-missing {
    color: var(--blue);
}

.opt-badge span {
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.agent-optimization-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.duplicate-badge {
    background: rgba(220,38,38,0.1);
    color: var(--red);
    border: 1px solid rgba(220,38,38,0.2);
}

.ag-suggestion {
    border: 2px dashed var(--border) !important;
    background: rgba(59,130,246,0.02) !important;
    position: relative;
}

.ag-suggestion::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent 30%, var(--blue) 30%, var(--blue) 70%, transparent 70%);
    background-size: 10px 10px;
    opacity: 0.1;
    border-radius: 10px;
    pointer-events: none;
}

.ag-type-suggestion {
    background: rgba(59,130,246,0.1) !important;
    color: var(--blue) !important;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification-show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--green);
    color: var(--green);
}

.notification-error {
    border-left: 4px solid var(--red);
    color: var(--red);
}

.notification i {
    font-size: 18px;
}

/* ── SEO Fix Modal ── */
.seo-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.seo-modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.25s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.seo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.seo-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.seo-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.seo-modal-close:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.seo-modal-body {
    padding: 24px;
}

.seo-fix-issue-info {
    background: #fef3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}

.seo-fix-comparison {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.seo-fix-current,
.seo-fix-suggested {
    border-radius: 10px;
    padding: 16px;
    border: 1.5px solid var(--border);
}

.seo-fix-current {
    background: #fef2f2;
    border-color: #fecaca;
}

.seo-fix-suggested {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.seo-fix-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.seo-fix-current .seo-fix-label { color: #b91c1c; }
.seo-fix-suggested .seo-fix-label { color: #15803d; }

.seo-fix-value {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    word-break: break-word;
}

.seo-fix-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 14px;
    border: 1.5px solid #bbf7d0;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: #f0fdf4;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.6;
}

.seo-fix-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.seo-fix-charcount {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}

.seo-fix-charcount.warning { color: var(--amber); }
.seo-fix-charcount.danger { color: var(--red); }

.seo-fix-explanation {
    background: var(--primary-light);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
}

.seo-fix-explanation strong {
    color: var(--primary);
    font-weight: 600;
}

.seo-fix-impact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.seo-fix-impact.high { background: #dcfce7; color: #15803d; }
.seo-fix-impact.medium { background: #fef9c3; color: #854d0e; }
.seo-fix-impact.low { background: #f1f5f9; color: #475569; }

.seo-fix-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
}

.seo-fix-actions .btn-fix-apply {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    transition: all 0.15s;
}

.seo-fix-actions .btn-fix-apply:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 84, 10, 0.25);
}

.seo-fix-actions .btn-fix-cancel {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    border: 1.5px solid var(--border);
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.15s;
}

.seo-fix-actions .btn-fix-cancel:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

/* Modal Loading Spinner */
.seo-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 16px;
}

.seo-modal-loading .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.seo-modal-loading p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ── GSC Styles ── */
.seo-gsc-opportunities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.seo-gsc-opp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px;
}

.seo-gsc-pos-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.seo-gsc-pos-badge.top3 { background: #dcfce7; color: #15803d; }
.seo-gsc-pos-badge.page1 { background: #fef9c3; color: #854d0e; }
.seo-gsc-pos-badge.page2 { background: #fee2e2; color: #b91c1c; }

.seo-gsc-sparkline { display: inline-block; vertical-align: middle; }

.seo-gsc-setup {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.seo-gsc-sync-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg);
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b0b0b0; }
