/* ============================================================
   SaleMate – DPR Corporate Design
   Vollständiges Stylesheet
   ============================================================ */

/* Font: Inter via System-Font-Stack (kein externes CDN erforderlich) */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --dpr-green:        #0dd18c;
  --dpr-green-dark:   #0aaa72;
  --dpr-green-deep:   #088a5c;
  --dpr-green-light:  #d0f7eb;
  --dpr-green-glow:   rgba(13, 209, 140, 0.18);

  --bg-page:          #f4f5f7;
  --bg-card:          #ffffff;
  --bg-topbar:        #0f1923;
  --bg-hero:          #0f1923;

  --text-primary:     #1a2332;
  --text-secondary:   #5a6a7a;
  --text-muted:       #8a9bac;
  --text-on-dark:     #ffffff;
  --text-topbar:      rgba(255, 255, 255, 0.88);

  --border-card:      #eaecef;
  --border-std:       #e2e6ea;

  --radius-sm:        6px;
  --radius-md:        12px;
  --radius-lg:        18px;
  --radius-xl:        24px;

  --shadow-card:      0 4px 20px rgba(0,0,0,0.07);
  --shadow-card-hover:0 8px 32px rgba(13,209,140,0.15);
  --shadow-modal:     0 20px 60px rgba(0,0,0,0.25);
  --shadow-topbar:    0 2px 16px rgba(0,0,0,0.25);

  --transition:       0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Progress Bar (Loading) ────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--dpr-green);
  z-index: 9999;
  width: 0%;
  transition: width 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 0 8px var(--dpr-green);
}
#progress-bar.loading { width: 70%; opacity: 1; }
#progress-bar.done    { width: 100%; opacity: 0; }

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg-topbar);
  border-bottom: 2px solid var(--dpr-green);
  box-shadow: var(--shadow-topbar);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 20px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.topbar-logo {
  width: 34px; height: 34px;
  background: var(--dpr-green);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--bg-topbar);
  font-weight: 700;
  flex-shrink: 0;
}

.topbar-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.topbar-brand-name .sale { color: var(--dpr-green); }

/* Nav */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-btn {
  padding: 7px 16px;
  border: none;
  background: transparent;
  color: var(--text-topbar);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-btn.active {
  background: var(--dpr-green-glow);
  color: var(--dpr-green);
  font-weight: 600;
}

/* Topbar Right */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-time {
  color: var(--text-topbar);
  font-size: 12px;
  text-align: right;
  line-height: 1.4;
}
.topbar-time .time { font-size: 14px; font-weight: 600; }

/* Notification Bell */
.notif-btn {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text-topbar);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 15px;
}
.notif-btn:hover { color: var(--dpr-green); background: var(--dpr-green-glow); }
.notif-badge {
  position: absolute;
  top: 2px; right: 2px;
  width: 16px; height: 16px;
  background: #dc2626;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  animation: pulse-dot 2s infinite;
}

/* User Avatar */
.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  cursor: pointer;
  transition: var(--transition);
}
.user-avatar-btn:hover { background: rgba(255,255,255,0.12); }

.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--dpr-green);
  color: var(--bg-topbar);
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.user-info { line-height: 1.3; text-align: left; }
.user-name { font-size: 12px; font-weight: 600; color: #fff; }
.user-role-label {
  font-size: 10px;
  color: var(--dpr-green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: var(--bg-topbar);
  border-bottom: 2px solid var(--dpr-green);
  padding: 12px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-btn { justify-content: flex-start; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  background: var(--bg-hero);
  padding: 36px 24px 40px;
  position: relative;
  overflow: hidden;
}

.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 400px; height: 400px;
  top: -100px; right: -80px;
  background: radial-gradient(circle, rgba(13,209,140,0.07) 0%, transparent 70%);
}
.hero::after {
  width: 300px; height: 300px;
  bottom: -80px; left: 10%;
  background: radial-gradient(circle, rgba(13,209,140,0.05) 0%, transparent 70%);
}

.hero-divider {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--dpr-green), transparent);
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--dpr-green);
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.hero-title .mate { color: var(--dpr-green); }

.hero-sub {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-sub span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-sub i { color: var(--dpr-green); }

/* ── Global Filter Bar ─────────────────────────────────────── */
.filter-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-card);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 60px;
  z-index: 900;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.period-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.period-btn {
  padding: 5px 12px;
  border: 1.5px solid var(--border-std);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.period-btn:hover { border-color: var(--dpr-green); color: var(--dpr-green); }
.period-btn.active {
  background: var(--dpr-green);
  border-color: var(--dpr-green);
  color: #fff;
  font-weight: 600;
}

.filter-divider {
  width: 1px; height: 20px;
  background: var(--border-std);
  flex-shrink: 0;
}

/* ── Page Content ──────────────────────────────────────────── */
.page-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.view { display: none; }
.view.active { display: block; }

/* ── Section Titles ────────────────────────────────────────── */
.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--dpr-green);
  margin-bottom: 4px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Cards (base) ──────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

/* Farbige Akzentlinie oben */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-accent, var(--dpr-green));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: var(--transition);
}

/* Glow an Akzentfarbe gekoppelt – key improvement */
/* Primärer Weg: CSS color-mix (modern browsers) */
/* Fallback: --card-glow wird per JS gesetzt */
.card:hover {
  transform: translateY(-5px);
  border-color: var(--card-accent, var(--dpr-green));
  box-shadow:
    var(--card-hover-shadow, 0 8px 32px rgba(13,209,140,0.18)),
    0 2px 8px rgba(0,0,0,0.06);
}
@supports (color: color-mix(in srgb, red 10%, transparent)) {
  .card:hover {
    box-shadow:
      0 8px 32px color-mix(in srgb, var(--card-accent, var(--dpr-green)) 20%, transparent),
      0 2px 8px rgba(0,0,0,0.06);
  }
}

/* ── KPI Card ──────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.kpi-card {
  padding: 20px;
  cursor: default;
}

.kpi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.kpi-icon-box {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: var(--transition);
}

.kpi-badge-pos {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: #eef2ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
  /* Smooth number update */
  transition: color 0.3s ease;
}
.kpi-value.updating { color: var(--dpr-green); }

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.kpi-trend {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
.kpi-trend.up { color: var(--dpr-green-deep); }
.kpi-trend.down { color: #dc2626; }
.kpi-trend.neutral { color: var(--text-muted); }

/* Sparkline */
.sparkline-wrap { height: 36px; }
.sparkline-wrap svg { width: 100%; height: 100%; }

/* ── Hub Section (3-col) ───────────────────────────────────── */
.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.hub-card {
  padding: 20px;
  min-height: 380px;
}

.hub-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-card);
}

.hub-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.refresh-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  transition: var(--transition);
}
.refresh-btn:hover { color: var(--dpr-green); transform: rotate(180deg); }

/* Activity Feed */
.activity-feed { display: flex; flex-direction: column; gap: 8px; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f5;
  /* Smooth slide-in for new items */
  animation: feedItemIn 0.3s ease;
}
.activity-item:last-child { border-bottom: none; }

@keyframes feedItemIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.activity-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.activity-body { flex: 1; min-width: 0; }
.activity-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 2px;
}
.activity-desc strong { color: var(--text-primary); }
.activity-time { font-size: 10px; color: var(--text-muted); }

.activity-type-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  flex-shrink: 0;
}

/* Appointment Timeline */
.appt-timeline { display: flex; flex-direction: column; gap: 8px; }

.appt-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: var(--transition);
  /* Smooth update */
  animation: cardSlideIn 0.3s ease;
}
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.appt-item:hover { border-color: var(--dpr-green); background: var(--dpr-green-light); }

.appt-time-col {
  width: 44px;
  text-align: center;
  flex-shrink: 0;
}
.appt-time { font-size: 11px; font-weight: 700; color: var(--text-primary); }
.appt-dur  { font-size: 10px; color: var(--text-muted); }

.appt-body { flex: 1; min-width: 0; }
.appt-title { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-customer { font-size: 11px; color: var(--text-muted); }

.appt-owner-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Leaderboard */
.leaderboard { display: flex; flex-direction: column; gap: 10px; }

.lb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  transition: var(--transition);
  animation: cardSlideIn 0.3s ease;
}
.lb-item:hover { border-color: var(--card-accent, var(--dpr-green)); transform: translateX(4px); }

.lb-rank {
  font-size: 18px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.lb-rank.num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.lb-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-std);
}

.lb-info { flex: 1; min-width: 0; }
.lb-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.lb-orders { font-size: 10px; color: var(--text-muted); }

.lb-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--dpr-green-deep);
  text-align: right;
  flex-shrink: 0;
}

.lb-progress-wrap { margin-top: 4px; }
.lb-bar {
  height: 3px;
  background: var(--border-std);
  border-radius: 2px;
  overflow: hidden;
}
.lb-bar-fill {
  height: 100%;
  background: var(--dpr-green);
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Alerts */
.alerts-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border-left: 3px solid;
  animation: cardSlideIn 0.3s ease;
}
.alert-item.warn   { background: #fef9ec; border-color: #b45309; }
.alert-item.danger { background: #fef2f2; border-color: #dc2626; }
.alert-item.info   { background: #fffbeb; border-color: #d97706; }
.alert-item i      { margin-top: 1px; flex-shrink: 0; }
.alert-text        { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.alert-text strong { color: var(--text-primary); }

/* ── Chart Row ─────────────────────────────────────────────── */
.chart-row {
  margin-bottom: 28px;
}
.chart-card {
  padding: 20px;
}
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.chart-container { height: 280px; position: relative; }

/* ── Team Triptychon ───────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.member-card {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  /* Glow per JS via style --card-accent */
}

/* Akzentbalken oben */
.member-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-accent, var(--dpr-green));
  transition: var(--transition);
}

/* Hover mit akzentgekoppeltem Glow */
.member-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-accent, var(--dpr-green));
  box-shadow:
    var(--card-hover-shadow, 0 12px 40px rgba(13,209,140,0.22)),
    0 2px 8px rgba(0,0,0,0.06);
}
@supports (color: color-mix(in srgb, red 10%, transparent)) {
  .member-card:hover {
    box-shadow:
      0 12px 40px color-mix(in srgb, var(--card-accent, var(--dpr-green)) 25%, transparent),
      0 2px 8px rgba(0,0,0,0.06);
  }
}

.member-photo-wrap {
  position: relative;
  width: 100%;
  padding-top: 120%;
  overflow: hidden;
  background: var(--bg-page);
}

.member-photo {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.member-card:hover .member-photo { transform: scale(1.04); }

/* Photo upload overlay */
.photo-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,25,35,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  cursor: pointer;
}
.member-card:hover .photo-upload-overlay { opacity: 1; }
.photo-upload-overlay span {
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Status dot */
.member-status-dot {
  position: absolute;
  bottom: 10px; right: 10px;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 1;
}
.member-status-dot.active {
  background: var(--dpr-green);
  animation: pulse-dot 2s infinite;
}
.member-status-dot.inactive { background: var(--text-muted); }

.member-body { padding: 14px 14px 16px; }

.member-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Mini KPI row */
.member-kpis {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.member-kpi-badge {
  flex: 1;
  min-width: 0;
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  border: 1px solid var(--border-std);
  text-align: center;
  transition: var(--transition);
}
.member-kpi-badge:hover { border-color: var(--card-accent, var(--dpr-green)); }

.mkpi-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  /* smooth update */
  transition: color 0.3s ease;
}
.mkpi-val.updating { color: var(--dpr-green); }

.mkpi-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Progress bar */
.member-quota-wrap { margin-bottom: 12px; }
.quota-bar-bg {
  height: 6px;
  background: var(--border-std);
  border-radius: 3px;
  overflow: hidden;
}
.quota-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--card-accent, var(--dpr-green));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.quota-label {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
}

/* Locked / masked KPI (for non-admin viewing colleagues) */
.member-kpi-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-std);
  margin-bottom: 10px;
}
.lock-icon { color: var(--text-muted); font-size: 13px; }
.lock-text {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

.member-open-btn {
  width: 100%;
  padding: 9px;
  background: var(--card-accent, var(--dpr-green));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--card-accent, var(--dpr-green)) 30%, transparent);
}
.member-open-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Animate in staggered */
.member-card {
  animation: fadeInUp 0.5s ease both;
}
.member-card:nth-child(1) { animation-delay: 0.05s; }
.member-card:nth-child(2) { animation-delay: 0.10s; }
.member-card:nth-child(3) { animation-delay: 0.15s; }
.member-card:nth-child(4) { animation-delay: 0.20s; }
.member-card:nth-child(5) { animation-delay: 0.25s; }
.member-card:nth-child(6) { animation-delay: 0.30s; }
.member-card:nth-child(7) { animation-delay: 0.35s; }
.member-card:nth-child(8) { animation-delay: 0.40s; }

/* ── Pipeline View ─────────────────────────────────────────── */
.pipeline-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.funnel-wrap { padding: 24px; }
.funnel-stages { display: flex; flex-direction: column; gap: 6px; }
.funnel-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  padding: 6px;
}
.funnel-stage:hover { background: var(--bg-page); }

.funnel-bar-wrap { flex: 1; }
.funnel-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
}
.funnel-bar-label .stage-name { font-weight: 600; color: var(--text-primary); }
.funnel-bar-label .stage-val  { color: var(--text-muted); }

.funnel-bar-bg {
  height: 24px;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.funnel-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.funnel-count {
  width: 32px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.winloss-wrap { padding: 24px; }
.winloss-chart-wrap { height: 200px; position: relative; }

/* Opportunity Table */
.opportunity-table-wrap { padding: 20px; margin-bottom: 28px; }
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.search-input-wrap { position: relative; }
.search-input-wrap i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
}
.search-input {
  padding: 8px 12px 8px 30px;
  border: 1.5px solid var(--border-std);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  font-size: 12px;
  width: 200px;
  transition: var(--transition);
}
.search-input:focus {
  outline: none;
  border-color: var(--dpr-green);
  box-shadow: 0 0 0 3px rgba(13,209,140,0.12);
}

.select-filter {
  padding: 8px 12px;
  border: 1.5px solid var(--border-std);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.select-filter:focus {
  outline: none;
  border-color: var(--dpr-green);
  box-shadow: 0 0 0 3px rgba(13,209,140,0.12);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border-std);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.data-table th:hover { color: var(--dpr-green); }
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f2f5;
  color: var(--text-secondary);
  transition: background 0.2s ease;
}
.data-table tbody tr:hover td { background: #f8fafc; }
.data-table tbody tr {
  cursor: pointer;
  animation: tableRowIn 0.3s ease both;
}

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

.data-table tbody tr.warning-row td { background: #fffbeb; }
.data-table tbody tr.warning-row:hover td { background: #fef9ec; }

/* ── Calendar View ─────────────────────────────────────────── */
.calendar-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.week-nav button {
  width: 32px; height: 32px;
  border: 1.5px solid var(--border-std);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.week-nav button:hover { border-color: var(--dpr-green); color: var(--dpr-green); }
.week-label { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.calendar-grid-wrap { overflow-x: auto; }

.calendar-grid {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  border: 1px solid var(--border-std);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 700px;
}

.cal-header-cell {
  padding: 10px 8px;
  text-align: center;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-std);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.cal-header-cell.today-col { background: var(--dpr-green-light); color: var(--dpr-green-deep); }

.cal-time-cell {
  padding: 6px 8px;
  text-align: right;
  font-size: 10px;
  color: var(--text-muted);
  border-right: 1px solid var(--border-std);
  border-bottom: 1px solid #f0f2f5;
}

.cal-slot {
  border-right: 1px solid var(--border-std);
  border-bottom: 1px solid #f0f2f5;
  min-height: 44px;
  position: relative;
  padding: 2px;
}
.cal-slot:last-child { border-right: none; }

.cal-event {
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event:hover { filter: brightness(1.15); transform: scale(1.02); }

/* ── Reports View ──────────────────────────────────────────── */
.reports-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.reports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.report-chart-card { padding: 20px; }
.report-chart-wrap { height: 250px; position: relative; }

.heatmap-grid {
  display: grid;
  gap: 3px;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  transition: var(--transition);
  cursor: default;
}
.heatmap-cell:hover { transform: scale(1.3); }

/* ── Admin Users View ─────────────────────────────────────── */
.users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.user-admin-card {
  padding: 20px;
  cursor: default;
}
.user-admin-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.user-admin-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-std);
  flex-shrink: 0;
}
.user-admin-info { flex: 1; min-width: 0; }
.user-admin-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.user-admin-email { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }

.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 10px;
}
.user-role-badge.admin { background: #eef2ff; color: #4f46e5; }
.user-role-badge.sales { background: var(--dpr-green-light); color: var(--dpr-green-deep); }

.user-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.user-active-badge { font-size: 11px; }
.user-active-badge.on  { color: var(--dpr-green-deep); }
.user-active-badge.off { color: #dc2626; }

.user-actions {
  display: flex;
  gap: 8px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--dpr-green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13,209,140,0.3);
}
.btn-primary:hover {
  background: var(--dpr-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13,209,140,0.4);
}
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-std);
}
.btn-secondary:hover { background: #f1f5f9; }
.btn-danger {
  background: transparent;
  color: #dc2626;
  border: 1.5px solid #fca5a5;
}
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}
.badge-green  { background: #ecfdf5; color: #059669; }
.badge-yellow { background: #fef9ec; color: #b45309; }
.badge-red    { background: #fef2f2; color: #dc2626; }
.badge-blue   { background: #eef2ff; color: #4f46e5; }
.badge-orange { background: #fffbeb; color: #d97706; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,18,30,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: fadeInOverlay 0.25s ease forwards;
}
@keyframes fadeInOverlay {
  to { opacity: 1; }
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(30px) scale(0.97);
  animation: slideUpModal var(--transition-bounce) forwards;
}
@keyframes slideUpModal {
  to { transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-shrink: 0;
}

.modal-profile-photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--dpr-green);
  flex-shrink: 0;
}

.modal-profile-info { flex: 1; }
.modal-profile-name { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.modal-profile-role { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.modal-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.modal-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}
.modal-meta-item i { color: var(--dpr-green); }

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
}
.modal-close:hover { color: #dc2626; background: #fef2f2; }

/* Modal tabs */
.modal-tabs {
  display: flex;
  gap: 2px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-card);
  flex-shrink: 0;
  overflow-x: auto;
}

.modal-tab {
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.modal-tab:hover { color: var(--text-primary); }
.modal-tab.active { color: var(--dpr-green); border-bottom-color: var(--dpr-green); font-weight: 600; }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

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

/* KPI Mini Grid in Modal */
.modal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.modal-kpi-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.modal-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--dpr-green));
}
.modal-kpi-card:hover {
  border-color: var(--card-accent, var(--dpr-green));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--card-accent, var(--dpr-green)) 18%, transparent);
  transform: translateY(-2px);
}

.modal-kpi-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s ease;
}
.modal-kpi-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 3px; }
.modal-kpi-sub   { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* Locked profile panel for sales viewing colleagues */
.locked-profile-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  gap: 12px;
}
.lock-shield {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #f8fafc;
  border: 2px solid var(--border-std);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--text-muted);
}
.lock-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.lock-desc { font-size: 13px; color: var(--text-muted); max-width: 300px; line-height: 1.6; }
.lock-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: #eef2ff;
  color: #4f46e5;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* ── Login Screen ──────────────────────────────────────────── */
#login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-hero);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(20px);
  animation: slideUpModal var(--transition-bounce) both;
}

.login-logo {
  width: 52px; height: 52px;
  background: var(--dpr-green);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--bg-topbar);
  font-weight: 700;
  margin: 0 auto 20px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 4px;
}
.login-sub { font-size: 13px; color: rgba(255,255,255,0.45); text-align: center; margin-bottom: 28px; }

.login-field { margin-bottom: 14px; }
.login-field label { display: block; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.6); margin-bottom: 6px; }
.login-field input, .login-field select {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  transition: var(--transition);
}
.login-field input::placeholder { color: rgba(255,255,255,0.3); }
.login-field input:focus,
.login-field select:focus {
  outline: none;
  border-color: var(--dpr-green);
  box-shadow: 0 0 0 3px rgba(13,209,140,0.15);
}
.login-field select option { background: #1a2332; color: #fff; }

.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--dpr-green);
  color: var(--bg-topbar);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}
.login-btn:hover { background: var(--dpr-green-dark); transform: translateY(-1px); }

.login-demo-hint { font-size: 11px; color: rgba(255,255,255,0.3); text-align: center; margin-top: 12px; }

/* Demo Sales List scrollbar */
#demo-sales-list::-webkit-scrollbar { width: 4px; }
#demo-sales-list::-webkit-scrollbar-track { background: transparent; }
#demo-sales-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
#demo-sales-list::-webkit-scrollbar-thumb:hover { background: rgba(13,209,140,0.4); }

/* Demo mode badge in topbar */
.demo-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: rgba(13,209,140,0.12);
  border: 1px solid rgba(13,209,140,0.25);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  color: var(--dpr-green);
  white-space: nowrap;
}

/* ── Toast Notifications ───────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--text-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  min-width: 240px;
  max-width: 320px;
  animation: toastIn 0.3s var(--transition-bounce) both;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
.toast.toast-success { background: var(--dpr-green-deep); }
.toast.toast-error   { background: #dc2626; }
.toast.toast-warn    { background: #d97706; }
.toast.removing { animation: toastOut 0.25s ease forwards; }
@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px); }
}

/* ── Skeleton Loader ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #e8eaed 25%, #f0f2f5 50%, #e8eaed 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(0.85); opacity: 0.6; }
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--bg-topbar);
  border-top: 2px solid var(--dpr-green);
  padding: 16px 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ── Notif Dropdown ────────────────────────────────────────── */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  z-index: 1100;
  overflow: hidden;
  animation: slideUpModal 0.3s var(--transition-bounce) both;
}
.notif-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-card);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f2f5;
  display: flex;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}
.notif-item:hover { background: var(--bg-page); }
.notif-item:last-child { border-bottom: none; }
.notif-item-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.notif-item-body { flex: 1; }
.notif-item-text { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.notif-item-text strong { color: var(--text-primary); }
.notif-item-time { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hub-grid { grid-template-columns: 1fr; }
  .pipeline-top { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
  .users-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topbar-nav { display: none; }
  .hamburger { display: flex; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { top: 56px; }
  .topbar { height: 56px; }
  .page-content { padding: 16px; }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .users-grid { grid-template-columns: 1fr; }
  .modal { border-radius: var(--radius-lg); }
  .modal-header { flex-direction: column; }
  .modal-kpi-grid { grid-template-columns: 1fr 1fr; }
}

@media (hover: none) {
  .card:hover, .member-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
  .card:active { transform: scale(0.97); }
  .member-card:active { transform: scale(0.97); }
}

/* ── Konfigurations-Modal ──────────────────────────────────── */
.config-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,18,30,0.75);
  backdrop-filter: blur(6px);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.config-modal {
  background: var(--bg-topbar);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: slideUpModal var(--transition-bounce) both;
}

.config-modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 14px;
}

.config-modal-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--dpr-green-glow);
  border: 1px solid rgba(13,209,140,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--dpr-green);
  flex-shrink: 0;
}

.config-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.config-modal-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

.config-modal-body { padding: 24px 28px; }
.config-modal-footer {
  padding: 16px 28px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.config-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--dpr-green);
  margin: 20px 0 10px;
}
.config-section-label:first-child { margin-top: 0; }

.config-field { margin-bottom: 14px; }
.config-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin-bottom: 5px;
}
.config-field input, .config-field select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  transition: var(--transition);
}
.config-field input::placeholder { color: rgba(255,255,255,0.25); }
.config-field input:focus,
.config-field select:focus {
  outline: none;
  border-color: var(--dpr-green);
  box-shadow: 0 0 0 3px rgba(13,209,140,0.15);
  background: rgba(255,255,255,0.08);
}
.config-field select option { background: #1a2332; color: #fff; }

.config-field .field-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 4px;
  line-height: 1.4;
}

.config-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 12px;
}
.config-status-row.demo {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  color: #fcd34d;
}
.config-status-row.connected {
  background: rgba(13,209,140,0.1);
  border: 1px solid rgba(13,209,140,0.25);
  color: var(--dpr-green);
}
.config-status-row.error {
  background: rgba(220,38,38,0.1);
  border: 1px solid rgba(220,38,38,0.25);
  color: #fca5a5;
}
.config-status-row.live {
  background: rgba(13,209,140,0.1);
  border: 1px solid rgba(13,209,140,0.25);
  color: var(--dpr-green);
}

/* SSO-Spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Status-Dot Pulse-Animation */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* Config-Button in Topbar */
.config-topbar-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  white-space: nowrap;
}
.config-topbar-btn:hover {
  border-color: var(--dpr-green);
  color: var(--dpr-green);
  background: var(--dpr-green-glow);
}
.config-topbar-btn.live {
  border-color: rgba(13,209,140,0.35);
  color: var(--dpr-green);
}
.config-topbar-btn:not(.live) .status-dot {
  background: #f59e0b;
}
.config-topbar-btn .status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s infinite;
}

/* ── Bookings week-nav hover ───────────────────────────────── */
.week-nav-btn:hover {
  border-color: var(--dpr-green) !important;
  color: var(--dpr-green) !important;
}

/* ── Leads grid responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  #leads-kpi-row { grid-template-columns: repeat(2, 1fr) !important; }
  #leads-grid    { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  #leads-kpi-row { grid-template-columns: 1fr 1fr !important; }
}

/* ── Smooth data update transitions für alle dynamischen Werte ── */
/* Zahlenwechsel, Fortschrittbalken, Badges */
.kpi-value, .modal-kpi-val, .mkpi-val, .lb-amount {
  transition: color 0.3s ease, opacity 0.2s ease;
}
.quota-bar-fill, .lb-bar-fill {
  transition: width 0.85s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Smooth list refresh: stagger delay für tbody Zeilen */
.data-table tbody tr:nth-child(1)  { animation-delay: 0.02s; }
.data-table tbody tr:nth-child(2)  { animation-delay: 0.04s; }
.data-table tbody tr:nth-child(3)  { animation-delay: 0.06s; }
.data-table tbody tr:nth-child(4)  { animation-delay: 0.08s; }
.data-table tbody tr:nth-child(5)  { animation-delay: 0.10s; }
.data-table tbody tr:nth-child(6)  { animation-delay: 0.12s; }
.data-table tbody tr:nth-child(7)  { animation-delay: 0.14s; }
.data-table tbody tr:nth-child(8)  { animation-delay: 0.16s; }
.data-table tbody tr:nth-child(9)  { animation-delay: 0.18s; }
.data-table tbody tr:nth-child(10) { animation-delay: 0.20s; }

/* Smooth badge update */
.badge { transition: background 0.25s ease, color 0.25s ease; }

/* Hub cards smooth height transition */
.hub-card { transition: var(--transition), box-shadow var(--transition); }

/* ── Utility ── */

.flex   { display: flex; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-16  { margin-top: 16px; }
.mb-16  { margin-bottom: 16px; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.relative { position: relative; }
