/* ===== Admin Panel Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Header */
.admin-header {
  padding: 16px 0 24px;
  border-bottom: 1px solid #2a2a40;
  margin-bottom: 24px;
}

.admin-header h1 {
  font-size: 1.4rem;
  font-weight: 600;
}

.admin-header a {
  color: #a78bfa;
  text-decoration: none;
}

/* Stats */
.admin-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #1a1a2e;
  border: 1px solid #2a2a40;
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 600;
  color: #a78bfa;
}

.stat-label {
  font-size: 0.85rem;
  color: #6b6b80;
  margin-top: 4px;
}

/* Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
}

.admin-table thead {
  background: #16213e;
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 0.85rem;
  color: #6b6b80;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 12px 16px;
  border-top: 1px solid #2a2a40;
  font-size: 0.9rem;
}

.admin-table tr:hover td {
  background: rgba(167, 139, 250, 0.05);
}

.visitor-id {
  font-family: monospace;
  font-size: 0.82rem;
  color: #6b6b80;
}

.admin-link {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 500;
}

.admin-link:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

/* Chat show */
.chat-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #2a2a40;
}

.chat-header h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.chat-meta {
  color: #6b6b80;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.chat-meta code {
  background: rgba(167, 139, 250, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Messages */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-message {
  background: #1a1a2e;
  border: 1px solid #2a2a40;
  border-radius: 12px;
  padding: 16px;
}

.admin-message-user {
  border-left: 3px solid #a78bfa;
}

.admin-message-assistant {
  border-left: 3px solid #6b6b80;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.message-role {
  font-weight: 600;
  font-size: 0.85rem;
}

.message-time {
  color: #6b6b80;
  font-size: 0.82rem;
}

.message-body {
  font-size: 0.9rem;
  line-height: 1.6;
}

.message-body p {
  margin-bottom: 0.5em;
}

.empty-state {
  text-align: center;
  color: #6b6b80;
  padding: 48px;
  font-size: 1rem;
}

/* Admin action buttons */
.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #2a2a40;
  background: #1a1a2e;
  color: #e0e0e0;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-action-btn:hover {
  background: #2a2a40;
  border-color: #3a3a50;
}

.admin-action-success {
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.admin-action-success:hover {
  background: rgba(16, 185, 129, 0.1);
}

.admin-action-danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.admin-action-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .admin-stats { flex-direction: column; }
  .admin-table { font-size: 0.82rem; }
  .admin-table th, .admin-table td { padding: 8px; }
}
