/* ============================================================
   Patricia · Conseil immobilier — design system
   Palette reprise d'Inova Conseil
   ============================================================ */

:root {
  --sage-900: #25331f;
  --sage-800: #334831;
  --sage-700: #546a51;
  --sage-600: #637c60;
  --sage-500: #7d947b;
  --sage-300: #b9c8b5;
  --sage-200: #d7e0d3;
  --sage-100: #e8eee5;
  --sage-50: #f2f5ef;

  --cream: #ebe9e6;
  --cream-2: #f4f2ee;
  --paper: #fbfaf7;
  --white: #ffffff;

  --navy: #1b365d;
  --blue: #095bb1;
  --orange: #e96f05;
  --orange-soft: #fdf0e4;
  --red: #c0392b;
  --red-soft: #fbeae8;
  --amber: #a88600;
  --amber-soft: #faf3d9;
  --green: #3f7d4e;
  --green-soft: #e6f1e8;

  --ink: #232a24;
  --muted: #6d726b;
  --faint: #9aa096;
  --line: #e6e3dc;
  --line-strong: #d8d4cb;

  --radius: 20px;
  --radius-sm: 13px;
  --radius-xs: 10px;
  --shadow-sm: 0 2px 8px rgba(43, 60, 42, 0.05);
  --shadow: 0 14px 40px -18px rgba(43, 60, 42, 0.28);
  --shadow-lg: 0 30px 70px -30px rgba(43, 60, 42, 0.42);

  --font-head: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(900px 520px at 100% -8%, rgba(99, 124, 96, 0.10), transparent 60%),
    radial-gradient(760px 500px at -10% 110%, rgba(233, 111, 5, 0.06), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.015em; }
a { color: var(--sage-700); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

/* ---------------------------------------------------------- layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 40;
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px 16px 18px;
  color: #eef1ea;
  background: linear-gradient(168deg, #3a5137 0%, #334831 42%, #28371f 100%);
  box-shadow: 18px 0 60px -40px rgba(20, 30, 18, 0.8);
  overflow-y: auto;
}
.sidebar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 260px at 0% 0%, rgba(235, 233, 230, 0.10), transparent 70%);
}
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-head); font-size: 19px; font-weight: 600; letter-spacing: .01em; color: #fff; }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #b9c8b5; margin-top: 2px; }

.nav-label { position: relative; z-index: 1; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #9fb09a; padding: 16px 12px 6px; }
.nav { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 11px;
  background: transparent; color: #d6e0d1; font-size: 13.6px; font-weight: 500;
  text-align: left; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.nav-item svg { width: 18px; height: 18px; opacity: .85; flex: none; }
.nav-item:hover { background: rgba(235, 233, 230, .08); color: #fff; }
.nav-item.active { background: rgba(235, 233, 230, .14); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(235,233,230,.08); }
.nav-item.active svg { opacity: 1; color: #d9e6d4; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.sidebar-foot { position: relative; z-index: 1; margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(235,233,230,.10); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.user-chip .avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
.user-meta { min-width: 0; flex: 1; }
.user-name { font-size: 12.8px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mail { font-size: 10.8px; color: #a9baa4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(235,233,230,.14); background: rgba(235,233,230,.06); color: #d6e0d1; display: grid; place-items: center; flex: none; }
.logout-btn:hover { background: rgba(192, 57, 43, .28); color: #ffd9d4; }

.main { flex: 1; min-width: 0; margin-left: 268px; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 34px;
  background: rgba(251, 250, 247, .84);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(216, 212, 203, .55);
}
.topbar-title { display: flex; flex-direction: column; min-width: 0; }
.topbar-eyebrow { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.topbar-h { font-family: var(--font-head); font-size: 16px; font-weight: 600; color: var(--sage-800); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; }

.search-wrap { position: relative; width: min(330px, 30vw); }
.search-box { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.search-box svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.search-box input { border: 0; outline: none; background: transparent; width: 100%; font-size: 13px; }
.search-box input::placeholder { color: var(--faint); }
.search-box kbd { font-family: var(--font-body); font-size: 10px; color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 8px; max-height: 420px; overflow: auto;
}
.sr-group { padding: 6px 8px 3px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.sr-item { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.sr-item:hover { background: var(--sage-50); }
.sr-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage-500); flex: none; }
.sr-empty { padding: 14px; text-align: center; color: var(--faint); font-size: 12.5px; }

.notif { position: relative; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--sage-800); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.notif:hover { background: var(--sage-50); }
.notif svg { width: 18px; height: 18px; }
.notif .ping { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px #fff; }
.notif-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 10px; font-weight: 700; display: none; place-items: center; box-shadow: 0 0 0 2px var(--paper); }
.notif-badge.show { display: grid; }

.sidebar-overlay { display: none; }

.view { width: 100%; max-width: 1480px; margin: 0 auto; padding: 30px 34px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title { font-size: 27px; font-weight: 600; color: var(--sage-900); line-height: 1.15; }
.page-sub { margin-top: 6px; font-size: 13.5px; color: var(--muted); max-width: 720px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: transform .14s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, #68815f 0%, #4d634a 100%); color: #fff; box-shadow: 0 12px 26px -12px rgba(77, 99, 74, .9); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(77, 99, 74, .95); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--cream-2); }
.btn-soft { background: var(--sage-100); color: var(--sage-800); }
.btn-soft:hover { background: var(--sage-200); }
.btn-orange { background: linear-gradient(180deg, #f0821f, #d96404); color: #fff; box-shadow: 0 12px 26px -14px rgba(233,111,5,.9); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #f6d9d5; }
.btn-sm { padding: 7px 11px; font-size: 12.2px; border-radius: 9px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-xs { padding: 5px 9px; font-size: 11.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; transition: .15s; }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { background: var(--sage-50); color: var(--sage-800); border-color: var(--sage-200); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); border-color: #efcbc6; }

/* ---------------------------------------------------------- cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 0; }
.card-title { font-size: 15.5px; font-weight: 600; color: var(--sage-900); }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.card-body { padding: 18px 22px 22px; }
.card-link { font-size: 12.5px; font-weight: 600; color: var(--sage-700); }
.card-link:hover { color: var(--sage-900); }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
.grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* ---------------------------------------------------------- kpi */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.kpi::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--sage-600), var(--sage-300)); opacity: .8; }
.kpi.orange::before { background: linear-gradient(90deg, var(--orange), #f7b267); }
.kpi.navy::before { background: linear-gradient(90deg, var(--navy), #4f74a8); }
.kpi.gold::before { background: linear-gradient(90deg, #b48f00, #e3c65c); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 11.8px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kpi-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sage-100); color: var(--sage-700); }
.kpi-icon svg { width: 19px; height: 19px; }
.kpi.orange .kpi-icon { background: var(--orange-soft); color: var(--orange); }
.kpi.navy .kpi-icon { background: #e9eef6; color: var(--navy); }
.kpi.gold .kpi-icon { background: var(--amber-soft); color: var(--amber); }
.kpi-value { margin-top: 14px; font-family: var(--font-head); font-size: 29px; font-weight: 600; letter-spacing: -0.03em; color: var(--sage-900); line-height: 1; }
.kpi-foot { margin-top: 9px; display: flex; align-items: center; gap: 7px; font-size: 11.8px; color: var(--muted); }
.kpi-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 7px; font-size: 10.8px; font-weight: 700; background: var(--sage-100); color: var(--sage-700); }
.kpi-chip.warn { background: var(--orange-soft); color: var(--orange); }

/* ---------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--cream-2); color: var(--muted); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-prospect, .b-en_attente, .b-rentre { background: #eef2fb; color: #3c5a91; }
.b-actif, .b-disponible, .b-en_cours, .b-realisee { background: var(--green-soft); color: var(--green); }
.b-ancien, .b-conclu, .b-vendu { background: var(--sage-100); color: var(--sage-800); }
.b-a_relancer, .b-compromis, .b-haute { background: var(--orange-soft); color: var(--orange); }
.b-signature, .b-financement, .b-normale { background: var(--amber-soft); color: var(--amber); }
.b-loue, .b-perdu { background: #f0ecef; color: #7c5c74; }
.b-basse { background: var(--cream-2); color: var(--faint); }
.b-acheteur { background: #eef2fb; color: #3c5a91; }
.b-vendeur { background: var(--green-soft); color: var(--green); }
.b-locataire { background: #f1edf8; color: #6b50a0; }
.b-bailleur { background: #eaf6f6; color: #1f7a7a; }
.b-investisseur { background: var(--orange-soft); color: var(--orange); }

/* ---------------------------------------------------------- avatars */
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 600; font-size: 13.5px; color: #fff; flex: none; background: linear-gradient(135deg, #637c60, #334831); letter-spacing: .02em; }
.avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.avatar.lg { width: 68px; height: 68px; border-radius: 20px; font-size: 23px; }
.avatar.orange { background: linear-gradient(135deg, #f0821f, #d96404); }
.avatar.navy { background: linear-gradient(135deg, #375d92, #1b365d); }
.avatar.clay { background: linear-gradient(135deg, #b57a53, #8a5232); }

/* ---------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead th { text-align: left; padding: 11px 14px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 600; border-bottom: 1px solid var(--line); background: var(--cream-2); white-space: nowrap; }
.tbl tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--sage-50); }
.tbl tr.clickable { cursor: pointer; }
.tbl td .inline { flex-wrap: nowrap; gap: 6px; }
.tbl th:last-child, .tbl td:last-child { min-width: 122px; }
.cell-main { font-weight: 600; color: var(--sage-900); }
.cell-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.cell-flex { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- toolbar */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--cream-2); border: 1px solid var(--line); border-radius: 12px; }
.seg { border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg:hover { color: var(--sage-900); }
.seg.active { background: #fff; color: var(--sage-900); box-shadow: var(--shadow-sm); }
.seg .n { margin-left: 5px; font-size: 10.5px; color: var(--faint); }
.filter-input { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 8px 11px; }
.filter-input svg { width: 15px; height: 15px; color: var(--faint); }
.filter-input input { border: 0; outline: 0; background: transparent; font-size: 12.8px; width: 190px; }

/* ---------------------------------------------------------- lists */
.row-list { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.row-item:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13.2px; font-weight: 600; color: var(--sage-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 11.6px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-side { display: flex; align-items: center; gap: 8px; flex: none; }

.due { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 7px; font-size: 10.5px; font-weight: 700; background: var(--cream-2); color: var(--muted); white-space: nowrap; }
.due.overdue { background: var(--red-soft); color: var(--red); }
.due.today { background: var(--orange-soft); color: var(--orange); }
.due.soon { background: var(--sage-100); color: var(--sage-700); }

/* ---------------------------------------------------------- kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(218px, 1fr)); gap: 14px; overflow-x: auto; padding: 2px 2px 12px; }
.kanban-col { background: var(--cream-2); border: 1px solid var(--line); border-radius: 17px; padding: 12px; min-height: 240px; display: flex; flex-direction: column; transition: background .15s, outline .15s; }
.kanban-col.drag-over { background: var(--sage-50); outline: 2px dashed var(--sage-500); outline-offset: -3px; }
.kanban-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 12px; }
.kanban-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage-500); }
.kanban-name { font-size: 12.5px; font-weight: 700; color: var(--sage-900); }
.kanban-count { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; }
.kanban-total { padding: 0 4px 10px; font-size: 11px; color: var(--faint); font-weight: 600; }
.kanban-cards { display: flex; flex-direction: column; gap: 9px; flex: 1; }
.kanban-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px; box-shadow: var(--shadow-sm); cursor: grab; transition: box-shadow .15s, transform .15s, border-color .15s; }
.kanban-card:hover { box-shadow: var(--shadow); border-color: var(--sage-200); transform: translateY(-1px); }
.kanban-card.dragging { opacity: .45; transform: rotate(1deg); }
.kc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kc-ref { font-size: 10px; letter-spacing: .06em; color: var(--faint); font-weight: 700; }
.kc-title { font-size: 12.8px; font-weight: 600; color: var(--sage-900); margin-top: 6px; line-height: 1.35; }
.kc-sub { font-size: 11.3px; color: var(--muted); margin-top: 3px; }
.kc-amount { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--sage-800); margin-top: 9px; }
.kc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.kc-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.kanban-card:hover .kc-actions { opacity: 1; }

/* ---------------------------------------------------------- properties */
.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 18px; }
.prop-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s; display: flex; flex-direction: column; }
.prop-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.prop-img { position: relative; height: 156px; background-size: cover; background-position: center; background-color: var(--sage-200); }
.prop-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,30,18,0) 45%, rgba(20,30,18,.42)); }
.prop-img .badge { position: absolute; top: 11px; left: 11px; z-index: 2; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.prop-img .prop-ref { position: absolute; bottom: 10px; left: 12px; z-index: 2; color: #fff; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.prop-type { position: absolute; top: 11px; right: 11px; z-index: 2; background: rgba(255,255,255,.9); color: var(--sage-800); font-size: 10.5px; font-weight: 700; padding: 4px 8px; border-radius: 7px; text-transform: capitalize; }
.prop-body { padding: 14px 16px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prop-title { font-size: 14px; font-weight: 600; color: var(--sage-900); line-height: 1.35; }
.prop-loc { font-size: 11.8px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.prop-loc svg { width: 13px; height: 13px; color: var(--faint); flex: none; }
.prop-price { font-family: var(--font-head); font-size: 19px; font-weight: 600; color: var(--sage-800); letter-spacing: -.02em; }
.prop-specs { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); }
.prop-specs span { display: inline-flex; align-items: center; gap: 4px; }
.prop-specs svg { width: 13px; height: 13px; color: var(--faint); }
.prop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.prop-owner { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); min-width: 0; }

/* ---------------------------------------------------------- estimations */
.est-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.est-col { background: var(--cream-2); border: 1px solid var(--line); border-radius: 18px; padding: 13px; min-height: 220px; }
.est-col-head { display: flex; align-items: center; gap: 8px; padding: 3px 4px 12px; }
.est-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.est-card:last-child { margin-bottom: 0; }
.est-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.est-price { font-family: var(--font-head); font-size: 18px; font-weight: 600; color: var(--sage-800); letter-spacing: -.02em; }
.est-addr { font-size: 12.5px; font-weight: 600; color: var(--sage-900); margin-top: 5px; }
.est-client { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.est-specs { display: flex; gap: 10px; margin-top: 9px; font-size: 11px; color: var(--muted); }
.est-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.est-foot .inline { flex-wrap: nowrap; }

/* ---------------------------------------------------------- detail */
.detail-head { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.detail-id { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1; }
.detail-name { font-size: 23px; font-weight: 600; color: var(--sage-900); line-height: 1.2; }
.detail-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.info-item { background: var(--cream-2); border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; }
.info-label { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.info-value { font-size: 13px; font-weight: 600; color: var(--sage-900); margin-top: 5px; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-mini { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; box-shadow: var(--shadow-sm); }
.stat-mini .v { font-family: var(--font-head); font-size: 21px; font-weight: 600; color: var(--sage-800); }
.stat-mini .l { font-size: 11px; color: var(--muted); margin-top: 2px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { position: relative; border: 0; background: transparent; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tab:hover { color: var(--sage-900); }
.tab.active { color: var(--sage-900); }
.tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--sage-600); }

/* ---------------------------------------------------------- timeline */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 5px; bottom: 5px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 20px 6px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -24px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--sage-500); box-shadow: 0 0 0 3px #fff; }
.tl-dot.orange { border-color: var(--orange); }
.tl-dot.navy { border-color: var(--navy); }
.tl-dot.red { border-color: var(--red); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-type { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-700); }
.tl-date { font-size: 11px; color: var(--faint); }
.tl-content { font-size: 13px; color: var(--ink); margin-top: 4px; line-height: 1.5; }
.tl-user { font-size: 11px; color: var(--faint); margin-top: 3px; }

/* ---------------------------------------------------------- charts */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { position: relative; flex: none; }
.donut svg { transform: rotate(-90deg); display: block; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut-center .v { font-family: var(--font-head); font-size: 20px; font-weight: 600; color: var(--sage-900); line-height: 1; }
.donut-center .l { font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.legend { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 140px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend-label { color: var(--muted); flex: 1; }
.legend-val { font-weight: 700; color: var(--sage-900); }
.bars { width: 100%; }
.bars text { font-family: var(--font-body); fill: var(--faint); font-size: 9.5px; }
.bars .bar { transition: opacity .15s; }
.bars .bar:hover { opacity: .8; }
.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel-step { display: flex; align-items: center; gap: 10px; }
.funnel-label { width: 120px; font-size: 12px; color: var(--muted); flex: none; }
.funnel-track { flex: 1; height: 28px; border-radius: 8px; background: var(--cream-2); overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--sage-600), var(--sage-400, #8fa88c)); display: flex; align-items: center; justify-content: flex-end; padding-right: 9px; color: #fff; font-size: 11px; font-weight: 700; min-width: 34px; }
.funnel-fill.orange { background: linear-gradient(90deg, #e96f05, #f5a24f); }
.funnel-fill.navy { background: linear-gradient(90deg, #1b365d, #4f74a8); }

/* ---------------------------------------------------------- calendar */
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cal-month { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--sage-900); text-transform: capitalize; }
.cal-nav { display: flex; gap: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 1 / 1; border: 0; background: transparent; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12.5px; color: var(--ink); transition: background .12s; }
.cal-day:hover { background: var(--sage-50); }
.cal-day.other { color: #c9c6bf; }
.cal-day.today { background: var(--sage-100); color: var(--sage-900); font-weight: 700; }
.cal-day.selected { background: var(--sage-700); color: #fff; font-weight: 700; }
.cal-day.selected .cal-dot { background: #fff; }
.cal-dots { display: flex; gap: 2px; margin-top: 2px; height: 5px; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.cal-dot.sage { background: var(--sage-600); }
.cal-legend { display: flex; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }

.agenda-list { display: flex; flex-direction: column; gap: 18px; }
.agenda-group-title { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 4px; }
.agenda-group-title .pill { background: var(--cream-2); color: var(--muted); border-radius: 999px; padding: 2px 7px; font-size: 10px; }
.task-row { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-check { width: 19px; height: 19px; border-radius: 6px; border: 2px solid var(--sage-300); background: #fff; flex: none; margin-top: 1px; display: grid; place-items: center; transition: .15s; }
.task-check:hover { border-color: var(--sage-600); }
.task-check svg { width: 11px; height: 11px; color: #fff; opacity: 0; }
.task-row.done .task-check { background: var(--sage-600); border-color: var(--sage-600); }
.task-row.done .task-check svg { opacity: 1; }
.task-row.done .task-title { text-decoration: line-through; color: var(--faint); }
.task-title { font-size: 13.2px; font-weight: 600; color: var(--sage-900); line-height: 1.4; }
.task-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.task-side { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.prio-bar { width: 3px; border-radius: 3px; align-self: stretch; background: var(--line); flex: none; }
.prio-bar.haute { background: var(--orange); }
.prio-bar.normale { background: var(--amber); }
.prio-bar.basse { background: var(--sage-300); }

/* ---------------------------------------------------------- empty / misc */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--sage-50); color: var(--sage-500); display: grid; place-items: center; margin: 0 auto 12px; }
.empty-icon svg { width: 24px; height: 24px; }
.empty-title { font-size: 14px; font-weight: 600; color: var(--sage-900); }
.empty-sub { font-size: 12.5px; margin-top: 4px; }
.section-title { font-family: var(--font-head); font-size: 18px; font-weight: 600; color: var(--sage-900); margin-bottom: 14px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* ---------------------------------------------------------- modal */
.modal-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(31, 40, 30, .48); backdrop-filter: blur(5px); display: flex; align-items: flex-start; justify-content: center; padding: 28px 18px; overflow-y: auto; animation: fade .16s ease; }
.modal-card { width: min(620px, 100%); background: var(--paper); border: 1px solid rgba(255,255,255,.7); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s cubic-bezier(.2,.8,.3,1); }
.modal-card.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 0; }
.modal-title { font-size: 18px; font-weight: 600; color: var(--sage-900); }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-close { margin-left: auto; width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--cream-2); color: var(--muted); display: grid; place-items: center; flex: none; }
.modal-close:hover { background: var(--cream); color: var(--ink); }
.modal-body { padding: 20px 24px 22px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 0 24px 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.label { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.label .req { color: var(--orange); }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 13.2px; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s; appearance: none;
}
.select { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236d726b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px; }
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--sage-500); box-shadow: 0 0 0 3px rgba(99, 124, 96, .16); }
.input::placeholder, .textarea::placeholder { color: #b3b8b0; }
.hint { font-size: 11px; color: var(--faint); }
.form-error { display: none; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 12.5px; margin-bottom: 12px; }
.form-error.show { display: block; }
.radio-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; inset: 0; }
.radio-pill span { display: block; text-align: center; padding: 9px 6px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.radio-pill input:checked + span { background: var(--sage-100); border-color: var(--sage-500); color: var(--sage-900); }

/* ---------------------------------------------------------- toast */
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: flex; flex-direction: column; gap: 10px; max-width: 92vw; }
.toast { display: flex; align-items: flex-start; gap: 10px; min-width: 260px; padding: 13px 15px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sage-600); border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13px; color: var(--ink); animation: toastIn .22s ease; }
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
.toast svg { width: 17px; height: 17px; flex: none; color: var(--sage-600); margin-top: 1px; }
.toast.error svg { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-art { position: relative; overflow: hidden; padding: 54px 58px; color: #f2f5ef; background: linear-gradient(160deg, #3d563a 0%, #334831 45%, #22301c 100%); display: flex; flex-direction: column; justify-content: space-between; }
.login-art::before { content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; top: -220px; right: -160px; background: radial-gradient(circle, rgba(235,233,230,.14), transparent 65%); }
.login-art::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; bottom: -260px; left: -180px; background: radial-gradient(circle, rgba(233,111,5,.16), transparent 65%); }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.login-brand .brand-mark { width: 46px; height: 46px; }
.login-brand-name { font-family: var(--font-head); font-size: 21px; font-weight: 600; color: #fff; }
.login-brand-sub { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #b9c8b5; margin-top: 2px; }
.login-hero { position: relative; z-index: 1; margin: 60px 0; max-width: 480px; }
.login-hero h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; font-weight: 600; color: #fff; letter-spacing: -.02em; }
.login-hero h1 em { font-style: normal; color: #d9c9a8; }
.login-hero p { margin-top: 18px; font-size: 14.5px; line-height: 1.65; color: #cdd8c8; max-width: 420px; }
.login-features { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.login-feature { display: flex; align-items: center; gap: 11px; font-size: 13px; color: #dbe5d6; }
.login-feature .fi { width: 32px; height: 32px; border-radius: 9px; background: rgba(235,233,230,.10); border: 1px solid rgba(235,233,230,.12); display: grid; place-items: center; color: #dfe9da; flex: none; }
.login-feature .fi svg { width: 15px; height: 15px; }
.login-art-foot { position: relative; z-index: 1; font-size: 11.5px; color: #9fb09a; }
.login-form-wrap { display: grid; place-items: center; padding: 40px 28px; background: var(--paper); }
.login-card { width: min(420px, 100%); }
.login-card .brand-mobile { display: none; }
.login-card h2 { font-size: 25px; font-weight: 600; color: var(--sage-900); letter-spacing: -.02em; }
.login-card .lead { font-size: 13.5px; color: var(--muted); margin-top: 7px; margin-bottom: 26px; }
.login-card .field { margin-bottom: 15px; }
.login-card .btn-primary { margin-top: 6px; padding: 12px; }
.login-note { margin-top: 24px; text-align: center; font-size: 11px; color: var(--faint); }
.login-error { display: none; margin-top: 14px; padding: 11px 13px; border-radius: 10px; background: var(--red-soft); border: 1px solid #efcbc6; color: var(--red); font-size: 12.5px; }
.login-error.show { display: block; }

/* ---------------------------------------------------------- settings */
.settings-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.settings-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.settings-card h3 { font-size: 15.5px; color: var(--sage-900); margin-bottom: 4px; }
.settings-card .sub { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.interval-list { display: flex; flex-direction: column; gap: 8px; }
.interval-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--cream-2); }
.interval-key { width: 52px; font-weight: 700; font-size: 12px; color: var(--sage-800); flex: none; }
.interval-desc { font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1240px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-2-even { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .info-grid, .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-104%); transition: transform .24s cubic-bezier(.2,.8,.3,1); box-shadow: 30px 0 80px -40px rgba(0,0,0,.7); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(31,40,30,.38); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--sage-800); }
  .menu-btn svg { width: 19px; height: 19px; }
  .topbar { padding: 12px 20px; }
  .view { padding: 24px 20px 56px; }
  .est-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-form-wrap { min-height: 100vh; }
  .login-card .brand-mobile { display: flex; align-items: center; gap: 11px; margin-bottom: 30px; }
  .login-card .brand-mobile .brand-mark { width: 40px; height: 40px; }
  .search-wrap { width: 220px; }
}
@media (max-width: 720px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 24px; }
  .kpi-icon { width: 34px; height: 34px; border-radius: 10px; }
  .page-title { font-size: 22px; }
  .topbar-eyebrow { display: none; }
  .search-wrap { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .info-grid, .stat-strip { grid-template-columns: 1fr 1fr; }
  .page-head { align-items: flex-start; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .tbl thead { display: none; }
  .tbl tbody td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 0; }
  .tbl tbody tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .tbl tbody td::before { content: attr(data-label); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 600; }
  .tbl tbody td.cell-hide-mobile { display: none; }
  .kanban { grid-template-columns: repeat(5, 250px); }
  .modal-overlay { padding: 12px; }
  .modal-card { border-radius: 18px; }
  .radio-row { grid-template-columns: 1fr 1fr; }
  .donut-wrap { justify-content: center; }
}
@media (max-width: 460px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .view { padding: 18px 14px 50px; }
  .topbar { padding: 10px 14px; }
  .page-title { font-size: 20px; }
  .info-grid, .stat-strip { grid-template-columns: 1fr; }
}
