/* Desa CRM — premium color & property match polish v4 */
:root{
  --desa-sand:#c3aa94;
  --desa-charcoal:#383838;
  --desa-blue:#6f92a3;
  --desa-teal:#5f8f8d;
  --desa-sage:#6f9277;
  --desa-amber:#d39a5e;
  --desa-rose:#b97777;
  --desa-green:#5f8a69;
  --desa-red:#a86f6f;
  --desa-lilac:#8b86a8;
}
.status.newlead{background:#eaf2f8!important;color:#4f7183!important;border:1px solid #d6e4ed!important}.status.contacted{background:#eaf5f4!important;color:#4f7d7a!important;border:1px solid #d5e9e7!important}.status.qualified{background:#edf5ee!important;color:#55755c!important;border:1px solid #dce9de!important}.status.viewing{background:#fbf1e6!important;color:#9a6a37!important;border:1px solid #f0dfcb!important}.status.match{background:#f0eef8!important;color:#6f698e!important;border:1px solid #e1ddf0!important}.status.hot{background:#fff0e5!important;color:#b06f3e!important;border:1px solid #f4dcc8!important}.status.negotiation{background:#f8ebeb!important;color:#9e5f5f!important;border:1px solid #ead6d6!important}.status.won{background:#e8f4eb!important;color:#4f7659!important;border:1px solid #d5e7da!important}.status.lost{background:#f2f2f2!important;color:#777!important;border:1px solid #e3e3e3!important}
#dashboard .kpi{position:relative!important;overflow:hidden!important}#dashboard .kpi:before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:#c3aa94}#dashboard .kpi:nth-child(1):before{background:var(--desa-blue)}#dashboard .kpi:nth-child(2):before{background:var(--desa-teal)}#dashboard .kpi:nth-child(3):before{background:var(--desa-amber)}#dashboard .kpi:nth-child(4):before{background:var(--desa-sage)}
.pipeline-stage{position:relative!important;overflow:hidden!important}.pipeline-stage:before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:#c8d3d8}.pipeline-stage[data-stage="Nieuwe lead"]:before{background:var(--desa-blue)}.pipeline-stage[data-stage="Contactpoging"]:before{background:#8ba7b4}.pipeline-stage[data-stage="Contact gehad"]:before{background:var(--desa-teal)}.pipeline-stage[data-stage="Gekwalificeerd"]:before{background:var(--desa-sage)}.pipeline-stage[data-stage="Call / bezichtiging"]:before{background:var(--desa-amber)}.pipeline-stage[data-stage="Vastgoedmatch"]:before{background:var(--desa-lilac)}.pipeline-stage[data-stage="Warme lead"]:before{background:#d98951}.pipeline-stage[data-stage="Onderhandeling"]:before{background:var(--desa-rose)}.pipeline-stage[data-stage="Gewonnen"]:before{background:var(--desa-green)}.pipeline-stage[data-stage="Verloren"]:before{background:var(--desa-red)}
.desa-lead-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0 0 12px}.desa-lead-summary-item{background:#fff;border:1px solid #e6ebef;border-radius:12px;padding:10px 11px;min-width:0}.desa-lead-summary-item span{display:block;font-size:8px;letter-spacing:.08em;text-transform:uppercase;color:#89969d;margin-bottom:5px}.desa-lead-summary-item strong{display:block;font-size:11px;line-height:1.35;color:#273239;white-space:normal;word-break:break-word}.desa-lead-summary-item:nth-child(1){box-shadow:inset 0 3px 0 #c3aa94}.desa-lead-summary-item:nth-child(2){box-shadow:inset 0 3px 0 var(--desa-blue)}.desa-lead-summary-item:nth-child(3){box-shadow:inset 0 3px 0 var(--desa-sage)}.desa-lead-summary-item:nth-child(4){box-shadow:inset 0 3px 0 var(--desa-amber)}.desa-lead-summary-item:nth-child(5){box-shadow:inset 0 3px 0 var(--desa-teal)}
#detail .match-linked{display:grid!important;grid-template-columns:112px minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;padding:10px!important;border:1px solid #e4eaee!important;border-radius:13px!important;background:linear-gradient(180deg,#fff,#fbfcfd)!important}#detail .match-linked-thumb{width:112px;height:78px;border-radius:10px;overflow:hidden;background:#eef2f4;position:relative}#detail .match-linked-thumb img{width:100%;height:100%;display:block;object-fit:cover}#detail .match-linked-main{min-width:0}#detail .match-linked-main b{display:block;font-size:12px!important;line-height:1.3!important;color:#253139!important;margin-bottom:4px}#detail .match-linked-main small{display:block;font-size:9px!important;line-height:1.5!important;color:#7b8991!important}#detail .match-status{display:grid!important;gap:7px!important;min-width:118px}#detail .match-status select,#detail .match-status .btn{height:34px!important;border-radius:9px!important}#detail .match-status select{border:1px solid #e1e7eb!important;background:#f8fafb!important;font-size:9px!important;padding:0 8px!important}#detail .match-status .btn{background:#fff!important;font-size:9px!important;color:#7f6666!important;border-color:#eadede!important}
#detail .match-card{overflow:hidden!important;border-radius:13px!important;border:1px solid #e4eaee!important;background:#fff!important}#detail .match-thumb{height:140px!important}#detail .match-score{background:#fff7ee!important;color:#a66f39!important;border:1px solid #edd8c1!important;border-radius:999px!important;padding:5px 8px!important}

/* Property catalogue — stronger action hierarchy */
#properties .desa-property-card{position:relative!important;overflow:hidden!important;border-radius:15px!important;border:1px solid #e3e9ed!important;background:#fff!important;box-shadow:0 5px 18px rgba(31,43,50,.045)!important;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
#properties .desa-property-card:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(31,43,50,.08)!important;border-color:#d6e0e5!important}
#properties .desa-property-card .property-img{position:relative!important;height:190px!important;background-color:#edf2f4!important}
#properties .property-status-badge{position:absolute;left:11px;top:11px;z-index:2;background:rgba(255,255,255,.93);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.8);border-radius:999px;padding:6px 9px;font-size:9px;font-weight:800;color:#496c55;box-shadow:0 4px 16px rgba(20,28,33,.08)}
#properties .property-body{padding:14px!important}
#properties .desa-property-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
#properties .desa-property-card-head>div{min-width:0}
#properties .desa-property-card-head b{font-size:15px!important;line-height:1.3!important;color:#202a30!important}
#properties .desa-property-card-head p{font-size:11px!important;line-height:1.5!important;color:#798890!important;margin:5px 0 10px!important}
#properties .property-match-count{background:#edf5f6!important;color:#5c7882!important;border:1px solid #dae6ea!important;border-radius:999px!important;padding:5px 7px!important;white-space:nowrap;font-size:9px!important}
#properties .property-body strong{font-size:20px!important;letter-spacing:-.035em!important;color:#1f292f!important}
#properties .desa-property-actions{display:grid;grid-template-columns:1fr 1fr 38px;gap:7px;margin-top:13px}
#properties .desa-property-actions .btn{height:38px!important;min-height:38px!important;margin:0!important;border-radius:9px!important;font-size:10px!important;font-weight:750!important;padding:0 10px!important;width:100%!important}
#properties .desa-property-info-btn{background:#f5f8fa!important;color:#394b54!important;border-color:#dde6eb!important}
#properties .desa-property-edit-btn{background:#fbf6f1!important;color:#826c59!important;border-color:#eaded2!important}
#properties .desa-property-delete-btn{background:#fff8f7!important;color:#a85f5f!important;border-color:#ecd8d5!important;padding:0!important;font-size:15px!important}
#properties .desa-property-actions .btn:hover{transform:translateY(-1px)!important}
#properties .desa-property-link-box{margin-top:12px;padding:11px;border-radius:11px;background:linear-gradient(180deg,#f8fafb,#f4f7f8);border:1px solid #e2e9ed}
#properties .desa-property-link-title{display:flex;justify-content:space-between;gap:10px;align-items:flex-end;margin-bottom:8px}
#properties .desa-property-link-title span{font-size:10px;font-weight:800;color:#40535c;text-transform:uppercase;letter-spacing:.07em}
#properties .desa-property-link-title small{font-size:9px;color:#829099;text-align:right}
#properties .property-linker{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important;margin-top:0!important}
#properties .property-linker select{height:40px!important;border:1px solid #dce5ea!important;border-radius:9px!important;background:#fff!important;padding:0 10px!important;font-size:11px!important;min-width:0!important}
#properties .desa-link-lead-btn{height:40px!important;min-height:40px!important;border-radius:9px!important;padding:0 13px!important;background:#383838!important;color:#fff!important;border-color:#383838!important;font-size:10px!important;white-space:nowrap;box-shadow:0 7px 16px rgba(56,56,56,.13)!important}
#properties .desa-link-lead-btn:hover{background:#2f2f2f!important;transform:translateY(-1px)!important}

/* Property details + edit modal */
.desa-property-modal{z-index:140!important}.desa-property-sheet{width:min(720px,95vw)!important;background:#fff!important;border-radius:18px!important;padding:18px!important;box-shadow:0 28px 70px rgba(21,28,32,.2)!important}.desa-property-sheet>.panelhead{padding-bottom:12px;margin-bottom:14px;border-bottom:1px solid #edf2f4}.desa-property-sheet>.panelhead h2{font-size:22px!important}.desa-property-sheet>.panelhead>button{width:36px;height:36px;border-radius:9px;background:#f4f7f8!important;border:1px solid #e3eaee!important;color:#596a72!important;font-size:20px!important}
.desa-property-detail-hero{height:260px;border-radius:14px;background-size:cover;background-position:center;background-color:#eef2f4;position:relative;overflow:hidden}.desa-property-detail-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 55%,rgba(24,30,33,.24))}.desa-property-detail-hero>span{position:absolute;left:12px;top:12px;z-index:2;background:rgba(255,255,255,.94);border-radius:999px;padding:7px 10px;font-size:10px;font-weight:800;color:#4b6d58}.desa-property-detail-price{font-size:28px;font-weight:850;letter-spacing:-.045em;color:#202a30;margin:16px 0 12px}.desa-property-detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.desa-property-detail-grid>div{padding:11px 12px;border:1px solid #e5ebee;background:#fafcfd;border-radius:10px}.desa-property-detail-grid span{display:block;font-size:8px;text-transform:uppercase;letter-spacing:.08em;color:#89969d;margin-bottom:5px}.desa-property-detail-grid b{font-size:12px;color:#2c3940}.desa-property-linked-leads{margin-top:18px}.desa-property-linked-leads h3{font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:#5a6c75;margin:0 0 8px}.desa-property-lead-row{width:100%;border:1px solid #e5ebee;background:#fff;border-radius:10px;padding:11px 12px;margin-top:7px;display:flex;justify-content:space-between;gap:12px;align-items:center;text-align:left}.desa-property-lead-row:hover{background:#f8fbfc}.desa-property-lead-row b{display:block;font-size:12px;color:#243139}.desa-property-lead-row span{font-size:10px;color:#718089}.desa-property-detail-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;padding-top:14px;border-top:1px solid #edf2f4}.desa-property-detail-actions .btn{min-width:110px}
.desa-property-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.desa-property-form label{display:grid;gap:6px}.desa-property-form label.full{grid-column:1/-1}.desa-property-form label>span{font-size:10px;font-weight:750;color:#5c6d76}.desa-property-form input,.desa-property-form select{width:100%;height:44px;border:1px solid #dce5ea;border-radius:10px;background:#fbfcfd;padding:0 11px;font-size:13px;color:#253139}.desa-property-form input:focus,.desa-property-form select:focus{outline:none;border-color:#aabcc5;box-shadow:0 0 0 4px rgba(96,123,133,.08);background:#fff}.desa-property-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px;padding-top:14px;border-top:1px solid #edf2f4}.desa-property-form-actions .btn{min-width:125px}

#reports .kpi:nth-child(1):before,#campaigns .kpi:nth-child(1):before{background:var(--desa-blue)!important}#reports .kpi:nth-child(2):before,#campaigns .kpi:nth-child(2):before{background:var(--desa-teal)!important}#reports .kpi:nth-child(3):before,#campaigns .kpi:nth-child(3):before{background:var(--desa-amber)!important}#reports .kpi:nth-child(4):before,#campaigns .kpi:nth-child(4):before{background:var(--desa-sage)!important}#reports .kpi,#campaigns .kpi{position:relative!important;overflow:hidden!important}#reports .kpi:before,#campaigns .kpi:before{content:"";position:absolute;left:0;right:0;top:0;height:4px}

@media(max-width:800px){
  .desa-lead-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.desa-lead-summary-item:last-child{grid-column:1/-1}
  #detail .match-linked{grid-template-columns:92px minmax(0,1fr)!important;align-items:start!important}#detail .match-linked-thumb{width:92px;height:72px}#detail .match-status{grid-column:1/-1!important;grid-template-columns:1fr auto!important;min-width:0!important;width:100%!important}#detail .match-thumb{height:126px!important}
  #properties .desa-property-card .property-img{height:150px!important}#properties .desa-property-actions{grid-template-columns:1fr 1fr 38px}#properties .desa-property-link-title{display:block}#properties .desa-property-link-title small{display:block;text-align:left;margin-top:3px}#properties .property-linker{grid-template-columns:1fr!important}#properties .desa-link-lead-btn{width:100%!important}
  .desa-property-sheet{width:100%!important;max-width:none!important;border-radius:18px 18px 0 0!important;padding:16px 13px calc(18px + env(safe-area-inset-bottom))!important}.desa-property-detail-hero{height:210px}.desa-property-detail-grid{grid-template-columns:1fr 1fr}.desa-property-form{grid-template-columns:1fr}.desa-property-form label.full{grid-column:auto}.desa-property-form-actions{display:grid;grid-template-columns:1fr 1fr}.desa-property-form-actions .btn{min-width:0;width:100%}
}
