.meteo-dashboard {
  position: relative;
  isolation: isolate;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--md-bg);
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  overflow: hidden;
}

.meteo-dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 0;
}

.meteo-dashboard * { box-sizing: border-box; }

.meteo-dashboard .md-shell {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.92);
  color: #1f2937;
}

.meteo-dashboard .md-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.meteo-dashboard .md-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.meteo-dashboard .md-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.meteo-dashboard .md-title { min-width: 0; }
.meteo-dashboard .md-title-top { font-weight: 800; font-size: 18px; line-height: 1.15; }
.meteo-dashboard .md-title-sub { font-weight: 600; font-size: 13px; color: #475569; margin-top: 2px; }

.meteo-dashboard .md-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meteo-dashboard .md-btn {
  appearance: none;
  border: 1px solid rgba(0,0,0,0.15);
  background: #0ea5e9;
  color: white;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}
.meteo-dashboard .md-btn:hover { filter: brightness(0.98); }

.meteo-dashboard .md-content {
  padding: 16px;
}

.meteo-dashboard .md-status {
  font-size: 13px;
  color: #475569;
  margin-bottom: 12px;
}

.meteo-dashboard .md-section {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 12px 12px;
  margin-bottom: 14px;
}

.meteo-dashboard .md-section-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 10px;
}

.meteo-dashboard .md-h2 {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.meteo-dashboard .md-rule {
  position: relative;
  flex: 1;
  height: 4px;
  background: #7dd3fc;
  border-radius: 999px;
  overflow: hidden;
  transform: translateY(-4px);
}

.meteo-dashboard .md-rule-accent {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 80px;
  background: #ef4444;
}

.meteo-dashboard .md-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.meteo-dashboard .md-col { min-width: 0; }

.meteo-dashboard .md-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.meteo-dashboard .md-cards-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.meteo-dashboard .md-cards-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.meteo-dashboard .md-cards-5 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.meteo-dashboard .md-card {
  background: #ffffff;
  border: 1px solid #7dd3fc;
  padding: 12px 12px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.meteo-dashboard .md-card-title {
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
}

.meteo-dashboard .md-card-at {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}

.meteo-dashboard .md-card-main {
  margin-top: 10px;
  font-weight: 900;
  font-size: clamp(28px, 5.5vw, 42px);
  line-height: 1;
  color: #111827;
  letter-spacing: -0.02em;
  max-width: 100%;
  overflow: hidden;
}

.meteo-dashboard .md-card-value {
  font-size: clamp(28px, 5.5vw, 42px);
  font-weight: 900;
  line-height: 1;
  display: block;
  max-width: 100%;
  overflow: hidden;
}

.meteo-dashboard .md-card-text {
  display: block;
  margin-top: 6px;
  font-size: clamp(14px, 2.4vw, 18px);
  font-weight: 700;
  color: #111827;
  line-height: 1.15;
  word-break: break-word;
}

.meteo-dashboard .md-card-unit {
  font-size: clamp(12px, 2vw, 18px);
  font-weight: 800;
  margin-left: 6px;
  white-space: nowrap;
}

.meteo-dashboard .md-card-footer {
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  color: #111827;
}

.meteo-dashboard .md-loading {
  padding: 10px;
  color: #475569;
}

.meteo-dashboard .md-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 12px;
  color: #475569;
  text-align: right;
}

@media (max-width: 900px) {
  .meteo-dashboard .md-grid2 { grid-template-columns: 1fr; }
  .meteo-dashboard .md-cards-5 { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .meteo-dashboard .md-cards-4 { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .meteo-dashboard .md-cards-2 { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
