.statistics-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--background);
  overflow: auto;
  padding: 4vw 0;
}
.statistics-card {
  background: var(--card-background);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 56px 48px 44px 48px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  transition: box-shadow .2s;
  overflow: visible;
  box-sizing: border-box;
  position: relative;
  margin: 0 auto;
  color: var(--primary-text);
}
.statistics-card h2 {
  font-size: 25px;
  font-weight: bold;
  color: var(--primary-text);
  margin-bottom: 32px;
  letter-spacing: .2px;
  line-height: 1.2;
}
.statistics-card .button {
  width: 100%;
  padding: 21px 0;
  background: var(--green);
  color: #fff;
  font-size: 23px;
  font-weight: bold;
  border: none;
  border-radius: 22px;
  cursor: pointer;
  margin-top: 20px;
  transition: background .19s;
}
.statistics-card .button:hover {
  background: var(--green-dark);
}
.statistics-card strong {
  color: var(--green);
  font-size: 19px;
  letter-spacing: .2px;
  font-weight: bold;
  margin-bottom: 10px;
  display: inline-block;
}
.statistics-card canvas {
  max-width: 100%;
  height: auto !important;
  margin: 0 auto 18px auto;
  display: block;
}
@media (max-width: 600px) {
  .statistics-card {
    width: 98vw;
    max-width: 99vw;
    padding: 7vw 2vw;
    border-radius: 0 0 16px 16px;
  }
  .statistics-container {
    padding: 0;
  }
}
@media (max-width: 440px) {
  .statistics-card {
    border-radius: 0 0 16px 16px !important;
    padding-left: 2vw !important;
    padding-right: 2vw !important;
  }
}
body.dark-mode .statistics-card {
  background: var(--card-background);
  color: var(--primary-text);
}

/* === IA INTEGRACIÓN === */
.ai-btn-statistics {
  margin: 18px auto 0 auto;
  display: block;
  cursor: pointer;
  font-size: 22px;
  background: #f0f4ff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  box-shadow: 0 2px 8px #0001;
  border: 1.5px solid #2b8be5;
  color: #2b8be5;
  transition: background 0.18s;
}
.ai-btn-statistics:hover {
  background: #e9f6ff;
}
#ai-chat-container {
  margin: 18px auto 0 auto;
  max-width: 380px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 22px #0002;
  padding: 22px 16px 16px 16px;
  text-align: left;
  position: relative;
  color: #263238;
  z-index: 1;
}
body.dark-mode #ai-chat-container {
  background: #181d26;
  color: #e6e6ea;
}
.ai-loading {
  color: #888;
  font-style: italic;
  text-align: center;
}
.ai-msg {
  font-size: 17px;
  margin-bottom: 15px;
  white-space: pre-wrap;
}

/* Responsive para IA */
@media (max-width: 440px) {
  #ai-chat-container {
    max-width: 98vw;
    padding: 13px 5vw 13px 5vw;
  }
}
