:root{
  --accent:#d9534f;
  --bg:#f7f9fc;
  --card:#ffffff;
  --muted:#666;
  --shadow: 0 6px 20px rgba(20,20,40,0.06);
  --glass: rgba(255,255,255,0.7);
  --radius:14px;
}

*{box-sizing:border-box}
html,body,#map {height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, Arial, sans-serif;
  background: linear-gradient(180deg,#eef3fb,#f7f9fc);
  color:#222;
}

/* Top bar */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 18px;
  background:var(--card);
  box-shadow:var(--shadow);
  gap:12px;
}
.brand{font-weight:700}
.actions{display:flex;gap:8px}
.actions button, .actions a{
  border:0;padding:8px 12px;border-radius:8px;cursor:pointer;
  background:#0b69ff;color:white;text-decoration:none;font-weight:600;
}
.actions .emergency{background:var(--accent)}

/* Layout */
.container{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:16px;
  padding:18px;
  height: calc(100vh - 72px);
}
.map-section{
  position:relative;
  border-radius:12px;
  overflow:hidden;
  box-shadow:var(--shadow);
  background:var(--card);
}
#map{width:100%;height:100%}
.legend{
  position:absolute;left:10px;top:10px;padding:8px 10px;border-radius:8px;
  background:rgba(255,255,255,0.9);box-shadow:0 6px 18px rgba(0,0,0,0.06);
  font-size:12px;color:var(--muted)
}

.panel{
  background:var(--card);padding:12px;border-radius:12px;box-shadow:var(--shadow);
  overflow:auto;
}
.report-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}
.report-item{
  padding:8px;border-radius:10px;background:linear-gradient(180deg,#fff,#fbfbff);
  border-left:4px solid #eee;display:flex;justify-content:space-between;gap:8px;
}
.report-item .meta{font-size:12px;color:var(--muted)}
.report-item button{background:none;border:1px solid #ddd;padding:6px;border-radius:8px;cursor:pointer}

/* Modal */
.modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(15,15,30,0.35);z-index:40}
.modal.hidden{display:none}
.modal-content{width:420px;background:var(--card);padding:14px;border-radius:12px;box-shadow:var(--shadow)}
.modal header{display:flex;justify-content:space-between;align-items:center}
.modal .close{background:none;border:0;font-size:20px;cursor:pointer}
.modal label{display:block;margin-top:10px;font-size:14px}
.modal input[type="text"], .modal textarea, .modal select, .modal input[type="file"]{
  width:100%;padding:10px;margin-top:6px;border-radius:8px;border:1px solid #e6e9ef;background:#fff
}
.modal .anon-row{margin-top:8px}
.location-row{display:flex;gap:10px;align-items:center;margin-top:8px}
.location-row button{padding:8px;border-radius:10px;border:0;background:#0b69ff;color:white}
.modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}
.primary{background:#0b69ff;color:white;padding:8px 12px;border-radius:10px;border:0;cursor:pointer}

.toast{
  position:fixed;right:18px;bottom:18px;padding:12px 16px;border-radius:12px;background:#111;color:#fff;box-shadow:var(--shadow);
}
.toast.hidden{display:none}

/* Responsive adjustments */
@media (max-width:900px){
  .container{grid-template-columns:1fr;grid-auto-rows:1fr 360px;height:calc(100vh - 72px)}
  .panel{height:360px}
  .modal-content{width:92%}
}
