/* OfferteOpvolgen.nl - theme.css (visuele stijl gelijk aan de marketing-site) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --deep: #0b1633;
  --ink: #0e1a35;
  --muted: #5b6b8c;
  --line: #e3e9f4;
  --bg: #f3f6fc;
  --card: #ffffff;
  --green: #129e5c;
  --green-light: #e0f5ea;
  --red: #d23b43;
  --red-light: #fdeaea;
  --amber: #b97a0a;
  --amber-light: #fdf1da;
  --blue-light: #e8effd;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(14, 26, 53, .06);
  --shadow-md: 0 10px 30px -8px rgba(14, 26, 53, .14);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.55 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--deep); margin: 0 0 16px; }
h2 { font-size: 15.5px; font-weight: 700; color: var(--deep); margin: 0 0 12px; }
h3 { font-size: 14px; font-weight: 700; margin: 0 0 8px; }

/* ---------- shell: zijbalk + main ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 212px; flex: none; background: var(--card); border-right: 1px solid var(--line);
  padding: 18px 12px; position: sticky; top: 0; height: 100vh;
}
.side .brand {
  display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px;
  color: var(--deep); padding: 2px 8px 18px; letter-spacing: -.02em; white-space: nowrap;
}
.side .brand b { color: var(--blue); font-weight: 800; }
.side nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; margin-bottom: 2px; font-size: 13.5px;
}
.side nav a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.side nav a.active { background: var(--blue-light); color: var(--blue); font-weight: 700; }
.side nav a .ico { width: 20px; text-align: center; flex: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 24px; height: 60px;
  position: sticky; top: 0; z-index: 50;
}
.topbar .spacer { flex: 1; }
.topbar .bell { position: relative; font-size: 17px; }
.topbar .bell .cnt {
  position: absolute; top: -7px; right: -9px; background: var(--red); color: #fff;
  border-radius: 999px; font-size: 10px; font-weight: 700; padding: 0 5px; line-height: 15px;
}
.topbar .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff;
  font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none;
}
.topbar .who { line-height: 1.2; }
.topbar .who b { display: block; font-size: 13px; color: var(--deep); }
.topbar .who span { color: var(--muted); font-size: 11.5px; }
.topbar .logout { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.wrap { max-width: 1240px; width: 100%; margin: 0 auto; padding: 24px; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { display: flex; overflow-x: auto; gap: 2px; }
  .side nav a { white-space: nowrap; }
  .side .brand { padding-bottom: 8px; }
}

/* ---------- KPI-kaarten met icoontegels ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); display: flex; gap: 13px; align-items: center;
}
.kpi .ic {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.kpi .ic.b { background: var(--blue-light); }
.kpi .ic.a { background: var(--amber-light); }
.kpi .ic.g { background: var(--green-light); }
.kpi .ic.p { background: #f1e9fd; }
.kpi .label { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.kpi .value { font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--deep); margin-top: 1px; }
.kpi .value.green { color: var(--green); }
.kpi .cnt { color: var(--muted); font-size: 11.5px; margin-top: 1px; }

/* ---------- cards & grids ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.card > h2 { font-size: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin: -2px 0 14px; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- tabellen ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; color: var(--muted); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line);
}
table.list td { padding: 10px; border-bottom: 1px solid #eef2fa; vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #f6f9ff; }

/* ---------- badges / chips ---------- */
.badge {
  display: inline-block; padding: 2.5px 10px; border-radius: 999px; font-size: 11.5px;
  font-weight: 700; background: var(--blue-light); color: var(--blue);
}
.badge.green { background: var(--green-light); color: var(--green); }
.badge.red { background: var(--red-light); color: var(--red); }
.badge.amber { background: var(--amber-light); color: var(--amber); }
.badge.gray { background: #eef1f7; color: var(--muted); }

/* ---------- knoppen & forms ---------- */
.btn {
  display: inline-block; border: 1px solid var(--blue); background: var(--blue); color: #fff;
  padding: 8px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: .12s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--blue); border-color: #c9d9f7; }
.btn.secondary:hover { background: var(--blue-light); }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); font-weight: 500; }
.btn.small { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; padding: 10px 13px; border: 1.5px solid #dbe3f2; border-radius: 10px;
  font: inherit; font-size: 14px; background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
input:not([type=checkbox]):not([type=radio]):hover, select:hover, textarea:hover { border-color: #b9c8e8; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
input::placeholder, textarea::placeholder { color: #a3aec7; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%235b6b8c' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
label { display: block; font-weight: 600; font-size: 13px; color: var(--deep); margin: 13px 0 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { color: var(--muted); font-size: 12.5px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); }

/* ---------- pipeline board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(235px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #eaeff9; border-radius: var(--radius); padding: 10px; min-height: 320px; }
.col h3 { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 600; }
.col .sum { color: var(--deep); font-weight: 700; }
.dealcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 12px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow);
}
.dealcard:hover { box-shadow: var(--shadow-md); }
.dealcard .amt { font-weight: 800; color: var(--deep); letter-spacing: -.01em; }
.dealcard .meta { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.dealcard.stale { border-left: 3px solid var(--amber); }
.col.dragover { outline: 2px dashed var(--blue); outline-offset: -4px; }

/* ---------- item-kaartjes (taken, offertes, deals) ---------- */
.icards { display: flex; flex-direction: column; gap: 10px; }
.icard {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start;
  transition: box-shadow .12s, border-color .12s, transform .12s;
}
.icard.click { cursor: pointer; }
.icard.click:hover { box-shadow: var(--shadow-md); border-color: #c7d5f2; transform: translateY(-1px); }
.icard .ibody { flex: 1; min-width: 0; }
.icard .ititle { font-weight: 700; color: var(--deep); font-size: 13.5px; line-height: 1.35; }
.icard .isub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.icard .iside { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: none; }
.icard .iamt { font-weight: 800; color: var(--deep); font-size: 14px; letter-spacing: -.01em; white-space: nowrap; }
.icard.hot { border-left: 3px solid var(--red); }
.icard.warn { border-left: 3px solid var(--amber); }
.done-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid #c9d9f7; background: #fff;
  color: var(--blue); font-size: 14px; font-weight: 700; cursor: pointer; flex: none;
  display: flex; align-items: center; justify-content: center; transition: .12s;
}
.done-btn:hover { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- activiteitenfeed ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; }
.feed li::before { content: ''; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.feed .when { color: var(--muted); font-size: 12px; }

/* ---------- login ---------- */
.login-wrap { max-width: 380px; margin: 9vh auto; padding: 0 16px; }
.login-wrap .brand { text-align: center; font-size: 23px; font-weight: 800; color: var(--blue); margin-bottom: 18px; letter-spacing: -.02em; }

/* ---------- portal (klantzijde) ---------- */
.portal-wrap { max-width: 680px; margin: 4vh auto; padding: 0 16px; }
.portal-header { text-align: center; margin-bottom: 20px; }
.portal-header .supplier { font-size: 21px; font-weight: 800; color: var(--blue); letter-spacing: -.02em; }
.portal-amount { font-size: 28px; font-weight: 800; color: var(--deep); letter-spacing: -.02em; }
.portal-cta { position: sticky; bottom: 12px; text-align: center; margin-top: 16px; }
.portal-cta .btn { width: 100%; max-width: 420px; padding: 14px; font-size: 16px; border-radius: 12px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.check-row input { margin-top: 3px; }
.otp-inputs input { text-align: center; font-size: 22px; letter-spacing: .5em; }
.pdf-frame { width: 100%; height: 60vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

.muted { color: var(--muted); }
.right { text-align: right; }
.mt { margin-top: 14px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--deep); color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 200;
  opacity: 0; transition: opacity .25s; box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 480px; width: 92%; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(11,22,51,.45); }
