/* ── Layout ── */
.cw-main { background: #f6f6f4; min-height: calc(100vh - 60px); }

.cw-hero {
  background: #fff;
  border-bottom: 1px solid #e9e9e9;
  padding: 24px 0;
}
.cw-hero-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.cw-hero-title { font-size: 22px; font-weight: 800; color: #101010; margin-bottom: 4px; }
.cw-hero-sub   { font-size: 13px; color: #888; }

.btn-add {
  background: #092a6e; color: #fff; font-size: 13px; font-weight: 600;
  padding: 9px 18px; border-radius: 8px; text-decoration: none; white-space: nowrap;
  transition: background 0.18s;
}
.btn-add:hover { background: #071e4f; color: #fff; }

/* ── Three-column layout ── */
.cw-layout {
  max-width: 1400px; margin: 0 auto; padding: 20px 24px;
  display: grid;
  grid-template-columns: 240px 340px 1fr;
  gap: 16px;
  align-items: start;
}

/* ── FILTERS ── */
.cw-filters {
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  padding: 16px;
  position: sticky;
  top: 16px;
}

.cf-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: #a8a29e;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid #f0ede8;
}

.cf-group { margin-bottom: 14px; }
.cf-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: #57534e;
  margin-bottom: 6px;
}
.cf-input, .cf-select {
  width: 100%; padding: 7px 10px;
  background: #faf9f7; border: 1px solid #e9e9e9;
  border-radius: 7px; font-family: inherit;
  font-size: 12px; color: #1c1917; outline: none;
  transition: border-color 0.18s;
}
.cf-input:focus, .cf-select:focus { border-color: #092a6e; }

.cf-years { display: flex; flex-wrap: wrap; gap: 5px; }
.cf-year-btn {
  padding: 4px 10px; font-size: 12px; font-weight: 500;
  background: #f6f6f4; border: 1px solid #e9e9e9;
  border-radius: 20px; cursor: pointer; font-family: inherit;
  color: #57534e; transition: all 0.15s;
}
.cf-year-btn:hover { border-color: #092a6e; color: #092a6e; }
.cf-year-btn.active { background: #092a6e; color: #fff; border-color: #092a6e; }

.cf-actions { display: flex; gap: 8px; margin-top: 16px; }
.btn-apply {
  flex: 1; padding: 8px; background: #092a6e; color: #fff;
  border: none; border-radius: 7px; font-family: inherit;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.18s;
}
.btn-apply:hover { background: #071e4f; }
.btn-reset {
  padding: 8px 12px; background: #f6f6f4; color: #57534e;
  border: 1px solid #e9e9e9; border-radius: 7px;
  font-size: 12px; font-weight: 500; text-decoration: none;
  transition: all 0.15s; text-align: center;
}
.btn-reset:hover { background: #f0ede8; color: #1c1917; }

/* ── LIST ── */
.cw-list-col {
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 120px);
  overflow: hidden;
}

.cw-list-head {
  padding: 12px 14px;
  border-bottom: 1px solid #f0ede8;
  font-size: 12px; font-weight: 700; color: #57534e;
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.cw-list-head small { color: #a8a29e; font-weight: 400; }

.cw-list {
  flex: 1; overflow-y: auto;
  padding: 6px;
}
.cw-list::-webkit-scrollbar { width: 4px; }
.cw-list::-webkit-scrollbar-thumb { background: #d9d0c4; border-radius: 2px; }

.cw-item {
  padding: 10px 12px; border-radius: 8px;
  cursor: pointer; transition: background 0.12s;
  margin-bottom: 3px; border: 1px solid transparent;
}
.cw-item:hover { background: #faf9f7; }
.cw-item.active {
  background: rgba(9,42,110,0.07);
  border-color: rgba(9,42,110,0.25);
}

.cw-item-title {
  font-size: 13px; font-weight: 600; color: #1c1917;
  line-height: 1.4; margin-bottom: 4px;
}
.cw-item-meta { font-size: 11px; color: #888; line-height: 1.5; }
.cw-item-meta span { display: block; }
.cw-item-year {
  display: inline-block; margin-top: 5px;
  font-size: 10px; font-weight: 600;
  background: rgba(9,42,110,0.08); color: #092a6e;
  padding: 2px 8px; border-radius: 10px;
}

.cw-empty {
  padding: 48px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: #a8a29e;
}
.cw-empty p { font-size: 13px; line-height: 1.5; }

/* Pagination */
.cw-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 10px;
  border-top: 1px solid #f0ede8; flex-shrink: 0;
}
.page-btn {
  font-size: 12px; font-weight: 500; color: #092a6e;
  text-decoration: none; padding: 4px 10px;
  border: 1px solid rgba(9,42,110,0.3); border-radius: 6px;
  transition: all 0.15s;
}
.page-btn:hover { background: #092a6e; color: #fff; }
.page-info { font-size: 12px; color: #888; }

/* ── RIGHT COL ── */
.cw-right-col {
  display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100vh - 120px);
}

.cw-map-block {
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cw-map-title {
  padding: 10px 14px;
  font-size: 12px; font-weight: 700; color: #57534e;
  border-bottom: 1px solid #f0ede8;
  background: #faf9f7;
  flex-shrink: 0;
}

#cw-map { flex: 1; min-height: 300px; }

.cw-detail-block {
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.cw-detail-placeholder {
  padding: 32px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #a8a29e; font-size: 13px;
}

#cw-detail-content {
  padding: 14px 16px;
  font-size: 13px;
}
.detail-title {
  font-size: 15px; font-weight: 700; color: #1c1917;
  margin-bottom: 10px; line-height: 1.4;
}
.detail-row {
  display: flex; gap: 6px; margin-bottom: 5px;
  font-size: 12px; color: #57534e;
}
.detail-row strong { color: #1c1917; min-width: 100px; flex-shrink: 0; }
.detail-desc {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid #f0ede8;
  font-size: 12px; color: #666; line-height: 1.6;
}
.detail-actions {
  display: flex; gap: 8px; margin-top: 12px;
}
.btn-detail {
  padding: 7px 14px; font-size: 12px; font-weight: 600;
  border-radius: 7px; text-decoration: none; transition: all 0.15s;
}
.btn-detail-primary {
  background: #092a6e; color: #fff;
}
.btn-detail-primary:hover { background: #071e4f; color: #fff; }
.btn-detail-secondary {
  background: #f6f6f4; color: #57534e;
  border: 1px solid #e9e9e9;
}
.btn-detail-secondary:hover { background: #f0ede8; }

/* Leaflet overrides */
.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
  padding: 0 !important;
}
.leaflet-popup-content { margin: 0 !important; }
.cw-popup { padding: 10px 12px; min-width: 160px; }
.cw-popup-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cw-popup-meta { font-size: 11px; color: #888; }

@media (max-width: 1100px) {
  .cw-layout { grid-template-columns: 220px 300px 1fr; }
}
@media (max-width: 900px) {
  .cw-layout { grid-template-columns: 1fr; }
  .cw-filters { position: static; }
  .cw-right-col { max-height: none; }
  .cw-list-col { max-height: 400px; }
}
