:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:#0b0c0f;
  color:#e8eefc;
}

.muted{ color:#9aa8c8; }

.layout{
  height:100vh;
  display:grid;
  grid-template-columns: 280px 1fr 320px;
  gap:16px;
  padding:16px;
}

@media (max-width: 1100px){
  .layout{ grid-template-columns: 280px 1fr; }
  .rightPanel{ display:none; }
}
@media (max-width: 860px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ display:none; }
}

.sbCard, .mainCard, .rpTopCard{
  background:#17181c;
  border:1px solid rgba(255,255,255,.06);
  border-radius:16px;
}

/* SIDEBAR */
.sidebar{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width: 0;
}
.brandCard{
  padding:14px;
  display:flex;
  align-items:center;
  gap:12px;
}
.owLogo{
  width:42px; height:42px; border-radius:12px;
  background: radial-gradient(circle at 30% 30%, rgba(255,106,42,.9), rgba(255,106,42,.15));
  border:1px solid rgba(255,255,255,.08);
}
.brandTitle{ font-weight: 950; letter-spacing:.2px; }
.brandSub{ font-size:12px; margin-top:3px; color:#9aa8c8; }
.sbChev{ margin-left:auto; opacity:.55; }

.userCard{
  padding:14px;
  display:flex;
  align-items:center;
  gap:12px;
}
.avatar{
  width:40px; height:40px;
  border-radius:999px;
  background: rgba(255,106,42,.25);
  display:grid;
  place-items:center;
  font-weight: 950;
}
.userMeta{ flex:1; min-width:0; }
.userName{ font-weight: 900; }
.logoutIcon{ opacity:.6; }

.navBtn{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.06);
  background:#17181c;
  color:#e8eefc;
  padding:14px 14px;
  display:flex;
  gap:10px;
  align-items:center;
  font-weight: 900;
  cursor:pointer;
}
.navBtn.active{
  background: rgba(255,106,42,.18);
  border-color: rgba(255,106,42,.22);
}
.navIcon{ opacity:.85; }

.sbGrow{ flex:1; }

.askBtn{
  width:100%;
  border-radius:14px;
  border:none;
  background:#ff6a2a;
  color:#121316;
  padding:14px 14px;
  font-weight: 950;
  cursor:pointer;
}
.askBtn:hover{ opacity:.92; }

.darkModeCard{
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.togglePill{
  width:54px; height:26px;
  border-radius:999px;
  background: rgba(255,106,42,.55);
  border:1px solid rgba(255,255,255,.08);
  position:relative;
}
.togglePill .dot{
  width:20px; height:20px;
  border-radius:999px;
  background:#fff;
  position:absolute;
  top:50%; right:4px;
  transform: translateY(-50%);
}

/* CENTER */
.main{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
}

.topHeader{
  display:flex;
  align-items:center;
  padding:6px 4px 0;
}
.dashTitle{
  font-size:34px;
  font-weight: 950;
  letter-spacing:-.3px;
  display:flex;
  gap:10px;
  align-items:baseline;
}
.cityBtn{
  border:none;
  background:transparent;
  color:#ff6a2a;
  font-size:34px;
  font-weight: 950;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.caret{ font-size:16px; color:#9aa8c8; transform: translateY(4px); }

/* MAIN CARD (MAP + TABLE) */
.mainCard{
  overflow:hidden;
  border-radius:18px;
  background:#17181c;
  border:1px solid rgba(255,255,255,.06);
}

/* Map zone */
.mapArea{
  position:relative;
  height: 430px;
  background:#131418;
}
.map{ height:100%; width:100%; min-height: 430px; }

/* Hide leaflet attribution (clean like screenshot) */
.leaflet-control-attribution{ display:none !important; }
.leaflet-control-zoom{
  border:none !important;
  box-shadow:none !important;
}
.leaflet-control-zoom a{
  background: rgba(23,24,28,.92) !important;
  color:#e8eefc !important;
  border:1px solid rgba(255,255,255,.08) !important;
}
.leaflet-bar a:hover{ background: rgba(255,255,255,.08) !important; }

.pillBar{
  position:absolute;
  top:12px;
  left:50%;
  transform: translateX(-50%);
  display:flex;
  gap:10px;
  padding:10px;
  border-radius:999px;
  background: rgba(18,19,22,.75);
  border:1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  z-index:500;
}
.pill{
  border:none;
  background: rgba(255,255,255,.06);
  color:#e8eefc;
  padding:10px 14px;
  border-radius:999px;
  font-weight: 900;
  font-size:14px;
  cursor:pointer;
  display:flex;
  gap:8px;
  align-items:center;
  opacity:.92;
}
.pill.active{
  background: rgba(255,106,42,.20);
  border:1px solid rgba(255,106,42,.25);
}
.pIcon{ opacity:.9; }

.searchBox{
  position:absolute;
  top:86px;
  left:14px;
  width: 360px;
  background: rgba(18,19,22,.75);
  border:1px solid rgba(255,255,255,.06);
  border-radius:14px;
  padding:10px;
  backdrop-filter: blur(10px);
  z-index:500;
}
.searchRow{
  display:flex;
  align-items:center;
  gap:10px;
}
.searchRow input{
  flex:1;
  border:none;
  outline:none;
  background:transparent;
  color:#e8eefc;
  font-weight: 650;
  min-width: 0;
}
.searchRow button{
  border:none;
  background: rgba(255,255,255,.10);
  color:#e8eefc;
  padding:10px 12px;
  border-radius:12px;
  font-weight: 900;
  cursor:pointer;
}
.searchRow button:hover{ background: rgba(255,255,255,.14); }
.sIcon{ opacity:.75; }

.mapIcons{
  position:absolute;
  top:86px;
  right:14px;
  display:flex;
  gap:10px;
  z-index:500;
}
.miniIcon{
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.06);
  background: rgba(18,19,22,.75);
  color:#e8eefc;
  cursor:pointer;
  backdrop-filter: blur(10px);
}
.miniIcon:hover{ background: rgba(255,255,255,.08); }

/* Floating weather card */
.wxCard{
  position:absolute;
  top:140px;
  right:14px;
  width: 300px;
  background: rgba(23,24,28,.92);
  border:1px solid rgba(255,255,255,.07);
  border-radius:14px;
  padding:14px;
  z-index:550;
}
.wxTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.wxTemp{
  font-size:44px;
  font-weight: 950;
  letter-spacing:-1px;
}
.deg{ font-size:28px; vertical-align: top; }
.wxIcon{
  width:44px; height:44px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.35));
}
.wxGrid{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.wxRow{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:14px;
}
.wxRow .k{ color:#9aa8c8; }
.wxRow .v{ font-weight: 900; }

/* Timeline bar */
.timelineBar{
  position:absolute;
  left:14px;
  right:14px;
  bottom:14px;
  background: rgba(18,19,22,.75);
  border:1px solid rgba(255,255,255,.06);
  border-radius:14px;
  padding:10px 12px;
  z-index:560;
  backdrop-filter: blur(10px);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.legend{
  display:flex;
  align-items:center;
  gap:10px;
}
.legendLine{
  height:6px;
  flex:1;
  border-radius:999px;
  background: linear-gradient(90deg, #16a34a, #84cc16, #facc15, #f97316, #ec4899);
}
.legendText{ font-size:13px; color:#9aa8c8; }

.timeNav{
  display:flex;
  align-items:center;
  gap:10px;
}
.timeBtn{
  width:40px; height:36px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.08);
  color:#e8eefc;
  font-weight: 950;
  cursor:pointer;
}
.timeBtn:hover{ background: rgba(255,255,255,.12); }

.timeStrip{ flex:1; position:relative; }
#slider{ width:100%; }

.ticks{
  margin-top:6px;
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:#9aa8c8;
  gap:10px;
  overflow:hidden;
}
.ticks span{ white-space:nowrap; opacity:.85; }

.centerStamp{
  position:absolute;
  top:-2px;
  left:50%;
  transform: translateX(-50%);
  font-size:12px;
  color:#e8eefc;
  opacity:.9;
}

.toast{
  position:absolute;
  left:14px;
  bottom:90px;
  background: rgba(23,24,28,.92);
  border:1px solid rgba(255,255,255,.07);
  border-radius:14px;
  padding:10px 12px;
  font-size:13px;
  z-index:700;
}

/* Table zone (bottom inside same card) */
.tableArea{
  background:#17181c;
  border-top:1px solid rgba(255,255,255,.06);
  padding:14px;
}
.tableInner{
  background:#15161a;
  border:1px solid rgba(255,255,255,.06);
  border-radius:16px;
  padding:12px;
}

.tableHeadRow{
  display:grid;
  grid-template-columns: 220px repeat(6, 1fr);
  gap:10px;
  padding:8px 8px 14px;
  color:#9aa8c8;
  font-weight: 900;
}
.tableHeadRow .th{ text-align:center; }

.tableRow{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap:10px;
  padding:10px 8px;
  border-top:1px solid rgba(255,255,255,.05);
}
.tableRow:first-of-type{ border-top:none; }

.rowLabel{
  display:flex;
  align-items:center;
  gap:10px;
  color:#cbd6f1;
  font-weight: 900;
}
.rowIcon{ opacity:.85; }

.rowCells{
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap:10px;
}
.cell{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#cbd6f1;
  font-weight: 900;
  min-height: 36px;
}
.cell.mutedCell{ color:#9aa8c8; font-weight: 700; }
.cell img{ width:26px; height:26px; opacity:.95; }

/* RIGHT PANEL */
.rightPanel{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
}
.rpTopCard{
  padding:14px;
}
.rpDateRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}
.rpDate{ font-weight: 950; }
.rpArrow{ opacity:.65; }

.rpTabs{
  display:flex;
  gap:10px;
  margin-bottom:12px;
}
.rpTab{
  border:1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.06);
  color:#e8eefc;
  padding:10px 14px;
  border-radius:999px;
  font-weight: 950;
  cursor:pointer;
}
.rpTab.active{
  background: rgba(255,106,42,.20);
  border-color: rgba(255,106,42,.25);
}

.rpMiniTabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.miniTab{
  border:1px solid rgba(255,255,255,.06);
  background: transparent;
  color:#e8eefc;
  padding:10px 14px;
  border-radius:999px;
  font-weight: 900;
  cursor:pointer;
  opacity:.9;
}
.miniTab.active{
  background: rgba(255,255,255,.08);
}

.rpList{
  padding:6px 2px;
  overflow:auto;
}
.eventCard{
  background:#17181c;
  border:1px solid rgba(255,255,255,.06);
  border-radius:16px;
  padding:14px;
  margin-bottom:12px;
}
.eventTag{
  font-size:12px;
  font-weight: 950;
  margin-bottom:8px;
}
.tagTrigger{ color:#fbbf24; }
.tagAlert{ color:#60a5fa; }
.tagReport{ color:#22c55e; }

.eventTitle{ font-weight: 950; margin-bottom:8px; }
.eventMeta{
  display:flex;
  justify-content:space-between;
  color:#9aa8c8;
  font-size:12px;
  font-weight: 800;
}
