
:root{
  --bg:#0b0f17;
  --card:#111827;
  --muted:#9ca3af;
  --text:#e5e7eb;
  --line:#1f2937;
  --accent:#60a5fa;
  --accent2:#34d399;
  --danger:#f87171;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% -10%, rgba(96,165,250,.15), transparent 60%),
              radial-gradient(800px 400px at 90% 10%, rgba(52,211,153,.12), transparent 60%),
              var(--bg);
  color:var(--text);
}
.wrap{max-width:1100px; margin:0 auto; padding:18px 16px;}
header h1{margin:10px 0 6px; font-size:28px; letter-spacing:.2px}
.sub{margin:0 0 8px; color:var(--muted); line-height:1.4}

/* --- Header with photo --- */
header.header{padding-top:22px; padding-bottom:6px}
.brandRow{display:flex; align-items:center; justify-content:space-between; gap:16px}
.brandText{min-width:0}
.avatar{
  width:88px; height:88px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
}
@media (max-width: 560px){
  .avatar{width:64px; height:64px}
  header h1{font-size:24px}
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  box-shadow: var(--shadow);
  margin:14px 0;
}
h2{margin:0 0 12px; font-size:18px}
.grid{display:grid; grid-template-columns: repeat(12, 1fr); gap:12px}
.col-12{grid-column: span 12}
.col-6{grid-column: span 6}
@media (max-width: 780px){
  .col-6{grid-column: span 12}
}
.field label{display:block; font-size:13px; color:var(--muted); margin:0 0 6px}
input, select{
  width:100%;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
  background: rgba(0,0,0,.25);
  color: var(--text);
  outline:none;
}
input:focus, select:focus{border-color: rgba(96,165,250,.7)}
.row{display:flex; gap:10px; align-items:center}
.row-wrap{flex-wrap:wrap}
.space-between{justify-content:space-between}
.btn{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
}
.btn:hover{border-color: rgba(96,165,250,.45)}
.btn.primary{
  border-color: rgba(96,165,250,.55);
  background: rgba(96,165,250,.12);
}
.btn:disabled{opacity:.5; cursor:not-allowed}
.hint{font-size:12px; color:var(--muted); margin-top:6px}
.muted{color:var(--muted)}
.pill{display:inline-flex; gap:8px; align-items:center; padding:8px 10px; border:1px solid var(--line); border-radius:999px; background: rgba(0,0,0,.18); font-size:13px}
.pill input, .pill select{width:auto; padding:6px 8px; border-radius:10px}
.checks{display:flex; flex-wrap:wrap; gap:8px}
.choices{border:1px solid var(--line); border-radius:12px; margin-top:8px; overflow:hidden}
.choice{
  padding:10px 12px;
  background: rgba(0,0,0,.18);
  border-top:1px solid rgba(255,255,255,.04);
  cursor:pointer;
}
.choice:hover{background: rgba(96,165,250,.08)}
.progress{
  margin-top:10px;
  width:100%;
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.06);
}
.progress .bar{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(96,165,250,.9), rgba(52,211,153,.9));
  transition: width .15s ease;
}
.status{margin-top:8px; font-size:12px; color:var(--muted)}
.stats{
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap:10px;
  margin:14px 0;
}
@media (max-width: 980px){ .stats{grid-template-columns: repeat(3, 1fr);} }
@media (max-width: 560px){ .stats{grid-template-columns: repeat(2, 1fr);} }
.stat{
  padding:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(0,0,0,.18);
}
.stat .k{font-size:12px; color:var(--muted)}
.stat .v{font-size:18px; margin-top:4px}
.tableWrap{overflow:auto; border:1px solid var(--line); border-radius:16px}
table{width:100%; border-collapse:collapse; min-width:980px}
th, td{padding:10px 10px; border-bottom:1px solid rgba(255,255,255,.06); font-size:13px; vertical-align:top}
th{position:sticky; top:0; background: rgba(17,24,39,.95); cursor:pointer}
td{color: rgba(229,231,235,.95)}

/* --- Manual selection column (exclude rows from stats/map) --- */
th.selHead, td.selCell{width:46px; text-align:center; padding-left:8px; padding-right:8px}
th.selHead{cursor:default}
td.selCell input[type="checkbox"], th.selHead input[type="checkbox"]{transform: scale(1.05); cursor:pointer}
tr.excluded{opacity:.45}
tr.excluded td{color: rgba(229,231,235,.7)}
td .small{display:block; color: var(--muted); font-size:12px}
.badge{display:inline-flex; align-items:center; gap:6px; font-size:12px; padding:4px 8px; border-radius:999px; border:1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.22)}
.badge.ok{border-color: rgba(52,211,153,.35)}
.badge.warn{border-color: rgba(248,113,113,.35)}
.empty{margin-top:10px; padding:10px 12px; border-radius:12px; border:1px dashed rgba(255,255,255,.14); color:var(--muted)}
#map{height:380px; border-radius:16px; border:1px solid rgba(255,255,255,.06); overflow:hidden}
.footer{padding-top:0}


/* --- Chart sizing (prevents vertical distortion) --- */
.chartWrap{ position: relative; width: 100%; height: 260px; margin-top: 8px; }
#chart{ display:block; width:100% !important; height:100% !important; }
@media (max-width: 780px){ .chartWrap{ height: 240px; } }
