:root{
  --bg0:#0b0705;
  --bg1:#120b07;
  --panel:#140c07cc;
  --panel2:#1a1009cc;
  --border:#c7a15c33;
  --border2:#c7a15c22;
  --text:#f3efe7;
  --muted:#d2c7b7cc;

  --brown:#6b3f1c;
  --brown2:#8b5a2b;
  --gold:#c7a15c;
  --ok:#12b981;
  --warn:#f59e0b;
  --bad:#ef4444;

  --shadow: 0 22px 70px rgba(0,0,0,.55);
  --r16: 16px;
  --r14: 14px;
  --r12: 12px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html,body{
  margin:0; height:100%;
  background: radial-gradient(1200px 700px at 18% 10%, rgba(199,161,92,.18), transparent 60%),
              radial-gradient(900px 600px at 80% 0%, rgba(139,90,43,.16), transparent 55%),
              linear-gradient(180deg,var(--bg0),var(--bg1));
  color:var(--text);
  font-family:var(--sans);
  overflow:hidden;
}
.app{ position:relative; width:100vw; height:100vh; }

.header{
  position:absolute; left:0; right:0; top:0;
  height:72px; z-index: 99999;
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(20,12,7,.92), rgba(20,12,7,.65));
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(10px);
}
.brand{ display:flex; align-items:center; gap:12px; min-width: 260px; }
.brand img{ width:44px; height:44px; object-fit:contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,.45)); }
.brand .title{ line-height:1.12; }
.brand .title .top{
  font-weight:900; letter-spacing:.12em; text-transform:uppercase;
  color: rgba(199,161,92,.95); font-size: 12px;
}
.brand .title .bot{ font-weight:800; font-size: 16px; color: rgba(243,239,231,.98); }
.brand .title .sub{ margin-top:2px; font-size: 12px; color: var(--muted); letter-spacing:.02em; }

.header-center{
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border:1px solid var(--border2);
  border-radius: 999px;
  background: rgba(15,9,6,.35);
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 6px 10px;
  border:1px solid var(--border2);
  border-radius: 999px;
  background: rgba(139,90,43,.14);
  color: rgba(243,239,231,.92);
  font-size: 12px;
}
.dot{ width:8px; height:8px; border-radius:999px; background: var(--warn); box-shadow:0 0 18px rgba(245,158,11,.4); }
.dot.ok{ background: var(--ok); box-shadow:0 0 18px rgba(18,185,129,.35); }
.dot.bad{ background: var(--bad); box-shadow:0 0 18px rgba(239,68,68,.35); }

.header-right{ display:flex; align-items:center; justify-content:flex-end; gap:12px; min-width: 260px; }
.header-right img{ width:40px; height:40px; object-fit:contain; }

#map{ position:absolute; left:0; right:0; top:72px; bottom:0; z-index:0; }

.panel{
  position:absolute; top: 86px; left: 14px;
  width: 480px; max-width: calc(100vw - 28px);
  max-height: calc(100vh - 100px);
  z-index: 99990;
  border-radius: var(--r16);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.panel-top{
  padding: 12px 12px;
  border-bottom:1px solid var(--border2);
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.kicker{
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(199,161,92,.95); font-weight: 900;
}
.h1{ font-size: 16px; font-weight: 900; letter-spacing:.02em; }
.desc{ font-size:12px; color: var(--muted); }

.panel-body{
  padding: 12px;
  overflow:auto;
  max-height: calc(100vh - 168px);
}
.grid2{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.grid3{ display:grid; grid-template-columns: 1fr 1fr 1fr; gap:10px; }

.card{
  border:1px solid var(--border2);
  border-radius: var(--r14);
  background: rgba(10,6,4,.35);
  padding: 10px;
}
.card h3{
  margin:0 0 8px 0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing:.02em;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  color: rgba(243,239,231,.96);
}
.small{ font-size: 11px; color: var(--muted); }
.mono{ font-family: var(--mono); }
.pre{ white-space: pre-wrap; }

label{ display:block; font-size: 12px; color: rgba(243,239,231,.86); }
input, select, textarea{
  width:100%; margin-top:6px; padding: 10px 10px;
  border-radius: 12px;
  border:1px solid rgba(199,161,92,.22);
  background: rgba(6,4,3,.65);
  color: rgba(243,239,231,.95);
  outline:none;
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(199,161,92,.45);
  box-shadow: 0 0 0 4px rgba(199,161,92,.12);
}

.btnrow{ display:flex; gap:10px; flex-wrap: wrap; }
.btn{
  cursor:pointer; user-select:none;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid rgba(199,161,92,.22);
  background: rgba(139,90,43,.18);
  color: rgba(243,239,231,.95);
  font-weight: 900;
  letter-spacing:.03em;
  box-shadow: 0 12px 35px rgba(0,0,0,.35);
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{ background: rgba(139,90,43,.26); border-color: rgba(199,161,92,.32); }
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: linear-gradient(180deg, rgba(199,161,92,.95), rgba(139,90,43,.95));
  border-color: rgba(199,161,92,.35);
  color:#1a0f08;
}
.btn-primary:hover{
  background: linear-gradient(180deg, rgba(220,178,101,.98), rgba(156,103,52,.98));
}
.btn-ok{ background: linear-gradient(180deg, rgba(18,185,129,.95), rgba(5,150,105,.95)); border-color: rgba(16,185,129,.35); }
.btn-ok:hover{ background: linear-gradient(180deg, rgba(34,211,153,.98), rgba(16,185,129,.98)); }
.btn-indigo{ background: linear-gradient(180deg, rgba(99,102,241,.95), rgba(79,70,229,.95)); border-color: rgba(99,102,241,.35); }
.btn-indigo:hover{ background: linear-gradient(180deg, rgba(129,140,248,.98), rgba(99,102,241,.98)); }
.btn-ghost{ background: rgba(6,4,3,.55); border-color: rgba(199,161,92,.18); }
.btn-ghost:hover{ background: rgba(6,4,3,.8); }

.divider{ height:1px; background: rgba(199,161,92,.16); margin:10px 0; }

.leaflet-control-attribution{ display:none; }
.drop-hover{
  filter: drop-shadow(0 0 14px rgba(199,161,92,.55)) drop-shadow(0 0 24px rgba(245,158,11,.35));
  transform: scale(1.08);
  transition: transform .08s ease;
}

@media (max-width: 520px){
  .panel{ width: calc(100vw - 28px); }
  .header-center{ display:none; }
  .grid2{ grid-template-columns: 1fr; }
  .grid3{ grid-template-columns: 1fr; }
  .brand{ min-width: 0; }
  .header-right{ min-width: 0; }
}
