:root{
  --teal:#287F96; --teal-d:#1D6175; --teal-l:#5FC6DC;
  --navy:#111B24; --bg:#0B1117; --surface:#151E27; --elev:#202B35;
  --text:#F4F7FA; --muted:#9AA8B5; --line:#2C3945;
  --ok:#22C55E; --warn:#F59E0B; --danger:#EF4444; --info:#38BDF8;
  --serif:'Cormorant Garamond',Georgia,serif;
  --sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --shadow:0 1px 2px rgba(0,0,0,.36),0 18px 44px -28px rgba(0,0,0,.8);
  --accent:var(--teal);
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0; background:var(--bg); color:var(--text); font-family:var(--sans); font-size:13.5px;
  line-height:1.5; -webkit-font-smoothing:antialiased}
h1,h2,h3{margin:0; letter-spacing:-.02em}
p{margin:0}
.is-hidden{display:none!important}
::selection{background:rgba(40,127,150,.45)}
::-webkit-scrollbar{width:10px; height:10px}
::-webkit-scrollbar-thumb{background:#2A3844; border-radius:8px; border:2px solid var(--bg)}
::-webkit-scrollbar-track{background:transparent}

.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid transparent;
  border-radius:8px; padding:9px 14px; font-family:var(--sans); font-size:12.5px; font-weight:600; cursor:pointer;
  text-decoration:none; transition:background .16s, border-color .16s, color .16s, transform .16s}
.btn:active{transform:translateY(1px)}
.btn-teal{background:var(--accent); color:#fff}
.btn-teal:hover{filter:brightness(1.1)}
.btn-ghost{background:transparent; border-color:var(--line); color:var(--text)}
.btn-ghost:hover{border-color:#3C4C5A; background:#1A242E}
.btn-block{width:100%; padding:11px}

/* ---------- login ---------- */
.login{position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:22px; background:#070C11}
.login-card{width:min(980px,100%); display:grid; grid-template-columns:1.05fr .95fr; border-radius:16px;
  overflow:hidden; border:1px solid var(--line); box-shadow:0 40px 90px -40px #000; background:var(--surface)}
.login-left{position:relative; padding:44px 40px; display:flex; flex-direction:column; justify-content:center;
  gap:18px; overflow:hidden; background:
    radial-gradient(700px 360px at 80% 10%, rgba(40,127,150,.55), transparent 70%),
    linear-gradient(160deg,#0E1620 0%,#111E27 60%,#0B2A33 100%)}
.glow{position:absolute; width:420px; height:420px; right:-140px; bottom:-160px; border-radius:50%;
  background:radial-gradient(circle,rgba(56,189,248,.28),transparent 65%); filter:blur(10px)}
.grid-lines{position:absolute; inset:0; opacity:.18;
  background-image:linear-gradient(rgba(95,198,220,.28) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(95,198,220,.28) 1px,transparent 1px);
  background-size:44px 44px; -webkit-mask-image:radial-gradient(circle at 30% 40%,#000 0%,transparent 72%);
  mask-image:radial-gradient(circle at 30% 40%,#000 0%,transparent 72%)}
.login-logo{width:min(300px,80%); height:auto; position:relative; z-index:1}
.login-tag{position:relative; z-index:1; font-size:11.5px; letter-spacing:.16em; text-transform:uppercase; color:#BFD5DE}
.login-feats{position:relative; z-index:1; list-style:none; margin:6px 0 0; padding:0; display:grid; gap:8px;
  font-size:12.5px; color:#AEC4CE}
.login-feats li::before{content:'—'; margin-right:8px; color:var(--teal-l)}
.login-foot-left{position:relative; z-index:1; margin-top:auto; font-size:11px; color:#7E96A1}
.login-right{padding:42px 40px; background:var(--surface)}
.login-right h1{font-size:30px; font-weight:600; letter-spacing:-.03em}
.login-note{color:var(--muted); margin-top:8px; font-size:12.5px; max-width:34ch}
.field{display:grid; gap:6px; margin-top:16px; font-size:10.5px; font-weight:600; letter-spacing:.09em;
  text-transform:uppercase; color:var(--muted)}
.field input{font-family:var(--sans); font-size:13.5px; text-transform:none; letter-spacing:0; padding:11px 12px;
  border:1px solid var(--line); border-radius:8px; background:#0F1720; color:var(--text); min-height:42px;
  transition:border-color .16s, box-shadow .16s}
.field input:focus{outline:0; border-color:var(--accent); box-shadow:0 0 0 3px rgba(40,127,150,.22)}
.pass{position:relative; display:block}
.pass input{width:100%; padding-right:64px}
.eye{position:absolute; right:6px; top:50%; transform:translateY(-50%); border:0; background:transparent;
  color:var(--muted); font-size:11px; font-weight:600; padding:6px 8px; cursor:pointer; border-radius:6px}
.eye:hover{background:#1B2731; color:var(--text)}
.login-row{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:14px;
  font-size:11.5px; color:var(--muted)}
.login-row a{color:var(--teal-l); text-decoration:none}
.check{display:inline-flex; align-items:center; gap:7px}
.check input{accent-color:var(--accent)}
#login-form .btn{margin-top:16px}
.login-err{margin-top:10px; font-size:12px; color:#FCA5A5}
.role-row{display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:20px; font-size:11px; color:var(--muted)}
.role{border:1px solid var(--line); background:transparent; border-radius:999px; padding:6px 11px; font-size:11.5px;
  font-weight:600; color:#C9D6DE; cursor:pointer; transition:background .16s, border-color .16s}
.role:hover{background:#1B2731; border-color:#3B4C59; color:#fff}

/* ---------- shell ---------- */
.app{min-height:100vh; display:flex; flex-direction:column}
.topbar{height:60px; background:#0D141B; border-bottom:1px solid var(--line); display:flex; align-items:center;
  gap:14px; padding:0 18px; position:sticky; top:0; z-index:40}
.topnav{display:flex; gap:2px}
.topnav a{text-decoration:none; color:var(--muted); font-size:12.5px; font-weight:500; padding:7px 10px; border-radius:6px}
.topnav a:hover{background:#16202A; color:var(--text)}
.topnav a.is-on{color:var(--text); background:#16202A; font-weight:600}
.crumbs{display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--muted); margin-left:8px;
  padding-left:14px; border-left:1px solid var(--line); white-space:nowrap}
.crumbs i{font-style:normal; opacity:.5}
.crumbs b{color:var(--text); font-weight:600}
.gsearch{flex:1; max-width:360px; margin-left:auto}
.gsearch input{width:100%; font-family:var(--sans); font-size:12.5px; padding:8px 12px; border-radius:8px;
  border:1px solid var(--line); background:#111A22; color:var(--text); min-height:34px}
.gsearch input::placeholder{color:#6F828F}
.gsearch input:focus{outline:0; border-color:var(--accent)}
.iconbtn{border:1px solid var(--line); background:#111A22; color:var(--muted); width:34px; height:34px;
  border-radius:8px; cursor:pointer; font-size:14px; display:grid; place-items:center}
.iconbtn:hover{color:var(--text); border-color:#3B4C59}
.avatar{width:32px; height:32px; border-radius:50%; background:#1B2731; border:1px solid var(--line);
  display:grid; place-items:center; font-size:10.5px; font-weight:700; color:#CFDCE3; letter-spacing:.04em}
.logo{height:26px; width:auto; max-width:210px; margin-left:6px; margin-right:2px; opacity:.95; object-fit:contain}
.burger{display:none; border:1px solid var(--line); background:#111A22; color:var(--text); border-radius:7px;
  width:34px; height:34px; font-size:15px; cursor:pointer}

.layout{flex:1; display:grid; grid-template-columns:264px minmax(0,1fr); min-height:0}
.sidebar{background:#0D141B; border-right:1px solid var(--line); padding:14px; display:flex; flex-direction:column;
  gap:14px; overflow-y:auto; height:calc(100vh - 60px); position:sticky; top:60px}
.client{display:flex; align-items:center; gap:10px; padding-bottom:12px; border-bottom:1px solid var(--line)}
.client-mark{width:34px; height:34px; border-radius:9px; background:var(--accent); color:#fff; display:grid;
  place-items:center; font-weight:700; font-size:15px; flex:0 0 auto}
.client-txt{min-width:0}
.client-txt b{display:block; font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:140px}
.client-txt span{display:block; font-size:10px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:140px}
.tenant-pick{margin-left:auto; border:1px solid var(--line); border-radius:6px; font-size:10.5px; padding:3px 5px;
  background:#111A22; color:var(--text); max-width:66px}
.menu{display:grid; gap:2px}
.menu button{display:flex; align-items:center; gap:10px; border:0; background:transparent; text-align:left;
  padding:8px 10px; border-radius:7px; font-family:var(--sans); font-size:12.5px; color:#B9C7D1; cursor:pointer;
  transition:background .14s, color .14s}
.menu button i{font-style:normal; font-size:11px; color:#6F828F; width:14px}
.menu button:hover{background:#141E27; color:var(--text)}
.menu button.on{background:rgba(40,127,150,.18); color:#DDF3F8; font-weight:600; box-shadow:inset 2px 0 0 var(--teal-l)}
.menu button.on i{color:var(--teal-l)}
.filters{display:grid; gap:9px; padding-top:12px; border-top:1px solid var(--line)}
.filters-h{font-size:10px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:#6F828F}
.fld{display:grid; gap:4px; font-size:10px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
.fld input,.fld select{font-family:var(--sans); font-size:12px; text-transform:none; letter-spacing:0; padding:7px 9px;
  border:1px solid var(--line); border-radius:7px; background:#111A22; color:var(--text); min-height:33px}
.fld input:focus,.fld select:focus{outline:0; border-color:var(--accent)}
.sidebox{background:#111A22; border:1px solid var(--line); border-radius:9px; padding:10px 11px; font-size:11px; color:#9FB3BF}
.sidebox b{display:block; font-size:11.5px; margin-bottom:3px; color:#D6E2E8}
.contact{margin-top:auto; border-top:1px solid var(--line); padding-top:11px; font-size:11px; color:var(--muted); display:grid; gap:2px}
.contact b{color:var(--text); font-size:11.5px}

.main{padding:18px 20px 26px; min-width:0}
.view{display:flex; flex-direction:column; gap:14px}
.view-head{display:flex; align-items:flex-end; justify-content:space-between; gap:16px}
.eyebrow{font-size:10px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:var(--teal-l); margin-bottom:5px}
.view-head h1{font-size:22px; font-weight:600; letter-spacing:-.03em}
.pill{font-size:11px; font-weight:600; color:#CFE7EE; background:rgba(40,127,150,.18); border:1px solid rgba(95,198,220,.25);
  border-radius:999px; padding:5px 11px; white-space:nowrap}

/* cards */
.kpis{display:grid; grid-template-columns:repeat(4,1fr); gap:11px}
.kpi{background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:13px 15px;
  transition:border-color .18s, transform .18s}
.kpi:hover{border-color:#3B4C59; transform:translateY(-2px)}
.kpi b{display:block; font-size:25px; font-weight:600; letter-spacing:-.035em; line-height:1.15}
.kpi span{font-size:10.5px; color:var(--muted); display:block; margin-top:2px}
.grid{display:grid; gap:12px}
.grid.two{grid-template-columns:1.25fr 1fr}
.card{background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:15px 17px}
.card-head{display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:12px}
.card-head h3{font-size:12.5px; font-weight:600; letter-spacing:-.01em}
.hint{font-size:10.5px; color:var(--muted)}
.notes{margin:0; padding-left:15px; display:grid; gap:6px; font-size:11.5px; color:#A9BBC5}
.notes li::marker{color:var(--teal-l)}

/* bars */
.bars{display:grid; gap:8px}
.bar{display:grid; grid-template-columns:104px 1fr auto; gap:9px; align-items:center; font-size:11.5px}
.bar .lab{font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#C9D6DE}
.bar .track{height:7px; background:#1C2731; border-radius:5px; overflow:hidden}
.bar .fill{display:block; height:100%; background:linear-gradient(90deg,var(--teal-d),var(--teal)); border-radius:5px}
.bar .val{color:var(--muted); text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; font-size:10.5px}

/* tables */
.tablewrap{overflow:auto; border:1px solid var(--line); border-radius:9px; background:#111A22}
.tbl{width:100%; border-collapse:collapse; font-size:11.5px; min-width:520px}
.tbl th{position:sticky; top:0; background:#131D26; text-align:left; font-size:9.5px; letter-spacing:.09em;
  text-transform:uppercase; color:var(--muted); padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; z-index:1}
.tbl td{padding:8px 10px; border-bottom:1px solid #1E2933; vertical-align:top; color:#C9D6DE}
.tbl td:first-child{white-space:nowrap}
.tbl tr:last-child td{border-bottom:0}
.tbl tbody tr{cursor:pointer}
.tbl tbody tr:hover{background:#16212B}
.tbl tbody tr:hover td{color:var(--text)}
.tbl .num{text-align:right; font-variant-numeric:tabular-nums}
.tbl b{color:var(--text); font-weight:600}
.chip{display:inline-block; font-size:9.5px; font-weight:600; border-radius:4px; padding:2px 6px; white-space:nowrap}
.chip.pass{background:rgba(34,197,94,.14); color:#6EE7A0; border:1px solid rgba(34,197,94,.25)}
.chip.fail{background:rgba(239,68,68,.12); color:#FCA5A5; border:1px solid rgba(239,68,68,.22)}
.chip.warn{background:rgba(245,158,11,.13); color:#FCD34D; border:1px solid rgba(245,158,11,.24)}

/* map */
.mapwrap{display:grid; grid-template-columns:minmax(0,1fr) 316px; gap:12px}
.maplayer{position:relative; border-radius:10px; overflow:hidden; border:1px solid var(--line); background:#0E1620}
.map{height:calc(100vh - 236px); min-height:430px; background:#0E1620}
.map-search{position:absolute; top:12px; left:12px; right:110px; z-index:500; max-width:360px}
.map-search input{width:100%; font-family:var(--sans); font-size:12px; padding:9px 12px; border-radius:8px;
  border:1px solid rgba(95,198,220,.3); background:rgba(13,20,27,.92); color:var(--text); backdrop-filter:blur(6px)}
.map-search input::placeholder{color:#7E96A1}
.map-search input:focus{outline:0; border-color:var(--teal-l)}
.map-ctl{position:absolute; top:12px; right:12px; z-index:500; display:flex; gap:6px}
.map-ctl button{font-family:var(--sans); font-size:11px; font-weight:600; color:#CFE7EE; background:rgba(13,20,27,.92);
  border:1px solid rgba(95,198,220,.3); border-radius:7px; padding:7px 10px; cursor:pointer}
.map-ctl button:hover{background:#16232E}
.map-legend{position:absolute; bottom:12px; left:12px; z-index:500; display:flex; gap:12px; align-items:center;
  background:rgba(13,20,27,.9); border:1px solid var(--line); border-radius:7px; padding:6px 10px;
  font-size:10.5px; color:var(--muted)}
.lg{display:inline-block; width:9px; height:9px; border-radius:2px; margin-right:5px}
.lg.pass{background:var(--teal-l)} .lg.warn{background:var(--warn)} .lg.fail{background:#5A6B77}

.spot{background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:15px; overflow-y:auto;
  height:calc(100vh - 236px); min-height:430px; font-size:12px}
.spot-empty{color:var(--muted); font-size:12px; line-height:1.6}
.spot-h{font-size:12.5px; font-weight:600; margin-bottom:8px}
.spot-id{font-size:10px; color:var(--muted); letter-spacing:.1em; text-transform:uppercase}
.spot h3{font-size:16px; margin:3px 0 2px}
.spot .loc{color:var(--muted); font-size:11.5px; margin-bottom:8px}
.stars{color:var(--warn); letter-spacing:2px; font-size:12px}
.spot-score{display:flex; align-items:baseline; gap:8px; margin:8px 0 10px}
.spot-score b{font-size:28px; letter-spacing:-.04em; font-weight:600}
.spot-score span{font-size:11px; color:var(--muted)}
.comp{display:grid; gap:4px; margin:8px 0 10px}
.comp-row{display:grid; grid-template-columns:1fr auto auto; gap:8px; font-size:11px; align-items:baseline}
.comp-row .nm{color:#A9BBC5}
.comp-row .pts{font-weight:600; color:var(--text)}
.comp-row .dist{color:var(--muted); font-variant-numeric:tabular-nums}
.spot h4{font-size:10px; letter-spacing:.1em; text-transform:uppercase; margin:14px 0 6px; color:#7E96A1}
.pinlist{display:grid; gap:4px; font-size:11px}
.pinlist span{display:flex; justify-content:space-between; gap:8px; color:#C9D6DE}
.pinlist em{font-style:normal; color:var(--muted)}
.spot-actions{display:flex; gap:7px; margin-top:13px; flex-wrap:wrap}
.spot-actions .btn{padding:7px 10px; font-size:11px}
.leaflet-container{font-family:var(--sans); background:#0E1620}
.leaflet-popup-content-wrapper{background:#151E27; color:var(--text); border:1px solid var(--line); border-radius:8px}
.leaflet-popup-tip{background:#151E27; border:1px solid var(--line)}
.leaflet-popup-content{font-size:11.5px; margin:9px 11px}
.mk{display:block; width:10px; height:10px; border:1.5px solid rgba(255,255,255,.85); box-shadow:0 1px 5px rgba(0,0,0,.6); border-radius:2px}
.mk.pass{background:var(--teal-l)} .mk.warn{background:var(--warn)} .mk.fail{background:#5A6B77}
.city-pin{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px;
  background:rgba(21,30,39,.95); color:#DDF3F8; border:1px solid rgba(95,198,220,.45); border-radius:7px;
  padding:3px 6px; box-shadow:0 4px 14px rgba(0,0,0,.5); line-height:1}
.city-pin b{font-size:11.5px; font-weight:700}
.city-pin i{font-style:normal; font-size:8px; color:var(--teal-l)}
.pin-dot{display:block; width:7px; height:7px; border-radius:50%; border:1px solid rgba(255,255,255,.8); box-shadow:0 1px 4px rgba(0,0,0,.6)}

.cats{display:grid; gap:5px}
.cat-row{display:flex; align-items:center; gap:8px; font-size:11.5px; padding:6px 8px; border:1px solid var(--line);
  border-radius:7px; background:#111A22; color:#C9D6DE}
.cat-row input{accent-color:var(--accent)}
.cat-row i{width:8px; height:8px; border-radius:50%; display:block}
.cat-row b{margin-left:auto; font-weight:600; font-variant-numeric:tabular-nums; color:var(--text)}
.survey-summary{margin-top:12px; border-top:1px solid var(--line); padding-top:10px; font-size:11px; color:var(--muted); display:grid; gap:3px}

/* competitor */
.cp-tabs{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px}
.cp-tab{border:1px solid var(--line); background:#111A22; border-radius:999px; padding:6px 12px; font-size:11.5px;
  font-weight:600; color:var(--muted); cursor:pointer}
.cp-tab:hover{color:var(--text); border-color:#3B4C59}
.cp-tab.on{background:var(--teal); color:#fff; border-color:var(--teal)}
.cp-grid{display:grid; grid-template-columns:1.2fr 1fr; gap:12px; margin-bottom:12px}
.cp-brandlist{display:grid; gap:6px; font-size:11.5px}
.cp-brand{display:grid; grid-template-columns:128px 1fr 58px; gap:8px; align-items:center}
.cp-brand span:first-child{color:#C9D6DE; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.cp-brand .t{height:7px; background:#1C2731; border-radius:5px; overflow:hidden}
.cp-brand .t i{display:block; height:100%; border-radius:5px}
.cp-brand .v{text-align:right; font-variant-numeric:tabular-nums; color:var(--muted); font-size:10.5px}
.cp-findings{margin:0; padding-left:16px; display:grid; gap:6px; font-size:11.5px; color:#A9BBC5}
.cp-findings li::marker{color:var(--teal-l)}
.cp-baseline{background:rgba(40,127,150,.14); border:1px solid rgba(95,198,220,.25); border-radius:8px;
  padding:9px 12px; font-size:11.5px; color:#CFE7EE; display:flex; justify-content:space-between; gap:10px; margin-bottom:12px}

/* report */
.report h2{font-size:18px; margin:0 0 4px}
.report h3{font-size:11px; letter-spacing:.08em; text-transform:uppercase; margin:16px 0 6px; color:#7E96A1}
.report p,.report li{font-size:11.5px; color:#A9BBC5}
.report ul{padding-left:16px; margin:0; display:grid; gap:4px}
.rep-kpis{display:grid; grid-template-columns:repeat(4,1fr); gap:9px; margin:12px 0}
.rep-kpis div{border:1px solid var(--line); border-radius:8px; padding:10px 12px; background:#111A22}
.rep-kpis b{display:block; font-size:20px; font-weight:600}

@media print{
  body{background:#fff; color:#111}
  .topbar,.sidebar,.map-search,.map-ctl,.map-legend,.filters,.btn{display:none!important}
  .layout{grid-template-columns:1fr}
  .main{padding:0}
  .card,.report{border-color:#ddd; background:#fff; color:#111}
  .report p,.report li{color:#333}
}

@media (max-width:1180px){
  .mapwrap{grid-template-columns:1fr}
  .spot{height:auto; min-height:0; max-height:none}
  .map{height:440px}
  .cp-grid{grid-template-columns:1fr}
}
@media (max-width:1024px){
  .layout{grid-template-columns:1fr}
  .burger{display:inline-flex; align-items:center; justify-content:center}
  .topnav,.crumbs{display:none}
  .sidebar{position:fixed; top:60px; bottom:0; left:0; width:264px; z-index:45; transform:translateX(-100%);
    transition:transform .24s ease; height:auto; box-shadow:0 20px 50px rgba(0,0,0,.55)}
  .sidebar.open{transform:none}
  .kpis{grid-template-columns:1fr 1fr}
  .grid.two{grid-template-columns:1fr}
  .map{height:420px}
  .logo{height:22px}
}
@media (max-width:640px){
  .map-search{left:8px; right:8px; top:8px; max-width:none}
  .map-search input{font-size:11.5px}
  .map-ctl{top:52px; right:8px}
  .map-ctl button{padding:6px 8px; font-size:10.5px}
  .map-legend{left:8px; bottom:8px}
  .main{padding:13px}
  .login-card{grid-template-columns:1fr}
  .login-left{padding:26px 22px}
  .login-right{padding:24px 22px}
  .login-logo{width:min(240px,70%)}
  .view-head{flex-direction:column; align-items:flex-start}
  .kpis{grid-template-columns:1fr 1fr}
  .bar{grid-template-columns:82px 1fr auto}
  .map{height:340px}
  .topbar{padding:0 10px; gap:8px}
  .gsearch{display:none}
  .logo{height:20px}
  .rep-kpis{grid-template-columns:1fr 1fr}
}
