:root {
  color-scheme: light;
  --bg: #edf2f7;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #52606d;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --error: #b42318;
  --border: #d9e2ec;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 30%),
    linear-gradient(180deg, #f8fbfd 0%, var(--bg) 100%);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 920px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.login-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
}

button {
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
}

.backend-status {
  margin: 14px 0 0;
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
}

.message.error {
  color: var(--error);
}

.weather-section {
  margin-top: 28px;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.charts-block {
  margin-top: 28px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.weather-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.weather-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.weather-card p {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.chart-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  background: #fff;
}

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

.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: rgba(15, 118, 110, 0.12);
}

.chart-dot {
  fill: var(--accent);
}

.chart-labels,
.chart-empty {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.chart-empty {
  justify-content: flex-start;
}

.hidden {
  display: none;
}

@media (max-width: 640px) {
  .panel {
    padding: 24px;
  }
}
