
.app-shell { display:grid; grid-template-columns: 280px minmax(0,1fr); min-height: calc(100vh - 73px); }
.sidebar {
  position: sticky;
  top: 73px;
  align-self: start;
  height: calc(100vh - 73px);
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(5,22,18,.72);
  backdrop-filter: blur(16px);
}
.sidebar-user { padding: 16px; margin-bottom: 14px; }
.sidebar-user h3 { margin: 0 0 4px; }
.side-nav { display:grid; gap:8px; }
.side-nav a, .side-nav button {
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,.88);
  font-weight: 850;
  cursor: pointer;
}
.side-nav a.active, .side-nav a:hover, .side-nav button:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}
.app-main { padding: 22px; min-width: 0; }
.app-top { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.app-top h1 { margin:0; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing:-.06em; line-height:1; }
.grid { display:grid; gap:16px; }
.dashboard-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.content-grid { grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr); }
.card { padding:18px; }
.stat strong { display:block; color:var(--brand); font-size:2rem; }
.list { display:grid; gap:10px; }
.item { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); padding:12px 0; }
.item:last-child{border-bottom:0;}
.item span { color:var(--muted); font-size:.88rem; }
.map-card { padding:0; overflow:hidden; min-height:520px; }
.map-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px; }
.map-canvas { height:470px; background: linear-gradient(135deg, rgba(122,201,67,.22), rgba(20,80,67,.72)), url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1600&q=80") center/cover; position:relative; }
.pin { position:absolute; width:18px; height:18px; border-radius:50%; background:var(--brand); box-shadow:0 0 0 8px rgba(122,201,67,.22); }
.pin.one { left:30%; top:35%; } .pin.two { left:64%; top:50%; } .pin.three { left:50%; top:68%; }
.form-grid { display:grid; gap:12px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width:100%;
  border:1px solid rgba(255,255,255,.18);
  border-radius:14px;
  background:rgba(255,255,255,.08);
  color:#fff;
  padding:13px 14px;
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns:1fr; }
  .sidebar { position:relative; top:auto; height:auto; border-right:0; border-bottom:1px solid var(--line); }
  .side-nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid,.content-grid { grid-template-columns:1fr; }
}
@media (max-width: 560px) {
  .app-main{padding:14px;}
  .side-nav{grid-template-columns:1fr;}
  .app-top{flex-direction:column;}
}

#full-map {
  height: 640px;
  width: 100%;
  filter: saturate(.85) brightness(.88);
}
@media (max-width: 700px) {
  #full-map { height: 520px; }
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(5,22,18,.66);
  border-bottom: 1px solid var(--line);
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-size: .78rem;
  font-weight: 850;
}
.marker-dot {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255,255,255,.08);
}
.marker-dot.my { background: #7ac943; }
.marker-dot.public { background: #2f80ed; }
.marker-dot.community { background: #56ccf2; }
.marker-dot.rare { background: #f2c94c; }
.marker-dot.group { background: #bb6bd9; }
.marker-dot.alert { background: #eb5757; }
.map-legend-full {
  border-top: 1px solid var(--line);
}
.custom-pin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: 0 0 0 6px rgba(122,201,67,.18), 0 8px 18px rgba(0,0,0,.38);
}
.custom-pin.my { background: #7ac943; }
.custom-pin.public { background: #2f80ed; }
.custom-pin.community { background: #56ccf2; }
.custom-pin.rare { background: #f2c94c; }
.custom-pin.group { background: #bb6bd9; }
.custom-pin.alert { background: #eb5757; }
@media (max-width: 560px) {
  .map-legend { gap: 6px; padding: 8px; }
  .map-legend span { font-size: .72rem; padding: 6px 8px; }
}

/* Compact mobile web-app dashboard */
@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    padding: 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line);
  }
  .sidebar > .brand {
    margin-bottom: 10px;
  }
  .sidebar-user {
    padding: 12px !important;
    margin-bottom: 10px !important;
  }
  .sidebar-user h3 { font-size: 1rem; }
  .sidebar-user p { font-size: .85rem; margin-bottom: 0; }
  .side-nav {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }
  .side-nav a, .side-nav button {
    flex: 0 0 auto;
    min-width: auto;
    white-space: nowrap;
    padding: 10px 12px !important;
    font-size: .9rem;
    scroll-snap-align: start;
  }
  .app-main { padding: 14px !important; }
  .app-top {
    flex-direction: row !important;
    align-items: center !important;
  }
  .app-top h1 {
    font-size: clamp(1.85rem, 8vw, 2.6rem) !important;
  }
}
@media (max-width: 560px) {
  .sidebar {
    padding: 10px !important;
  }
  .sidebar .brand .logo {
    width: 34px;
    height: 34px;
  }
  .sidebar-user {
    display: none;
  }
  .side-nav a, .side-nav button {
    font-size: .82rem;
    padding: 8px 10px !important;
  }
  .app-top {
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .app-top .pill {
    font-size: .68rem;
    padding: 5px 8px;
  }
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .card { padding: 14px !important; }
  #full-map { height: 440px !important; }
  .map-card { min-height: auto !important; }
}

/* Dashboard real map + signed-in mobile fixes */
#dashboard-map {
  height: 470px;
  width: 100%;
  filter: saturate(.85) brightness(.88);
  background: #17352f;
}
.dashboard-legend {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(5,22,18,.66);
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-size: .78rem;
  font-weight: 850;
}
.marker-dot {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255,255,255,.08);
}
.marker-dot.my { background: #7ac943; }
.marker-dot.public { background: #2f80ed; }
.marker-dot.community { background: #56ccf2; }
.marker-dot.rare { background: #f2c94c; }
.marker-dot.group { background: #bb6bd9; }
.marker-dot.alert { background: #eb5757; }
.custom-pin {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: 0 0 0 6px rgba(122,201,67,.18), 0 8px 18px rgba(0,0,0,.38);
}
.custom-pin.my { background: #7ac943; }
.custom-pin.public { background: #2f80ed; }
.custom-pin.community { background: #56ccf2; }
.custom-pin.rare { background: #f2c94c; }
.custom-pin.group { background: #bb6bd9; }
.custom-pin.alert { background: #eb5757; }

@media (max-width: 560px) {
  #dashboard-map {
    height: 360px !important;
  }
  .map-head {
    align-items: center;
  }
  .map-head .btn {
    width: auto;
    min-width: 88px;
    padding: 10px 12px;
  }
  .map-legend {
    gap: 6px;
    padding: 8px;
  }
  .map-legend span {
    font-size: .7rem;
    padding: 6px 7px;
  }
}

/* Phase 2 complete additions */
.filter-row,.quick-row{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.filter-chip{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.08);color:#fff;border-radius:999px;padding:8px 10px;font-weight:850;cursor:pointer}
.filter-chip.active{background:var(--brand);color:var(--brand-dark)}
.split-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);gap:16px}
.find-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.find-card{padding:14px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.07)}
.find-thumb{height:130px;border-radius:14px;margin-bottom:12px;background:linear-gradient(135deg,rgba(122,201,67,.22),rgba(20,80,67,.72)),url("https://images.unsplash.com/photo-1470114716159-e389f8712fda?auto=format&fit=crop&w=900&q=80") center/cover}
.notice{padding:12px 14px;border-radius:16px;background:rgba(122,201,67,.12);border:1px solid rgba(122,201,67,.25);color:var(--muted)}
.alert-card{border-left:4px solid #eb5757}.rare-card{border-left:4px solid #f2c94c}.group-card{border-left:4px solid #bb6bd9}
#dashboard-map,#full-map,#caution-map{min-height:420px;width:100%;background:#17352f}
@media(max-width:800px){.split-grid{grid-template-columns:1fr}.find-card-grid{grid-template-columns:1fr}}
@media(max-width:560px){.filter-row{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}.filter-chip{flex:0 0 auto;font-size:.78rem}}

.sync-status{display:grid;gap:8px}
.sync-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.sync-row:last-child{border-bottom:0}
.sync-row strong{color:#fff}.sync-row span{color:var(--muted);text-align:right}
@media(max-width:560px){#dashboard-map,#full-map{min-height:360px!important}.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Cleaner dashboard ad placement */
.dashboard-side-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .65fr);
  gap: 16px;
}
.dashboard-side-pair .ad-slot {
  width: 100%;
  margin: 0;
  min-height: 180px;
}
.dashboard-side-pair .ad-slot ins {
  min-height: 120px;
}
.dashboard-top-ad {
  display: none !important;
}
@media (max-width: 900px) {
  .dashboard-side-pair {
    grid-template-columns: 1fr;
  }
  .dashboard-side-pair .ad-slot {
    min-height: 100px;
  }
}

/* Keep the dashboard ad compact beside Recent Finds */
.dashboard-side-pair .ad-slot {
  min-height: 110px !important;
  max-height: 180px;
}
@media (max-width: 900px) {
  .dashboard-side-pair .ad-slot {
    min-height: 80px !important;
  }
}
