* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #6c63ff;
    --primary-light: #f0eeff;
    --text: #1a1a2e;
    --muted: #6b7280;
    --bg: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
    --radius: 12px;
}
body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

nav { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-left { display: flex; align-items: center; gap: 24px; }
.nav-right { display: flex; gap: 8px; }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.nav-link { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; padding: 6px 12px; border-radius: 6px; }
.nav-link:hover, .nav-link.active { background: var(--primary-light); color: var(--primary); }

.btn { background: var(--primary); color: white; padding: 10px 20px; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: #5a52d5; }
.btn-sm { background: var(--primary-light); color: var(--primary); padding: 6px 14px; border: none; border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-sm:hover { background: #e0dcff; }
.btn-red { background: #fee2e2; color: #dc2626; padding: 6px 14px; border: none; border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.btn-red:hover { background: #fecaca; }

.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #f0eeff, #fff); }
.auth-box { background: white; padding: 48px; border-radius: var(--radius); box-shadow: 0 4px 24px rgba(0,0,0,0.08); width: 100%; max-width: 400px; }
.auth-box .logo { font-size: 1.8rem; text-align: center; margin-bottom: 8px; }
.auth-box h2 { text-align: center; margin-bottom: 32px; color: var(--muted); font-weight: 400; }
.auth-box form { display: flex; flex-direction: column; gap: 14px; }
.error { color: #ef4444; font-size: 0.9rem; text-align: center; margin-bottom: 8px; }

input, select, textarea { padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; font-family: 'Inter', sans-serif; outline: none; background: white; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }

main { padding: 32px 0 64px; }
main h1 { font-size: 1.8rem; margin-bottom: 4px; }
.subtitle { color: var(--muted); margin-bottom: 24px; }

.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.card h2 { font-size: 1.1rem; margin-bottom: 16px; }
.mt { margin-top: 24px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-val { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

.toolbar { display: flex; gap: 12px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; flex: 1; min-width: 160px; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; padding: 10px 12px; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 500; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
tr:hover td { background: var(--bg); }
a.row-link { color: var(--text); text-decoration: none; font-weight: 600; }
a.row-link:hover { color: var(--primary); }

.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }
.nieuw { background: #f3f4f6; color: #374151; }
.contact-opgenomen { background: #dbeafe; color: #1e40af; }
.demo-gepland { background: #fef3c7; color: #92400e; }
.offerte-verstuurd { background: #f0eeff; color: var(--primary); }
.gewonnen { background: #d1fae5; color: #065f46; }
.verloren { background: #fee2e2; color: #dc2626; }

/* PIPELINE */
.pipeline { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 16px; }
@media(max-width: 900px) { .pipeline { grid-template-columns: repeat(3, 1fr); } }
.pipeline-col { background: white; border: 1px solid var(--border); border-radius: var(--radius); min-height: 400px; }
.col-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.col-header h3 { font-size: 0.85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.col-header .col-count { font-size: 0.8rem; color: var(--muted); }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pipeline-card { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; cursor: pointer; transition: box-shadow 0.15s; }
.pipeline-card:hover { box-shadow: 0 2px 8px rgba(108,99,255,0.12); }
.pipeline-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.pipeline-card p { font-size: 0.8rem; color: var(--muted); }
.pipeline-card .waarde { font-size: 0.8rem; color: var(--primary); font-weight: 600; margin-top: 6px; }

/* LEAD DETAIL */
.lead-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.lead-header h1 { font-size: 1.6rem; }
.lead-header p { color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media(max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }
.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--muted); }
.stage-form { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; }
.stage-form select { width: auto; }
.notitie-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; max-height: 320px; overflow-y: auto; }
.notitie { background: var(--bg); border-radius: 8px; padding: 12px 14px; }
.notitie p { font-size: 0.9rem; }
.notitie small { color: var(--muted); font-size: 0.78rem; }
.notitie-form { display: flex; gap: 8px; }
.notitie-form textarea { flex: 1; min-height: 40px; resize: vertical; }

.add-form { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.add-form h2 { font-size: 1rem; margin-bottom: 14px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row input, .form-row select { flex: 1; min-width: 140px; }
