/* =========================================================
   Acrebase  design polish on top of Tailwind
   ========================================================= */

:root {
  --ink-50:#f6f8fb; --ink-100:#eef2f7; --ink-200:#dde4ee; --ink-300:#bcc6d6;
  --ink-400:#8896ad; --ink-500:#5b6b86; --ink-600:#3f4d66; --ink-700:#2a3650;
  --ink-800:#19223a; --ink-900:#0f172a; --ink-950:#0b1220;
  --brand-500:#10b981; --brand-600:#059669; --brand-700:#047857;
  --gold-500:#d4a14a;
}

html, body { height: 100%; }
body { -webkit-font-smoothing: antialiased; }

/* App shell scrolling area */
.scroll-area { scrollbar-width: thin; scrollbar-color: #c8d0dc transparent; }
.scroll-area::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll-area::-webkit-scrollbar-thumb { background: #c8d0dc; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
.scroll-area::-webkit-scrollbar-thumb:hover { background: #a9b4c4; background-clip: content-box; }

/* Subtle dotted background for hero/login */
.dots-bg {
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 18px 18px;
}
.grid-bg {
  background-image:
    linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Sidebar gradient */
.sidebar-grad {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(16,185,129,0.18), transparent 60%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 60%, #0b1220 100%);
}

/* Card hover */
.card-hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-hover:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -16px rgba(15,23,42,.25); border-color: #cfd8e3; }

/* Pretty focus rings */
.focus-ring:focus { outline: none; box-shadow: 0 0 0 3px rgba(16,185,129,.25); border-color: var(--brand-500); }

/* Pill */
.pill { display: inline-flex; align-items: center; gap: .375rem; padding: .125rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }

/* Stat sparkline canvas containers */
.spark { height: 36px; width: 100%; }

/* Map sizing */
.leaflet-container { background: #e9eef5; border-radius: 12px; }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { font-family: Inter, sans-serif; }

/* -------------------- Map View (Leaflet engine) -------------------- */
/* Real interactive map host; sized so Leaflet has explicit height. */
#mv-leaflet { height: 480px; min-height: 380px; width: 100%; border-radius: 12px; overflow: hidden; }
#mv-map-wrap { position: relative; }
#mv-engine-notice {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .5rem .75rem; margin-bottom: .5rem;
  border-radius: .5rem; border: 1px solid #fde68a;
  background: #fffbeb; color: #92400e; font-size: .8125rem; line-height: 1.25rem;
}
#mv-engine-notice code { background: rgba(0,0,0,.06); padding: 0 .25rem; border-radius: .25rem; font-size: .75rem; }

/* Leaflet pin markers (DivIcon) */
.mv-pin-wrap { background: transparent !important; border: 0 !important; }
.mv-pin {
  display: inline-block; width: 18px; height: 18px; border-radius: 999px;
  border-style: solid; border-color: white; box-shadow: 0 1px 3px rgba(15,23,42,.35);
}
.mv-pin-selected .mv-pin { box-shadow: 0 0 0 3px rgba(15,23,42,.25), 0 1px 3px rgba(15,23,42,.45); }

/* Leaflet cluster bubbles (override the default plugin styling) */
.mv-cluster-wrap { background: transparent !important; }
.mv-cluster {
  color: white; font-weight: 700; text-align: center;
  border-radius: 999px; border: 2px solid white;
  box-shadow: 0 2px 6px rgba(15,23,42,.25);
}

/* Layer + fit-all controls */
.mv-fit-all {
  background: white; border: 1px solid rgba(15,23,42,.15); border-radius: 6px;
  padding: 4px 8px; font-size: 12px; font-weight: 600; color: #0f172a;
  cursor: pointer;
}
.mv-fit-all:hover { background: #f6f8fb; }

/* Score legend */
.mv-legend {
  background: rgba(255,255,255,.92); border: 1px solid rgba(15,23,42,.12);
  border-radius: 8px; padding: 8px 10px; font-size: 11px; color: #2a3650;
  box-shadow: 0 4px 12px -6px rgba(15,23,42,.25);
}
.mv-legend-title { font-weight: 700; margin-bottom: 4px; color: #0f172a; }
.mv-legend-row { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
.mv-legend-row span { display: inline-block; width: 10px; height: 10px; border-radius: 999px; }

/* Popups */
.mv-popup { font-family: Inter, sans-serif; min-width: 200px; }
.mv-popup-addr { font-weight: 600; color: #0f172a; font-size: 13px; line-height: 1.25rem; }
.mv-popup-meta { color: #5b6b86; font-size: 11px; margin: 2px 0 6px; line-height: 1rem; }
.mv-popup-rows { display: grid; grid-template-columns: 1fr auto; row-gap: 2px; column-gap: 8px; font-size: 12px; }
.mv-popup-row { display: contents; }
.mv-popup-row > span:first-child { color: #5b6b86; }
.mv-popup-row > span:last-child { color: #0f172a; font-weight: 600; text-align: right; }
.mv-popup-link {
  display: inline-block; margin-top: 8px; padding: 5px 8px;
  background: #0f172a; color: white; border-radius: 6px;
  font-size: 12px; font-weight: 600; text-decoration: none;
}
.mv-popup-link:hover { background: #19223a; }

/* Custom map markers */
.map-pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  background: var(--brand-600); transform: rotate(-45deg);
  border: 2px solid white; box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  display:flex; align-items:center; justify-content:center;
}
.map-pin span { transform: rotate(45deg); color: white; font-size: 12px; font-weight: 700; }

/* Property image placeholder gradient */
.bg-house-1 { background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%); }
.bg-house-2 { background: linear-gradient(135deg, #064e3b 0%, #10b981 100%); }
.bg-house-3 { background: linear-gradient(135deg, #7c2d12 0%, #f59e0b 100%); }
.bg-house-4 { background: linear-gradient(135deg, #4c1d95 0%, #a78bfa 100%); }
.bg-house-5 { background: linear-gradient(135deg, #831843 0%, #f472b6 100%); }
.bg-house-6 { background: linear-gradient(135deg, #0f172a 0%, #475569 100%); }
.bg-house-7 { background: linear-gradient(135deg, #134e4a 0%, #2dd4bf 100%); }
.bg-house-8 { background: linear-gradient(135deg, #4a044e 0%, #d946ef 100%); }
.bg-house-9 { background: linear-gradient(135deg, #1e293b 0%, #d4a14a 100%); }

/* Skeleton illustration of a house overlaid on gradient */
.house-illo {
  position: relative;
  overflow: hidden;
}
.house-illo::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 60% at 50% 100%, rgba(255,255,255,0.12), transparent 60%),
    linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.18) 100%);
}

/* Kanban column scroll */
.kanban-col { max-height: calc(100vh - 260px); overflow: auto; }

/* Lucide icon stroke default */
[data-lucide] { stroke-width: 1.75; }

/* Animated gradient header (hero) */
.hero-grad {
  background: linear-gradient(120deg, #0b1220, #0f172a 40%, #064e3b 90%);
}

/* Tooltip-style chip */
.chip { display:inline-flex; align-items:center; gap:.375rem; padding:.25rem .625rem; border-radius:.5rem; font-size:.75rem; font-weight:600; background:#eef2f7; color:#2a3650; }
.chip-good { background:#d1fae5; color:#065f46; }
.chip-warn { background:#fef3c7; color:#92400e; }
.chip-bad  { background:#fee2e2; color:#991b1b; }
.chip-info { background:#dbeafe; color:#1e3a8a; }

/* Tab underline */
.tab-active { color:#0f172a; border-bottom: 2px solid #10b981; }

/* Drawer / Modal */
.modal-backdrop { background: rgba(15,23,42,.55); backdrop-filter: blur(2px); }

/* Mobile sidebar */
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 12px 40px rgba(0,0,0,0.35); }
}

/* Small print tweaks */
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; padding: 2px 6px; border:1px solid #dde4ee; border-bottom-width:2px; border-radius:6px; background:#fff; color:#3f4d66; }

/* Print: reports look like documents */
@media print {
  .no-print { display: none !important; }
  body { background: white; }
  .printable { box-shadow: none !important; border: none !important; }
}
