body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #222;
}

.app-header {
  background: linear-gradient(135deg, #1976d2, #115293);
  color: #fff;
  padding: 16px;
  text-align: center;
}

.app-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.app-nav {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  overflow-x: auto;
}

.nav-btn {
  border: none;
  background: #eeeeee;
  color: #333333;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.nav-btn-active {
  background: #1976d2;
  color: #ffffff;
}

.section {
  display: none;
}

.section-visible {
  display: block;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.input-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

label {
  font-size: 14px;
  margin-bottom: 4px;
}

input {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.btn-primary {
  background: #4caf50;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
  background: #43a047;
}

.resultado {
  margin-top: 12px;
  font-weight: 500;
}

.etiqueta {
  margin-top: 8px;
  border-radius: 8px;
  padding: 12px;
  background: #e3f2fd;
  border: 1px solid #1976d2;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.etiqueta-colegio {
  font-weight: 600;
}

.etiqueta-proteina {
  font-size: 14px;
}

.etiqueta-pesos {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.app-footer {
  text-align: center;
  padding: 8px 16px 16px;
  font-size: 12px;
  color: #555;
}

.chatbot-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1976d2;
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 14px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  z-index: 1000;
}

.chatbot-toggle-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  color: #1976d2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.chatbot-panel {
  position: fixed;
  right: 16px;
  bottom: 70px;
  width: 320px;
  max-width: 95vw;
  max-height: 70vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999;
}

.chatbot-panel-visible {
  display: flex;
}

.chatbot-header {
  background: #004080;
  color: #ffffff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header-title {
  font-size: 14px;
  font-weight: 600;
}

.chatbot-header-close {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
}

.chatbot-messages {
  padding: 8px;
  flex: 1;
  overflow-y: auto;
  background: #f5f5f5;
}

.chatbot-msg {
  max-width: 80%;
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.chatbot-msg-bot {
  background: #e6f2ff;
  color: #003366;
  align-self: flex-start;
}

.chatbot-msg-user {
  background: #0059b3;
  color: #ffffff;
  align-self: flex-end;
}

.chatbot-input-row {
  display: flex;
  padding: 6px;
  border-top: 1px solid #e0e0e0;
  background: #ffffff;
}

.chatbot-input-row input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #cccccc;
  padding: 6px 10px;
  font-size: 13px;
}

.chatbot-input-row button {
  margin-left: 6px;
  border: none;
  border-radius: 999px;
  background: #1976d2;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
