/* ==========================================================================
   NUOVO REAL ESTATE — Design System
   Van potentie naar waarde.
   Palet: Umber & Goud · Typografie: EB Garamond (display) + Geist (tekst)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Geist:wght@300;400;500;600&display=swap');

:root {
  /* Brand palette (brandbook JUN26) */
  --gold: #A1845A;
  --gold-soft: #B79B72;
  --zand: #C7B18C;
  --umber: #4B3F27;
  --umber-dark: #3E341F;
  --espresso: #2A2318;
  --mist: #ECEAE4;
  --creme: #F5F0E7;
  --offwhite: #FBF9F4;
  --white: #ffffff;

  /* Semantic */
  --bg: var(--offwhite);
  --surface: #ffffff;
  --surface-2: var(--creme);
  --line: #E7E1D6;
  --line-strong: #D9D0C0;
  --text: #2A2318;
  --text-soft: #6B6152;
  --text-muted: #988E7C;
  --ink-invert: #F5F0E7;

  --success: #5B7A5B;
  --success-bg: #EAF0EA;
  --warn: #B08442;
  --warn-bg: #F6EEDF;
  --danger: #A15A5A;
  --danger-bg: #F3E7E7;
  --info: #5A7A8C;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(42, 35, 24, .06), 0 1px 3px rgba(42, 35, 24, .04);
  --shadow: 0 4px 16px rgba(42, 35, 24, .07), 0 1px 3px rgba(42, 35, 24, .05);
  --shadow-lg: 0 18px 50px rgba(42, 35, 24, .16);
  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 268px;
}

/* Geist via local-ish fallback (loaded from CDN in template) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -.01em; color: var(--umber); margin: 0; line-height: 1.15; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.kop-label {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: .68rem;
  font-weight: 500;
  color: var(--gold);
}
.serif { font-family: var(--font-serif); }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font-family: var(--font-sans); font-weight: 500; font-size: .86rem;
  padding: .62rem 1.15rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: all .18s ease; letter-spacing: .01em; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--umber); color: var(--creme); }
.btn-primary:hover { background: var(--espresso); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-soft); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--gold); color: var(--umber); }
.btn-soft { background: var(--surface-2); color: var(--umber); }
.btn-soft:hover { background: var(--mist); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-bg); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { padding: .4rem .8rem; font-size: .78rem; }
.btn-icon { padding: .5rem; width: 38px; height: 38px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   Cards & surfaces
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.4rem 1.5rem; }
.card-hover { transition: transform .2s ease, box-shadow .2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px;
  border: 1px solid var(--line); border-radius: 50%; opacity: .5;
}
.kpi-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--text-muted); font-weight: 500; }
.kpi-value { font-family: var(--font-serif); font-size: 2rem; font-weight: 500; color: var(--umber); margin: .35rem 0 .1rem; line-height: 1; }
.kpi-sub { font-size: .8rem; color: var(--text-soft); display: flex; align-items: center; gap: .35rem; }
.kpi-accent { border-top: 3px solid var(--gold); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 500;
  padding: .22rem .6rem; border-radius: 999px; letter-spacing: .02em; text-transform: capitalize;
  background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--line);
}
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.acquisitie, .badge.gepland { background: var(--mist); color: var(--text-soft); }
.badge.ontwikkeling, .badge.bezig, .badge.optie { background: var(--warn-bg); color: var(--warn); }
.badge.realisatie { background: #EBF0E9; color: var(--success); }
.badge.verkoop, .badge.gestort { background: #E8EEF1; color: var(--info); }
.badge.afgerond, .badge.verkocht, .badge.actief { background: var(--success-bg); color: var(--success); }
.badge.vertraagd, .badge.on_hold { background: var(--danger-bg); color: var(--danger); }
.badge.beschikbaar { background: var(--success-bg); color: var(--success); }
.badge.gereserveerd, .badge.toegezegd { background: var(--warn-bg); color: var(--warn); }
.badge.hoog { background: var(--danger-bg); color: var(--danger); }
.badge.gemiddeld { background: var(--warn-bg); color: var(--warn); }
.badge.laag { background: var(--success-bg); color: var(--success); }
.badge-gold { background: var(--gold); color: #fff; border-color: var(--gold); }

.pill { padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: all .15s; color: var(--text-soft); }
.pill:hover { border-color: var(--gold); color: var(--umber); }
.pill.active { background: var(--umber); color: var(--creme); border-color: var(--umber); }

/* Progress */
.progress { height: 8px; background: var(--mist); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 999px; transition: width .6s ease; }
.progress.thin { height: 5px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th { text-align: left; font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); padding: .7rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Avatar */
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 500; font-size: .82rem; flex-shrink: 0; font-family: var(--font-sans); }
.avatar-sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar-lg { width: 54px; height: 54px; font-size: 1.1rem; }

/* Forms */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .78rem; font-weight: 500; color: var(--text-soft); margin-bottom: .35rem; letter-spacing: .02em; }
.input, .select, textarea.input {
  width: 100%; padding: .6rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: .9rem; background: var(--surface); color: var(--text); transition: all .15s; font-weight: 300;
}
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(161,132,90,.12); }
.input::placeholder { color: var(--text-muted); }

/* Icon circle (brandbook iconography) */
.icon-circle {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gold);
  display: grid; place-items: center; color: var(--gold); flex-shrink: 0;
}
.icon-circle.filled { background: var(--gold); color: #fff; border-color: var(--gold); }
.icon-circle.umber { border-color: var(--umber); color: var(--umber); }
.icon-circle svg { width: 20px; height: 20px; stroke-width: 1.6; }

/* Layout helpers */
.grid { display: grid; gap: 1.25rem; }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; gap: .6rem; }
.stack { display: flex; flex-direction: column; }
.gap-sm { gap: .5rem; } .gap { gap: 1rem; } .gap-lg { gap: 1.5rem; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--zand); }

/* Fade-in */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeUp .4s ease both; }
[x-cloak] { display: none !important; }
