/* ChatVUSA - Modern AI Chat Interface */
/* Dark Theme with Gradient Accents */

:root {
  /* Colors */
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #252525;
  --bg-hover: #2a2a2a;
  
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  --border-color: #333333;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  
  /* Sizes */
  --sidebar-width: 280px;
  --header-height: 60px;
  --input-height: 60px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  
  /* Transitions */
  --transition: all 0.2s ease;
}

/* Light Theme */
body.light-theme {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e5e5e5;
  --bg-hover: #d5d5d5;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #e0e0e0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Utilities */
.hidden {
  display: none !important;
}

.screen {
  height: 100vh;
  width: 100vw;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ========== AUTH SCREEN ========== */
#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15), transparent 50%),
    radial-gradient(ellipse at bottom, rgba(139, 92, 246, 0.1), transparent 50%);
}

.auth-container {
  width: 100%;
  max-width: 400px;
  padding: 40px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header .logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.auth-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

.tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: white;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group label i {
  width: 16px;
  text-align: center;
  color: var(--accent-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  transition: var(--transition);
}

.btn-primary {
  width: 100%;
  background: var(--accent-gradient);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.auth-footer {
  margin-top: 25px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* ========== APP SCREEN ========== */
#app-screen {
  display: flex;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.sidebar.collapsed {
  width: 0;
  overflow: hidden;
  border: none;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.logo-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-mini i {
  font-size: 24px;
  color: var(--accent-primary);
}

.sidebar-section {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-section h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.model-selector select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}

.model-selector select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* User Info */
.user-info {
  flex-shrink: 0;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.user-avatar {
  width: 44px;
  height: 44px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.username {
  font-weight: 600;
  color: var(--text-primary);
}

.user-rank {
  font-size: 12px;
  color: var(--accent-primary);
  text-transform: uppercase;
}

.token-usage {
  padding: 10px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
}

.token-bar {
  height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.token-progress {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.token-text {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

/* Sidebar Menu */
.sidebar-menu {
  flex: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  background: transparent;
  border: none;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  text-align: left;
  transition: var(--transition);
}

.menu-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.menu-item i {
  width: 20px;
  text-align: center;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
}

/* Chat Header */
.chat-header {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.chat-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-title h2 {
  font-size: 16px;
  font-weight: 600;
}

.model-badge {
  padding: 4px 10px;
  background: var(--accent-gradient);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: white;
}

.header-actions {
  display: flex;
  gap: 5px;
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Welcome Message */
.welcome-message {
  max-width: 600px;
  margin: auto;
  text-align: center;
  padding: 40px 20px;
}

.welcome-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.welcome-message h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.welcome-message p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.suggestion-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  text-align: left;
  font-size: 13px;
  transition: var(--transition);
}

.suggestion-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.suggestion-btn i {
  color: var(--accent-primary);
}

/* Message Bubbles */
.message {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.user {
  flex-direction: row-reverse;
  margin-left: auto;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.message.user .message-avatar {
  background: var(--accent-gradient);
  color: white;
}

.message.assistant .message-avatar {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

.message-content {
  padding: 12px 16px;
  border-radius: var(--border-radius);
  max-width: 100%;
}

.message.user .message-content {
  background: var(--accent-gradient);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}

.message-text {
  word-wrap: break-word;
  white-space: pre-wrap;
}

.message-text p {
  margin-bottom: 10px;
}

.message-text p:last-child {
  margin-bottom: 0;
}

.message-text code {
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
}

.message-text pre {
  margin: 10px 0;
  padding: 15px;
  background: var(--bg-primary);
  border-radius: var(--border-radius-sm);
  overflow-x: auto;
}

.message-text pre code {
  padding: 0;
  background: transparent;
}

.message-image {
  margin-top: 10px;
  max-width: 100%;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.message-image img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  cursor: pointer;
  transition: var(--transition);
}

.message-image img:hover {
  opacity: 0.9;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.message.user .message-meta {
  color: rgba(255, 255, 255, 0.7);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 15px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* Chat Input */
.chat-input-container {
  padding: 15px 20px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.image-preview-container {
  margin-bottom: 10px;
}

.image-preview {
  position: relative;
  display: inline-block;
}

.image-preview img {
  max-width: 150px;
  max-height: 100px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
}

.btn-remove-image {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--danger);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-form {
  width: 100%;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 15px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.upload-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.upload-btn:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

#message-input {
  flex: 1;
  max-height: 150px;
  padding: 10px 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  resize: none;
  line-height: 1.5;
}

#message-input:focus {
  outline: none;
}

#message-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--border-radius-sm);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.send-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.input-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* ========== MODALS ========== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-lg {
  max-width: 700px;
}

.modal-xl {
  max-width: 900px;
}

.modal-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h2 i {
  color: var(--accent-primary);
}

.btn-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.btn-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

/* Stats Modal */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.stats-section {
  margin-top: 20px;
}

.stats-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-secondary);
}

.model-usage-table {
  overflow-x: auto;
}

.model-usage-table table,
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.model-usage-table th,
.model-usage-table td,
.admin-table th,
.admin-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.model-usage-table th,
.admin-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
}

.model-usage-table td,
.admin-table td {
  font-size: 13px;
}

.daily-usage {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.daily-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
}

.daily-date {
  min-width: 100px;
  font-weight: 500;
}

.daily-stats {
  flex: 1;
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Settings Modal */
.settings-form h3 {
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.settings-section {
  margin-top: 25px;
}

.settings-section h3 {
  margin-bottom: 15px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.setting-item label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
}

.setting-item input[type="checkbox"] {
  width: 40px;
  height: 22px;
  appearance: none;
  background: var(--bg-tertiary);
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.setting-item input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: var(--transition);
}

.setting-item input[type="checkbox"]:checked {
  background: var(--accent-primary);
}

.setting-item input[type="checkbox"]:checked::before {
  transform: translateX(18px);
  background: white;
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 25px 0;
}

/* Admin Modal */
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.admin-tab {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

.admin-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.admin-tab.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: white;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.admin-stat-card {
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  text-align: center;
}

.admin-stat-card i {
  font-size: 28px;
  color: var(--accent-primary);
  margin-bottom: 10px;
}

.admin-stat-card.highlight {
  background: var(--accent-gradient);
}

.admin-stat-card.highlight i,
.admin-stat-card.highlight .admin-stat-value,
.admin-stat-card.highlight .admin-stat-label {
  color: white;
}

.admin-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
}

.admin-section {
  margin-top: 25px;
}

.admin-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-secondary);
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.admin-toolbar input {
  flex: 1;
  padding: 10px 15px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
}

.admin-toolbar input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 300px;
  padding: 15px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.info {
  border-left: 4px solid var(--info);
}

.toast-icon {
  font-size: 20px;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-message {
  flex: 1;
  font-size: 14px;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: white;
}

.loading-spinner i {
  font-size: 40px;
  color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transform: translateX(-100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .sidebar-toggle {
    display: flex !important;
  }
  
  .suggestions {
    grid-template-columns: 1fr;
  }
  
  .message {
    max-width: 95%;
  }
  
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal-content {
    margin: 10px;
    max-height: calc(100vh - 20px);
  }
}

@media (min-width: 769px) {
  .sidebar-toggle {
    display: none;
  }
}
