/* Decision Support Dashboard – consistent with ticket-settings / reconciliation */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

.ai-dashboard-page {
  --dash-bg: #f0f9ff;
  --dash-surface: #ffffff;
  --dash-border: rgba(6, 182, 212, 0.35);
  --dash-accent: #0891b2;
  --dash-text: #0f172a;
  --dash-muted: #64748b;
  --dash-card: rgba(255, 255, 255, 0.9);
  --dash-success: #16a34a;
  --dash-danger: #dc2626;
  font-family: 'Outfit', -apple-system, sans-serif;
  background: var(--dash-bg);
  min-height: 100vh;
  color: var(--dash-text);
}

.ai-dashboard-page .ai-dashboard-body {
  position: relative;
  overflow-x: hidden;
}

.ai-dashboard-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50vh;
  background: radial-gradient(ellipse 80% 50% at 50% -5%, rgba(6, 182, 212, 0.12), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.ai-dashboard-main {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow: auto;
  padding: 1.5rem 2rem 3rem;
}

.ai-dashboard-hero {
  margin-bottom: 2rem;
}

.ai-dashboard-hero h1 {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--dash-text) 0%, var(--dash-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-dashboard-hero h1 .bi {
  -webkit-text-fill-color: initial;
  color: var(--dash-accent);
}

.ai-dashboard-hero p {
  color: var(--dash-muted);
  font-size: 0.95rem;
  font-weight: 300;
  margin-bottom: 0;
}

.ai-dashboard-section {
  margin-bottom: 2rem;
}

.ai-dashboard-decision-card-body {
  max-height: 420px;
  overflow-y: auto;
}

.ai-dashboard-card {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(6, 182, 212, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.ai-dashboard-card-header {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06) 0%, rgba(6, 182, 212, 0.02) 100%);
  border-bottom: 1px solid var(--dash-border);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ai-dashboard-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dash-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-dashboard-card-title .bi {
  color: var(--dash-accent);
  font-size: 1.1rem;
}

.ai-dashboard-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-dashboard-empty {
  color: var(--dash-muted);
  font-size: 0.9rem;
  padding: 1.5rem;
  text-align: center;
}

.ai-dashboard-table {
  font-size: 0.875rem;
}

.ai-dashboard-table thead th {
  color: var(--dash-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--dash-border);
}

.ai-dashboard-table tbody td {
  vertical-align: middle;
}

.ai-dashboard-table .ticket-link {
  font-weight: 500;
  color: var(--dash-accent);
  text-decoration: none;
}

.ai-dashboard-table .ticket-link:hover {
  text-decoration: underline;
}

.ai-dashboard-table .current-vs-suggested {
  font-size: 0.8rem;
}

.ai-dashboard-table .suggested-diff {
  color: var(--dash-accent);
}

.ai-dashboard-table .confidence-pill {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.ai-dashboard-table .confidence-high {
  background: rgba(22, 163, 74, 0.15);
  color: var(--dash-success);
}

.ai-dashboard-table .confidence-mid {
  background: rgba(217, 119, 6, 0.15);
  color: #b45309;
}

.ai-dashboard-table .confidence-low {
  background: rgba(100, 116, 139, 0.2);
  color: var(--dash-muted);
}

.ai-dashboard-table .reasoning-cell {
  max-width: 320px;
}

.ai-dashboard-table .reasoning-text {
  font-size: 0.8rem;
  color: var(--dash-muted);
  line-height: 1.4;
}

.ai-dashboard-table .reasoning-full {
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-dashboard-table .reasoning-toggle {
  font-size: 0.75rem;
  vertical-align: baseline;
  text-decoration: none;
  color: var(--dash-accent);
}

.ai-dashboard-table .reasoning-toggle:hover {
  color: var(--dash-accent);
  text-decoration: underline;
}

.ai-dashboard-table .actions-cell {
  white-space: nowrap;
}

.ai-dashboard-table .btn-action {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ai-dashboard-table .btn-action .bi {
  font-size: 1rem;
}

.ai-dashboard-table .btn-action.btn-apply {
  background: linear-gradient(135deg, var(--dash-success) 0%, #15803d 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25);
}

.ai-dashboard-table .btn-action.btn-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
  color: #fff;
}

.ai-dashboard-table .btn-action.btn-dismiss {
  background: #fff;
  color: var(--dash-muted);
  border: 1px solid var(--dash-border);
}

.ai-dashboard-table .btn-action.btn-dismiss:hover {
  background: rgba(100, 116, 139, 0.08);
  color: var(--dash-text);
  border-color: var(--dash-muted);
  transform: translateY(-1px);
}

.ai-dashboard-table .sender-cell {
  max-width: 180px;
}

.ai-dashboard-table .sender-text {
  font-size: 0.8rem;
  color: var(--dash-muted);
}

.ai-dashboard-table .btn-ignore-sender {
  vertical-align: middle;
}

#ignored-senders-list {
  max-height: 120px;
  overflow-y: auto;
}

.ai-dashboard-stat-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06) 0%, rgba(6, 182, 212, 0.02) 100%);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.ai-dashboard-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dash-text);
  line-height: 1.2;
}

.ai-dashboard-stat-label {
  font-size: 0.8rem;
  color: var(--dash-muted);
  margin-top: 0.25rem;
}

.ai-dashboard-volume-chart {
  min-height: 200px;
  background: rgba(6, 182, 212, 0.04);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.ai-dashboard-volume-bar {
  flex: 1;
  min-width: 8px;
  background: linear-gradient(180deg, var(--dash-accent) 0%, rgba(6, 182, 212, 0.5) 100%);
  border-radius: 4px 4px 0 0;
  transition: opacity 0.2s;
}

.ai-dashboard-volume-bar:hover {
  opacity: 0.85;
}

.ai-dashboard-volume-chart .bar-label {
  font-size: 0.65rem;
  color: var(--dash-muted);
  text-align: center;
  margin-top: 4px;
}

.toast-container .toast {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
