/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: #f8fafc; color: #1e293b; line-height: 1.5; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.form-card { max-width: 480px; margin: 2rem auto; background: #fff; border-radius: 8px; padding: 2rem; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.form-card.wide { max-width: 800px; }
.form-card.admin-wide { max-width: 1400px; margin: 1rem 0; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; flex: 1; min-width: 180px; }
.form-control { padding: 0.4rem 0.6rem; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 1rem; }
.form-control:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px #bfdbfe; }
.hint { font-size: 0.85rem; color: #64748b; }
.field-error { color: #dc2626; font-size: 0.82rem; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar { background: #1e3a5f; color: #fff; padding: 0.75rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.navbar-brand { color: #fff; font-size: 1.25rem; font-weight: 700; }
.navbar-brand:hover { text-decoration: none; }
.navbar-links { display: flex; gap: 1rem; align-items: center; flex: 1; }
.navbar-links a { color: #93c5fd; font-size: 0.95rem; }
.navbar-links a:hover { color: #fff; text-decoration: none; }
.badge-notif { background: #ef4444; color: #fff; border-radius: 99px; padding: 0 0.4rem; font-size: 0.75rem; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary { background: #2563eb; color: #fff; border: none; padding: 0.5rem 1.2rem; border-radius: 4px; cursor: pointer; font-size: 0.95rem; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #e2e8f0; color: #1e293b; border: none; padding: 0.5rem 1.2rem; border-radius: 4px; cursor: pointer; font-size: 0.95rem; }
.btn-secondary:hover { background: #cbd5e1; }
.btn-danger { background: #dc2626; color: #fff; border: none; padding: 0.5rem 1.2rem; border-radius: 4px; cursor: pointer; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.82rem; }
.btn-fav { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: #f59e0b; }

/* ── Alerts / flash ───────────────────────────────────────────────────────── */
.alert { padding: 0.75rem 1rem; border-radius: 4px; margin: 0.75rem 0; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger  { background: #fee2e2; color: #991b1b; }
.alert-info    { background: #dbeafe; color: #1e40af; }
.alert-warning { background: #fef3c7; color: #92400e; }

/* ── Search panel ─────────────────────────────────────────────────────────── */
.search-panel { background: #fff; border-radius: 8px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.search-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.5rem; align-items: flex-end; }
.search-group { display: flex; flex-direction: column; gap: 0.25rem; }
.search-group label { font-size: 0.8rem; color: #64748b; font-weight: 600; }

/* ── View toggle ──────────────────────────────────────────────────────────── */
.view-toggle { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.view-toggle .btn-primary.active, .view-toggle .btn-secondary.active { outline: 2px solid #2563eb; }

/* ── Stats bar ────────────────────────────────────────────────────────────── */
.stats-bar { background: #1e3a5f; color: #93c5fd; padding: 0.4rem 0.8rem; border-radius: 4px; font-size: 0.9rem; display: inline-block; margin-bottom: 0.5rem; }
.page-header { margin-bottom: 1rem; }

/* ── Flyability colors ────────────────────────────────────────────────────── */
.flyability-green  { background: #dcfce7; color: #166534; border: 1px solid #86efac; border-radius: 6px; padding: 0.5rem 1rem; }
.flyability-yellow { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; border-radius: 6px; padding: 0.5rem 1rem; }
.flyability-red    { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; border-radius: 6px; padding: 0.5rem 1rem; }
.flyability-grey   { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0.5rem 1rem; }
.flyability-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.flyability-dot.flyability-green  { background: #22c55e; }
.flyability-dot.flyability-yellow { background: #eab308; }
.flyability-dot.flyability-red    { background: #ef4444; }
.flyability-dot.flyability-grey   { background: #94a3b8; }

/* ── Rating badges ────────────────────────────────────────────────────────── */
.rating-badge { padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.rating-1 { background: #dbeafe; color: #1e40af; }
.rating-2 { background: #dcfce7; color: #166534; }
.rating-3 { background: #fef9c3; color: #854d0e; }
.rating-4 { background: #fee2e2; color: #991b1b; }
.rating-5 { background: #2d1b69; color: #e9d5ff; }
.cat-tag { background: #e2e8f0; color: #475569; padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.78rem; margin-left: 0.25rem; }

/* ── Site header ──────────────────────────────────────────────────────────── */
.site-header { margin-bottom: 1.5rem; }
.site-title-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.site-meta { display: flex; gap: 1rem; align-items: center; font-size: 0.9rem; color: #64748b; margin-bottom: 0.5rem; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid #e2e8f0; margin-bottom: 1rem; }
.tab-btn { background: none; border: none; padding: 0.6rem 1.2rem; cursor: pointer; font-size: 0.95rem; color: #64748b; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab-btn.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Forecast grid ────────────────────────────────────────────────────────── */
.forecast-grid { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; }
.forecast-day { min-width: 140px; }
.forecast-day h3 { font-size: 0.85rem; margin-bottom: 0.3rem; color: #475569; }
.hour-blocks { display: flex; flex-wrap: wrap; gap: 2px; }
.hour-block { width: 28px; height: 28px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; cursor: default; }
.hour-label { font-size: 0.6rem; }
.hour-green  { background: #22c55e; color: #fff; }
.hour-yellow { background: #eab308; color: #fff; }
.hour-red    { background: #ef4444; color: #fff; }
.hour-grey   { background: #e2e8f0; color: #94a3b8; }
.forecast-legend { margin-top: 0.5rem; font-size: 0.85rem; display: flex; gap: 0.5rem; align-items: center; }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.sites-table, .admin-table, .wind-table, .zones-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.sites-table th, .admin-table th, .wind-table th, .zones-table th { background: #1e3a5f; color: #fff; padding: 0.6rem 0.8rem; text-align: left; font-size: 0.85rem; }
.sites-table td, .admin-table td, .wind-table td, .zones-table td { padding: 0.5rem 0.8rem; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; }
.sites-table tr:hover, .admin-table tr:hover { background: #f8fafc; }
.job-error td { color: #dc2626; }
.status-active   { color: #166534; font-weight: 600; }
.status-pending  { color: #854d0e; }
.status-rejected { color: #991b1b; }
.role-admin { color: #2563eb; font-weight: 600; }
.zone-type-start   { color: #166534; }
.zone-type-landing { color: #1e40af; }

/* ── Image gallery ────────────────────────────────────────────────────────── */
.image-gallery { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.gallery-thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 4px; }
.gallery-item { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }

/* ── Admin ────────────────────────────────────────────────────────────────── */
.admin-stats { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.stat-card { background: #fff; border-radius: 8px; padding: 1.2rem 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); min-width: 140px; text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 700; color: #1e3a5f; }
.stat-label { font-size: 0.85rem; color: #64748b; }
.stat-warn .stat-number { color: #dc2626; }
.admin-nav { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.pending-card { background: #fff; border-radius: 8px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pending-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; align-items: center; flex-wrap: wrap; }

/* ── User dashboard ───────────────────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.dashboard-card { background: #fff; border-radius: 8px; padding: 1.2rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dashboard-card h2 { font-size: 1.1rem; margin-bottom: 0.75rem; color: #1e3a5f; }
.fav-list { list-style: none; }
.fav-list li { display: flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0; border-bottom: 1px solid #f1f5f9; }
.notif-list { list-style: none; max-height: 300px; overflow-y: auto; }
.notif-list li { padding: 0.4rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.88rem; }
.notif-list li.unread { font-weight: 600; }
.notif-type { font-size: 0.75rem; background: #dbeafe; color: #1e40af; padding: 0.1rem 0.3rem; border-radius: 3px; margin-right: 0.3rem; }

/* ── Error pages ──────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 5rem 1rem; }
.error-page h1 { font-size: 5rem; color: #94a3b8; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer { background: #1e3a5f; color: #93c5fd; text-align: center; padding: 1rem; margin-top: 3rem; font-size: 0.85rem; }
.footer a { color: #bfdbfe; }

/* ── Site detail — two-column layout (three when live widget present) ───── */
.detail-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; margin-bottom: 1.5rem; }
.detail-has-live { grid-template-columns: 210px 1fr 1fr; }
@media (max-width: 900px) { .detail-columns, .detail-has-live { grid-template-columns: 1fr; } }
.detail-section { background: #fff; border-radius: 8px; padding: 1.2rem; box-shadow: 0 1px 3px rgba(0,0,0,.07); margin-bottom: 1rem; }
.detail-section h2 { font-size: 1rem; color: #1e3a5f; margin-bottom: 0.75rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.4rem; }
.detail-map-section { padding: 1.2rem; }
.site-meta-row { display: flex; gap: 1.2rem; font-size: 0.88rem; color: #64748b; margin: 0.3rem 0 0.6rem; flex-wrap: wrap; }
.site-description { color: #374151; line-height: 1.6; }

/* Wind condition cards */
.wind-cards { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.wind-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 0.8rem; min-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.wind-card-level { font-weight: 600; font-size: 0.85rem; color: #1e3a5f; }
.wind-card-speed { font-size: 0.95rem; color: #374151; }
.wind-card-dirs { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.75rem; text-align: center; }
.dir-green  { color: #16a34a; }
.dir-yellow { color: #ca8a04; }

/* Zone cards */
.zone-cards { display: flex; flex-direction: column; gap: 0.5rem; }
.zone-card { background: #f8fafc; border-radius: 6px; padding: 0.7rem 0.9rem; border-left: 4px solid #94a3b8; }
.zone-card-start   { border-left-color: #22c55e; }
.zone-card-landing { border-left-color: #3b82f6; }
.zone-card-header  { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.zone-type-badge { font-size: 0.78rem; font-weight: 600; }
.zone-type-badge.zone-type-start   { color: #16a34a; }
.zone-type-badge.zone-type-landing { color: #1d4ed8; }
.diff-badge { font-size: 0.72rem; padding: 0.1rem 0.35rem; border-radius: 3px; }
.diff-beginner     { background: #dcfce7; color: #166534; }
.diff-intermediate { background: #fef9c3; color: #854d0e; }
.diff-pro          { background: #fee2e2; color: #991b1b; }
.zone-card-name   { font-weight: 600; font-size: 0.9rem; color: #1e293b; }
.zone-card-notes  { font-size: 0.82rem; color: #64748b; margin-top: 0.2rem; line-height: 1.4; }
.zone-card-coords { font-size: 0.75rem; color: #94a3b8; margin-top: 0.3rem; font-family: monospace; }

/* Map legend */
.map-legend { margin-top: 0.6rem; font-size: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; color: #64748b; }
.legend-item { padding: 0.15rem 0.5rem; border-radius: 3px; font-size: 0.76rem; }
.legend-beginner     { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.legend-intermediate { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.legend-pro          { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Site list page — card grid ───────────────────────────────────────────── */
.list-filter-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.list-filter-bar input, .list-filter-bar select { padding: 0.4rem 0.6rem; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 0.9rem; background: #fff; }
.site-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.site-card { background: #fff; border-radius: 8px; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; gap: 0.75rem; align-items: flex-start; color: #1e293b; text-decoration: none; transition: box-shadow 0.15s; border: 1px solid transparent; }
.site-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); border-color: #93c5fd; text-decoration: none; }
.site-card-body { flex: 1; min-width: 0; }
.site-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.3rem; }
.site-card-name { font-weight: 600; font-size: 1rem; color: #1e3a5f; }
.site-card-cats { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.4rem; }
.cat-tag-sm { font-size: 0.72rem; }
.site-card-desc { font-size: 0.83rem; color: #64748b; line-height: 1.45; margin-bottom: 0.5rem; }
.site-card-stats { display: flex; gap: 0.75rem; font-size: 0.8rem; color: #94a3b8; flex-wrap: wrap; }
.fly-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 0.2rem; }
.fly-dot-green  { background: #22c55e; }
.fly-dot-yellow { background: #eab308; }
.fly-dot-red    { background: #ef4444; }
.fly-dot-grey   { background: #cbd5e1; }

/* ── Admin wide form layout ───────────────────────────────────────────────── */
.admin-form-cols { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.admin-form-main { flex: 1; min-width: 300px; }
.admin-form-map  { flex: 1.4; min-width: 320px; }

/* ── Toggle switch ────────────────────────────────────────────────────────── */
.toggle-label { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; user-select: none; font-size: .9rem; }
.toggle-label input[type=checkbox] { display: none; }
.toggle-track { width: 38px; height: 20px; background: #cbd5e1; border-radius: 20px; position: relative; transition: background .2s; flex-shrink: 0; }
.toggle-track::after { content:''; position:absolute; top:3px; left:3px; width:14px; height:14px; background:#fff; border-radius:50%; transition: transform .2s; }
.toggle-label input:checked + .toggle-track { background: #22c55e; }
.toggle-label input:checked + .toggle-track::after { transform: translateX(18px); }

/* ── Admin nav link ───────────────────────────────────────────────────────── */
.nav-admin { color: #f59e0b !important; font-weight: 600; }

/* ── Job status row colours (admin tables) ────────────────────────────────── */
.job-ok    { background: rgba(34,197,94,.06); }
.job-error { background: rgba(239,68,68,.07); }

/* ── Status badges ────────────────────────────────────────────────────────── */
.status-active   { color: #16a34a; font-weight: 600; }
.status-pending  { color: #ca8a04; font-weight: 600; }
.status-rejected { color: #dc2626; font-weight: 600; }

/* ── Admin site edit two-column layout ───────────────────────────────────── */
.admin-edit-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.admin-edit-left { flex: 1; min-width: 0; max-width: 700px; }
.admin-edit-map-col { flex: 0 0 420px; }
.admin-map-sticky { position: sticky; top: 1rem; }
.admin-section { background: #fff; border-radius: 8px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 1.25rem; }
.admin-section h2 { font-size: 1.05rem; margin-bottom: .75rem; color: #1e3a5f; }
.zone-row { cursor: pointer; transition: background .15s; }
.zone-row:hover { background: #eff6ff; }
@media (max-width: 900px) {
  .admin-edit-layout { flex-direction: column; }
  .admin-edit-map-col { flex: none; width: 100%; }
  .admin-map-sticky { position: static; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Site Editor — full-screen split layout
   ══════════════════════════════════════════════════════════════════════════ */
.site-editor-main { padding: 0; max-width: 100%; }
.site-editor-layout { display: flex; height: calc(100vh - 56px); overflow: hidden; }

/* Left panel — scrollable forms */
.site-editor-panel {
  width: 440px; min-width: 280px; overflow-y: auto;
  background: #f1f5f9; border-right: 1px solid #e2e8f0;
  display: flex; flex-direction: column;
}

/* Right panel — full-height map */
.site-editor-map-panel {
  flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative;
}
#site-map { flex: 1; min-height: 0; }

/* ── Editor header ─────────────────────────────────────────────────────── */
.editor-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 1rem; background: #1e3a5f; color: #fff;
  flex-shrink: 0; gap: .5rem; flex-wrap: wrap;
}
.editor-title {
  font-size: 1rem; font-weight: 600; margin: 0; color: #fff;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.editor-header-actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* ── Toast notifications ───────────────────────────────────────────────── */
.editor-toast {
  margin: .4rem .75rem; padding: .45rem .75rem;
  border-radius: 5px; font-size: .88rem; font-weight: 500; flex-shrink: 0;
}
.toast-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.toast-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.toast-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ── Accordion sections ────────────────────────────────────────────────── */
.editor-section { background: #fff; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; }
.editor-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1rem; font-weight: 600; font-size: .88rem;
  cursor: pointer; user-select: none; color: #1e293b; background: #f8fafc;
}
.editor-section-head:hover { background: #eff6ff; }
.editor-section-body { padding: .75rem 1rem; }
.sec-chevron { font-size: .7rem; color: #94a3b8; flex-shrink: 0; }
.count-badge {
  background: #e2e8f0; color: #475569; font-size: .7rem;
  padding: .05rem .4rem; border-radius: 10px; font-weight: 700; margin-left: .3rem;
}

/* ── Zone edit cards ───────────────────────────────────────────────────── */
.zone-edit-card {
  border: 1px solid #e2e8f0; border-radius: 6px;
  margin-bottom: .45rem; overflow: hidden; background: #fff;
}
.zone-edit-card:hover { border-color: #93c5fd; }
.zone-card-row {
  display: flex; align-items: center; gap: .45rem;
  padding: .45rem .65rem; cursor: pointer; user-select: none;
}
.zone-card-row:hover { background: #eff6ff; }
.zone-expand { padding: .65rem .75rem; border-top: 1px solid #e2e8f0; background: #f8fafc; }

.zone-type-icon { font-size: .95rem; width: 1.4rem; text-align: center; flex-shrink: 0; }
.zone-icon-start       { color: #16a34a; }
.zone-icon-landing     { color: #1d4ed8; }
.zone-icon-flying_area { color: #7c3aed; }

.zone-card-label {
  flex: 1; font-weight: 500; font-size: .86rem;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Small difficulty pill (reuses diff-beginner etc. from public card section) */
.diff-mini {
  font-size: .68rem; font-weight: 700; padding: .1rem .3rem;
  border-radius: 3px; flex-shrink: 0;
}

.poly-indicator { color: #7c3aed; font-size: .8rem; flex-shrink: 0; }
.zone-del-btn   { flex-shrink: 0; margin-left: auto; }
.polygon-row    { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .4rem 0; }

.new-zone-card { border-color: #93c5fd; background: #eff6ff; }

/* ── Map toolbar ───────────────────────────────────────────────────────── */
.map-toolbar {
  display: flex; align-items: center; gap: .65rem; padding: .35rem .75rem;
  background: #fff; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; flex-wrap: wrap;
}
.map-legend-mini {
  display: flex; align-items: center; gap: .45rem;
  font-size: .78rem; color: #64748b;
}
.legend-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0; margin-right: 1px;
}

/* ── Responsive: stack vertically on mobile ────────────────────────────── */
@media (max-width: 768px) {
  .site-editor-layout { flex-direction: column; height: auto; overflow: visible; }
  .site-editor-panel  { width: 100%; border-right: none; border-bottom: 1px solid #e2e8f0; max-height: 55vh; }
  .site-editor-map-panel { height: 50vh; }
  #site-map { height: 100%; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Compact search bar (front page)
   ══════════════════════════════════════════════════════════════════════════ */
.search-bar {
  background: #fff; border-radius: 8px; padding: .5rem .75rem;
  margin-bottom: .5rem; box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.sb-row {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.sb-group { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.sb-location { flex: 1; min-width: 240px; }
.sb-coord { width: 76px; padding: .25rem .4rem; font-size: .82rem;
            border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; }
.sb-sep { width: 1px; height: 16px; background: #e2e8f0; margin: 0 .15rem; }
.sb-inline-label { font-size: .78rem; color: #64748b; white-space: nowrap; }
.sb-select {
  padding: .25rem .4rem; font-size: .82rem; border: 1px solid #cbd5e1;
  border-radius: 4px; background: #fff; cursor: pointer;
}
.sb-check-label {
  display: flex; align-items: center; gap: .2rem;
  font-size: .8rem; color: #374151; cursor: pointer; white-space: nowrap;
}
.sb-cats { gap: .4rem; }
.sb-flyable { font-weight: 600; color: #16a34a; }
.sb-stats {
  font-size: .8rem; color: #64748b; padding: .15rem 0 0; margin-top: .15rem;
  border-top: 1px solid #f1f5f9;
}
#max-km { width: 80px; cursor: pointer; accent-color: #2563eb; }
.sb-layer { margin-left: auto; }

/* Tooltip on site markers */
.site-map-tooltip { font-size: .85rem; line-height: 1.45; }

/* ══════════════════════════════════════════════════════════════════════════
   Site detail — current conditions strip
   ══════════════════════════════════════════════════════════════════════════ */
.current-conditions {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  margin-top: .5rem; padding: .5rem .8rem;
  background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0;
}
.fly-status {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .7rem; border-radius: 5px; font-weight: 600; font-size: .9rem;
}
.fly-status-green  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.fly-status-yellow { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.fly-status-red    { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.fly-status-grey   { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.fly-status .confidence { font-weight: 400; font-size: .82rem; opacity: .8; }

.current-wind {
  display: flex; align-items: center; gap: .3rem; font-size: .95rem;
}
.cw-speed { font-weight: 700; font-size: 1.05rem; color: #1e293b; }
.cw-arrow {
  font-size: 1.2rem; display: inline-block; line-height: 1;
  color: #2563eb; transition: transform .3s;
}
.cw-dir { color: #64748b; font-size: .85rem; }
.cw-meta { font-size: .75rem; color: #94a3b8; }

/* Holfuy section — fits the 210px column */
.holfuy-section { padding: .75rem; }
.holfuy-section iframe { max-width: 100%; }


/* ══════════════════════════════════════════════════════════════════════════
   Wind direction drag editor (admin wind form)
   ══════════════════════════════════════════════════════════════════════════ */
.wind-editor-card { max-width: 680px; }
.wind-dir-editor {
  display: flex; gap: 1.5rem; margin: 1rem 0; align-items: flex-start; flex-wrap: wrap;
}
.wind-dir-compass { flex-shrink: 0; }
.wind-dir-inputs  { flex: 1; min-width: 200px; }
.arc-group        { background: #f8fafc; border-radius: 6px; padding: .75rem; border: 1px solid #e2e8f0; }
.arc-group-title  {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .88rem; margin-bottom: .5rem; color: #1e293b;
}
.arc-swatch {
  display: inline-block; width: 14px; height: 14px;
  border-radius: 3px; flex-shrink: 0;
}

/* Source label + Holfuy note in current conditions strip */
.cw-source {
  font-size: .7rem; color: #94a3b8; background: #f1f5f9;
  padding: .05rem .35rem; border-radius: 3px; font-weight: 500;
}
.cw-source-live  { background: #dcfce7; color: #166534; }
.cw-source-model { background: #f1f5f9; color: #64748b; }
.cw-holfuy-note {
  font-size: .78rem; color: #ca8a04; font-weight: 500;
}

@media (max-width: 520px) {
  .wind-dir-editor { flex-direction: column; }
  .wind-dir-compass { align-self: center; }
}
