:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f3f6fb;
  color: #102a43;
}

.dashboard {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 20px 40px;
}

.dashboard-header {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  text-align: center;
  margin-bottom: 28px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

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

.dashboard-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  padding: 28px 22px;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  font-size: 1.05rem;
  color: #1e293b;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.weather-info p,
.user-info p,
.currency-info p,
.city-fact p {
  margin: 0 0 12px;
}

.user-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 12px 0 16px;
  border: 3px solid #e2e8f0;
}

.refresh-button {
  margin-top: 16px;
  padding: 10px 18px;
  border: none;
  border-radius: 14px;
  background: #2563eb;
  color: white;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.refresh-button:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.refresh-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.chat-icon {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #2563eb;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  z-index: 20;
}

.chat-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  max-height: 520px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 24px;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 30;
}

.chat-window.hidden {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: #2563eb;
  color: white;
  font-weight: 600;
}

.chat-close {
  border: none;
  background: transparent;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
}

.chat-messages {
  padding: 14px 16px;
  background: #f8fafc;
  overflow-y: auto;
  flex: 1;
  min-height: 180px;
}

.chat-message {
  padding: 10px 14px;
  border-radius: 18px;
  margin-bottom: 12px;
  max-width: 100%;
  line-height: 1.5;
}

.chat-message.system {
  background: #eef2ff;
  color: #1e293b;
}

.chat-message.user {
  background: #dbeafe;
  color: #0f172a;
  align-self: flex-end;
}

.chat-message.assistant {
  background: #f1f5f9;
  color: #0f172a;
  align-self: flex-start;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 14px 16px 18px;
  background: white;
  border-top: 1px solid #e2e8f0;
}

.chat-input-area input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.95rem;
}

.chat-input-area button {
  border: none;
  background: #2563eb;
  color: white;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
}

.chat-input-area button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .dashboard {
    margin: 20px auto;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
