
:root{
  --bg:#0b1220;
  --text:#e7ecf6;
  --muted:#a8b3cc;
  --border: rgba(255,255,255,.08);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --ugt1:#ffcc00;
  --ugt2:#4cc3ff;
  --ugt3:#7cf29c;
  --ugt4:#ff7aa5;
  --ugt5:#c5a6ff;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
}
.brand-title{font-weight:700;font-size:16px}
.brand-subtitle{color:var(--muted);font-size:12px;margin-top:2px}
.top-actions{display:flex;gap:10px;align-items:center}
#searchBox, #labSearch{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  outline:none;
}
#searchBox{ width:min(360px, 50vw); }
#btnClear{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
}
#btnClear:hover{background:rgba(255,255,255,.10)}
.layout{
  height: calc(100vh - 64px - 38px);
  display:grid;
  grid-template-columns: 1.7fr 1fr;
}
.map-panel{position:relative}
#map{height:100%; width:100%}
.legend{
  position:absolute;
  left:12px;
  bottom:12px;
  background: rgba(15,25,48,.85);
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.legend-title{font-size:12px;color:var(--muted);margin-bottom:8px; max-width: 360px}
.legend-items{display:flex;gap:8px;flex-wrap:wrap}
.chip{
  padding:6px 8px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(255,255,255,.10);
}
.ugt1{background: color-mix(in srgb, var(--ugt1) 18%, transparent);}
.ugt2{background: color-mix(in srgb, var(--ugt2) 18%, transparent);}
.ugt3{background: color-mix(in srgb, var(--ugt3) 18%, transparent);}
.ugt4{background: color-mix(in srgb, var(--ugt4) 18%, transparent);}
.ugt5{background: color-mix(in srgb, var(--ugt5) 18%, transparent);}

.side-panel{
  overflow:auto;
  padding:12px;
  border-left:1px solid var(--border);
  background: radial-gradient(1200px 600px at 30% 10%, rgba(255,255,255,.06), transparent 40%);
}
.card{
  background: rgba(15,25,48,.72);
  border:1px solid var(--border);
  border-radius:18px;
  padding:12px 12px 14px;
  box-shadow: var(--shadow);
  margin-bottom:12px;
}
.card-title{font-weight:700;margin-bottom:10px}
.form label{display:block;font-size:12px;color:var(--muted);margin:10px 0 6px}
.form select, .form input[type="number"]{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color:var(--text);
  outline:none;
}
.row{display:flex;gap:8px;align-items:center}
.unit{color:var(--muted);font-size:12px}
#applyFilters{
  width:100%;
  margin-top:12px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.10);
  color:var(--text);
  cursor:pointer;
}
#applyFilters:hover{background: rgba(255,255,255,.16)}
.hint{margin-top:10px;font-size:12px;color:var(--muted);line-height:1.35}
.hole-info{font-size:13px;line-height:1.35}
.muted{color:var(--muted)}

.profile{
  margin-top:12px;
  border:1px dashed rgba(255,255,255,.14);
  border-radius:16px;
  padding:10px;
  min-height:140px;
}
.profile-bar{
  position:relative;
  width:100%;
  height:240px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}
.seg{
  position:absolute;
  left:0; right:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 10px;
  font-size:12px;
  border-top:1px solid rgba(255,255,255,.10);
}
.seg .left{font-weight:700}
.seg .right{color:rgba(255,255,255,.85);font-size:11px}

.stats{font-size:13px;line-height:1.35}
.stats .k{color:var(--muted)}
.stats .v{font-weight:700}

.footer{
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  border-top:1px solid var(--border);
  font-size:12px;
}

.banner{
  position:absolute;
  top:12px; left:12px; right:12px;
  background: rgba(255,140,0,.16);
  border: 1px solid rgba(255,140,0,.35);
  padding:10px 12px;
  border-radius:14px;
  box-shadow: var(--shadow);
  font-size:12px;
  color:var(--text);
}
.hidden{display:none}
.small{font-size:12px}

/* Checkbox label */
.chk{
  display:flex !important;
  align-items:center;
  gap:8px;
  margin-top:10px !important;
}
.chk input{ transform: scale(1.05); }

/* Tabs */
.tabs{
  display:flex;
  gap:8px;
  margin-top:12px;
}
.tab{
  flex:1;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
}
.tab.active{
  background: rgba(255,255,255,.14);
}
.tabcontent{ margin-top:10px; }
.btnSmall{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
}
.btnSmall:hover{ background: rgba(255,255,255,.10); }

/* Table */
.tablewrap{
  max-height: 360px;
  overflow:auto;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
}
table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
th, td{
  padding:8px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  vertical-align:top;
}
th{
  position:sticky;
  top:0;
  background: rgba(15,25,48,.98);
  z-index: 1;
  text-align:left;
  color: rgba(255,255,255,.92);
}
tbody tr:hover{
  background: rgba(255,255,255,.04);
}
