/* assets/css/style.css */
:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,0.08);
  --card2: rgba(255,255,255,0.12);
  --text: #f3f6ff;
  --muted: rgba(243,246,255,0.75);
  --border: rgba(255,255,255,0.18);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --primary: #4f8cff;
  --danger: #ff4d4d;
}

*{ box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(79,140,255,0.30), transparent 60%),
              radial-gradient(900px 450px at 80% 20%, rgba(255,77,166,0.20), transparent 55%),
              var(--bg);
  color: var(--text);
}

.topbar{
  display:flex;
  gap:16px;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
}

.title-wrap h1{
  margin:0;
  font-size: 20px;
}
.subtitle{
  margin:6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.container{
  padding: 16px;
}

#map{
  width: 100%;
  height: calc(100vh - 110px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.10);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
}

.btn-primary{
  background: rgba(79,140,255,0.22);
  border-color: rgba(79,140,255,0.40);
}
.btn-secondary{
  background: rgba(255,255,255,0.10);
}
.btn-danger{
  background: rgba(255,77,77,0.18);
  border-color: rgba(255,77,77,0.35);
}
.btn-admin{
  padding: 9px 12px;
  font-size: 13px;
}

.empty-state{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.25);
  color: var(--muted);
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
}

.hidden{ display:none !important; }

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 9999;
}

.modal-content{
  width: min(520px, 100%);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 16px;
}

.modal-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.modal-header h2{
  margin:0;
  font-size: 18px;
}

.icon-btn{
  border:none;
  background: rgba(255,255,255,0.10);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor:pointer;
  font-size: 20px;
}

.label{
  display:block;
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.input{
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.20);
  color: var(--text);
  outline: none;
}

.modal-actions{
  display:flex;
  gap:10px;
  margin-top: 14px;
}

.hint{
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

/* Admin page */
.admin .card{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  max-width: 820px;
}

.note{
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.16);
  color: var(--muted);
}

.upload-form{
  margin-top: 12px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.alert{
  max-width: 820px;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  background: rgba(255,255,255,0.08);
}
.alert-success{
  border-color: rgba(46,204,113,0.35);
  background: rgba(46,204,113,0.12);
}
.alert-error{
  border-color: rgba(255,77,77,0.40);
  background: rgba(255,77,77,0.12);
}

/* Leaflet label inside circle */
.marker-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;

  color: #ffffff !important;
  font-weight: 800;
  font-size: 13px;

  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;

  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}



/* Popup */
.popup{ min-width: 210px; }
.popup-title{
  font-weight: 800;
  margin-bottom: 8px;
}
.popup-row{
  display:flex;
  gap: 8px;
  margin: 4px 0;
}
.popup-row .k{ color: #333; font-weight: 700; }
.popup-row .v{ color: #111; }
.leaflet-popup-content-wrapper{
  border-radius: 14px !important;
}
.cluster-icon {
  background: rgba(0, 123, 255, 0.85);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.cluster-total {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-weight: 900;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
