:root {
  --gold: #E8A523;
  --gold-dark: #C8881A;
  --gold-light: #F5BC45;
  --anthrazit: #1A1A1A;
  --anthrazit2: #2D2D2D;
  --silber: #A8A8A8;
  --silber-hell: #D0D0D0;
  --danger: #E8503A;
  --success: #4CAF6D;
  --hot: #E8503A;
  --warm: #E8A523;
  --cold: #4A90D9;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--anthrazit); color: #fff;
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-tap-highlight-color: transparent; }
body { padding-top: var(--safe-top); padding-bottom: calc(56px + var(--safe-bottom)); min-height: 100vh; }

h1, h2, h3 { font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif; letter-spacing: 0.5px; margin: 0 0 8px; }
a { color: var(--gold); text-decoration: none; }

/* ---- Top bar ---- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--anthrazit); border-bottom: 1px solid #333;
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.topbar .brand { font-family: 'Bebas Neue', sans-serif; font-size: 20px; color: var(--gold); }
.topbar .user-pill { font-size: 12px; background: var(--anthrazit2); padding: 4px 10px; border-radius: 999px; color: var(--silber-hell); }

/* ---- Bottom nav (mobile) ---- */
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom); background: var(--anthrazit2); border-top: 1px solid #3a3a3a;
  display: flex; z-index: 30; }
.bottomnav button { flex: 1; background: none; border: none; color: var(--silber); font-size: 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 0; }
.bottomnav button.active { color: var(--gold); }
.bottomnav .icon { font-size: 18px; }

/* ---- Content ---- */
.screen { display: none; padding: 12px 16px 24px; max-width: 720px; margin: 0 auto; }
.screen.active { display: block; }

/* ---- KPI grid (home) ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi-card { background: var(--anthrazit2); border-radius: 12px; padding: 14px; border-left: 3px solid var(--gold); }
.kpi-card .val { font-family: 'Bebas Neue', sans-serif; font-size: 28px; color: #fff; }
.kpi-card .label { font-size: 11px; color: var(--silber); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-card.pipeline { grid-column: span 2; border-left-color: var(--success); }

.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--silber);
  margin: 20px 0 8px; }

/* ---- Lead card ---- */
.lead-card { background: var(--anthrazit2); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
  border-left: 4px solid var(--warm); display: flex; flex-direction: column; gap: 6px; }
.lead-card.hot { border-left-color: var(--hot); }
.lead-card.cold { border-left-color: var(--cold); }
.lead-card .row1 { display: flex; justify-content: space-between; align-items: baseline; }
.lead-card .company { font-weight: 600; font-size: 15px; }
.lead-card .score { font-family: 'Bebas Neue', sans-serif; font-size: 20px; color: var(--gold); }
.lead-card .meta { font-size: 12px; color: var(--silber); }
.lead-card .nba { font-size: 12px; color: var(--gold-light); background: rgba(232,165,35,0.1);
  padding: 4px 8px; border-radius: 6px; display: inline-block; margin-top: 4px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none;
  border-radius: 10px; padding: 12px 16px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn-primary { background: var(--gold); color: var(--anthrazit); }
.btn-secondary { background: var(--anthrazit2); color: #fff; border: 1px solid #444; }
.btn-block { width: 100%; }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }

/* ---- Filters/search ---- */
.searchbar { display: flex; gap: 8px; margin-bottom: 12px; }
.searchbar input { flex: 1; background: var(--anthrazit2); border: 1px solid #444; border-radius: 10px;
  padding: 10px 12px; color: #fff; font-size: 14px; min-height: 44px; }
.filter-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.chip { background: var(--anthrazit2); border: 1px solid #444; border-radius: 999px; padding: 6px 12px;
  font-size: 12px; white-space: nowrap; color: var(--silber-hell); }
.chip.active { background: var(--gold); color: var(--anthrazit); border-color: var(--gold); }

/* ---- Modal ---- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 50; display: none; }
.modal-backdrop.open { display: flex; align-items: flex-end; }
.modal { background: var(--anthrazit2); width: 100%; border-radius: 16px 16px 0 0; padding: 20px 16px;
  padding-bottom: calc(20px + var(--safe-bottom)); max-height: 85vh; overflow-y: auto; }
.modal h3 { color: var(--gold); }

/* ---- Login ---- */
.login-screen { min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  align-items: center; padding: 24px; }
.login-box { width: 100%; max-width: 360px; }
.login-box input { width: 100%; margin-bottom: 10px; background: var(--anthrazit2); border: 1px solid #444;
  border-radius: 10px; padding: 12px; color: #fff; font-size: 15px; min-height: 44px; }
.login-logo { font-family: 'Bebas Neue', sans-serif; font-size: 32px; color: var(--gold); text-align: center; margin-bottom: 24px; }

.badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; font-weight: 700; }
.badge-a { background: var(--hot); color: #fff; }
.badge-b { background: var(--warm); color: var(--anthrazit); }
.badge-c { background: var(--cold); color: #fff; }

.empty-state { text-align: center; color: var(--silber); padding: 40px 20px; font-size: 14px; }
.offline-banner { background: var(--danger); color: #fff; text-align: center; font-size: 12px; padding: 6px;
  display: none; }
.offline-banner.show { display: block; }

/* --- UX-Upgrade: simple Bedienung --- */
.btn-call { display:block;width:100%;text-align:center;background:#25D366;color:#06331b;font-weight:700;padding:16px;border-radius:12px;font-size:17px;text-decoration:none;margin-top:10px; }
.status-chips { display:flex;flex-wrap:wrap;gap:8px; }
.status-chip { flex:1 1 45%;padding:14px;border-radius:10px;background:var(--anthrazit2);color:#fff;border:1px solid #444;font-size:14px; }
.status-chip.active { border-color:var(--gold);background:rgba(232,165,35,0.15); }
.status-chip:active { transform:scale(0.97); }
.detail-facts { margin-top:12px;padding:12px;border-radius:10px;background:var(--anthrazit2);font-size:13px;line-height:1.7; }
.activity-log { margin-top:14px;padding:12px;border-radius:10px;border:1px dashed #444;font-size:12px; }
.contact-line { margin-top:2px; }
.lead-card { cursor:pointer; }
