:root {
  --ink: #102449;
  --muted: #66789b;
  --blue: #237fdc;
  --blue-soft: #e8f3ff;
  --mint: #eaf9f4;
  --green: #199a69;
  --yellow: #ffbd2e;
  --paper: #ffffff;
  --canvas: #f4f2ee;
  --line: #dce5ee;
  --shadow: 0 24px 70px rgba(35, 53, 83, .12);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.app { width: min(1480px, calc(100% - 44px)); min-height: calc(100vh - 44px); margin: 22px auto; display: grid; grid-template-columns: 240px 1fr; overflow: hidden; border: 1px solid rgba(197,210,221,.75); border-radius: 28px; background: #fbfdff; box-shadow: var(--shadow); }

.sidebar { position: relative; display: flex; flex-direction: column; min-height: calc(100vh - 44px); padding: 28px 18px; border-right: 1px solid var(--line); background: var(--paper); }
.brand { display: flex; align-items: center; gap: 9px; padding: 0 8px; font-size: 18px; font-weight: 850; letter-spacing: -.7px; }
.brand strong { color: var(--blue); }
.brand-mark { position: relative; width: 34px; height: 28px; flex: 0 0 auto; }
.brand-mark::before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow); top: 0; left: 10px; box-shadow: 0 0 0 4px rgba(255,189,46,.16); }
.brand-mark::after { content: ""; position: absolute; width: 28px; height: 14px; border-radius: 14px 14px 8px 8px; background: #5bbcf2; bottom: 0; left: 1px; }
.side-nav { display: grid; gap: 8px; margin-top: 52px; }
.side-nav a { display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.side-nav a:hover { background: #f3f7fb; }
.side-nav a.active { color: #086fc7; background: #e0efff; }
.nav-icon { width: 24px; height: 24px; display: inline-grid; place-items: center; font-size: 19px; }
.sidebar-note { margin-top: auto; padding: 22px 14px 8px; color: var(--muted); line-height: 1.45; }
.sidebar-note .mini-city { height: 85px; margin-bottom: 16px; border-radius: 17px; background: linear-gradient(170deg,#edf9f4,#d9f0e7); position: relative; overflow: hidden; }
.mini-city::before { content: ""; position: absolute; left: 18px; right: 18px; bottom: 16px; height: 34px; background: linear-gradient(90deg,#84c7a3 15%,transparent 15% 22%,#bfd8e4 22% 48%,transparent 48% 55%,#88c8a5 55% 72%,transparent 72%); clip-path: polygon(0 100%,0 35%,14% 35%,14% 8%,25% 8%,25% 55%,44% 55%,44% 28%,58% 28%,58% 64%,73% 64%,73% 0,84% 0,84% 48%,100% 48%,100% 100%); }

.workspace { min-width: 0; }
.topbar { height: 84px; display: flex; align-items: center; gap: 28px; padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); }
.mobile-menu { display: none; border: 0; background: transparent; color: var(--ink); padding: 8px; }
.mobile-menu span { display: block; width: 24px; height: 2px; margin: 5px; background: currentColor; }
.greeting { min-width: 240px; }
.greeting h1 { margin: 0; font-size: 23px; letter-spacing: -.8px; }
.greeting p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.top-search { flex: 1; max-width: 510px; display: flex; align-items: center; gap: 10px; padding: 0 18px; height: 48px; border: 1px solid #cad8e5; border-radius: 24px; background: #f8fbfe; }
.top-search svg { width: 19px; stroke: currentColor; fill: none; stroke-width: 2; }
.top-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.unit-toggle { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 22px; background: #f9fbfd; }
.unit-toggle button { border: 0; min-width: 54px; padding: 9px 12px; border-radius: 18px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.unit-toggle button.active { color: white; background: var(--blue); }
.round-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--ink); cursor: pointer; }

.content { padding: 18px; }
.dashboard-grid { display: grid; grid-template-columns: 1.18fr .95fr; gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 18px rgba(28,60,93,.04); }
.weather-card { position: relative; min-height: 414px; overflow: hidden; background: #dff2ff url('../img/berlin-weather.png') center / cover; }
.weather-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(225,245,255,.98) 0%,rgba(225,245,255,.82) 36%,rgba(225,245,255,.02) 68%); }
.weather-copy { position: relative; z-index: 2; padding: 28px; }
.location { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 28px; }
.date { margin: 8px 0 24px; color: #4d6590; font-size: 13px; }
.big-temp { display: block; font-size: 90px; font-weight: 850; letter-spacing: -7px; line-height: .95; }
.condition { margin: 10px 0 4px; font-size: 24px; font-weight: 850; }
.feels { margin: 0; color: var(--muted); }
.weather-metrics { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3,1fr); padding: 18px 22px; background: rgba(255,255,255,.95); border-top: 1px solid rgba(213,226,237,.85); backdrop-filter: blur(10px); }
.metric { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; padding: 0 16px; border-right: 1px solid var(--line); }
.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: 0; }
.metric .metric-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #0877d1; background: var(--blue-soft); font-size: 20px; }
.metric small,.metric b { display: block; }
.metric small { color: var(--muted); }
.metric b { margin-top: 3px; font-size: 17px; }

.map-card { overflow: hidden; min-height: 414px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px 10px; }
.card-head h2 { margin: 0; font-size: 20px; }
.map-tabs { display: flex; gap: 6px; padding: 0 20px 10px; overflow-x: auto; }
.map-tabs button { border: 0; border-radius: 16px; padding: 9px 14px; color: var(--muted); background: #f1f5f9; font-size: 12px; cursor: pointer; }
.map-tabs button.active { color: white; background: var(--blue); }
.map-view { position: relative; height: 322px; background: url('../img/radar-map.png') center / cover; }
.map-pin { position: absolute; width: 14px; height: 14px; border: 3px solid white; border-radius: 50%; background: var(--ink); box-shadow: 0 3px 8px rgba(0,0,0,.22); cursor: pointer; }
.map-pin.active { width: 18px; height: 18px; background: var(--blue); }
.map-pin[data-city="Hamburg"] { left: 49%; top: 23%; }
.map-pin[data-city="Berlin"] { left: 66%; top: 36%; }
.map-pin[data-city="Köln"] { left: 31%; top: 53%; }
.map-pin[data-city="München"] { left: 58%; top: 78%; }
.map-popup { position: absolute; left: 61%; top: 23%; min-width: 120px; padding: 10px 12px; border-radius: 10px; background: white; box-shadow: 0 10px 25px rgba(17,49,78,.18); font-size: 12px; }
.map-popup b,.map-popup span { display: block; }
.map-popup b { font-size: 14px; }

.forecast-card { grid-column: 1 / -1; overflow: hidden; }
.forecast-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; padding: 0 20px 16px; }
.day { border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; background: white; cursor: pointer; transition: .2s; }
.day:hover { transform: translateY(-2px); }
.day.active { border-color: #70b9ff; background: #eff7ff; }
.day b,.day small,.day strong { display: block; }
.day small { margin-top: 4px; color: var(--muted); }
.day .wx { display: block; margin: 10px 0 7px; font-size: 31px; }
.day strong { font-size: 19px; }

.insight-grid { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr .9fr; gap: 16px; }
.insight { min-height: 164px; padding: 22px; }
.umbrella { display: grid; grid-template-columns: 90px 1fr; align-items: center; background: linear-gradient(135deg,#e8faf5,#f9fffd); }
.umbrella-icon { font-size: 64px; text-align: center; }
.insight h2 { margin: 0 0 10px; font-size: 18px; }
.insight .answer { display: block; color: var(--green); font-size: 29px; font-weight: 850; }
.insight p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.air-row { display: flex; align-items: center; justify-content: space-between; }
.air-score { width: 82px; height: 82px; display: grid; place-items: center; border: 10px solid #d9e4e7; border-top-color: #3ec48b; border-right-color: #3ec48b; border-radius: 50%; font-size: 22px; font-weight: 850; }
.sun-times { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 24px; }
.sun-times div { border-right: 1px solid var(--line); }
.sun-times div:last-child { border-right: 0; }
.sun-times strong,.sun-times small { display: block; }
.sun-times small { color: var(--muted); margin-top: 4px; }

.page-title { margin-bottom: 18px; padding: 28px; background: linear-gradient(120deg,#e6f4ff,#f1fbf7); }
.page-title h1 { margin: 0 0 8px; font-size: 40px; letter-spacing: -2px; }
.page-title p { margin: 0; color: var(--muted); line-height: 1.5; }
.page-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.page-card { min-height: 190px; padding: 24px; }
.page-card h2 { margin-top: 0; }
.page-card p { color: var(--muted); line-height: 1.55; }
.wide { grid-column: span 2; }
.full { grid-column: 1 / -1; }
.favorite-list { display: grid; gap: 10px; }
.favorite-row { display: grid; grid-template-columns: 1fr auto auto; gap: 20px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: 13px; }
.favorite-row button { border: 0; color: #d15e6c; background: transparent; cursor: pointer; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th,.data-table td { padding: 15px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font-size: 12px; }
.article-photo { min-height: 260px; background: url('../img/berlin-weather.png') center 65% / cover; border-radius: 15px; }
.contact-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; }
.contact-form { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field span { font-size: 13px; font-weight: 800; }
.field input,.field textarea,.field select { width: 100%; padding: 13px; border: 1px solid #cad8e5; border-radius: 10px; outline: 0; background: white; }
.field textarea { min-height: 135px; resize: vertical; }
.primary { border: 0; border-radius: 10px; padding: 13px 18px; color: white; background: var(--blue); font-weight: 800; cursor: pointer; }
.form-message { display: block; min-height: 20px; margin-top: 8px; color: var(--green); font-weight: 800; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; opacity: 0; transform: translateY(15px); padding: 14px 18px; border-radius: 11px; color: white; background: var(--ink); box-shadow: var(--shadow); transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1120px) {
  .app { grid-template-columns: 92px 1fr; }
  .brand span:last-child,.side-nav a span:last-child,.sidebar-note p { display: none; }
  .brand { justify-content: center; }
  .side-nav a { justify-content: center; padding: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .forecast-card,.insight-grid { grid-column: 1; }
  .insight-grid { grid-template-columns: repeat(2,1fr); }
  .greeting { display: none; }
}

@media (max-width: 760px) {
  .app { width: 100%; min-height: 100vh; margin: 0; display: block; border: 0; border-radius: 0; }
  .sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 250px; transform: translateX(-105%); transition: transform .25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .sidebar .brand span:last-child,.sidebar .side-nav a span:last-child,.sidebar .sidebar-note p { display: block; }
  .sidebar .brand,.sidebar .side-nav a { justify-content: flex-start; }
  .topbar { height: auto; min-height: 74px; padding: 12px 14px; flex-wrap: wrap; gap: 10px; }
  .mobile-menu { display: block; }
  .top-search { order: 3; flex-basis: 100%; max-width: none; }
  .round-btn { display: none; }
  .unit-toggle button { min-width: 42px; padding: 8px; }
  .content { padding: 12px; }
  .weather-card { min-height: 470px; }
  .weather-card::after { background: linear-gradient(180deg,rgba(225,245,255,.97),rgba(225,245,255,.55) 60%,rgba(225,245,255,.1)); }
  .big-temp { font-size: 75px; }
  .weather-metrics { grid-template-columns: 1fr; gap: 10px; }
  .metric { border-right: 0; padding: 0; }
  .forecast-row { grid-template-columns: repeat(5,145px); overflow-x: auto; }
  .insight-grid,.page-grid,.contact-grid { grid-template-columns: 1fr; }
  .wide,.full { grid-column: 1; }
  .umbrella { grid-template-columns: 70px 1fr; }
  .page-title h1 { font-size: 32px; }
  .data-table { min-width: 620px; }
  .table-scroll { overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; } }
