/* AuditLens Dashboard Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

/* Navigation */
.nav {
  background: #1a1a2e;
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-links { display: flex; gap: 16px; }
.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s;
}
.nav-links a:hover { background: rgba(255,255,255,0.1); color: #fff; }

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

h1 { margin-bottom: 20px; font-size: 24px; }
h2 { margin-bottom: 12px; font-size: 18px; color: #444; }
h3 { margin-bottom: 8px; font-size: 14px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-value { font-size: 32px; font-weight: 700; color: #1a1a2e; }
.card-label { font-size: 13px; color: #888; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.card-pending { border: 2px solid #f0ad4e; }
.card-pending a { text-decoration: none; color: inherit; }

.summary-date { color: #888; margin-bottom: 16px; font-size: 14px; }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-pending_review, .badge-pending { background: #fff3cd; color: #856404; }
.badge-reviewed, .badge-confirmed { background: #d4edda; color: #155724; }
.badge-dismissed, .badge-false_positive { background: #f8d7da; color: #721c24; }
.badge-no_order_found { background: #e2e3e5; color: #383d41; }
.badge-critical { background: #f8d7da; color: #721c24; }
.badge-major { background: #fff3cd; color: #856404; }
.badge-minor { background: #cce5ff; color: #004085; }

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0;
}

.tab {
  padding: 8px 20px;
  text-decoration: none;
  color: #666;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s;
}
.tab:hover { color: #333; }
.tab.active { color: #1a1a2e; border-bottom-color: #1a1a2e; font-weight: 600; }

/* Queue Table */
.queue-table {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-collapse: collapse;
}

.queue-table th {
  background: #f8f9fa;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  border-bottom: 1px solid #e0e0e0;
}

.queue-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.queue-table tr:hover { background: #f8f9fa; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.btn:hover { background: #f0f0f0; }

.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-primary { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.btn-primary:hover { background: #2d2d4e; }
.btn-confirm { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.btn-confirm:hover { background: #c3e6cb; }
.btn-dismiss { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.btn-dismiss:hover { background: #f5c6cb; }

/* Two-Panel Layout */
.two-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.panel {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.conversation-header { margin-bottom: 8px; }
.conversation-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  color: #666;
  font-size: 14px;
}

/* Chat Bubbles */
.chat-container {
  max-height: 600px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
}

.chat-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  word-wrap: break-word;
}

.chat-customer {
  background: #dcf8c6;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-agent {
  background: #e8e8e8;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-system {
  background: #fff3cd;
  align-self: center;
  font-style: italic;
  font-size: 12px;
  text-align: center;
}

.chat-sender { font-size: 11px; font-weight: 600; color: #666; margin-bottom: 2px; }
.chat-text { white-space: pre-wrap; }
.chat-time { font-size: 10px; color: #999; text-align: right; margin-top: 4px; }

/* Extraction & Findings */
.extraction-section {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.extraction-section ul { list-style: none; padding: 0; }
.extraction-section li { padding: 4px 0; font-size: 14px; }

.finding-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-left: 4px solid #ccc;
}

.finding-critical { border-left-color: #dc3545; }
.finding-major { border-left-color: #ffc107; }
.finding-minor { border-left-color: #17a2b8; }

.finding-header { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.finding-category { font-weight: 600; font-size: 14px; }
.finding-detail { font-size: 13px; color: #666; margin: 8px 0; display: flex; gap: 16px; }
.finding-actions { display: flex; gap: 8px; margin-top: 8px; }

/* Review Section */
.review-section { margin-top: 20px; }
.review-section textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 10px;
  resize: vertical;
}

.review-date { font-size: 12px; color: #999; margin-top: 4px; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #888;
}

/* Responsive */
@media (max-width: 768px) {
  .two-panel { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .conversation-meta { flex-direction: column; gap: 4px; }
  .nav { padding: 0 12px; gap: 16px; }
}
