@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --pine: #1f3d2e;
    --pine-dark: #14281e;
    --pine-light: #2c5642;
    --amber: #e0952f;
    --amber-dark: #b9761f;
    --cream: #f5f6f0;
    --cream-alt: #eef1e6;
    --ink: #20241d;
    --muted: #5b6357;
    --line: #dde1d5;
    --white: #ffffff;
    --danger: #c0392b;

    --slate-950: #14171d;
    --slate-900: #1b2028;
    --slate-800: #262c37;
    --slate-100: #eef0f3;
    --slate-200: #e2e5ea;
    --slate-500: #6b7280;
    --panel: #f6f7f9;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    line-height: 1.5;
}
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; }
p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    width: 100%;
    background: var(--white);
    color: var(--ink);
}
input:focus, select:focus, textarea:focus, button:focus, a:focus {
    outline: 2px solid var(--pine-light);
    outline-offset: 1px;
}
label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.3rem; color: var(--ink); }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.3rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    background: var(--slate-100);
    color: var(--ink);
    transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--pine); color: var(--white); }
.btn-primary:hover { background: var(--pine-dark); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-lg { padding: 0.9rem 1.7rem; font-size: 1.02rem; }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--pine); font-weight: 600; padding: 0; }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.4rem;
}

/* ---------------- Public site ---------------- */

body.public { background: var(--cream); }

.public-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Fraunces', serif; font-size: 1.05rem; }
.logo-mark {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--pine); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
}
.logo-text strong { color: var(--pine); }
.public-nav { display: flex; align-items: center; gap: 22px; font-weight: 500; }
.header-contact a { font-weight: 600; color: var(--pine); }

.hero { padding: 64px 0 80px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-copy h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); max-width: 16ch; color: var(--pine-dark); }
.hero-copy p { font-size: 1.08rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin: 26px 0 22px; flex-wrap: wrap; }
.hero-trust { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; color: var(--pine-dark); font-weight: 500; }
.hero-visual {
    aspect-ratio: 4 / 3.4; border-radius: 18px;
    background: linear-gradient(155deg, var(--pine) 0%, var(--pine-light) 55%, var(--amber) 130%);
}

.section { padding: 60px 0; }
.section-alt { background: var(--cream-alt); }
.section h2 { font-size: 1.8rem; margin-bottom: 28px; color: var(--pine-dark); }

.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.service-card { border-radius: 12px; }
.service-card h3 { color: var(--pine-dark); font-size: 1.1rem; }
.service-card p { margin: 0; font-size: 0.94rem; }

.step { padding: 6px 0; }
.step-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--pine); color: var(--white); font-weight: 700;
    margin-bottom: 14px; font-family: 'Fraunces', serif;
}
.step h3 { font-size: 1.08rem; color: var(--pine-dark); }
.step p { font-size: 0.94rem; margin: 0; }

.section-form { background: var(--pine-dark); color: var(--white); }
.section-form h2 { color: var(--white); }
.section-form p { color: #cbd9d0; }
.form-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.lead-form { background: var(--white); border-radius: 14px; }
.lead-form .form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row .form-group { margin-bottom: 0; }

.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6cb; }
.alert-error ul { padding-left: 18px; list-style: disc; }

.thanks-section { padding: 100px 0; text-align: center; }
.thanks-inner { max-width: 560px; margin: 0 auto; }
.thanks-inner h1 { color: var(--pine-dark); }

.public-footer { background: var(--pine-dark); color: #cbd9d0; padding: 48px 0 20px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 30px; }
.footer-logo .logo-text strong { color: var(--amber); }
.public-footer h4 { color: var(--white); font-family: 'Inter', sans-serif; font-size: 0.85rem; margin-bottom: 10px; }
.public-footer p { color: #cbd9d0; font-size: 0.9rem; margin: 0 0 4px; }
.public-footer a:hover { color: var(--amber); }
.footer-bottom { border-top: 1px solid #2c4a3c; padding-top: 16px; font-size: 0.8rem; color: #9db3a8; }

/* ---------------- Login ---------------- */

body.login-page {
    background: var(--pine-dark);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
}
.login-box { width: 380px; }
.login-logo { justify-content: center; margin-bottom: 18px; }
.login-box h1 { font-size: 1.3rem; text-align: center; margin-bottom: 20px; color: var(--pine-dark); }
.login-box .form-group { margin-bottom: 14px; }

/* ---------------- Dashboard ---------------- */

body.dashboard { background: var(--panel); color: var(--ink); }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 236px; flex-shrink: 0;
    background: var(--slate-950); color: var(--slate-100);
    display: flex; flex-direction: column;
    padding: 20px 14px;
}
.sidebar-logo { color: var(--white); margin-bottom: 26px; padding: 0 8px; }
.sidebar-logo .logo-text strong { color: var(--amber); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-nav a {
    padding: 10px 12px; border-radius: 8px; font-size: 0.92rem; font-weight: 500;
    color: #b7bdc9;
}
.sidebar-nav a:hover { background: var(--slate-800); color: var(--white); }
.sidebar-nav a.active { background: var(--pine); color: var(--white); }
.sidebar-nav a.disabled { opacity: 0.35; pointer-events: none; }
.sidebar-footer { border-top: 1px solid var(--slate-800); padding-top: 14px; margin-top: 14px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--amber); color: var(--pine-dark);
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.user-name { font-size: 0.88rem; font-weight: 600; color: var(--white); }
.user-role { font-size: 0.75rem; color: #8b93a3; text-transform: capitalize; }
.sidebar-footer .btn-link { color: #b7bdc9; font-size: 0.85rem; }

.main-column { flex: 1; min-width: 0; }
.topbar { background: var(--white); border-bottom: 1px solid var(--slate-200); padding: 18px 32px; }
.topbar h1 { font-size: 1.3rem; margin: 0; color: var(--ink); }
.main-content { padding: 28px 32px 60px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.kpi-card {
    background: var(--white); border: 1px solid var(--slate-200); border-radius: 10px;
    padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
}
.kpi-card.kpi-warning { border-color: #f2c9a0; background: #fff8f0; }
.kpi-label { font-size: 0.78rem; color: var(--slate-500); font-weight: 500; }
.kpi-value { font-size: 1.6rem; font-weight: 700; font-family: 'Fraunces', serif; color: var(--pine-dark); }

.dashboard-lower { align-items: start; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-header h2 { font-size: 1.05rem; margin: 0; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th { text-align: left; color: var(--slate-500); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 8px 6px; border-bottom: 1px solid var(--slate-200); }
.data-table td { padding: 10px 6px; border-bottom: 1px solid var(--slate-200); }
.data-table tr[onclick] { cursor: pointer; }
.data-table tr[onclick]:hover { background: var(--panel); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; color: var(--white); font-size: 0.75rem; font-weight: 600; }
.badge-outline { border: 1px solid var(--slate-200); border-radius: 999px; padding: 2px 8px; font-size: 0.72rem; text-transform: capitalize; color: var(--slate-500); }
.score-badge { background: var(--cream-alt); color: var(--pine-dark); padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.muted { color: var(--slate-500); font-size: 0.85rem; }

.task-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--slate-200); font-size: 0.9rem; }
.task-list li:last-child { border-bottom: none; }
.task-list li.priority-urgent strong { color: var(--danger); }
.task-list li.priority-hoog strong { color: var(--amber-dark); }
.task-list li.done { opacity: 0.5; text-decoration: line-through; }
.empty-cell { color: var(--slate-500); text-align: center; padding: 18px 0 !important; font-size: 0.88rem; }

.pipeline-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.kanban-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; }
.kanban-column { min-width: 250px; flex-shrink: 0; }
.kanban-column-header {
    display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 700;
    padding: 8px 4px; border-top: 3px solid; background: var(--white);
    border-radius: 6px 6px 0 0; border: 1px solid var(--slate-200); border-top-width: 3px;
}
.kanban-cards { background: var(--slate-100); min-height: 120px; padding: 8px; border-radius: 0 0 8px 8px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--slate-200); border-top: none; }
.kanban-card {
    display: block; background: var(--white); border: 1px solid var(--slate-200); border-radius: 8px; padding: 10px 12px;
    cursor: grab;
}
.kanban-card:hover { border-color: var(--pine-light); }
.kanban-card-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.kanban-card-meta { font-size: 0.78rem; color: var(--slate-500); margin-bottom: 8px; }
.kanban-card-footer { display: flex; justify-content: space-between; align-items: center; }

.modal { display: none; position: fixed; inset: 0; background: rgba(20,23,29,0.5); align-items: center; justify-content: center; z-index: 50; }
.modal.open { display: flex; }
.modal-inner { width: 480px; max-width: 92vw; max-height: 88vh; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.lead-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.lead-header h1 { font-size: 1.5rem; margin-bottom: 8px; }
.lead-header-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lead-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lead-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.lead-main, .lead-side { display: flex; flex-direction: column; gap: 18px; }
.lead-main .card h2, .lead-side .card h2 { font-size: 1rem; margin-bottom: 14px; }
.lead-main .card h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--slate-500); margin: 16px 0 8px; }

.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
.detail-grid div { display: flex; flex-direction: column; gap: 2px; }
.detail-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--slate-500); }
.detail-grid span:last-child { font-size: 0.92rem; }

.inline-form { display: flex; gap: 8px; margin-bottom: 16px; }
.inline-form select { width: auto; }

.timeline { display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--slate-200); padding-left: 16px; }
.timeline li { padding-bottom: 16px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -21px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--pine); }
.timeline-date { font-size: 0.75rem; color: var(--slate-500); margin-bottom: 2px; }
.timeline-body p { margin: 2px 0 4px; font-size: 0.9rem; color: var(--ink); }

.note-list li { padding: 10px 0; border-bottom: 1px solid var(--slate-200); }
.note-list li.important { background: #fff8ea; border-radius: 6px; padding: 10px; border-bottom: none; margin-bottom: 4px; }
.note-list li p { margin: 0 0 4px; font-size: 0.9rem; color: var(--ink); }

.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; margin: 8px 0; }
.checkbox-label input { width: auto; }

.simple-list li { padding: 8px 0; border-bottom: 1px solid var(--slate-200); font-size: 0.9rem; }
.simple-list li:last-child { border-bottom: none; }

@media (max-width: 900px) {
    .hero-inner, .form-inner, .lead-grid, .footer-inner { grid-template-columns: 1fr; }
    .grid-4, .grid-3, .grid-2, .kpi-grid, .detail-grid { grid-template-columns: repeat(2, 1fr); }
    .sidebar { display: none; }
    .public-nav { display: none; }
}
