:root{
  --ink:#101019;--navy:#000080;--purple:#821586;--purple-hot:#a31fa8;
  --purple-dim:rgba(130,21,134,.12);--yellow:#ffda01;
  --focus-ring:0 0 0 3px rgba(255,218,1,.92);
  --ff-display:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --ff-body:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;overflow:hidden;background:#0c0c0f}
body{font-family:var(--ff-body);-webkit-font-smoothing:antialiased;display:flex;flex-direction:column}
button,input{font:inherit}
a:focus-visible,button:focus-visible,input:focus-visible,.leaflet-control a:focus-visible{outline:2px solid var(--yellow)!important;outline-offset:3px;box-shadow:var(--focus-ring)}

/* ── HEADER ── */
.hdr{flex-shrink:0;height:56px;background:rgba(12,12,15,.97);backdrop-filter:blur(12px);border-bottom:1px solid rgba(255,255,255,.07);display:flex;align-items:center;justify-content:space-between;padding:0 20px}
.hdr-left{display:flex;align-items:center;gap:14px;min-width:0}
.hdr-left>a{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
.hdr img{width:42px;height:42px;padding:4px;border:1px solid rgba(198,160,51,.58);border-radius:50%;background:#fff;box-sizing:border-box;object-fit:contain;object-position:center}
.hdr-title{border-left:1px solid rgba(255,255,255,.12);padding-left:14px;font-family:var(--ff-display);font-weight:800;font-size:12px;color:#fff;letter-spacing:.05em;text-transform:uppercase}
.hdr-title span{display:block;font-size:10px;font-weight:500;color:var(--purple);font-family:var(--ff-body);letter-spacing:.06em}
.hdr-right{display:flex;gap:8px}
.hdr-btn{display:flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;padding:7px 13px;border-radius:4px;font-size:12px;font-weight:600;cursor:pointer;transition:background .2s,color .2s,border-color .2s;border:none;font-family:var(--ff-body);text-decoration:none}
.hdr-btn.ghost{background:rgba(255,255,255,.06);color:rgba(255,255,255,.7);border:1px solid rgba(255,255,255,.1)}
.hdr-btn.ghost:hover{background:rgba(255,255,255,.12);color:#fff}
.hdr-btn svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.regions-toggle{display:none}
body.regions-drawer-open .xk-chat-toggle,body.regions-drawer-open .xk-chat-panel{display:none!important}

/* ── LAYOUT ── */
.layout{flex:1;display:flex;overflow:hidden}

/* ── SIDEBAR ── */
.sidebar{
  width:300px;flex-shrink:0;
  background:rgba(12,12,15,.97);border-right:1px solid rgba(255,255,255,.07);
  display:flex;flex-direction:column;overflow:hidden;
}
.sidebar-head{padding:20px 20px 16px;border-bottom:1px solid rgba(255,255,255,.07);display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.sidebar-heading{min-width:0}
.sidebar-head h3{font-family:var(--ff-display);font-size:15px;color:#fff;font-weight:800;margin-bottom:4px}
.sidebar-head p{font-size:12px;color:rgba(255,255,255,.45)}
.sidebar-close{display:none;width:44px;height:44px;border:1px solid rgba(255,255,255,.14);border-radius:6px;background:rgba(255,255,255,.06);color:#fff;cursor:pointer;align-items:center;justify-content:center;flex-shrink:0}
.sidebar-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.search-wrap{padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.07)}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.search-wrap input{
  width:100%;min-height:44px;padding:9px 12px;background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);border-radius:6px;
  color:#fff;font-family:var(--ff-body);font-size:13px;
}
.search-wrap input::placeholder{color:rgba(255,255,255,.35)}
.search-wrap input:focus{border-color:var(--purple)}
.search-status{display:block;min-height:20px;margin-top:6px;font-size:11px;color:rgba(255,255,255,.58)}
.district-list{flex:1;overflow-y:auto;padding:8px 0}
.district-list::-webkit-scrollbar{width:4px}
.district-list::-webkit-scrollbar-track{background:transparent}
.district-list::-webkit-scrollbar-thumb{background:rgba(255,255,255,.1);border-radius:2px}
.region-group{margin-bottom:4px}
.region-label{
  padding:8px 16px 4px;font-size:10px;font-weight:700;letter-spacing:.1em;
  text-transform:uppercase;color:rgba(255,255,255,.3);
}
.district-item{
  display:flex;align-items:center;justify-content:space-between;
  min-height:44px;padding:9px 16px;cursor:pointer;transition:background .15s;
  border-left:2px solid transparent;text-decoration:none;
}
.district-item:hover{background:rgba(255,255,255,.05);border-left-color:var(--purple)}
.district-item.active{background:var(--purple-dim);border-left-color:var(--purple)}
.district-item .name{font-size:13px;color:rgba(255,255,255,.8);font-weight:500}
.district-item .seats{font-size:11px;color:rgba(255,255,255,.35);background:rgba(255,255,255,.07);padding:2px 7px;border-radius:10px}
.district-item:hover .name,.district-item.active .name{color:#fff}

/* ── INFO PANEL ── */
.info-panel{
  position:absolute;bottom:20px;right:20px;z-index:1000;
  background:rgba(12,12,15,.95);backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.1);border-radius:10px;
  padding:16px 20px;min-width:220px;max-width:280px;
  transform:translateY(20px);opacity:0;transition:all .25s;pointer-events:none;
}
.info-panel.show{transform:translateY(0);opacity:1;pointer-events:auto}
.info-panel[hidden]{display:none}
.info-panel .region-name{font-family:var(--ff-display);font-size:16px;font-weight:800;color:#fff;margin-bottom:4px}
.info-panel .region-sub{font-size:12px;color:var(--purple);font-weight:600;letter-spacing:.04em;margin-bottom:12px}
.info-panel .stat{display:flex;justify-content:space-between;font-size:12px;color:rgba(255,255,255,.6);padding:4px 0;border-bottom:1px solid rgba(255,255,255,.07)}
.info-panel .stat:last-of-type{border:none}
.info-panel .stat strong{color:#fff}
.info-panel .visit-btn{
  display:flex;align-items:center;justify-content:center;min-height:44px;margin-top:12px;padding:9px;text-align:center;
  background:var(--purple);color:#fff;border-radius:6px;
  font-size:12px;font-weight:700;text-decoration:none;letter-spacing:.04em;
  transition:background .2s;
}
.info-panel .visit-btn:hover{background:var(--purple-hot)}

/* ── MAP ── */
#map{flex:1;position:relative}
.leaflet-container{background:#1a1a2e!important}
.map-status{position:absolute;top:14px;left:50%;z-index:1000;transform:translateX(-50%);max-width:min(560px,calc(100% - 32px));padding:10px 14px;border:1px solid rgba(255,255,255,.12);border-radius:6px;background:rgba(12,12,15,.92);color:rgba(255,255,255,.86);font-size:12px;text-align:center;box-shadow:0 12px 30px rgba(0,0,0,.18)}
.map-status[data-state="ready"]{display:none}
.map-status[data-state="error"]{border-color:rgba(255,218,1,.5);color:#fff}
.leaflet-bar a,.leaflet-touch .leaflet-bar a{width:44px!important;height:44px!important;line-height:44px!important;font-size:22px!important}

/* Tooltip */
.map-tooltip{
  background:rgba(12,12,15,.92)!important;backdrop-filter:blur(8px);
  border:1px solid rgba(130,21,134,.4)!important;border-radius:6px!important;
  color:#fff!important;font-family:var(--ff-body)!important;font-size:13px!important;
  font-weight:600!important;padding:6px 12px!important;box-shadow:none!important;
  white-space:nowrap;
}
.map-tooltip::before{display:none!important}

/* Legend */
.legend{
  position:absolute;bottom:20px;left:320px;z-index:1000;
  background:rgba(12,12,15,.9);backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.08);border-radius:8px;
  padding:12px 14px;
}
.legend-item{display:flex;align-items:center;gap:8px;font-size:11px;color:rgba(255,255,255,.6);margin-bottom:6px}
.legend-item:last-child{margin:0}
.legend-dot{width:12px;height:12px;border-radius:3px}
.legend-dot--attiki{background:#821586}
.legend-dot--voreia-ellada{background:#000080}
.legend-dot--kentriki-dytiki{background:#1a6b3c}
.legend-dot--nisia{background:#c0392b}
.legend-dot--peloponnisos{background:#d4880a}

@media(max-width:760px){
  html,body{width:100%;max-width:100%;overflow:hidden}
  .hdr{height:56px;padding:0 12px;gap:10px}
  .hdr-left{min-width:0;gap:10px}
  .hdr img{width:40px;height:40px;max-width:40px}
  .hdr-title{display:none}
  .hdr-right{flex-shrink:0;gap:6px}
  .hdr-btn{width:44px;height:44px;padding:0;justify-content:center;font-size:0;border-radius:6px}
  .hdr-btn svg{width:18px;height:18px}
  .regions-toggle{display:flex}
  .layout,#map{min-width:0;width:100%;max-width:100%;overflow:hidden}
  .sidebar{display:flex;position:fixed;z-index:1800;top:56px;bottom:0;left:0;width:100vw;max-width:100%;transform:translateX(-102%);visibility:hidden;transition:transform .22s ease,visibility 0s linear .22s;box-shadow:20px 0 60px rgba(0,0,0,.42)}
  .sidebar.mobile-open{transform:translateX(0);visibility:visible;transition:transform .22s ease}
  .sidebar-close{display:flex}
  .legend{left:10px;bottom:10px;max-width:calc(100vw - 160px)}
  .info-panel{left:10px;right:10px;bottom:160px;min-width:0;max-width:none}
  .map-status{top:10px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
