:root {
  --blue-header: #00a4d3; /* Ciano similar to image */
  --blue-text: #004a8f;
  --bg-sidebar: #f3f4f6;
  --bg-page: #f8fafc;
  --text-muted: #6b7280;
  --text-dark: #374151;
  --border-light: #e5e7eb;
  --white: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg-page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
}

/* HEADER */
.hero {
  background: var(--blue-header);
  padding: 10px 20px 60px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.logo-img {
  max-width: 100%;
  height: auto;
  max-height: 160px;
  display: block;
}

/* STATS */
.stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: -40px; /* Overlap header */
  padding: 0 20px;
  position: relative;
  z-index: 10;
}
.stat-card {
  background: var(--white);
  padding: 24px 32px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card b {
  color: var(--blue-text);
  font-size: 36px;
  font-weight: 900;
}
.stat-card span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

/* LAYOUT */
.layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: calc(100vh - 200px);
  margin-top: 20px;
}
.sidebar {
  background: var(--bg-sidebar);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
}
.sidebar h2 {
  font-size: 18px;
  color: var(--text-dark);
  margin: 0 0 10px 0;
  line-height: 1.4;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: var(--text-dark);
  outline: none;
  cursor: pointer;
  appearance: auto;
}
.filter-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.btn {
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  flex: 1;
}
.btn-outline {
  border-color: #cbd5e1;
  color: var(--text-muted);
  background: white;
}
.btn-outline:hover {
  background: #f1f5f9;
}

/* MAP & DETAIL */
.map-panel {
  position: relative;
  width: 100%;
  height: 100%;
}
#map {
  width: 100%;
  height: 100%;
  background: #e2e8f0;
}

.detail {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 400px;
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.detail h3 { margin: 0 0 12px 0; font-size: 20px; color: var(--blue-text); }
.meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.money {
  font-size: 24px;
  font-weight: 800;
  color: #10b981;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.pill {
  display: inline-block;
  background: #e0f2fe;
  color: var(--blue-text);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}
.close-btn:hover { color: #000; }

.works-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}
.work-item {
  background: white;
  padding: 14px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: 0.1s;
}
.work-item:hover { border-color: var(--blue-text); }
.work-item strong { display: block; font-size: 13px; margin-bottom: 4px; color: var(--text-dark); }
.work-item span { font-size: 11px; color: var(--text-muted); }

@media(max-width: 900px){
  .stats { flex-direction: column; align-items: center; margin-top: 20px; padding-top: 20px; }
  .stat-card { width: 100%; max-width: 400px; }
  .layout { grid-template-columns: 1fr; display: flex; flex-direction: column-reverse; margin-top: 20px; height: auto; }
  .map-panel { height: 500px; }
  .detail { width: calc(100% - 48px); bottom: 12px; right: 24px; }
}

/* CUSTOM MAP MARKERS */
.custom-map-marker {
  background: transparent;
  border: none;
}
.marker-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 18px;
  background: white;
  border: 2px solid var(--blue);
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.marker-emoji:hover {
  transform: scale(1.2) translateY(-4px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.4);
  z-index: 1000;
  border-color: var(--yellow);
}

/* SEARCH BAR */
.search-container {
  margin-bottom: 8px;
}
.search-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: var(--paper);
}
.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 62, 117, 0.1);
}
.sidebar-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}
