/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #07070f;
  --bg-card:      #0c0c1a;
  --bg-card-2:    #10102a;
  --border:       #1a1a3a;
  --border-hi:    #2a2a5a;
  --accent:       #00e676;
  --accent-dim:   rgba(0,230,118,0.55);
  --accent-glow:  rgba(0,230,118,0.10);
  --purple:       #9d4edd;
  --purple-glow:  rgba(157,78,221,0.10);
  --gold:         #ffd700;
  --gold-glow:    rgba(255,215,0,0.10);
  --red:          #ff4757;
  --orange:       #fb923c;
  --blue:         #4fc3f7;
  --text:         #dde1f7;
  --text-dim:     #7a82b8;
  --text-muted:   #3a4070;
  --font:         'Inter', system-ui, sans-serif;
  --font-num:     'Space Grotesk', system-ui, sans-serif;
  --radius:       12px;
  --radius-sm:    8px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); min-height: 100vh; overflow-x: hidden; }

/* === HEADER === */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-left  { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 10px; }

.logo {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), #00904a);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-weight: 700; font-size: 13px; color: #000;
  flex-shrink: 0;
}
.header-date { display: flex; flex-direction: column; }
.header-date span:first-child { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.header-date span:last-child  { font-size: 13px; font-weight: 500; }

.app-title {
  font-family: var(--font-num); font-size: 22px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, #00b248 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; letter-spacing: -0.5px;
}

.streak-badge, .level-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
}
.streak-badge { background: rgba(255,80,0,0.10); border: 1px solid rgba(255,100,0,0.25); color: #ff7c3a; }
.level-badge  { background: var(--accent-glow); border: 1px solid rgba(0,230,118,0.22); color: var(--accent); }
.streak-label { font-size: 11px; color: var(--text-dim); }

/* === XP BAR === */
.xp-bar-container { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 5px 28px; }
.xp-bar-inner { display: flex; align-items: center; gap: 10px; }
.xp-label, .xp-next { font-size: 11px; color: var(--text-dim); font-family: var(--font-num); white-space: nowrap; min-width: 70px; }
.xp-next { text-align: right; min-width: 160px; }
.xp-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.xp-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #00904a, var(--accent));
  box-shadow: 0 0 10px var(--accent-dim);
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* === MAIN LAYOUT === */
.main {
  padding: 20px 28px 80px;
  max-width: 1440px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 18px;
}

/* === STATS GRID === */
.stats-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 14px; }

.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-hi); }
.stat-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stat-icon { font-size: 15px; }
.stat-title { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 500; }
.stat-body { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }

.stat-number {
  font-family: var(--font-num); font-weight: 700;
  font-size: 44px; line-height: 1; color: var(--text);
  transition: color 0.2s;
}
.calls-card .stat-number { font-size: 54px; }
.stat-target { font-size: 18px; color: var(--text-muted); font-family: var(--font-num); }
.stat-sub { font-size: 11px; color: var(--text-dim); }

.stat-number.accent { color: var(--accent); text-shadow: 0 0 24px var(--accent-dim); }
.stat-number.purple { color: var(--purple); text-shadow: 0 0 24px rgba(157,78,221,0.5); }
.stat-number.gold   { color: var(--gold);   text-shadow: 0 0 24px rgba(255,215,0,0.5); }

.stat-progress { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.stat-progress-fill {
  height: 100%; background: linear-gradient(90deg, #00904a, var(--accent));
  border-radius: 2px; transition: width 0.5s ease;
}

/* === PROGRESS SECTION === */
.progress-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
}
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.progress-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); font-weight: 500; }
.progress-pct { font-family: var(--font-num); font-size: 22px; font-weight: 700; color: var(--accent); }

.big-progress-track {
  height: 34px; background: var(--border); border-radius: 17px;
  overflow: hidden; position: relative; margin-bottom: 14px;
}
.big-progress-fill {
  height: 100%; border-radius: 17px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  box-shadow: 0 0 20px rgba(255,71,87,0.3);
}
.big-progress-fill.half  { background: linear-gradient(90deg, var(--orange), #facc15); box-shadow: 0 0 20px rgba(251,146,60,0.3); }
.big-progress-fill.good  { background: linear-gradient(90deg, #facc15, var(--accent)); box-shadow: 0 0 20px rgba(0,230,118,0.3); }
.big-progress-fill.done  { background: linear-gradient(90deg, #00904a, var(--accent), #80ffba); box-shadow: 0 0 28px var(--accent-dim); }
.big-progress-shine {
  position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.12), transparent);
  border-radius: 17px 17px 0 0;
}
.progress-milestones { position: absolute; inset: 0; pointer-events: none; }
.milestone { position: absolute; top: 0; height: 100%; border-left: 1px dashed rgba(255,255,255,0.08); }
.milestone span {
  position: absolute; bottom: -20px; font-size: 10px; color: var(--text-muted);
  font-family: var(--font-num); transform: translateX(-50%);
}
.progress-footer { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); padding-top: 8px; }

/* === QUOTAS === */
.quotas-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.quotas-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.quotas-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-dim); font-weight: 500;
}
.quotas-sub {
  font-size: 11px; color: var(--text-muted);
  font-family: var(--font-num);
}
.quotas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.15fr;
  gap: 12px;
}
@media (max-width: 980px) {
  .quotas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .quotas-grid { grid-template-columns: 1fr; }
}
.quota-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex; flex-direction: column;
  gap: 6px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.quota-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-1px);
}
.quota-icon { font-size: 18px; opacity: 0.9; }
.quota-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-dim); font-weight: 500;
}
.quota-value {
  font-family: var(--font-num);
  font-size: 32px; font-weight: 700;
  color: var(--accent);
  line-height: 1.05;
  letter-spacing: -0.5px;
}
.quota-card:nth-child(2) .quota-value { color: var(--purple); }
.quota-card:nth-child(3) .quota-value { color: var(--gold); }
.quota-formula {
  font-size: 12px; color: var(--text-dim);
  font-family: var(--font-num);
}
.quota-bar {
  height: 4px; background: var(--border);
  border-radius: 2px; overflow: hidden;
  margin-top: 4px;
}
.quota-bar-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(.2,.8,.2,1);
}
.quota-bar-fill.purple { background: var(--purple); }
.quota-bar-fill.gold { background: var(--gold); }
.quota-target {
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px;
}

/* Tagesauswertung-Karte (rechts) */
.summary-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(0,230,118,0.06), transparent 60%),
    var(--bg-card-2);
  border-color: rgba(0,230,118,0.18);
}
.summary-list { list-style: none; padding: 0; margin: 4px 0 0; }
.summary-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-dim);
}
.summary-list li strong {
  font-family: var(--font-num);
  font-size: 16px; font-weight: 600;
  color: var(--text);
}
.summary-list li strong.accent { color: var(--accent); }
.summary-list li strong.gold { color: var(--gold); }
.summary-list li strong.purple { color: var(--purple); }
.sum-divider {
  border-top: 1px solid var(--border);
  margin-top: 6px; padding-top: 8px !important;
}
.sum-divider span { color: var(--text); font-weight: 500; }
.sum-divider strong { font-size: 18px !important; }

/* === QUICK ACTIONS === */
.actions-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
}
.actions-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.actions-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); font-weight: 500; }
.btn-undo {
  padding: 5px 12px; background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12px; cursor: pointer; font-family: var(--font);
  transition: all 0.15s ease;
}
.btn-undo:hover { color: var(--text); border-color: var(--border-hi); }
.actions-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }

.action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card-2); cursor: pointer; color: var(--text);
  font-family: var(--font); transition: all 0.15s ease;
  user-select: none;
}
.action-btn:hover { transform: translateY(-3px); }
.action-btn:active { transform: translateY(0) scale(0.96); }

.action-icon { font-size: 24px; }
.action-label { font-size: 13px; font-weight: 500; }
.action-xp { font-size: 10px; color: var(--text-muted); font-family: var(--font-num); }

.action-btn.noanswer:hover    { border-color: var(--red);    box-shadow: 0 4px 20px rgba(255,71,87,0.12); }
.action-btn.dial:hover        { border-color: var(--blue);   box-shadow: 0 4px 20px rgba(79,195,247,0.12); }
.action-btn.reached:hover     { border-color: var(--accent); box-shadow: 0 4px 20px var(--accent-glow); }
.action-btn.followup:hover    { border-color: var(--orange); box-shadow: 0 4px 20px rgba(251,146,60,0.12); }
.action-btn.appointment:hover { border-color: var(--purple); box-shadow: 0 4px 20px var(--purple-glow); }
.action-btn.meeting:hover     { border-color: var(--purple); box-shadow: 0 4px 20px var(--purple-glow); }
.action-btn.deal              { border-color: rgba(255,215,0,0.18); }
.action-btn.deal:hover        { border-color: var(--gold);   box-shadow: 0 4px 24px rgba(255,215,0,0.2); }

/* === SPLIT SECTION === */
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.card-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px;
}
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-header h2 { font-size: 14px; font-weight: 600; }

/* === ACTIVITY LOG === */
.activity-log { display: flex; flex-direction: column; gap: 6px; max-height: 230px; overflow-y: auto; }
.activity-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 28px 0; }
.activity-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--bg-card-2);
  border-radius: var(--radius-sm); font-size: 12px;
}
.activity-time  { color: var(--text-muted); font-family: var(--font-num); min-width: 38px; }
.activity-label { flex: 1; }
.activity-xp    { color: var(--accent); font-family: var(--font-num); font-size: 11px; }

/* === WEEKLY CHART === */
.weekly-chart { display: flex; align-items: flex-end; gap: 8px; height: 100px; margin-bottom: 14px; }
.wbar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.wbar-track { flex: 1; width: 100%; background: var(--border); border-radius: 4px; overflow: hidden; display: flex; align-items: flex-end; }
.wbar-fill { width: 100%; background: rgba(0,230,118,0.3); border-radius: 4px; min-height: 2px; transition: height 0.5s ease; }
.wbar-fill.today { background: var(--accent); box-shadow: 0 0 14px var(--accent-dim); }
.wbar-label { font-size: 10px; color: var(--text-muted); font-family: var(--font-num); }
.weekly-stats { display: flex; gap: 24px; }
.weekly-stat { display: flex; flex-direction: column; gap: 2px; }
.weekly-num { font-family: var(--font-num); font-size: 26px; font-weight: 700; }
.weekly-num.accent { color: var(--accent); }
.weekly-num.gold   { color: var(--gold); }
.weekly-label { font-size: 11px; color: var(--text-dim); }

/* === LEADS === */
.leads-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-input, .filter-select {
  background: var(--bg-card-2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 7px 10px; font-size: 13px; font-family: var(--font);
  transition: border-color 0.15s;
}
.search-input { width: 160px; }
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus, .filter-select:focus { outline: none; border-color: var(--accent); }
.filter-select { cursor: pointer; }

.leads-table-wrapper { overflow-x: auto; margin-top: 2px; }
.leads-table { width: 100%; border-collapse: collapse; }
.leads-table th {
  text-align: left; padding: 8px 14px;
  font-size: 10px; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.6px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.leads-table td {
  padding: 10px 14px; font-size: 13px;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.leads-table tr:last-child td { border-bottom: none; }
.leads-table tbody tr:hover td { background: var(--bg-card-2); }
.leads-empty td { text-align: center; color: var(--text-muted); padding: 32px; }

.status-sel {
  padding: 3px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 500; cursor: pointer;
  border: 1px solid; background: transparent; font-family: var(--font);
}
.s-neu            { color: var(--blue);   border-color: rgba(79,195,247,0.3);   background: rgba(79,195,247,0.08); }
.s-angerufen      { color: var(--text-dim); border-color: var(--border-hi);     background: var(--bg-card-2); }
.s-erreicht       { color: var(--accent); border-color: rgba(0,230,118,0.3);    background: var(--accent-glow); }
.s-followup       { color: var(--orange); border-color: rgba(251,146,60,0.3);   background: rgba(251,146,60,0.08); }
.s-termin         { color: var(--purple); border-color: rgba(157,78,221,0.3);   background: var(--purple-glow); }
.s-abschluss      { color: var(--gold);   border-color: rgba(255,215,0,0.3);    background: var(--gold-glow); }
.s-kein-interesse { color: var(--red);    border-color: rgba(255,71,87,0.3);    background: rgba(255,71,87,0.08); }

.leads-count-badge {
  font-size: 11px; color: var(--text-muted); font-weight: 400;
  margin-left: 6px; font-family: var(--font-num);
}

.btn-icon {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-size: 14px; padding: 4px 6px; border-radius: 5px; line-height: 1;
}
.btn-icon:hover { color: var(--text); background: var(--border); }

/* === ACHIEVEMENTS === */
.achievements-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.achievement {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 13px; border: 1px solid; transition: opacity 0.3s;
}
.achievement.locked   { border-color: var(--border); background: var(--bg-card-2); opacity: 0.4; }
.achievement.unlocked { border-color: rgba(255,215,0,0.25); background: var(--gold-glow); }
.ach-icon { font-size: 18px; }
.ach-name { font-weight: 600; font-size: 12px; }
.ach-desc { font-size: 10px; color: var(--text-dim); margin-top: 2px; }

/* === BUTTONS === */
.btn-primary {
  padding: 7px 15px; background: var(--accent); color: #000;
  border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font);
  transition: all 0.15s ease; white-space: nowrap;
}
.btn-primary:hover { background: #00ff88; box-shadow: 0 0 18px var(--accent-dim); }

.btn-secondary {
  padding: 7px 15px; background: var(--bg-card-2); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer; font-family: var(--font);
  transition: all 0.15s ease; white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--border-hi); color: var(--text); }

.btn-danger-sm {
  padding: 5px 10px; background: transparent; color: var(--red);
  border: 1px solid rgba(255,71,87,0.25); border-radius: var(--radius-sm);
  font-size: 11px; cursor: pointer; font-family: var(--font);
  transition: all 0.15s ease;
}
.btn-danger-sm:hover { background: rgba(255,71,87,0.08); border-color: var(--red); }

/* === SETTINGS BUTTON === */
.settings-btn {
  position: fixed; bottom: 22px; right: 22px; z-index: 90;
  width: 44px; height: 44px;
  background: var(--bg-card); border: 1px solid var(--border-hi);
  border-radius: 50%; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.settings-btn:hover { border-color: var(--accent); box-shadow: 0 4px 24px var(--accent-glow); }

/* === MODAL === */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.72); z-index: 200; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: block; }

.modal {
  display: none; position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-card); border: 1px solid var(--border-hi);
  border-radius: var(--radius); padding: 26px 28px;
  z-index: 201; min-width: 320px; max-width: 480px; width: 90%;
}
.modal.active { display: block; }
.modal h2 { font-size: 18px; font-weight: 600; margin-bottom: 20px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input {
  width: 100%; padding: 9px 12px;
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font); font-size: 14px; resize: vertical;
}
.form-input:focus { outline: none; border-color: var(--accent); }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* === TOAST === */
#toast-container {
  position: fixed; top: 72px; right: 20px; z-index: 400;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card-2); border: 1px solid rgba(255,215,0,0.35);
  border-radius: var(--radius); box-shadow: 0 0 30px rgba(255,215,0,0.08);
  font-size: 14px; max-width: 280px; pointer-events: all;
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.8s forwards;
}
.toast-icon { font-size: 22px; flex-shrink: 0; }
.toast-title { font-weight: 600; font-size: 13px; }
.toast-msg   { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

@keyframes toast-in  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toast-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(110%); opacity: 0; } }

/* Pulse animation on stat update */
@keyframes num-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.num-pulse { animation: num-pulse 0.35s ease; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .stats-grid    { grid-template-columns: 1fr 1fr 1fr; }
  .calls-card    { grid-column: 1 / -1; }
  .actions-grid  { grid-template-columns: repeat(3, 1fr); }
  .split-section { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-grid   { grid-template-columns: 1fr 1fr; }
  .actions-grid { grid-template-columns: repeat(2, 1fr); }
  .main         { padding: 14px 14px 80px; }
  .header       { padding: 12px 16px; }
}

/* ============================================================
 * v2 — Year-Counter, Day-Eval, Lead-Detail, Prio-Badges
 * ============================================================ */

/* Year-Counter im Header */
.year-counter {
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px; padding: 4px 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 99px;
  font-family: var(--font-num); font-size: 12px;
  color: var(--text-dim);
}
.year-counter strong { color: var(--accent); font-weight: 600; font-size: 13px; }
.year-counter .year-sep { opacity: 0.5; }
.year-counter .year-pct { margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--border-hi); color: var(--blue); font-weight: 600; }
.header-center { display: flex; flex-direction: column; align-items: center; gap: 0; }

/* 5er-Stat-Grid */
.stats-grid { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1280px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } .calls-card { grid-column: span 1; } }
@media (max-width: 800px)  { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* 7er Action-Grid */
.actions-grid-7 { grid-template-columns: repeat(7, 1fr); }
@media (max-width: 1280px) { .actions-grid-7 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px)  { .actions-grid-7 { grid-template-columns: repeat(2, 1fr); } }

.action-btn.employee  { background: linear-gradient(180deg, rgba(79,195,247,0.10), rgba(79,195,247,0.04)); border-color: rgba(79,195,247,0.25); }
.action-btn.employee:hover  { box-shadow: 0 6px 20px rgba(79,195,247,0.25); border-color: var(--blue); }
.action-btn.mail      { background: linear-gradient(180deg, rgba(251,146,60,0.10), rgba(251,146,60,0.04)); border-color: rgba(251,146,60,0.30); }
.action-btn.mail:hover      { box-shadow: 0 6px 20px rgba(251,146,60,0.25); border-color: var(--orange); }
.action-btn.rejection { background: linear-gradient(180deg, rgba(255,71,87,0.10), rgba(255,71,87,0.04)); border-color: rgba(255,71,87,0.25); }
.action-btn.rejection:hover { box-shadow: 0 6px 20px rgba(255,71,87,0.25); border-color: var(--red); }

/* Tagesauswertung-Tabelle */
.day-eval-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px;
}
.day-eval-section .section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.day-eval-section h2 { font-size: 15px; font-weight: 600; }
.day-eval-sub { font-size: 11px; color: var(--text-dim); }

.day-eval-wrap { overflow-x: auto; }
.day-eval-table {
  width: 100%; border-collapse: collapse; font-family: var(--font-num);
}
.day-eval-table th, .day-eval-table td {
  padding: 8px 10px; text-align: right;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.day-eval-table th {
  font-size: 11px; color: var(--text-dim); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  background: rgba(255,255,255,0.02);
}
.day-eval-table th:first-child, .day-eval-table td:first-child { text-align: left; }
.day-eval-table td.metric-col, .day-eval-table th.metric-col { width: 30%; }
.day-eval-table td.day-col strong, .day-eval-table th.day-col { color: var(--accent); font-weight: 700; }
.day-eval-table td.month-col, .day-eval-table th.month-col { color: var(--text-dim); border-left: 1px solid var(--border); padding-left: 14px; }
.day-eval-table td.bench-col, .day-eval-table th.bench-col { color: var(--text-muted); font-size: 11px; font-style: italic; }
.day-eval-table tr.subtle { opacity: 0.85; }
.day-eval-table tr.accent td.day-col strong { color: var(--purple); }
.day-eval-table tr.gold td.day-col strong   { color: var(--gold); }
.day-eval-table tr.quota-row { background: rgba(0,230,118,0.04); }
.day-eval-table tr.quota-row td.day-col strong { color: var(--accent); }

/* Prio-Badges */
.prio-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.prio-badge.prio-top     { background: rgba(255,71,87,0.15);   color: #ff8e9c; border-color: rgba(255,71,87,0.30); }
.prio-badge.prio-2fach   { background: rgba(251,146,60,0.15);  color: #ffb98a; border-color: rgba(251,146,60,0.30); }
.prio-badge.prio-1fach   { background: rgba(255,215,0,0.12);   color: #ffe680; border-color: rgba(255,215,0,0.30); }
.prio-badge.prio-design  { background: rgba(79,195,247,0.12);  color: #92d8fa; border-color: rgba(79,195,247,0.30); }
.prio-badge.prio-mittel  { background: rgba(79,195,247,0.12);  color: #92d8fa; border-color: rgba(79,195,247,0.30); }
.prio-badge.prio-noweb   { background: rgba(157,78,221,0.15);  color: #c79af5; border-color: rgba(157,78,221,0.30); }
.prio-badge.prio-pruefen { background: rgba(120,120,160,0.15); color: var(--text-dim); border-color: var(--border); }
.prio-badge.prio-pass    { background: rgba(0,230,118,0.10);   color: #6dffaa; border-color: rgba(0,230,118,0.25); }

/* Score-Pill */
.score-pill {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  font-family: var(--font-num); font-size: 12px; font-weight: 600;
  background: var(--bg-card-2); color: var(--text-dim);
  border: 1px solid var(--border);
}
.score-pill.score-bad  { background: rgba(255,71,87,0.12);  color: #ff8e9c; border-color: rgba(255,71,87,0.30); }
.score-pill.score-mid  { background: rgba(255,215,0,0.10); color: #ffe680; border-color: rgba(255,215,0,0.25); }
.score-pill.score-good { background: rgba(0,230,118,0.10); color: #6dffaa; border-color: rgba(0,230,118,0.25); }

/* Lead-Tabelle erweitert */
.lead-row { cursor: pointer; transition: background 0.15s; }
.lead-row:hover { background: rgba(255,255,255,0.03); }
.phone-cell { font-family: var(--font-num); font-size: 13px; }
.hebel-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text-dim); }

/* Lead-Detail-Modal */
.modal.modal-lg {
  max-width: 760px; width: 92vw; max-height: 90vh; overflow-y: auto;
  padding: 24px 28px;
}
.ld-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.ld-prio { margin-bottom: 6px; font-size: 13px; }
.ld-company { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.ld-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-dim); }
.ld-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ld-close {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); width: 32px; height: 32px; border-radius: 50%;
  font-size: 20px; cursor: pointer; transition: all 0.15s;
  flex-shrink: 0;
}
.ld-close:hover { background: var(--red); color: #fff; border-color: var(--red); }

.ld-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.ld-call-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; background: linear-gradient(135deg, var(--accent), #00904a);
  color: #000; font-weight: 700; font-size: 15px;
  border-radius: var(--radius-sm); text-decoration: none;
  font-family: var(--font-num); letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(0,230,118,0.25);
  transition: transform 0.15s;
}
.ld-call-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,230,118,0.35); }

.ld-section {
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 14px;
}
.ld-section-title {
  font-size: 11px; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.ld-section.ld-pitch {
  background: linear-gradient(135deg, rgba(255,71,87,0.06), rgba(251,146,60,0.04));
  border-color: rgba(255,71,87,0.25);
}
.ld-pitch-text { font-size: 14px; color: var(--text); line-height: 1.55; }
.ld-pitch-call {
  margin-top: 10px; padding: 10px 12px;
  background: rgba(0,0,0,0.30); border-left: 3px solid var(--accent);
  border-radius: 4px; font-size: 13px; color: var(--text-dim);
}
.ld-validated {
  margin-top: 8px; font-size: 11px; color: var(--accent); font-weight: 600;
}

.ld-empfehlungen { list-style: none; padding: 0; counter-reset: emp; }
.ld-empfehlungen li {
  position: relative; padding: 8px 12px 8px 36px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; line-height: 1.45;
  counter-increment: emp;
}
.ld-empfehlungen li:last-child { border-bottom: none; }
.ld-empfehlungen li::before {
  content: counter(emp);
  position: absolute; left: 8px; top: 8px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #000;
  font-family: var(--font-num); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.ld-quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ld-quick-actions .action-btn { padding: 10px; min-height: auto; font-size: 12px; }
.ld-quick-actions .action-btn .action-icon { font-size: 18px; }
.ld-quick-actions .action-btn .action-label { font-size: 11px; }
.ld-quick-actions .action-btn .action-xp { display: none; }

.ld-form-row { margin-bottom: 10px; }

/* Score-Breakdown */
.score-breakdown { display: flex; flex-direction: column; gap: 8px; }
.score-row {
  display: grid; grid-template-columns: 80px 1fr 60px;
  align-items: center; gap: 12px;
  font-size: 12px;
}
.score-label { color: var(--text-dim); font-weight: 600; }
.score-track {
  height: 6px; background: var(--bg-card); border-radius: 99px;
  overflow: hidden; border: 1px solid var(--border);
}
.score-fill { height: 100%; transition: width 0.4s; border-radius: 99px; }
.score-fill.score-bad  { background: linear-gradient(90deg, var(--red), #ff8c98); }
.score-fill.score-mid  { background: linear-gradient(90deg, #ffae00, var(--gold)); }
.score-fill.score-good { background: linear-gradient(90deg, #00b85a, var(--accent)); }
.score-num { font-family: var(--font-num); font-weight: 600; color: var(--text); text-align: right; font-size: 11px; }

/* Mehr Quoten-Karten */
.quotas-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1280px) { .quotas-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .quotas-grid { grid-template-columns: 1fr; } }

/* Mobile Tabelle */
@media (max-width: 800px) {
  .leads-table th:nth-child(6), .leads-table td:nth-child(6) { display: none; }
  .leads-table th:nth-child(7), .leads-table td:nth-child(7) { display: none; }
}

/* ============================================================
   CLOUD-VARIANTE — Undo-Banner, Logout-Button, Mobile-Tweaks
   ============================================================ */

.logout-btn {
  position: fixed; bottom: 22px; right: 76px; z-index: 90;
  width: 44px; height: 44px;
  background: var(--bg-card); border: 1px solid var(--border-hi);
  border-radius: 50%; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  color: var(--text-dim);
}
.logout-btn:hover { border-color: var(--red); color: var(--red); }

/* Undo-Banner — auffälliges Sticky-Banner unten */
.undo-banner {
  position: fixed;
  left: 50%; bottom: 22px; transform: translate(-50%, calc(100% + 30px));
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,107,53,0.95);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  z-index: 250;
  max-width: calc(100vw - 32px);
  font-family: var(--font);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.undo-banner.show {
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.undo-banner-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.undo-banner-text {
  display: flex; flex-direction: column; line-height: 1.25;
  font-size: 14px;
}
.undo-banner-text strong {
  font-weight: 600;
  font-size: 14px;
}
.undo-banner-text span {
  font-size: 12px;
  opacity: 0.85;
}
.undo-banner-btn {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  flex-shrink: 0;
}
.undo-banner-btn:hover { background: rgba(255,255,255,0.28); }

/* ============================================================
   MOBILE-OPTIMIERUNGEN — fingergerecht, scrollbare Tabellen
   ============================================================ */
@media (max-width: 700px) {
  /* iOS Safe-Area */
  body { padding-bottom: env(safe-area-inset-bottom, 0); }

  /* Header kompakter */
  .header { flex-direction: column; gap: 8px; padding: 10px 12px; }
  .header-left, .header-center, .header-right { width: 100%; justify-content: center; }
  .app-title { font-size: 18px; }
  .year-counter { font-size: 12px; }

  /* Stats: 2-Spalten, kompakter */
  .stats-grid { gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-number { font-size: 26px !important; }

  /* Action-Buttons fingergerecht */
  .actions-grid-7 { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .action-btn {
    min-height: 64px;
    padding: 12px 8px;
    font-size: 13px;
  }
  .action-icon { font-size: 22px; }

  /* Tagesauswertung-Tabelle horizontal scrollbar */
  .day-eval-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .day-eval-table { min-width: 560px; font-size: 12px; }
  .day-eval-table th, .day-eval-table td { padding: 8px 6px; }
  .day-eval-sub { font-size: 11px; }

  /* Lead-Tabelle: nur essentielle Spalten */
  .leads-table th:nth-child(1), .leads-table td:nth-child(1) { display: none; } /* Prio */
  .leads-table th:nth-child(6), .leads-table td:nth-child(6) { display: none; } /* Hebel */
  .leads-table th:nth-child(7), .leads-table td:nth-child(7) { display: none; } /* Score */
  .leads-table th:nth-child(8), .leads-table td:nth-child(8) { display: none; } /* Letzter Kontakt */
  .leads-table-wrapper { overflow-x: auto; }
  .leads-table { min-width: unset; font-size: 13px; }
  .leads-table th, .leads-table td { padding: 8px 6px; }

  /* Filter-Leiste umbrechen */
  .leads-actions { flex-wrap: wrap; gap: 6px; }
  .leads-actions .search-input,
  .leads-actions .filter-select { font-size: 13px; padding: 8px 10px; flex: 1 1 calc(50% - 6px); min-width: 100px; }
  .leads-actions .btn-primary,
  .leads-actions .btn-secondary { font-size: 12px; padding: 8px 10px; }

  /* Lead-Detail-Modal vollbild */
  .modal { max-width: 100vw !important; max-height: 100vh; border-radius: 0; left: 0; top: 0; transform: none; padding: 16px; overflow-y: auto; }
  .modal-lg { padding: 14px; }
  .ld-quick-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ld-call-btn { font-size: 16px !important; padding: 14px 16px !important; }

  /* Settings/Logout-Buttons höher, damit sie nicht das Banner überlappen */
  .settings-btn { bottom: 16px; right: 16px; }
  .logout-btn { bottom: 16px; right: 64px; }

  /* Undo-Banner: volle Breite minus Padding, oberhalb der Floating-Buttons */
  .undo-banner { left: 12px; right: 12px; transform: translateY(calc(100% + 30px)); bottom: 70px; max-width: none; }
  .undo-banner.show { transform: translateY(0); }
}

/* iOS-PWA Standalone Mode */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top, 0); }
}

/* ============================================================
   LEAD-CARD-LAYOUT: Desktop = Tabelle, Mobile = Cards
   ============================================================ */
/* Desktop: mobile-only-Elemente verstecken */
.lc-mobile-extra,
.lc-subscores,
.lc-phone-link,
.lc-hebel-label,
.lead-actions-dropdown { display: none; }

@media (max-width: 700px) {
  /* Tabelle aufbrechen → Card-Layout */
  .leads-table-wrapper { overflow: visible; }
  .leads-table { display: block; min-width: 0; }
  .leads-table thead { display: none; }
  .leads-table tbody { display: block; }
  .lead-row {
    display: block;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 12px 14px;
    background: var(--bg-card);
    cursor: pointer;
  }
  .lead-row td {
    display: block;
    padding: 0;
    border: none;
    margin-bottom: 6px;
  }
  .lead-row td:last-child { margin-bottom: 0; }

  /* Cells, die im Card-Layout doppelt wären → ausblenden */
  .lead-prio-cell,
  .lead-phone-cell,
  .lead-score-cell,
  .lead-lastcontact-cell,
  .lead-actions-icons,
  .lead-row .leads-table th { display: none !important; }

  /* Mobile-only Elemente einblenden */
  .lc-mobile-extra {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    margin-top: 6px;
  }
  .lc-subscores {
    display: flex; gap: 6px; font-size: 11px; color: var(--text-dim);
    margin-top: 4px; flex-wrap: wrap;
  }
  .lc-subscores span {
    background: rgba(255,255,255,0.06);
    padding: 2px 7px; border-radius: 4px;
    font-family: var(--font-num); font-weight: 500;
  }
  .lc-phone-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent); text-decoration: none;
    font-weight: 500; font-size: 14px;
    padding: 6px 0;
  }
  .lc-phone-link:active { opacity: 0.6; }
  .lc-name { font-size: 16px; line-height: 1.3; display: block; }

  /* Hebel: prominenter Snippet */
  .lead-hebel-cell {
    font-size: 13px; line-height: 1.4;
    color: var(--text-dim);
    border-left: 3px solid var(--accent);
    padding: 6px 10px !important;
    background: rgba(255,107,53,0.06);
    border-radius: 6px;
    margin-top: 8px !important;
  }
  .lc-hebel-label { display: inline; color: var(--accent); font-weight: 600; margin-right: 4px; }

  /* Status-Select voll breit */
  .lead-status-cell { margin-top: 8px !important; }
  .lead-status-cell .status-sel { width: 100%; padding: 8px 10px; font-size: 14px; }

  /* Aktion-Dropdown statt der Icon-Reihe */
  .lead-actions-dropdown { display: block; margin-top: 8px; }
  .lead-actions-dropdown .lead-action-sel {
    width: 100%;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(255,107,53,0.16), rgba(247,147,30,0.10));
    border: 1px solid rgba(255,107,53,0.4);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px; font-weight: 600;
    font-family: var(--font);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'><path fill='%23ff6b35' d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
  }
  .lead-actions-dropdown .lead-action-sel:focus {
    outline: none;
    border-color: var(--accent);
  }
}
