/* Bridge: outreach UI on ZAP dashboard shell */
:root {
  --bg: var(--zap-bg);
  --bg2: var(--zap-surface);
  --bg3: var(--zap-surface2);
  --border: var(--zap-border);
  --accent: var(--zap-green);
  --accent-h: var(--zap-dark-green);
  --text: var(--zap-text);
  --text-muted: var(--zap-text-muted);
  --success: var(--zap-green);
  --warning: #ffb74d;
  --danger: #ff5050;
  --info: var(--zap-cyan);
  --radius: var(--radius-sm);
  --shadow: var(--shadow);
  --surface: var(--zap-surface);
}

body.outreach-zap-theme {
  font-family: 'Poppins', sans-serif;
  background: var(--zap-bg);
  color: var(--zap-text);
}

.outreach-zap-theme .main-content {
  min-height: 100vh;
}

.outreach-zap-theme .page-content.outreach-app {
  padding: 12px 24px 32px;
  max-width: 1600px;
}

.outreach-zap-theme .header {
  display: none;
}

.outreach-zap-theme .tab-nav {
  display: none;
}

.outreach-zap-theme .outreach-topbar {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  padding: 0 20px;
  overflow: visible;
}

.outreach-zap-theme .outreach-topbar .topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  z-index: 2;
}

.outreach-zap-theme .outreach-topbar-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  max-width: min(560px, calc(100vw - 520px));
}

.outreach-zap-theme .outreach-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  margin-left: auto;
  z-index: 2;
}

.outreach-zap-theme .outreach-topbar .topbar-time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  min-width: 8.5ch;
  text-align: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.outreach-zap-theme .topbar-kpi-strip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--zap-border);
  border-radius: 8px;
  flex-shrink: 0;
  pointer-events: auto;
}

.outreach-zap-theme .topbar-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 52px;
  line-height: 1;
  flex-shrink: 0;
}

.outreach-zap-theme .topbar-stat span {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  min-width: 5ch;
  text-align: center;
  display: block;
}

.outreach-zap-theme .topbar-stat label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--zap-text-muted);
  margin-top: 2px;
  text-align: center;
  white-space: nowrap;
  width: 100%;
}

.outreach-zap-theme .topbar-stat-divider {
  width: 1px;
  height: 22px;
  background: var(--zap-border);
  flex-shrink: 0;
}

.outreach-zap-theme .topbar-stat.stat-neutral span { color: var(--zap-text); }
.outreach-zap-theme .topbar-stat.stat-open span { color: var(--zap-green); }
.outreach-zap-theme .topbar-stat.stat-done span { color: var(--zap-green); }
.outreach-zap-theme .topbar-stat.stat-sent span { color: var(--zap-cyan); }
.outreach-zap-theme .topbar-stat.stat-skipped span { color: #ffb74d; }

.outreach-zap-theme .topbar-skip-badges {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 2px;
  z-index: 5;
}

.outreach-zap-theme .topbar-stat.stat-skipped {
  position: relative;
}

.outreach-zap-theme .topbar-stat-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  min-width: 90px;
}

.outreach-zap-theme .topbar-stat-progress .kpi-progress-bar {
  width: 56px;
  height: 4px;
}

.outreach-zap-theme .topbar-stat-progress .kpi-progress-text {
  font-size: 10px;
  color: var(--zap-text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  min-width: 7ch;
  text-align: center;
}

.outreach-zap-theme .outreach-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--zap-text-muted);
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--zap-border);
  border-radius: 999px;
}

.outreach-zap-theme .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zap-text-muted);
}

.outreach-zap-theme .status-dot.running {
  background: var(--zap-green);
  box-shadow: 0 0 8px var(--zap-green);
  animation: outreachPulse 1.5s infinite;
}

.outreach-zap-theme .status-dot.error {
  background: var(--danger);
}

@keyframes outreachPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.outreach-zap-theme .main {
  max-width: none;
  margin: 0;
  padding: 0;
}

.outreach-zap-theme .card,
.outreach-zap-theme .table-wrapper {
  background: var(--zap-surface);
  border: 1px solid var(--zap-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.outreach-zap-theme .card-header h2,
.outreach-zap-theme .table-header h2 {
  color: var(--zap-text);
  font-weight: 600;
}

.outreach-zap-theme .btn-primary,
.outreach-zap-theme .btn-success {
  background: var(--zap-green);
  color: var(--zap-dark);
  border: none;
}

.outreach-zap-theme .btn-primary:hover,
.outreach-zap-theme .btn-success:hover {
  background: var(--zap-light-green);
}

.outreach-zap-theme .btn-secondary,
.outreach-zap-theme .btn-outline,
.outreach-zap-theme .btn-info {
  background: var(--zap-surface2);
  color: var(--zap-text);
  border: 1px solid var(--zap-border);
}

.outreach-zap-theme .btn-danger {
  background: rgba(255, 80, 80, 0.15);
  color: #ffd4d4;
  border: 1px solid rgba(255, 80, 80, 0.35);
}

.outreach-zap-theme input,
.outreach-zap-theme select,
.outreach-zap-theme textarea,
.outreach-zap-theme .filter-input,
.outreach-zap-theme .search-input {
  background: var(--zap-surface2);
  border: 1px solid var(--zap-border);
  color: var(--zap-text);
  border-radius: var(--radius-sm);
}

.outreach-zap-theme input:focus,
.outreach-zap-theme select:focus,
.outreach-zap-theme textarea:focus {
  border-color: rgba(24, 232, 136, 0.45);
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 232, 136, 0.12);
}

.outreach-zap-theme .data-table th,
.outreach-zap-theme .quote-table th,
.outreach-zap-theme table thead th {
  background: var(--zap-surface2);
  color: var(--zap-text-muted);
}

.outreach-zap-theme .data-table td,
.outreach-zap-theme .quote-table td {
  border-color: var(--zap-border);
}

.outreach-zap-theme .lang-tab.active,
.outreach-zap-theme .cb-tab-btn.active {
  background: rgba(24, 232, 136, 0.14);
  color: var(--zap-green);
  border-color: rgba(24, 232, 136, 0.35);
}

.outreach-zap-theme .ab-variant-card {
  border: 1px solid var(--zap-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
}

.outreach-zap-theme .ab-variant-card.variant-b {
  border-color: rgba(0, 255, 255, 0.25);
  background: rgba(0, 255, 255, 0.04);
}

.outreach-zap-theme .ab-variant-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.outreach-zap-theme .ab-variant-label.variant-a { color: var(--zap-green); }
.outreach-zap-theme .ab-variant-label.variant-b { color: var(--zap-cyan); }

.outreach-zap-theme .ab-test-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: rgba(24, 232, 136, 0.08);
  border: 1px solid rgba(24, 232, 136, 0.22);
  font-size: 13px;
}

.outreach-zap-theme .ab-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.outreach-zap-theme .ab-stat-tile {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--zap-surface2);
  border: 1px solid var(--zap-border);
}

.outreach-zap-theme .ab-stat-tile strong {
  display: block;
  font-size: 22px;
  font-family: 'Rubik', sans-serif;
  color: var(--zap-green);
}

.outreach-zap-theme .badge-variant-a {
  background: rgba(24, 232, 136, 0.14);
  color: var(--zap-green);
  border: 1px solid rgba(24, 232, 136, 0.3);
}

.outreach-zap-theme .badge-variant-b {
  background: rgba(0, 255, 255, 0.12);
  color: var(--zap-cyan);
  border: 1px solid rgba(0, 255, 255, 0.28);
}

/* ===== Overview: Filter + Domain-Suche + Tabelle ===== */
.outreach-zap-theme #tab-overview > .filter-compact.sticky-toolbar {
  margin-bottom: 14px;
}

.outreach-zap-theme .work-area-stack {
  gap: 0;
}

.outreach-zap-theme .filter-compact.sticky-toolbar {
  position: static;
  top: auto;
  z-index: auto;
  margin-bottom: 14px;
  border-radius: var(--radius);
  box-shadow: none;
}

.outreach-zap-theme .filter-compact {
  margin-bottom: 14px;
  border-radius: var(--radius) !important;
}

.outreach-zap-theme .filter-compact-row {
  flex-wrap: nowrap;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
  min-height: 0;
}

.outreach-zap-theme .filter-quick-chips {
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.outreach-zap-theme .filter-select-compact {
  flex-shrink: 0;
}

.outreach-zap-theme .filter-count-compact {
  flex-shrink: 0;
  white-space: nowrap;
}

.outreach-zap-theme .work-area-stack .table-wrapper {
  overflow: visible;
  margin-top: 0;
  border-radius: var(--radius);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

/* Sticky innerhalb der Tabelle verursacht Überlappung mit dem Suchfeld */
.outreach-zap-theme .table-wrapper .table-header-split {
  position: static;
  top: auto;
  z-index: auto;
  padding: 16px 16px 14px;
  margin-bottom: 0;
  background: var(--zap-surface);
  border-bottom: 1px solid var(--zap-border);
}

.outreach-zap-theme .table-wrapper .table-search-row {
  position: static;
  top: auto;
  z-index: auto;
  padding: 20px 16px 22px;
  margin: 10px 0 0;
  background: var(--zap-surface);
  border-top: 1px solid var(--zap-border);
  border-bottom: 1px solid var(--zap-border);
}

.outreach-zap-theme .table-search-input {
  display: block;
  width: 100%;
  height: 42px;
  padding: 0 14px;
  box-sizing: border-box;
  background: var(--zap-surface2);
  border: 1px solid var(--zap-border);
  border-radius: var(--radius-sm);
}

/* Getrennter Tabellenkopf (fix) + scrollbarer Body */
.outreach-zap-theme .table-head-fixed {
  margin-top: 0;
  background: var(--zap-surface2);
  border-bottom: 1px solid var(--zap-border);
}

.outreach-zap-theme .table-head-inner {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.outreach-zap-theme .table-head-inner::-webkit-scrollbar {
  display: none;
}

.outreach-zap-theme .table-scroll.table-scroll-body,
.outreach-zap-theme .table-scroll-body {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding-top: 0;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 65vh;
}

.outreach-zap-theme .domain-data-table {
  width: 100%;
  min-width: 1100px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.outreach-zap-theme .table-head-fixed .domain-data-table thead th {
  position: static;
  background-color: var(--zap-surface2);
  border-bottom: 1px solid var(--zap-border);
}

.outreach-zap-theme .table-scroll-body .domain-data-table tbody td {
  border-bottom: 1px solid var(--zap-border);
}

@media (max-width: 1200px) {
  .outreach-zap-theme .outreach-topbar-center {
    position: static;
    transform: none;
    order: 4;
    flex: 1 1 100%;
    max-width: none;
    margin: 0;
    pointer-events: auto;
  }

  .outreach-zap-theme .outreach-topbar {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--topbar-height);
    padding: 8px 16px;
  }
}

@media (max-width: 900px) {
  .outreach-zap-theme .outreach-topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .outreach-zap-theme .ab-stats-grid {
    grid-template-columns: 1fr;
  }
  .outreach-zap-theme .filter-compact-row {
    flex-wrap: wrap;
  }
  .outreach-zap-theme .filter-quick-chips {
    flex-wrap: wrap;
    width: 100%;
  }
}

/* Mail action + DataForSEO metrics columns */
.outreach-zap-theme .mail-action-col,
.outreach-zap-theme td[data-col="mail_action"] {
  width: 72px;
  min-width: 72px;
  text-align: center;
}

.outreach-zap-theme .btn-send-row {
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.3;
}

.outreach-zap-theme .template-variant-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.outreach-zap-theme .template-variant-badge.variant-a {
  background: rgba(76, 175, 80, 0.15);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.35);
}

.outreach-zap-theme .template-variant-badge.variant-b {
  background: rgba(33, 150, 243, 0.15);
  color: #64b5f6;
  border: 1px solid rgba(33, 150, 243, 0.35);
}

.outreach-zap-theme td[data-col="dfs_dr"],
.outreach-zap-theme td[data-col="dfs_traffic"] {
  font-size: 12px;
  white-space: nowrap;
}

.outreach-zap-theme .dfs-trend {
  font-weight: 700;
  margin-left: 2px;
}

.outreach-zap-theme .dfs-trend-up { color: #81c784; }
.outreach-zap-theme .dfs-trend-down { color: #ff5050; }
.outreach-zap-theme .dfs-trend-flat { color: var(--text-muted); }

.outreach-zap-theme .cell-muted,
.outreach-zap-theme .dfs-loading {
  color: var(--text-muted);
}
