:root { color-scheme: light; }
* { 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:#f6f7fb;
  color:#0b1220;
}

.muted{ color:#5b677a; }

.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:#ffffff;
  border:1px solid rgba(15,23,42,.10);
  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(34,197,94,.95), rgba(34,197,94,.18));
  border:1px solid rgba(15,23,42,.10);
}
.brandTitle{ font-weight: 950; letter-spacing:.2px; }
.brandSub{ font-size:12px; margin-top:3px; color:#5b677a; }
.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(34,197,94,.18);
  display:grid;
  place-items:center;
  font-weight: 950;
  color:#14532d;
}
.userMeta{ flex:1; min-width:0; }
.userName{ font-weight: 900; }
.logoutIcon{ opacity:.6; }

.navBtn{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  color:#0b1220;
  padding:14px 14px;
  display:flex;
  gap:10px;
  align-items:center;
  font-weight: 900;
  cursor:pointer;
}
.navBtn.active{
  background: rgba(34,197,94,.14);
  border-color: rgba(34,197,94,.35);
}
.navIcon{ opacity:.8; }

.sbGrow{ flex:1; }

.askBtn{
  width:100%;
  border-radius:14px;
  border:none;
  background:#22c55e;
  color:#052e14;
  padding:14px 14px;
  font-weight: 950;
  cursor:pointer;
}
.askBtn:hover{ filter: brightness(.98); }

.darkModeCard{
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.togglePill{
  width:54px; height:26px;
  border-radius:999px;
  background: rgba(34,197,94,.65);
  border:1px solid rgba(15,23,42,.10);
  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:#16a34a;
  font-size:34px;
  font-weight: 950;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.caret{ font-size:16px; color:#5b677a; transform: translateY(4px); }

/* MAIN CARD (MAP + TABLE) */
.mainCard{
  overflow:hidden;
  border-radius:18px;
  background:#fff;
  border:1px solid rgba(15,23,42,.10);
}

/* Map zone */
.mapArea{
  position:relative;
  height: 430px;
  background:#0b0c0f; /* keep dark map background for contrast */
}
.map{ height:100%; width:100%; min-height: 430px; }

/* Hide leaflet attribution */
.leaflet-control-attribution{ display:none !important; }
.leaflet-control-zoom{ border:none !important; box-shadow:none !important; }
.leaflet-control-zoom a{
  background: rgba(255,255,255,.92) !important;
  color:#0b1220 !important;
  border:1px solid rgba(15,23,42,.12) !important;
}
.leaflet-bar a:hover{ background: rgba(255,255,255,.98) !important; }

.pillBar{
  position:absolute;
  top:12px;
  left:50%;
  transform: translateX(-50%);
  display:flex;
  gap:10px;
  padding:10px;
  border-radius:999px;
  background: rgba(255,255,255,.86);
  border:1px solid rgba(15,23,42,.12);
  backdrop-filter: blur(10px);
  z-index:500;
}
.pill{
  border:1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.04);
  color:#0b1220;
  padding:10px 14px;
  border-radius:999px;
  font-weight: 900;
  font-size:14px;
  cursor:pointer;
  display:flex;
  gap:8px;
  align-items:center;
  opacity:.95;
}
.pill.active{
  background: rgba(34,197,94,.16);
  border-color: rgba(34,197,94,.35);
}
.pIcon{ opacity:.9; }

.searchBox{
  position:absolute;
  top:86px;
  left:14px;
  width: 360px;
  background: rgba(255,255,255,.86);
  border:1px solid rgba(15,23,42,.12);
  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:#0b1220;
  font-weight: 650;
  min-width: 0;
}
.searchRow button{
  border:none;
  background: rgba(34,197,94,.18);
  color:#052e14;
  padding:10px 12px;
  border-radius:12px;
  font-weight: 950;
  cursor:pointer;
}
.searchRow button:hover{ background: rgba(34,197,94,.24); }
.sIcon{ opacity:.7; }

.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(15,23,42,.12);
  background: rgba(255,255,255,.86);
  color:#0b1220;
  cursor:pointer;
  backdrop-filter: blur(10px);
}
.miniIcon:hover{ background: rgba(255,255,255,.95); }

/* Floating weather card */
.wxCard{
  position:absolute;
  top:140px;
  right:14px;
  width: 300px;
  background: rgba(255,255,255,.94);
  border:1px solid rgba(15,23,42,.12);
  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;
  color:#0b1220;
}
.deg{ font-size:28px; vertical-align: top; }
.wxIcon{ width:44px; height:44px; }
.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:#5b677a; }
.wxRow .v{ font-weight: 900; color:#0b1220; }

/* Timeline bar */
.timelineBar{
  position:absolute;
  left:14px;
  right:14px;
  bottom:14px;
  background: rgba(255,255,255,.86);
  border:1px solid rgba(15,23,42,.12);
  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, #ef4444);
}
.legendText{ font-size:13px; color:#5b677a; }

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

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

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

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

.toast{
  position:absolute;
  left:14px;
  bottom:90px;
  background: rgba(255,255,255,.94);
  border:1px solid rgba(15,23,42,.12);
  border-radius:14px;
  padding:10px 12px;
  font-size:13px;
  z-index:700;
  color:#0b1220;
}

/* Table zone */
.tableArea{
  background:#fff;
  border-top:1px solid rgba(15,23,42,.10);
  padding:14px;
}
.tableInner{
  background:#ffffff;
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:12px;
}

.tableHeadRow{
  display:grid;
  grid-template-columns: 220px repeat(6, 1fr);
  gap:10px;
  padding:8px 8px 14px;
  color:#5b677a;
  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(15,23,42,.08);
}
.tableRow:first-of-type{ border-top:none; }

.rowLabel{
  display:flex;
  align-items:center;
  gap:10px;
  color:#0b1220;
  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:#0b1220;
  font-weight: 900;
  min-height: 36px;
}
.cell.mutedCell{ color:#5b677a; 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(15,23,42,.10);
  background: rgba(15,23,42,.04);
  color:#0b1220;
  padding:10px 14px;
  border-radius:999px;
  font-weight: 950;
  cursor:pointer;
}
.rpTab.active{
  background: rgba(34,197,94,.16);
  border-color: rgba(34,197,94,.35);
}

.rpMiniTabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.miniTab{
  border:1px solid rgba(15,23,42,.10);
  background: transparent;
  color:#0b1220;
  padding:10px 14px;
  border-radius:999px;
  font-weight: 900;
  cursor:pointer;
  opacity:.92;
}
.miniTab.active{ background: rgba(15,23,42,.04); }

.rpList{ padding:6px 2px; overflow:auto; }
.eventCard{
  background:#ffffff;
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:14px;
  margin-bottom:12px;
}
.eventTag{
  font-size:12px;
  font-weight: 950;
  margin-bottom:8px;
}
.tagTrigger{ color:#b45309; } /* amber-ish */
.tagAlert{ color:#2563eb; }   /* blue */
.tagReport{ color:#16a34a; }  /* green */

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