/* ================================
   FIXPROF — Portal stylesheet
   (login, dashboard, credits, settings, route-planner)
   Zelfde ontwerptokens als assets/style.css voor merkconsistentie.
   ================================ */

:root {
  --blue:        #1a56db;
  --blue-dark:   #1344b4;
  --blue-soft:   #eff6ff;
  --blue-mid:    #dbeafe;
  --green:       #059669;
  --dark:        #0c1a2e;
  --dark-2:      #1e2d3d;
  --text:        #1f2937;
  --muted:       #64748b;
  --muted-2:     #94a3b8;
  --border:      #e2e8f0;
  --bg:          #f8fafc;
  --white:       #ffffff;
  --orange:      #ea7424;
  --shadow-sm:   0 2px 8px rgba(12,26,46,.06);
  --shadow:      0 8px 28px rgba(12,26,46,.10);
  --shadow-lg:   0 20px 50px rgba(12,26,46,.14);
  --radius:      16px;
  --radius-lg:   24px;
  --radius-xl:   32px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

.wrapper { min-height: 100vh; display: flex; flex-direction: column; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-main { flex: 1; padding: 28px 0 60px; }

/* ---------- Header / navbar ---------- */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1160px;
  margin: 0 auto;
}

.portal-logo { display: flex; align-items: center; gap: 10px; }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--blue); }
.nav-links a.active { color: var(--blue); }
.nav-links a.nav-cta {
  background: var(--blue);
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  transition: background .15s ease;
}
.nav-links a.nav-cta:hover { background: var(--blue-dark); color: #fff; }

/* ---------- Footer ---------- */
footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-brand { font-weight: 800; color: var(--dark); }

/* ---------- Bottom nav (mobiel) ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 200;
  box-shadow: 0 -4px 16px rgba(12,26,46,.06);
}
.bottom-nav a, .bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px;
}
.bottom-nav a.active { color: var(--blue); }
.bottom-nav .icon { font-size: 1.15rem; }
@media (max-width: 720px) {
  .bottom-nav { display: flex; }
  .nav-links { display: none; }
  .page-main { padding-bottom: 90px; }
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.card-text { font-size: 0.9rem; color: var(--muted); line-height: 1.65; margin: 0; }

.grid-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) { .grid-main { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn-primary, .btn-orange, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
  font-family: inherit;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(26,86,219,.22); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 4px 14px rgba(234,116,36,.25); }
.btn-orange:hover { background: #d4601a; transform: translateY(-1px); color: #fff; }
.btn-outline { background: #fff; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-back { background: #fff; color: var(--muted); border: 1.5px solid var(--border); border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 0.85rem; }

/* ---------- Alerts ---------- */
.alert, .alert-pay {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-ok, .alert-pay.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-err, .alert-pay.err { background: #fff1f1; border: 1px solid #ffd0d0; color: #7b0017; }
.alert-warn { background: #fff8e8; border: 1px solid #f0d999; color: #7a5a00; }

/* ---------- Stat grid (dashboard) ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
.stat-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-box.blue { border-color: var(--blue-mid); background: var(--blue-soft); }
.stat-box.green { border-color: #bbf7d0; background: #f0fdf4; }
.stat-box.orange { border-color: #fde3c8; background: #fff8f0; }
.stat-label { font-size: 0.74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.stat-value { font-size: 1.7rem; font-weight: 900; color: var(--dark); letter-spacing: -0.03em; line-height: 1; }
.stat-sub { font-size: 0.76rem; color: var(--muted-2); margin-top: 4px; }

/* ---------- Tabs ---------- */
.tab-nav-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Lead list/items ---------- */
.lead-list { display: flex; flex-direction: column; gap: 12px; }
.lead-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
}
.lead-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.lead-title { font-weight: 800; font-size: 0.95rem; color: var(--dark); }
.lead-date, .lead-date-small { font-size: 0.76rem; color: var(--muted-2); white-space: nowrap; }
.lead-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.lead-tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700;
  background: var(--bg); color: var(--muted); border: 1px solid var(--border);
}
.lead-tag.blue { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-mid); }
.lead-tag.orange { background: #fff3e8; color: var(--orange); border-color: #fde3c8; }
.lead-sub-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  background: var(--blue); color: #fff; border-radius: 999px; padding: 2px 9px; margin-left: 6px;
}
.lead-desc { font-size: 0.85rem; color: var(--text); line-height: 1.6; margin-bottom: 10px; }
.lead-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lead-contact { background: var(--blue-soft); border: 1px solid var(--blue-mid); border-radius: var(--radius); padding: 16px; }
.lead-contact h3 { font-size: 0.85rem; font-weight: 800; color: var(--dark); margin: 0 0 10px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-item { font-size: 0.84rem; }
.contact-item strong { display: block; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }

.sold-badge {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0;
}

/* ---------- Profile / quick actions ---------- */
.profile-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.profile-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.profile-item:last-child { border-bottom: none; }
.profile-item-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.profile-item-value { font-size: 0.88rem; color: var(--dark); font-weight: 700; }
.credit-warning { background: #fff3e8; border: 1px solid #fde3c8; color: #9a5200; border-radius: 10px; padding: 10px 12px; font-size: 0.82rem; font-weight: 600; margin-top: 8px; }

.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.quick-action { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.86rem; }
.quick-action:last-child { border-bottom: none; }
.quick-action a { color: var(--blue); font-weight: 700; }

.regio-compact {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; background: var(--blue-soft); color: var(--blue); border: 1px solid var(--blue-mid);
}

/* ---------- Credits page ---------- */
.credits-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  color: #fff;
}
.credits-hero h2 { font-size: 0.95rem; font-weight: 700; color: rgba(255,255,255,.7); margin: 0 0 6px; }
.credits-big { font-size: 2.6rem; font-weight: 900; letter-spacing: -0.03em; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 0.84rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 0.9rem; font-family: inherit; background: #fff; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}

.acc-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.acc-item:first-child { padding-top: 0; }
.acc-item:last-child { border-bottom: none; }
.acc-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: none; padding: 0; font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--text); cursor: pointer; gap: 8px; }
.acc-trigger:hover { color: var(--blue); }
.acc-trigger .plus { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--muted); flex-shrink: 0; transition: all .15s; }
.acc-trigger.open .plus { background: var(--blue); border-color: var(--blue); color: #fff; }
.acc-body { margin-top: 14px; }
.acc-body[hidden] { display: none; }

/* ---------- Route planner ---------- */
.regio-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.regio-tag {
  background: var(--blue-soft); border: 1px solid var(--blue-mid); color: var(--blue);
  border-radius: 999px; padding: 3px 10px; font-size: 0.75rem; font-weight: 700;
}

/* ---------- Login page ---------- */
.login-wrap { width: 100%; max-width: 460px; }
.login-logo { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 32px; text-decoration: none; }
.login-logo-text { display: flex; flex-direction: column; align-items: flex-start; }
.login-logo-name { font-size: 24px; font-weight: 800; letter-spacing: 0.04em; color: var(--dark); line-height: 1; }
.login-logo-name span { color: var(--orange); }
.login-logo-tag { font-size: 8px; font-weight: 700; text-transform: uppercase; color: var(--muted-2); margin-top: 3px; display: flex; justify-content: space-between; width: 100%; }
.login-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 36px; box-shadow: var(--shadow-lg); }
.login-title { font-size: 1.5rem; font-weight: 900; color: var(--dark); letter-spacing: -0.03em; margin-bottom: 6px; }
.login-sub { font-size: 0.9rem; color: var(--muted); margin-bottom: 24px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.login-field input {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 0.95rem; font-family: inherit; background: #fff; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.login-error {
  background: #fff1f1; border: 1px solid #ffd0d0; color: #7b0017; border-radius: 12px;
  padding: 12px 16px; font-size: 0.88rem; font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.login-error::before { content: "✕"; }
.login-divider { text-align: center; font-size: 0.78rem; color: var(--muted-2); margin: 20px 0; position: relative; }
.login-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.login-divider span { background: #fff; position: relative; padding: 0 12px; }
.login-footer { text-align: center; font-size: 0.86rem; color: var(--muted); margin-top: 4px; }
.login-footer a, .login-footer strong { color: var(--blue); font-weight: 700; }
.trust-items { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 24px; }
.trust-item { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); font-weight: 600; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
