:root{
  --bg:#0a1326;
  --bg-2:#0f1b33;
  --panel:#18253d;
  --panel-2:#101b2f;
  --line:#2b3e61;
  --line-2:#38517a;
  --text:#eef4ff;
  --muted:#a9b9d2;
  --accent:#f5c842;
  --accent-2:#6ebdff;
  --green:#98d98f;
  --blue:#7ec4ff;
  --danger:#ff9e78;
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(70,116,214,.18), transparent 55%),
    radial-gradient(700px 400px at 15% 0%, rgba(53,121,234,.12), transparent 50%),
    linear-gradient(180deg,#09111f 0%, #0a1326 100%);
  color:var(--text);
}

button,
select{
  font:inherit;
}

.app-shell{
  display:grid;
  grid-template-columns:84px 1fr;
  min-height:100vh;
}

.sidebar{
  background:#334467;
  border-right:1px solid #50607f;
  padding:18px 12px;
}

.brand-mark{
  height:48px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:var(--accent);
  color:#1d2a44;
  font-weight:800;
  margin-bottom:20px;
}

.side-nav{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.side-btn{
  border:none;
  border-radius:12px;
  background:#495a7d;
  color:#eef4ff;
  padding:10px 6px;
  font-size:12px;
  cursor:pointer;
}

.side-btn.active{
  background:var(--accent);
  color:#18243b;
  font-weight:700;
}

.main{
  padding:22px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:20px;
  margin-bottom:18px;
}

.topbar h1{
  margin:0 0 8px 0;
  font-size:48px;
}

.topbar p{
  margin:0;
  color:var(--muted);
}

.top-controls{
  display:flex;
  gap:12px;
  align-items:flex-end;
}

.control{
  min-width:260px;
}

label,
.tool-label{
  display:block;
  margin-bottom:8px;
  color:#d0dbec;
  font-size:14px;
}

select{
  width:100%;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid var(--line);
  background:var(--panel);
  color:var(--text);
  font-size:16px;
}

.hero-grid{
  display:grid;
  grid-template-columns:1fr 1.05fr;
  gap:18px;
  margin-bottom:18px;
}

.panel{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
}

.compact-panel{
  padding:16px 18px;
}

.panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}

.panel-head h2{
  margin:0;
  font-size:20px;
}

.muted{
  color:var(--muted);
  font-size:13px;
}

.current-main{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
}

.current-left{
  display:flex;
  align-items:center;
  gap:16px;
}

.current-icon{
  font-size:58px;
  line-height:1;
}

.current-temp{
  font-size:56px;
  font-weight:800;
  line-height:1;
}

.current-condition{
  font-size:28px;
  font-weight:700;
  margin-top:8px;
}

.current-sub{
  margin-top:8px;
  color:var(--muted);
}

.badge-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}

.badge{
  background:#243857;
  color:#d7e4f7;
  border:1px solid #41577c;
  border-radius:999px;
  padding:8px 12px;
  font-size:12px;
  white-space:nowrap;
}

.badge-muted{
  background:#15253f;
}

.current-summary{
  margin-top:16px;
  color:#d6e0ef;
}

.stat-row{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin-top:18px;
}

.mini-stat{
  background:var(--panel-2);
  border:1px solid #273a5b;
  border-radius:12px;
  padding:12px;
}

.mini-stat span{
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-bottom:6px;
}

.mini-stat strong{
  font-size:18px;
}

.radar-stage{
  position:relative;
  height:196px;
  overflow:hidden;
  border-radius:14px;
  border:1px solid #45617f;
  background:#aacde2;
}

.radar-grid{
  position:absolute;
  inset:0;
  background:
    linear-gradient(to right, rgba(96,132,154,.35) 1px, transparent 1px) 0 0/20% 100%,
    linear-gradient(to bottom, rgba(96,132,154,.35) 1px, transparent 1px) 0 0/100% 25%;
}

.blob{
  position:absolute;
  border-radius:999px;
  opacity:.9;
  filter:blur(1px);
}

.blue{background:#4994ff}
.cyan{background:#69d0ff}
.green{background:#39be7a}
.yellow{background:#d9dd58}
.amber{background:#ffbd58}
.b1{width:58px;height:58px;left:26%;top:34%}
.b2{width:36px;height:36px;left:32%;top:30%}
.b3{width:28px;height:28px;left:44%;top:26%}
.b4{width:60px;height:60px;left:66%;top:44%}
.b5{width:38px;height:38px;left:74%;top:52%}
.b6{width:24px;height:24px;left:82%;top:58%}

.radar-label{
  position:absolute;
  left:14px;
  bottom:14px;
  background:rgba(23,36,55,.55);
  color:#f0f6ff;
  padding:8px 10px;
  border-radius:10px;
  font-size:13px;
}

.day-strip{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:12px;
}

.day-pill{
  background:var(--panel-2);
  border:1px solid #2c4165;
  border-radius:14px;
  padding:14px;
  cursor:pointer;
  transition:border-color .15s ease, transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.day-pill:hover{
  border-color:#648abf;
  transform:translateY(-1px);
}

.day-pill.active{
  background:#22385a;
  border-color:#7da0d8;
  box-shadow:0 0 0 1px rgba(125,160,216,.18) inset;
}

.day-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:10px;
}

.day-title-wrap{
  min-width:0;
}

.day-name{
  font-weight:700;
}

.day-date{
  color:var(--muted);
  font-size:12px;
  margin-top:3px;
}

.day-temps{
  font-size:18px;
  font-weight:800;
  margin-bottom:6px;
}

.day-desc{
  color:#dce7f7;
  font-size:13px;
}

.day-night,
.day-rain{
  margin-top:8px;
  font-size:12px;
  color:#c8d7eb;
}

.forecast-tools{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  margin-top:18px;
  margin-bottom:16px;
}

.tool-meta-wrap{
  text-align:right;
}

.selected-day-meta{
  color:#eef4ff;
  font-size:15px;
  font-weight:700;
}

.model-toggles{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.model-toggle{
  border:1px solid #324b72;
  background:#0f1f38;
  color:#dfe9f8;
  border-radius:999px;
  padding:9px 12px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.model-toggle .dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:#4d678f;
}

.model-toggle.active{
  border-color:#7aa1d9;
  background:#173156;
}

.model-toggle.active .dot{
  background:var(--green);
}

.model-toggle.locked{
  cursor:default;
  opacity:.7;
}

.chart-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:16px;
}

.tab{
  border:none;
  border-radius:16px;
  background:#203454;
  color:#d4dff0;
  padding:10px 14px;
  cursor:pointer;
}

.tab.active{
  background:var(--accent);
  color:#16233b;
  font-weight:700;
}

.chart-container{
  height:340px;
  background:linear-gradient(180deg,#2a3d61,#263758);
  border:1px solid #4d648c;
  border-radius:12px;
  padding:12px;
  overflow:hidden;
  position:relative;
}

.chart-legend{
  display:flex;
  gap:18px;
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
}

.legend-swatch{
  display:inline-block;
  width:18px;
  height:4px;
  border-radius:4px;
  margin-right:6px;
  vertical-align:middle;
}

.legend-swatch.consensus{background:var(--green)}
.legend-swatch.provider{background:var(--accent-2)}

.bottom-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:18px;
}

.consensus-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.consensus-item{
  padding:12px 0;
  border-bottom:1px solid #2b3e61;
}

.consensus-item.active{
  background:rgba(39, 62, 97, .18);
  border-radius:12px;
  padding:14px 12px;
  border-bottom-color:transparent;
  outline:1px solid rgba(126, 196, 255, .18);
}

.consensus-item:last-child{
  border-bottom:none;
}

.consensus-title{
  font-weight:700;
  margin-bottom:6px;
}

.consensus-meta{
  color:var(--muted);
  font-size:13px;
  margin-top:6px;
}

.provider-cards{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.provider-card{
  background:var(--panel-2);
  border:1px solid #2b3e61;
  border-radius:12px;
  padding:14px;
}

.provider-card h3{
  margin:0 0 10px 0;
  font-size:18px;
}

.provider-mini{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:8px;
}

.provider-mini-item{
  background:#15223a;
  border:1px solid #253856;
  border-radius:10px;
  padding:10px;
}

.provider-mini-item.active{
  background:#21385a;
  border-color:#6f92c9;
}

.provider-mini-item .date{
  color:var(--muted);
  font-size:12px;
  margin-bottom:6px;
}

.provider-mini-item .temp{
  font-weight:700;
  margin-bottom:4px;
}

.provider-mini-item .cond,
.provider-mini-item .minor{
  color:#cbd8eb;
  font-size:12px;
}

.status-message{
  height:100%;
  min-height:64px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(255,255,255,.04);
  border:1px dashed rgba(255,255,255,.08);
  color:#dce7f7;
  padding:18px;
  text-align:center;
}

.status-message.error{
  color:#ffd9cf;
  border-color:rgba(255,158,120,.55);
  background:rgba(255,158,120,.08);
}

.chart-svg{
  width:100%;
  height:100%;
  display:block;
}

.chart-label{
  fill:#d7e2f2;
  font-size:12px;
}

.chart-label.muted{
  fill:#a7b7d1;
}

@media (max-width: 1360px){
  .day-strip,
  .provider-mini{
    grid-template-columns:repeat(3,1fr);
  }
}

@media (max-width: 1100px){
  .hero-grid,
  .bottom-grid{
    grid-template-columns:1fr;
  }

  .day-strip,
  .provider-mini{
    grid-template-columns:repeat(2,1fr);
  }

  .forecast-tools{
    flex-direction:column;
    align-items:flex-start;
  }

  .tool-meta-wrap{
    text-align:left;
  }

  .stat-row{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 800px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{display:none}
  .topbar{flex-direction:column;align-items:stretch}
  .stat-row,
  .day-strip,
  .provider-mini{grid-template-columns:1fr}
  .badge-stack{align-items:flex-start}
}
