/* Chatbot Analytics Dashboard Styles */
.analytics-dashboard {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1000px;
  height: 80vh;
  background: white;
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.analytics-dashboard.active {
  display: flex;
}

.analytics-header {
  background: linear-gradient(135deg, #165C9F, #0a1628);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.analytics-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.analytics-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.analytics-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.analytics-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.analytics-card {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.analytics-card h3 {
  margin: 0 0 10px 0;
  color: #165C9F;
  font-size: 18px;
}

.analytics-number {
  font-size: 32px;
  font-weight: bold;
  color: #333;
  margin: 10px 0;
}

.analytics-label {
  color: #666;
  font-size: 14px;
}

.chat-logs {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  border-radius: 10px;
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.chat-logs h3 {
  margin: 0 0 15px 0;
  color: #165C9F;
}

.log-entry {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
}

.log-timestamp {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.log-conversation {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-message {
  padding: 8px 12px;
  border-radius: 15px;
  font-size: 14px;
  max-width: 80%;
}

.log-message.user {
  background: #165C9F;
  color: white;
  align-self: flex-end;
}

.log-message.bot {
  background: #e1e5e9;
  color: #333;
  align-self: flex-start;
}

.admin-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #165C9F;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  z-index: 9999;
  display: none;
}

.admin-toggle.visible {
  display: block;
}

.customization-panel {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.customization-panel h3 {
  margin: 0 0 15px 0;
  color: #165C9F;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e1e5e9;
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-primary {
  background: #165C9F;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background: #0a1628;
}

.export-section {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.export-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.export-btn:hover {
  background: #218838;
}