/* ===========================================
   Avante Security AI — Admin Dashboard
   =========================================== */

:root {
  --primary: #0f62fe;
  --primary-hover: #0353e9;
  --primary-light: #edf5ff;
  --accent: #00c9a7;
  --accent-dark: #00a88a;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --border: #e1e5eb;
  --border-light: #eef1f5;

  --text: #1a1d23;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --info: #3b82f6;
  --info-bg: #eff6ff;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);

  --sidebar-w: 250px;
  --topbar-h: 60px;
  --transition: 0.2s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===========================================
   Screen management
   =========================================== */
.screen { display: none; }
.screen.active { display: flex; min-height: 100vh; }
#login-screen.active { display: flex; align-items: center; justify-content: center; }
#dashboard-screen.active { display: flex; }

/* ===========================================
   Login
   =========================================== */
.login-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f62fe 0%, #0a3d91 50%, #061e47 100%);
  padding: 24px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

.login-brand { text-align: center; margin-bottom: 36px; }

.login-logo {
  width: 72px; height: 72px;
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(15,98,254,0.3);
}

.login-brand h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.login-subtitle { color: var(--text-secondary); font-size: 14px; margin-top: 4px; letter-spacing: 0.5px; text-transform: uppercase; }

/* ===========================================
   Forms
   =========================================== */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,98,254,0.12);
}

.form-group input::placeholder { color: var(--text-muted); }

.error-message { color: var(--danger); font-size: 13px; margin-top: 12px; text-align: center; }

/* ===========================================
   Buttons
   =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,98,254,0.3); }

.btn-secondary { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); color: var(--text); border-color: #cdd3db; }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: rgba(0,0,0,0.05); color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-small { padding: 5px 12px; font-size: 12px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }

/* ===========================================
   Sidebar
   =========================================== */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: #0d1117;
  color: #c9d1d9;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo { width: 36px; height: 36px; border-radius: 10px; }

.brand-name { display: block; font-size: 16px; font-weight: 700; color: #fff; }
.brand-tagline { display: block; font-size: 11px; color: #6b7b8d; text-transform: uppercase; letter-spacing: 1px; }

.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: #8b949e;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.sidebar-item:hover { background: rgba(255,255,255,0.06); color: #e6edf3; }

.sidebar-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15,98,254,0.4);
}

.sidebar-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-status { display: flex; align-items: center; gap: 8px; font-size: 12px; }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warning);
  transition: background var(--transition);
}

.status-dot.connected { background: var(--success); box-shadow: 0 0 6px rgba(16,185,129,0.6); }
.status-dot.disconnected { background: var(--danger); }

/* ===========================================
   Main Area
   =========================================== */
.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.sidebar-toggle {
  display: none;
  background: none; border: none; cursor: pointer; color: var(--text-secondary);
  padding: 6px;
}

.topbar-title { font-size: 18px; font-weight: 700; flex: 1; }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.admin-greeting { font-size: 13px; color: var(--text-secondary); }

/* Main content */
.main-content { flex: 1; padding: 28px; max-width: 1400px; width: 100%; }

/* Tabs */
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===========================================
   Stats Grid
   =========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-card.stat-active {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  border-color: transparent;
  color: #fff;
}

.stat-card.stat-active .stat-label { color: rgba(255,255,255,0.75); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.calls-icon { background: #eef2ff; color: #4f46e5; }
.active-icon { background: rgba(255,255,255,0.2); color: #fff; }
.tickets-icon { background: #fef3c7; color: #d97706; }
.customers-icon { background: #ecfdf5; color: #059669; }

.stat-value { font-size: 28px; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

/* ===========================================
   Panels
   =========================================== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.panel-header h2 { font-size: 16px; font-weight: 700; margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ===========================================
   Tables
   =========================================== */
.table-wrapper { overflow-x: auto; }

.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--surface-hover); }

.empty-cell { text-align: center; color: var(--text-muted); padding: 40px 14px !important; }

/* ===========================================
   Filters
   =========================================== */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.filters select, .filters input[type="text"], .filters input[type="date"] {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
}

.filters select:focus, .filters input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ===========================================
   Badges
   =========================================== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-live {
  background: var(--danger);
  color: #fff;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge.active, .status-badge.open, .status-badge.in_progress { background: var(--info-bg); color: var(--info); }
.status-badge.completed, .status-badge.closed, .status-badge.paid { background: var(--success-bg); color: var(--success); }
.status-badge.escalated, .status-badge.critical, .status-badge.failed { background: var(--danger-bg); color: var(--danger); }
.status-badge.high, .status-badge.warning { background: var(--warning-bg); color: var(--warning); }
.status-badge.medium { background: #f3f4f6; color: #6b7280; }
.status-badge.low { background: #f3f4f6; color: #9ca3af; }
.status-badge.processing { background: #fef3c7; color: #92400e; }

/* ===========================================
   Lists (Active calls, Activity)
   =========================================== */
.list { max-height: 420px; overflow-y: auto; }

.empty-message { text-align: center; padding: 40px; color: var(--text-muted); font-size: 14px; }

.active-call-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border-left: 3px solid var(--primary);
}

.call-info { flex: 1; }
.call-customer { font-weight: 600; font-size: 14px; }
.call-phone { color: var(--text-secondary); font-size: 13px; }
.call-duration { font-weight: 700; color: var(--primary); font-size: 14px; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}

.activity-content { flex: 1; }
.activity-title { font-weight: 600; font-size: 13px; }
.activity-time { font-size: 12px; color: var(--text-muted); }

/* ===========================================
   Modal
   =========================================== */
.modal { display: none; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; }
.modal.active { display: flex; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 92%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h2 { font-size: 18px; font-weight: 700; margin: 0; }

.modal-close {
  background: none; border: none;
  font-size: 24px; cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body { padding: 24px; overflow-y: auto; }

/* ===========================================
   Detail sections (inside modals)
   =========================================== */
.detail-section { margin-bottom: 24px; }

.detail-section h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.detail-item {
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.detail-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.detail-value { font-weight: 600; font-size: 14px; }

/* Transcript */
.transcript {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  max-height: 300px;
  overflow-y: auto;
}

.transcript-item { margin-bottom: 12px; }
.transcript-speaker { font-weight: 700; font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.transcript-content { padding: 10px 14px; background: var(--surface); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6; }
.transcript-item.customer .transcript-content { background: var(--info-bg); border-left: 3px solid var(--info); }
.transcript-item.assistant .transcript-content { background: var(--success-bg); border-left: 3px solid var(--success); }

/* ===========================================
   Knowledge Base — Upload zone
   =========================================== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.upload-text { font-size: 15px; font-weight: 600; margin-top: 12px; }
.upload-hint { font-size: 12px; margin-top: 6px; }

.progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 16px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.upload-status { font-size: 13px; color: var(--text-secondary); margin-top: 8px; text-align: center; }

/* ===========================================
   Configuration — Editable forms
   =========================================== */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  gap: 16px;
  flex-wrap: wrap;
}

.config-item.config-item-vertical {
  flex-direction: column;
  align-items: stretch;
}

.config-item label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.config-item input {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  flex: 1;
  min-width: 0;
  background: var(--surface);
  transition: border-color var(--transition);
}

.config-item input:focus { outline: none; border-color: var(--primary); }

.config-item textarea {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  min-height: 80px;
  background: var(--surface);
  transition: border-color var(--transition);
  resize: vertical;
  line-height: 1.5;
}

.config-item textarea:focus { outline: none; border-color: var(--primary); }

.save-message {
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  display: none;
}

.save-message.success { display: block; background: var(--success-bg); color: var(--success); }
.save-message.error { display: block; background: var(--danger-bg); color: var(--danger); }

/* Business hours editable rows */
#business-hours-body input[type="time"] {
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--surface);
}

#business-hours-body input[type="time"]:focus {
  outline: none;
  border-color: var(--primary);
}

#business-hours-body input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ===========================================
   Loading spinner
   =========================================== */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading { display: flex; justify-content: center; align-items: center; padding: 40px; }

/* ===========================================
   Help Page
   =========================================== */
.help-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.help-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.help-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.help-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

.help-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.help-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===========================================
   User Status Indicators
   =========================================== */
.user-status-active {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--success-bg);
  color: var(--success);
}

.user-status-inactive {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--danger-bg);
  color: var(--danger);
}

/* ===========================================
   Feedback & Requests
   =========================================== */

/* Nav badge */
.feedback-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
}

/* Submit panel */
.feedback-submit-panel { border-left: 4px solid var(--primary); }

.feedback-intro {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.feedback-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feedback-form-grid .form-group select,
.feedback-form-grid .form-group input,
.feedback-form-grid .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.feedback-form-grid .form-group select:focus,
.feedback-form-grid .form-group input:focus,
.feedback-form-grid .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,98,254,0.12);
}

.feedback-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.feedback-submit-msg {
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.feedback-submit-msg.success { color: var(--success); }
.feedback-submit-msg.error { color: var(--danger); }

/* Feedback cards list */
.feedback-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feedback-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  border-left: 4px solid var(--primary);
}

.feedback-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.feedback-card.feedback-resolved {
  opacity: 0.65;
  border-left-color: var(--success);
}

.feedback-card.feedback-resolved:hover { opacity: 1; }

.feedback-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.feedback-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.feedback-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.feedback-cat-bug { background: var(--danger-bg); color: var(--danger); }
.feedback-cat-feature { background: #fef3c7; color: #92400e; }
.feedback-cat-change { background: var(--info-bg); color: var(--info); }
.feedback-cat-improvement { background: var(--success-bg); color: var(--success); }
.feedback-cat-question { background: #f3e8ff; color: #7c3aed; }

.feedback-priority-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.priority-low { background: #f3f4f6; color: #9ca3af; }
.priority-medium { background: #f3f4f6; color: #6b7280; }
.priority-high { background: var(--warning-bg); color: var(--warning); }
.priority-critical { background: var(--danger-bg); color: var(--danger); }

.feedback-status-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-new { background: var(--info-bg); color: var(--info); }
.status-in_review { background: #fef3c7; color: #92400e; }
.status-planned { background: #f3e8ff; color: #7c3aed; }
.status-in_progress { background: var(--info-bg); color: var(--info); }
.status-implemented { background: var(--success-bg); color: var(--success); }
.status-declined { background: var(--danger-bg); color: var(--danger); }
.status-deferred { background: #f3f4f6; color: #6b7280; }

.feedback-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.feedback-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.feedback-admin-notes {
  background: var(--success-bg);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.6;
}

.feedback-comments {
  margin-bottom: 12px;
}

.feedback-comment {
  background: var(--bg-secondary, #f8f9fa);
  border-left: 3px solid var(--primary, #0f62fe);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.feedback-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.feedback-comment-header strong {
  font-size: 12px;
  color: var(--text);
}

.feedback-comment-date {
  font-size: 11px;
  color: var(--text-muted);
}

.feedback-comment p {
  margin: 0;
  color: var(--text-secondary);
}

.feedback-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.feedback-author { font-weight: 600; }

.feedback-manage-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }

  .main-area { margin-left: 0; }

  .sidebar-toggle { display: block; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  .panel-header { flex-direction: column; align-items: flex-start; gap: 12px; }

  .filters { width: 100%; }

  .detail-grid { grid-template-columns: 1fr; }

  .config-grid { grid-template-columns: 1fr; }

  .feedback-form-grid { grid-template-columns: 1fr; }

  .topbar { padding: 0 16px; }
  .main-content { padding: 16px; }
}
