/* Neurovexa customer dashboard — polished layout & components */

.nvx-dash {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--nvx-space-4) var(--nvx-space-8);
}

.nvx-dash .nvx-card {
  box-sizing: border-box;
}

.nvx-dash .nvx-panel {
  display: flex;
  flex-direction: column;
  padding: var(--nvx-panel-pad);
  height: 100%;
  min-height: 0;
}

.nvx-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--nvx-space-4);
  margin-bottom: var(--nvx-space-5);
  flex-shrink: 0;
}

.nvx-panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ---- Hero ---- */
.nvx-dash-hero {
  margin-bottom: var(--nvx-section-gap);
  padding: var(--nvx-space-6) var(--nvx-space-6);
  border-radius: var(--nvx-radius);
  border: 1px solid var(--nvx-border);
  background: var(--nvx-glass-strong);
  box-shadow: var(--nvx-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nvx-dash-hero h1 {
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 700;
  margin: 0 0 var(--nvx-space-3);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.nvx-dash-hero p {
  margin: 0;
  color: var(--nvx-muted);
  max-width: 38rem;
  font-size: 0.95rem;
  line-height: 1.55;
  font-weight: 450;
}

/* ---- Metrics ---- */
.nvx-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--nvx-gap);
  margin-bottom: var(--nvx-section-gap);
  align-items: stretch;
}

.nvx-metric {
  display: flex;
  flex-direction: column;
  padding: var(--nvx-panel-pad);
  min-height: 118px;
  position: relative;
  overflow: hidden;
}

.nvx-metric::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 151, 249, 0.22), transparent 70%);
  pointer-events: none;
}

.nvx-metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--nvx-space-3);
  margin-bottom: var(--nvx-space-3);
}

.nvx-metric-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--nvx-muted);
  margin: 0;
  line-height: 1.3;
}

.nvx-metric-value {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.nvx-metric-value.nvx-metric-value-sm {
  font-size: 1.15rem;
  word-break: break-all;
}

.nvx-metric-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(66, 151, 249, 0.12);
  border: 1px solid var(--nvx-border-soft);
  color: var(--nvx-cyan);
}

.nvx-metric-hint {
  margin: auto 0 0;
  padding-top: var(--nvx-space-2);
  font-size: 0.75rem;
  color: var(--nvx-muted-2);
  line-height: 1.3;
}

.nvx-metric-actions {
  display: inline-flex;
  gap: 0.45rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.nvx-metric-actions i {
  cursor: pointer;
  color: var(--nvx-cyan);
  font-size: 0.9rem;
}

/* ---- Main grids ---- */
.nvx-dash-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: var(--nvx-gap);
  margin-bottom: var(--nvx-section-gap);
  align-items: stretch;
}

.nvx-dash-side {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--nvx-gap);
  margin-bottom: var(--nvx-section-gap);
  align-items: stretch;
}

.nvx-dash-side > .nvx-panel {
  min-height: 220px;
}

.nvx-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--nvx-space-3);
}

.nvx-service-card {
  padding: var(--nvx-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--nvx-space-3);
  min-height: 148px;
}

.nvx-service-card .nvx-svc-title {
  font-weight: 650;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
}

.nvx-service-card .nvx-svc-meta {
  color: var(--nvx-muted);
  font-size: 0.8rem;
  margin: 0;
  flex: 1;
}

/* ---- Badges ---- */
.nvx-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--nvx-radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}

.nvx-badge-ok {
  color: var(--nvx-success);
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}

.nvx-badge-warn {
  color: var(--nvx-warning);
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
}

.nvx-badge-err {
  color: var(--nvx-danger);
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
}

.nvx-badge-muted {
  color: var(--nvx-muted);
  background: rgba(180, 195, 230, 0.08);
  border-color: var(--nvx-border-soft);
}

/* ---- Empty states ---- */
.nvx-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nvx-space-6) var(--nvx-space-4);
  min-height: 180px;
  border-radius: var(--nvx-radius-sm);
  border: 1px dashed rgba(66, 151, 249, 0.28);
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(66, 151, 249, 0.1) 0%, transparent 70%),
    rgba(6, 7, 34, 0.35);
  color: var(--nvx-muted);
}

.nvx-empty-sm {
  min-height: 120px;
  padding: var(--nvx-space-5) var(--nvx-space-3);
}

.nvx-empty-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--nvx-space-4);
  background: rgba(66, 151, 249, 0.12);
  border: 1px solid rgba(61, 224, 245, 0.35);
  box-shadow: 0 0 24px rgba(66, 151, 249, 0.2);
  color: var(--nvx-cyan);
  font-size: 1.25rem;
}

.nvx-empty h3 {
  margin: 0 0 var(--nvx-space-2);
  font-size: 1rem;
  font-weight: 650;
  color: var(--nvx-text);
  line-height: 1.3;
}

.nvx-empty p {
  margin: 0 0 var(--nvx-space-5);
  max-width: 22rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--nvx-muted);
}

.nvx-empty .nvx-btn {
  margin-top: 0;
}

/* ---- Account tiles ---- */
.nvx-account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--nvx-space-3);
  margin-bottom: var(--nvx-space-5);
}

.nvx-account-tile {
  display: flex;
  align-items: flex-start;
  gap: var(--nvx-space-3);
  padding: var(--nvx-space-3) var(--nvx-space-3);
  border-radius: var(--nvx-radius-sm);
  border: 1px solid var(--nvx-border-soft);
  background: rgba(6, 7, 34, 0.45);
  min-height: 72px;
}

.nvx-account-tile-icon {
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(66, 151, 249, 0.12);
  border: 1px solid var(--nvx-border-soft);
  color: var(--nvx-cyan);
  font-size: 0.85rem;
}

.nvx-account-tile .nvx-tile-label {
  display: block;
  font-size: 0.72rem;
  color: var(--nvx-muted);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.nvx-account-tile .nvx-tile-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  word-break: break-word;
}

.nvx-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nvx-space-2);
  margin-top: auto;
}

/* ---- Lists / status ---- */
.nvx-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nvx-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--nvx-border-soft);
  font-size: 0.86rem;
}

.nvx-list li:last-child {
  border-bottom: 0;
}

.nvx-support-blurb {
  display: flex;
  align-items: flex-start;
  gap: var(--nvx-space-3);
  margin-bottom: var(--nvx-space-5);
  padding: var(--nvx-space-3);
  border-radius: var(--nvx-radius-sm);
  border: 1px solid var(--nvx-border-soft);
  background: rgba(6, 7, 34, 0.4);
}

.nvx-support-blurb i {
  color: var(--nvx-cyan);
  margin-top: 0.15rem;
}

.nvx-support-blurb p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--nvx-muted);
}

/* ---- News (side panel stack) ---- */
.nvx-news-stack {
  display: flex;
  flex-direction: column;
  gap: var(--nvx-space-3);
  flex: 1;
  min-height: 0;
}

.nvx-news-card {
  padding: var(--nvx-space-3) var(--nvx-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--nvx-space-2);
  border-radius: var(--nvx-radius-sm);
  border: 1px solid var(--nvx-border-soft);
  background: rgba(6, 7, 34, 0.45);
}

.nvx-news-card .nvx-news-cat {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 650;
  padding: 0.15rem 0.5rem;
  border-radius: var(--nvx-radius-pill);
  line-height: 1.2;
}

.nvx-news-cat-info {
  color: var(--nvx-cyan);
  border: 1px solid rgba(61, 224, 245, 0.3);
  background: rgba(61, 224, 245, 0.08);
}

.nvx-news-cat-update {
  color: var(--nvx-sky);
  border: 1px solid rgba(66, 151, 249, 0.35);
  background: rgba(66, 151, 249, 0.12);
}

.nvx-news-cat-warn {
  color: var(--nvx-warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.12);
}

.nvx-news-card h3 {
  font-size: 0.92rem;
  margin: 0;
  font-weight: 650;
  line-height: 1.35;
}

.nvx-news-card p {
  margin: 0;
  color: var(--nvx-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nvx-news-card .nvx-news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.72rem;
  color: var(--nvx-muted-2);
  margin-top: 0.15rem;
}

.nvx-reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: nvx-reveal 0.55s var(--nvx-ease) forwards;
}

@keyframes nvx-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1199.98px) {
  .nvx-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nvx-dash-grid { grid-template-columns: 1fr; }
  .nvx-dash-side { grid-template-columns: 1fr; }
  .nvx-dash-side > .nvx-panel { min-height: 0; }
  .nvx-account-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 575.98px) {
  .nvx-dash { padding-left: var(--nvx-space-3); padding-right: var(--nvx-space-3); }
  .nvx-metrics { grid-template-columns: 1fr; }
  .nvx-account-grid { grid-template-columns: 1fr; }
  .nvx-dash-hero { padding: var(--nvx-space-5); }
}

@media (prefers-reduced-motion: reduce) {
  .nvx-reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ================================================================
   Kunden-Dashboard (templates/nexcms/customer/dashboard.php)
   Seitenleiste links (Daten, Guthaben, Konto, Schnellzugriff),
   rechts Kennzahlen, Wissensdatenbank-Suche und Panels in zwei Spalten.
   ================================================================ */
.nvx-cd {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 8px 48px;
  color: var(--nvx-text);
  font-family: var(--nvx-font);
}

.nvx-cd a { text-decoration: none; }
.nvx-cd h1, .nvx-cd h2, .nvx-cd p, .nvx-cd ul, .nvx-cd dl, .nvx-cd dd, .nvx-cd address { margin: 0; }
.nvx-cd ul { padding: 0; list-style: none; }
.nvx-cd-muted { color: var(--nvx-muted-2); font-size: 0.82rem; }

/* —— Karten und Panels —— */
.nvx-cd-card,
.nvx-cd-panel {
  position: relative;
  border: 1px solid var(--nvx-border-soft);
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(66, 151, 249, 0.07), transparent 60%),
    rgba(10, 14, 40, 0.82);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.8);
}

.nvx-cd-card { padding: 20px; }

.nvx-cd-card-title {
  margin-bottom: 12px !important;
  color: var(--nvx-muted-2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nvx-cd-label { color: var(--nvx-muted-2); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* —— Buttons und Badges —— */
.nvx-cd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(156, 194, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff !important;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.nvx-cd-btn:hover { border-color: rgba(66, 151, 249, 0.6); background: rgba(66, 151, 249, 0.1); }
.nvx-cd-btn--primary { border-color: transparent; background: linear-gradient(135deg, #4aa2ff, var(--nvx-sky) 45%, #2b6fd6); box-shadow: 0 10px 24px -14px rgba(66, 151, 249, 0.9); }
.nvx-cd-btn--primary:hover { border-color: transparent; background: linear-gradient(135deg, #5aaeff, #4aa2ff 45%, #3479df); }
.nvx-cd-btn--sm { min-height: 32px; padding: 0 12px; border-radius: 10px; font-size: 0.78rem; }
.nvx-cd-btn--block { width: 100%; margin-top: 16px; }
.nvx-cd-btn i { font-size: 0.8em; }

.nvx-cd-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.nvx-cd-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.nvx-cd-badge--ok { background: rgba(52, 211, 153, 0.12); color: var(--nvx-success); }
.nvx-cd-badge--warn { background: rgba(251, 191, 36, 0.12); color: var(--nvx-warning); }
.nvx-cd-badge--err { background: rgba(248, 113, 113, 0.12); color: var(--nvx-danger); }
.nvx-cd-badge--muted { background: rgba(255, 255, 255, 0.06); color: var(--nvx-muted); }

/* —— Seitenleiste —— */
.nvx-cd-side { display: flex; flex-direction: column; gap: 16px; }

.nvx-cd-me-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }

.nvx-cd-avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--nvx-sky), var(--nvx-purple));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.nvx-cd-me-head strong { display: block; color: #fff; font-size: 1rem; font-weight: 700; }
.nvx-cd-me-head span { color: var(--nvx-muted-2); font-size: 0.8rem; }

.nvx-cd-address { color: var(--nvx-muted); font-size: 0.86rem; font-style: normal; line-height: 1.6; }

.nvx-cd-kv { display: grid; gap: 8px; margin-top: 14px !important; padding-top: 14px; border-top: 1px solid var(--nvx-border-soft); }
.nvx-cd-kv div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nvx-cd-kv dt { color: var(--nvx-muted-2); font-size: 0.8rem; font-weight: 500; }
.nvx-cd-kv dd { color: #fff; font-size: 0.86rem; font-weight: 600; }

.nvx-cd-balance { display: grid; gap: 4px; }
.nvx-cd-balance-value { color: #fff; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }

.nvx-cd-rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(66, 151, 249, 0.1);
  color: var(--nvx-muted-2);
  font-size: 0.82rem;
}

.nvx-cd-rows li:first-child { border-top: 0; padding-top: 0; }
.nvx-cd-rows li > span:last-child,
.nvx-cd-rows a { color: #fff; font-weight: 600; text-align: right; }
.nvx-cd-rows a { color: var(--nvx-cyan) !important; }

.nvx-cd-pin { display: inline-flex; align-items: center; gap: 6px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.nvx-cd-pin button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--nvx-muted);
  font-size: 0.7rem;
  cursor: pointer;
}

.nvx-cd-pin button:hover { background: rgba(66, 151, 249, 0.18); color: #fff; }

.nvx-cd-shortcuts a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--nvx-muted) !important;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.nvx-cd-shortcuts a:hover { background: rgba(66, 151, 249, 0.08); color: #fff !important; }
.nvx-cd-shortcuts a i:first-child { width: 18px; color: var(--nvx-sky); text-align: center; }
.nvx-cd-shortcuts a span { flex: 1; }
.nvx-cd-shortcuts a i:last-child { color: var(--nvx-muted-2); font-size: 0.65rem; }

/* —— Kopf —— */
.nvx-cd-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.nvx-cd-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.nvx-cd-hero h1 { color: #fff; font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 700; letter-spacing: -0.02em; }
.nvx-cd-hero p { margin-top: 6px !important; color: var(--nvx-muted); font-size: 0.95rem; }
.nvx-cd-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* —— Kennzahlen —— */
.nvx-cd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

.nvx-cd-stat {
  --tone: var(--nvx-sky);
  position: relative;
  display: grid;
  gap: 2px;
  padding: 20px 20px 18px;
  overflow: hidden;
  border: 1px solid var(--nvx-border-soft);
  border-radius: 16px;
  background: rgba(10, 14, 40, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.nvx-cd-stat::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--tone);
}

.nvx-cd-stat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 55%, transparent); }
.nvx-cd-stat strong { color: var(--tone); font-size: 2.1rem; font-weight: 700; line-height: 1.1; }
.nvx-cd-stat span { color: var(--nvx-muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.nvx-cd-stat-icon {
  position: absolute;
  top: 16px;
  right: 18px;
  color: var(--tone);
  font-size: 2rem;
  opacity: 0.18;
}

.nvx-cd-stat--sky { --tone: var(--nvx-sky); }
.nvx-cd-stat--cyan { --tone: var(--nvx-cyan); }
.nvx-cd-stat--violet { --tone: var(--nvx-purple); }
.nvx-cd-stat--amber { --tone: var(--nvx-warning); }

/* —— Suche —— */
.nvx-cd-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 18px;
  border: 1px solid var(--nvx-border-soft);
  border-radius: 14px;
  background: rgba(10, 14, 40, 0.82);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nvx-cd-search:focus-within { border-color: rgba(66, 151, 249, 0.7); box-shadow: 0 0 0 4px rgba(66, 151, 249, 0.14); }
.nvx-cd-search > i { color: var(--nvx-muted-2); }

.nvx-cd-search input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0 !important;
  background: none !important;
  color: #fff !important;
  font-size: 0.95rem;
  outline: none;
  box-shadow: none !important;
}

.nvx-cd-search input::placeholder { color: var(--nvx-muted-2); }

/* —— Panels in zwei Spalten —— */
.nvx-cd-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.nvx-cd-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.nvx-cd-panel { overflow: hidden; }

/* farbige Kante oben je nach Zustand */
.nvx-cd-panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--nvx-sky), var(--nvx-purple)); opacity: 0.6; }
.nvx-cd-panel--ok::before { background: var(--nvx-success); }
.nvx-cd-panel--warn::before { background: var(--nvx-warning); opacity: 0.85; }
.nvx-cd-panel--err::before { background: var(--nvx-danger); opacity: 0.9; }

.nvx-cd-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(66, 151, 249, 0.1);
}

.nvx-cd-panel > header h2 { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 0.98rem; font-weight: 700; }
.nvx-cd-panel > header h2 i { color: var(--nvx-sky); font-size: 0.9rem; }

.nvx-cd-panel-body { padding: 16px 18px; color: var(--nvx-muted); font-size: 0.88rem; line-height: 1.6; }
.nvx-cd-panel-body--flush { padding: 6px 8px; }
.nvx-cd-panel-body strong { color: #fff; }

.nvx-cd-ok { display: flex; align-items: center; gap: 10px; color: var(--nvx-muted); }
.nvx-cd-ok i { color: var(--nvx-success); }

/* Listen in Panels */
.nvx-cd-list li + li { border-top: 1px solid rgba(66, 151, 249, 0.08); }

.nvx-cd-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.nvx-cd-list a:hover { background: rgba(66, 151, 249, 0.07); }

.nvx-cd-list-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(66, 151, 249, 0.14);
  color: #9cc2ff;
  font-size: 0.82rem;
}

.nvx-cd-list-copy { display: grid; flex: 1; min-width: 0; }
.nvx-cd-list-copy strong { display: flex; align-items: center; gap: 8px; min-width: 0; color: #fff; font-size: 0.88rem; font-weight: 600; white-space: nowrap; }
.nvx-cd-list-title { overflow: hidden; text-overflow: ellipsis; }
.nvx-cd-ref { flex-shrink: 0; padding: 1px 8px; border-radius: 999px; background: rgba(66, 151, 249, 0.12); box-shadow: inset 0 0 0 1px rgba(66, 151, 249, 0.3); color: #9fd0ff; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; }
.nvx-cd-list-copy small { color: var(--nvx-muted-2); font-size: 0.76rem; }
.nvx-cd-link { color: var(--nvx-cyan); font-size: 0.8rem; font-weight: 600; white-space: nowrap; }

.nvx-cd-empty { display: grid; justify-items: center; gap: 10px; padding: 22px 12px; text-align: center; }
.nvx-cd-empty i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(66, 151, 249, 0.12); color: var(--nvx-sky); }
.nvx-cd-empty p { max-width: 320px; color: var(--nvx-muted-2); font-size: 0.84rem; }

/* Domain-Suche */
.nvx-cd-domain { display: flex; gap: 8px; margin-bottom: 10px; }

.nvx-cd-domain input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(156, 194, 255, 0.18) !important;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035) !important;
  color: #fff !important;
  outline: none;
}

.nvx-cd-domain input:focus { border-color: rgba(66, 151, 249, 0.7) !important; box-shadow: 0 0 0 4px rgba(66, 151, 249, 0.14); }

/* Neuigkeiten */
.nvx-cd-news li { display: grid; gap: 2px; padding: 12px 10px; }
.nvx-cd-news li + li { border-top: 1px solid rgba(66, 151, 249, 0.08); }
.nvx-cd-news time { color: var(--nvx-muted-2); font-size: 0.72rem; }
.nvx-cd-news strong { color: #fff; font-size: 0.9rem; }
.nvx-cd-news p { color: var(--nvx-muted); font-size: 0.82rem; }

/* —— Responsive —— */
@media (max-width: 1199.98px) {
  .nvx-cd { grid-template-columns: minmax(0, 1fr); }
  .nvx-cd-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); order: 2; }
  .nvx-cd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .nvx-cd { padding: 16px 0 32px; }
  .nvx-cd-side,
  .nvx-cd-cols { grid-template-columns: minmax(0, 1fr); }
  .nvx-cd-hero-actions { width: 100%; }
  .nvx-cd-hero-actions .nvx-cd-btn { flex: 1; }
}

@media (max-width: 479.98px) {
  .nvx-cd-stats { gap: 10px; }
  .nvx-cd-stat { padding: 16px; }
  .nvx-cd-stat strong { font-size: 1.7rem; }
  .nvx-cd-search button { display: none; }
}

.nvx-cd-invoice-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px !important; }
.nvx-cd-invoice-stats div { padding: 10px 12px; border: 1px solid rgba(251, 191, 36, 0.25); border-radius: 12px; background: rgba(251, 191, 36, 0.06); }
.nvx-cd-invoice-stats div.is-err { border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.nvx-cd-invoice-stats dt { color: var(--nvx-muted-2); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.nvx-cd-invoice-stats dd { color: #fff; font-size: 1.5rem; font-weight: 700; }

/* Panels als Zeilenpaare: nebeneinanderstehende Panels gleich hoch, Inhalt füllt die Höhe */
.nvx-cd-cols { align-items: stretch; }
.nvx-cd-cols > .nvx-cd-panel { display: flex; flex-direction: column; }
.nvx-cd-cols > .nvx-cd-panel > .nvx-cd-panel-body { flex: 1; }
.nvx-cd-cols .nvx-cd-panel-body:has(> .nvx-cd-empty) { display: flex; align-items: center; justify-content: center; }

@media (max-width: 767.98px) {
  .nvx-cd-cols { grid-template-columns: minmax(0, 1fr); }
}

/* breiter: mehr Platz auf großen Bildschirmen, Seitenleiste etwas breiter */
.nvx-cd { max-width: 1720px; grid-template-columns: 320px minmax(0, 1fr); }
@media (max-width: 1199.98px) { .nvx-cd { grid-template-columns: minmax(0, 1fr); } }

/* Dashboard nutzt die volle Breite: das „boxed“-Layout des Panels begrenzt .container-fluid,
   für das Dashboard wird die Grenze aufgehoben (andere Seiten bleiben unverändert) */
[data-layout-width=boxed] .container-fluid:has(> .nvx-cd),
[data-layout-width=boxed] #layout-wrapper:has(.nvx-cd) { max-width: none; }

.nvx-cd { max-width: 1760px; padding-left: 24px; padding-right: 24px; }

/* Seitenleiste links */
@media (min-width: 1200px) {
  .nvx-cd { grid-template-columns: 340px minmax(0, 1fr); }
}

/* ================================================================
   Affiliate-Seite (templates/nexcms/customer/affiliate.php) – nutzt die Dashboard-Bausteine
   ================================================================ */
.nvx-cd.nvx-aff { grid-template-columns: minmax(0, 1fr) !important; max-width: 1240px; }
.nvx-aff .nvx-cd-hero h1 { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }

.nvx-aff-offer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid rgba(66, 151, 249, 0.3);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(66, 151, 249, 0.16), rgba(168, 85, 247, 0.12));
}

.nvx-aff-offer-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--nvx-sky), var(--nvx-purple));
  color: #fff;
  font-size: 1.1rem;
}

.nvx-aff-offer strong { display: block; color: #fff; font-size: 1.1rem; }
.nvx-aff-offer p { margin: 2px 0 0; color: var(--nvx-muted); font-size: 0.9rem; }

.nvx-aff-form { align-items: center; margin: 14px 0 10px; }

.nvx-aff-prefix {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(156, 194, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--nvx-muted-2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
  white-space: nowrap;
}

.nvx-aff-link { display: flex; gap: 8px; margin-bottom: 10px; }

.nvx-aff-link input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(156, 194, 255, 0.18) !important;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035) !important;
  color: #fff !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9rem;
  outline: none;
}

.nvx-aff-link .nvx-cd-btn.is-copied { background: var(--nvx-success); box-shadow: none; }

.nvx-aff-steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.nvx-aff-steps li { display: flex; gap: 14px; }

.nvx-aff-steps li > span {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(66, 151, 249, 0.16);
  color: #9cc2ff;
  font-weight: 700;
}

.nvx-aff-steps strong { color: #fff; font-size: 0.92rem; }
.nvx-aff-steps p { margin: 2px 0 0; color: var(--nvx-muted); font-size: 0.85rem; }

.nvx-aff-ref { display: flex; align-items: center; gap: 12px; padding: 10px; }

.nvx-aff-progress {
  position: relative;
  width: 90px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.nvx-aff-progress i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--nvx-sky), var(--nvx-cyan)); }

.nvx-aff-terms { font-size: 0.78rem; }

@media (max-width: 575.98px) {
  .nvx-aff-form, .nvx-aff-link { flex-wrap: wrap; }
  .nvx-aff-prefix { width: 100%; }
  .nvx-aff-progress { display: none; }
}

/* Affiliate-Programm Kundenbereich wie WHMCS (Aktivierung, Kacheln, Stände, Empfehlungen) */
.nvx-afc .nvx-cd-main { display: grid; gap: 18px; }
.nvx-afc-flash { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; border-radius: 12px; font-size: 0.9rem; }
.nvx-afc-flash--ok { border: 1px solid rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); color: #a7f3d0; }
.nvx-afc-flash--err { border: 1px solid rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.1); color: #fecaca; }
.nvx-afc-intro-body { padding: 34px 38px; }
.nvx-afc-intro h1 { margin: 0 0 6px; color: #fff; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; }
.nvx-afc-intro .nvx-afc-lead { margin: 0 0 22px; color: var(--nvx-muted); font-size: 1.02rem; }
.nvx-afc-intro ul { display: grid; gap: 10px; margin: 0 0 28px; padding-left: 22px; list-style: disc; color: rgba(230, 236, 255, 0.86); font-size: 0.94rem; line-height: 1.55; }
.nvx-afc-intro li { display: list-item; }
.nvx-afc-intro li::marker { color: var(--nvx-sky); }
.nvx-afc-go { width: 100%; padding: 16px 20px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; font-size: 1.12rem; font-weight: 700; cursor: pointer; box-shadow: 0 14px 30px -18px rgba(34, 197, 94, 0.9); transition: filter 0.15s; }
.nvx-afc-go:hover { filter: brightness(1.08); }

.nvx-afc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.nvx-afc-tile { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 16px; color: #fff; }
.nvx-afc-tile > i { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); font-size: 1.3rem; }
.nvx-afc-tile strong { display: block; font-size: 1.8rem; line-height: 1.1; }
.nvx-afc-tile small { font-size: 0.9rem; opacity: 0.9; }
.nvx-afc-tile--amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.nvx-afc-tile--cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.nvx-afc-tile--green { background: linear-gradient(135deg, #22c55e, #16a34a); }

.nvx-afc-link { padding: 20px 22px; }
.nvx-afc-link h2, .nvx-afc-refs h2 { margin: 0 0 12px; color: #fff; font-size: 1.1rem; font-weight: 700; }
.nvx-afc-linkrow { display: flex; gap: 8px; }
.nvx-afc-linkrow input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid rgba(156, 194, 255, 0.18) !important; border-radius: 12px; background: rgba(255, 255, 255, 0.035) !important; color: #fff !important; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.9rem; text-align: center; outline: none; }
.nvx-afc-linkrow .nvx-cd-btn.is-copied { background: var(--nvx-success); box-shadow: none; }

.nvx-afc-balances { width: 100%; max-width: 640px; margin: 4px auto 0; border-collapse: collapse; }
.nvx-afc-balances th, .nvx-afc-balances td { padding: 12px 14px; border-bottom: 1px solid var(--nvx-border-soft); font-size: 0.95rem; }
.nvx-afc-balances th { color: var(--nvx-muted); font-weight: 600; text-align: right; width: 60%; }
.nvx-afc-balances td { color: #fff; font-weight: 700; }

.nvx-afc-withdraw { text-align: center; }
.nvx-afc-wbtn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--nvx-sky), #2563eb); color: #fff; font-weight: 700; cursor: pointer; }
.nvx-afc-wbtn:disabled { opacity: 0.45; cursor: not-allowed; }
.nvx-afc-withdraw p { margin: 10px auto 0; max-width: 640px; color: var(--nvx-muted); font-size: 0.86rem; }

.nvx-afc-refbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; color: var(--nvx-muted); font-size: 0.88rem; }
.nvx-afc-search { position: relative; display: inline-flex; align-items: center; }
.nvx-afc-search i { position: absolute; left: 12px; color: var(--nvx-muted); font-size: 0.8rem; pointer-events: none; }
.nvx-afc-search input, .nvx-afc-per select { height: 36px; border: 1px solid rgba(156, 194, 255, 0.18) !important; border-radius: 10px; background: rgba(255, 255, 255, 0.035) !important; color: #fff !important; outline: none; }
.nvx-afc-search input { width: 220px; padding: 0 12px 0 32px; }
.nvx-afc-per select { padding: 0 8px; margin: 0 6px; }
.nvx-afc-per select option { background: #0a0e28; }
.nvx-afc-table-wrap { overflow-x: auto; }
.nvx-afc-table { width: 100%; border-collapse: collapse; }
.nvx-afc-table th { padding: 12px 16px; border-bottom: 1px solid var(--nvx-border-soft); color: var(--nvx-muted); font-size: 0.8rem; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.nvx-afc-table td { padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); color: rgba(235, 240, 255, 0.92); font-size: 0.9rem; }
.nvx-afc-table td small { color: var(--nvx-muted); }
.nvx-afc-table tbody tr:last-child td { border-bottom: 0; }
.nvx-afc-empty { padding: 26px 16px !important; color: var(--nvx-muted) !important; text-align: center; }
.nvx-afc-nav { display: inline-flex; }
.nvx-afc-nav button { padding: 7px 14px; border: 1px solid rgba(156, 194, 255, 0.18); background: rgba(255, 255, 255, 0.035); color: #fff; font-size: 0.86rem; cursor: pointer; }
.nvx-afc-nav button:first-child { border-radius: 10px 0 0 10px; }
.nvx-afc-nav button:last-child { border-left: 0; border-radius: 0 10px 10px 0; }
.nvx-afc-nav button:disabled { color: var(--nvx-muted); cursor: default; opacity: 0.6; }

@media (max-width: 767px) {
  .nvx-afc-tiles { grid-template-columns: minmax(0, 1fr); }
  .nvx-afc-intro-body { padding: 24px 20px; }
  .nvx-afc-balances th { text-align: left; width: auto; }
  .nvx-afc-search input { width: 100%; }
}
