* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #8258ff;
  --text-main: #f7f8ff;
  --text-muted: #9aa2c5;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(15, 18, 50, 0.7);
}

body {
  font-family: "Poppins", system-ui, sans-serif;
  background: url('assets/images/bg-main.png') center/cover no-repeat fixed,
              radial-gradient(circle at top, #1b1d3f 0, #020414 55%, #000);
  color: var(--text-main);
  overflow-x: hidden;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
}

.sidebar {
  display: flex;
  align-items: center;
}

.sidebar-img {
  width: 100%;
  object-fit: contain;
}

.main {
  display: grid;
  grid-template-rows: 64px 1fr;
  gap: 16px;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.user-pill {
  background: rgba(7, 10, 34, 0.96);
  border-radius: 30px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-icon { width: 24px; height: 24px; }
.user-name, .chevron { font-size: 14px; }
.chevron { color: var(--text-muted); }

.dashboard {
  display: grid;
  grid-template-columns: 2.2fr 2fr;
  grid-template-rows: 260px 1fr;
  gap: 18px;
}

.card {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 22px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}

.today-card {
  display: grid;
  grid-template-columns: 2fr 170px;
  gap: 10px;
  align-items: center;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(100, 80, 200, 0.7);
  font-size: 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(150, 120, 255, 0.3);
}

.today-main h1 { font-size: 32px; margin-bottom: 4px; font-weight: 600; }
.today-main .date { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

.temperature-row { display: flex; align-items: baseline; gap: 18px; }
.temperature-value { font-size: 52px; font-weight: 600; }
.hi-low, .feels-like, .mini-sub { font-size: 12px; color: var(--text-muted); }

.today-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.toggle-checkbox { display: none; }
.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 72px;
  height: 36px;
  background: linear-gradient(135deg, #1f1d3f 0%, #2a254a 100%);
  border-radius: 18px;
  cursor: pointer;
  position: relative;
  border: 1.5px solid rgba(130, 88, 255, 0.3);
  padding: 0 6px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(130, 88, 255, 0.1);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-label::before {
  content: '';
  position: absolute;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5f7ff 0%, #e8ebff 100%);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  left: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toggle-text {
  position: relative;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.toggle-text:nth-child(1)::before { content: 'C'; }
.toggle-text:nth-child(2)::after { content: 'F'; }

.toggle-checkbox:checked + .toggle-label { 
  background: linear-gradient(135deg, rgba(130, 88, 255, 0.4) 0%, rgba(100, 60, 255, 0.3) 100%);
  border-color: rgba(130, 88, 255, 0.6);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 25px rgba(130, 88, 255, 0.2);
}
.toggle-checkbox:checked + .toggle-label::before { 
  left: 3px; 
  background: linear-gradient(135deg, var(--accent) 0%, #9970ff 100%);
  box-shadow: 0 4px 15px rgba(130, 88, 255, 0.5);
}
.toggle-checkbox:checked + .toggle-label .toggle-text:nth-child(1) { opacity: 1; }
.toggle-label .toggle-text:nth-child(2) { opacity: 0.9; }

.location-pill::before {
  content: '📍';
  margin-right: 6px;
  font-size: 14px;
}

.weather-icon { width: 85px; height: 85px; opacity: 0.8; }

.highlight-card { display: grid; grid-template-rows: auto 1fr; gap: 12px; }
.highlight-header h2 { font-size: 16px; font-weight: 500; }
.highlights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.mini-card {
  background: rgba(20, 25, 60, 0.6);
  border-radius: 14px;
  padding: 10px;
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mini-label { font-size: 9px; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }
.mini-main { font-size: 15px; font-weight: 600; }

.air-quality-bar {
  width: 100%; height: 3px;
  background: #1c203b;
  border-radius: 10px;
  margin-top: 6px;
}
.air-quality-bar span {
  display: block; height: 100%; width: 60%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4caf50, #ffb300, #ef5350);
}

.today-week { display: grid; grid-template-rows: 40px 1fr; gap: 16px; }
.today-week-main { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }

.hourly-strip {
  background: rgba(12, 15, 40, 0.6);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  gap: 10px;
  border: 1px solid var(--card-border);
  overflow-x: auto;
  scroll-behavior: smooth;
}

.hour-pill {
  flex: 1; min-width: 60px;
  background: rgba(25, 30, 70, 0.5);
  border-radius: 16px;
  padding: 8px 6px;
  text-align: center;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hour-icon { width: 20px; height: 20px; margin: 4px auto; display: block; }

.sunrise-card {
  background: rgba(12, 15, 40, 0.6);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--card-border);
}

.sunrise-row { display: flex; justify-content: space-between; }
.sunrise-value { font-size: 18px; font-weight: 500; }

.tomorrow-strip {
  margin-top: 12px;
  background: linear-gradient(135deg, rgba(20, 30, 80, 0.5), rgba(15, 25, 60, 0.5));
  border-radius: 20px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  border: 1px solid var(--card-border);
}

.temp-map-card { display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.map-box { 
  border-radius: 20px;
  background: radial-gradient(circle at 20% 20%, #ffd66b, #f4b946 40%, #cc7e39 65%, #644439);
  position: relative;
  height: 200px;
}

.map-inner {
  position: absolute; inset: 6px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0.25), transparent 55%);
}

.map-pin {
  background: #fff; border-radius: 999px;
  padding: 6px 12px;
  display: flex; align-items: baseline; gap: 6px;
  color: #111;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.map-pin .value { font-size: 18px; font-weight: 600; }
.map-pin .label { font-size: 11px; color: #555; }

@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; padding: 16px; }
  .sidebar { display: none; }
  .dashboard { grid-template-columns: 1fr; grid-template-rows: auto; }
  .today-card, .temp-map-card, .highlight-card, .today-week { grid-column: 1 / -1; }
  .temperature-value { font-size: 40px; }
  .today-right { flex-direction: row; margin-top: 16px; }
  .highlights-grid { grid-template-columns: repeat(2, 1fr); }
  .today-week-main { grid-template-columns: 1fr; }
  .map-box { height: 220px; }
  .hourly-strip { overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
  .hour-pill { flex-shrink: 0; }
}