:root {
  /* Simplified Black/White Theme (Matches WebUI) */
  --primary-500: #000000;
  --secondary-500: #666666;
  --success-500: #166534;
  --alert-500: #991b1b;
  --warning-500: #92400e;

  /* Neutrals */
  --neutral-950: #000000;
  --neutral-900: #171717;
  --neutral-800: #e5e5e5; /* Lighter borders */
  --neutral-400: #737373; /* Muted text */
  --neutral-100: #000000; /* Main text */

  /* Theme Mapping */
  --bg: #ffffff;
  --bg-secondary: #f5f5f5;
  --panel: #ffffff; /* Panels connect seamlessly or use slight off-white if needed */
  --component-bg: #ffffff;
  --muted: var(--neutral-400);
  --text: var(--neutral-100);
  --text-muted: var(--neutral-400);

  --accent: #000000;
  --accent-secondary: #404040;

  --danger: var(--alert-500);
  --warning: var(--warning-500);
  --success: var(--success-500);

  --border: var(--neutral-800);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  z-index: 5;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo {
  height: 38px;
  width: auto;
  filter: invert(1);
}

.brand-subtitle-container {
  display: flex;
  flex-direction: column;
}

.brand-by {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  font-weight: 700;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Responsive grid layouts */
@media (max-width: 992px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Make 3-column grids stack on tablets/mobile */
  div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  /* Make 4-column perf stats into 2x2 on tablets */
  #perf-stats-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 576px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  /* Make perf stats fully stack on small mobile */
  #perf-stats-container {
    grid-template-columns: 1fr !important;
  }
}

.panel {
  background: var(--component-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: none;
  margin-bottom: 8px;
}

.panel h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Panel header with controls on the right */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-header h3 {
  margin: 0;
}

.panel-header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-header-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .panel-header-controls select,
  .panel-header-controls button {
    flex: 1;
    min-width: 0;
  }

  /* Stack inline grids on mobile */
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Responsive form controls */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

input,
select,
button,
textarea {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--component-bg);
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
}

input:focus,
select:focus,
button:focus,
textarea:focus {
  border-color: var(--accent);
}

.btn {
  background: #111827; /* dark, near-black solid fill */
  border: 1px solid #111827;
  color: #ffffff;
  cursor: pointer;
  transition: 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* All variants share the same solid black style for a consistent look */
.btn.primary,
.btn.success,
.btn.warning,
.btn.danger {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sdk-tab-btn.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.sdk-code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-size: 0.78rem;
  overflow-x: auto;
  margin: 0;
  white-space: pre;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  line-height: 1.5;
}

/* Pagination controls */
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-controls .btn {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  min-height: 30px;
  min-width: 32px;
  justify-content: center;
  gap: 4px;
}

.pagination-controls .btn[disabled] {
  opacity: 0.4;
}

.pagination-controls .btn.primary {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 30px;
  font-size: 15px;
  color: var(--text-muted);
  user-select: none;
}

/* Ensure SVG icons inside buttons don't block clicks */
.btn svg,
.btn i,
.btn svg * {
  pointer-events: none;
}

.metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.metric {
  flex: 1 1 200px;
  background: var(--component-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.metric .value {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.metric .label {
  font-size: 12px;
  color: var(--muted);
}

.metric .trend {
  font-size: 11px;
  margin-top: 4px;
}

.metric .trend.up {
  color: var(--success);
}

.metric .trend.down {
  color: var(--danger);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

/* Markdown content styling for AI Insights */
.markdown-content {
  color: var(--text-primary);
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 8px;
  font-weight: 600;
}

.markdown-content h1 {
  font-size: 1.5em;
}
.markdown-content h2 {
  font-size: 1.3em;
}
.markdown-content h3 {
  font-size: 1.15em;
}
.markdown-content h4 {
  font-size: 1.05em;
}

.markdown-content p {
  margin: 8px 0;
}

.markdown-content strong {
  font-weight: 600;
  color: var(--text-primary);
}

.markdown-content em {
  font-style: italic;
}

.markdown-content code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", "Consolas", "Monaco", monospace;
  font-size: 0.9em;
  color: var(--accent);
}

.markdown-content pre {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--border);
}

.markdown-content pre code {
  background: transparent;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
}

.markdown-content ul,
.markdown-content ol {
  margin: 8px 0;
  padding-left: 24px;
}

.markdown-content li {
  margin: 4px 0;
  line-height: 1.6;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

.markdown-content th,
.markdown-content td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.markdown-content th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

.markdown-content tr:nth-child(even) {
  background: var(--bg-secondary);
}

.markdown-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 12px 0;
  padding: 8px 16px;
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.markdown-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.markdown-content a {
  color: var(--accent);
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}

/* Typing cursor animation for streaming */
.typing-cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s step-end infinite;
  font-weight: 300;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid;
  display: inline-block;
  margin: 2px;
  white-space: nowrap;
}

.tag.active {
  border-color: var(--success);
  color: var(--success);
  background: rgba(38, 166, 96, 0.1);
}

.tag.suspended {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(222, 40, 84, 0.1);
}

.tag.enabled {
  border-color: var(--success);
  color: var(--success);
  background: rgba(38, 166, 96, 0.1);
}

.tag.disabled {
  border-color: var(--muted);
  color: var(--muted);
  background: rgba(102, 102, 102, 0.1);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.status-dot.healthy {
  background: var(--success);
}

.status-dot.warning {
  background: var(--warning);
}

.status-dot.error {
  background: var(--danger);
}

.right {
  text-align: right;
}

.center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

.pill {
  border: 1px solid var(--border);
  background: var(--component-bg);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  display: inline-block;
}

.flex {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  background: var(--bg);
  overflow: hidden;
}

.sidebar {
  width: 250px;
  background: var(--component-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: visible;
}

.sidebar-nav {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Replaces .tab styling */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--neutral-900);
}

.nav-item.active {
  background-color: #000000;
  color: #ffffff;
}

.nav-item [data-lucide] {
  width: 20px;
  height: 20px;
  color: currentColor;
}

.main-content {
  flex: 1;
  padding: 24px;
  background: var(--bg);
  overflow-y: auto;
  min-width: 0;
}

.tab-content {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes confirmSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.chart-placeholder {
  height: 200px;
  background: var(--component-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.employee-card {
  background: var(--component-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

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

.employee-card .stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}

.model-usage-bar {
  background: var(--component-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  height: 20px;
  margin: 4px 0;
}

.model-usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transition: width 0.3s ease;
}

.loading {
  opacity: 0.6;
}

.error-message {
  color: var(--danger);
  background: rgba(222, 40, 84, 0.1);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
}

.success-message {
  color: var(--success);
  background: rgba(38, 166, 96, 0.1);
  border: 1px solid var(--success);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
}

/* Lucide icon styling for clean, minimal icons (no heavy chips) */
[data-lucide] {
  width: 28px;
  height: 16px;
  stroke-width: 2px;
}

.panel h3 [data-lucide],
.panel h4 [data-lucide],
.tabs .tab [data-lucide] {
  color: var(--accent);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.active,
.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg);
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  overflow: hidden;
}

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

.modal-header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  background: var(--panel);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Chat Bubbles */
#chat-history-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 0;
}

.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
  position: relative;
}

.chat-message.user {
  align-self: flex-end;
  background: var(--accent);
  color: white;
  border-bottom-right-radius: 2px;
}

.chat-message.assistant {
  align-self: flex-start;
  background: var(--component-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
}

.chat-message.system {
  align-self: stretch;
  background: transparent;
  color: var(--text);
  border: none;
  max-width: 100%;
  padding: 4px 0;
}

.chat-message.system .role {
  display: none;
}

.chat-message .role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0.8;
  display: block;
}

.chat-message pre {
  background: rgba(0, 0, 0, 0.05);
  padding: 8px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 12px;
  margin: 8px 0;
}

/* Chat History Modal Enhanced Styles */
.chat-history-modal-content {
  max-width: 900px;
  max-height: 85vh;
  overflow: hidden;
}

.chat-history-modal-body {
  flex: 1;
  overflow-y: auto;
  max-height: calc(85vh - 160px);
  padding: 20px;
}

.chat-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin: 20px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.chat-section-header i {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* Analysis Section Styles */
.analysis-section {
  background: linear-gradient(
    135deg,
    var(--component-bg) 0%,
    rgba(51, 111, 228, 0.03) 100%
  );
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

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

.analysis-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.analysis-title i {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.analysis-content {
  min-height: 60px;
}

.analysis-placeholder,
.analysis-loading,
.analysis-error,
.no-detections {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
}

.analysis-placeholder i,
.analysis-loading i,
.no-detections i {
  width: 18px;
  height: 18px;
}

.analysis-error {
  color: var(--danger);
}

.no-detections {
  background: rgba(34, 197, 94, 0.08);
  border-radius: 8px;
  color: #22c55e;
}

.no-detections i {
  color: #22c55e;
}

/* Analysis Results */
.analysis-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.summary-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-card.clean {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
}

.summary-card.low {
  border-color: #eab308;
  background: rgba(234, 179, 8, 0.05);
}

.summary-card.warning {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.05);
}

.summary-card.critical {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.summary-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--component-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-icon i {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.summary-card.clean .summary-icon i {
  color: #22c55e;
}
.summary-card.low .summary-icon i {
  color: #eab308;
}
.summary-card.warning .summary-icon i {
  color: #f97316;
}
.summary-card.critical .summary-icon i {
  color: #ef4444;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.summary-value.small {
  font-size: 12px;
  font-weight: 600;
}

.summary-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

/* Detections Section */
.detections-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.section-title i {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.detections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.detection-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--component-bg);
  border-radius: 8px;
  border-left: 3px solid var(--border);
}

.detection-card.low {
  border-left-color: #eab308;
}

.detection-card.warning {
  border-left-color: #f97316;
}

.detection-card.critical {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.detection-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detection-icon i {
  width: 16px;
  height: 16px;
}

.detection-card.low .detection-icon i {
  color: #eab308;
}
.detection-card.warning .detection-icon i {
  color: #f97316;
}
.detection-card.critical .detection-icon i {
  color: #ef4444;
}

.detection-details {
  flex: 1;
  min-width: 0;
}

.detection-label {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
}

.detection-count {
  font-size: 11px;
  color: var(--muted);
}

.detection-confidence {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.8;
}

/* Compliance Violations */
.compliance-violations {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.violation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 12px;
  color: #ef4444;
  margin-bottom: 10px;
}

.violation-header i {
  width: 16px;
  height: 16px;
}

.violation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.violation-tag {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* Recommendations */
.analysis-recommendations {
  background: rgba(51, 111, 228, 0.05);
  border: 1px solid rgba(51, 111, 228, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.recommendations-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
}

.recommendations-header i {
  width: 16px;
  height: 16px;
}

.recommendations-list {
  margin: 0;
  padding-left: 20px;
  font-size: 12px;
  color: var(--text);
}

.recommendations-list li {
  margin-bottom: 4px;
}

/* JSON Syntax Highlighting */
.json-content {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  padding: 12px;
  font-size: 11px;
  line-height: 1.5;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

.json-key {
  color: #0550ae;
}
.json-string {
  color: #0a3069;
}
.json-number {
  color: #0550ae;
}
.json-boolean {
  color: #cf222e;
}
.json-null {
  color: #6e7781;
}

.code-block {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  padding: 12px;
  font-size: 12px;
  overflow-x: auto;
}

.inline-code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* Badge styles for classification */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.badge-info {
  background: rgba(51, 111, 228, 0.15);
  color: var(--accent);
}

.badge-warning {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Spinner Animation */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.spin {
  animation: spin 1s linear infinite;
}

/* Category Breakdown */
.category-breakdown {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--component-bg);
  border-radius: 8px;
  border-left: 4px solid var(--border);
}

.category-card i {
  width: 24px;
  height: 24px;
}

.category-info {
  flex: 1;
}

.category-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
}

.category-count {
  font-size: 11px;
  color: var(--muted);
}

/* Severity Breakdown */
.severity-breakdown {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.severity-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.severity-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.severity-label {
  width: 60px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.severity-label.critical {
  color: #ef4444;
}
.severity-label.high {
  color: #f97316;
}
.severity-label.medium {
  color: #eab308;
}
.severity-label.low {
  color: #22c55e;
}

.severity-bar-container {
  flex: 1;
  height: 8px;
  background: var(--component-bg);
  border-radius: 4px;
  overflow: hidden;
}

.severity-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.severity-bar.critical {
  background: #ef4444;
}
.severity-bar.high {
  background: #f97316;
}
.severity-bar.medium {
  background: #eab308;
}
.severity-bar.low {
  background: #22c55e;
}

.severity-count {
  width: 30px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* Detection meta info */
.detection-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.category-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

.category-badge.phi {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.category-badge.pii {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.category-badge.pci {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.category-badge.credentials {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

.confidence {
  font-size: 10px;
  color: var(--muted);
}

/* Clickable detection cards */
.detection-card.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.detection-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detection-card.active {
  ring: 2px solid var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
  background: rgba(51, 111, 228, 0.08);
}

.detection-card .click-hint {
  width: 12px;
  height: 12px;
  color: var(--muted);
  margin-left: 4px;
  opacity: 0.6;
}

.detection-card.clickable:hover .click-hint {
  opacity: 1;
  color: var(--accent);
}

/* Detection highlight in chat */
.detection-highlight {
  background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
  padding: 1px 4px;
  border-radius: 3px;
  color: #854d0e;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.detection-highlight.pulse {
  animation: highlightPulse 0.5s ease-in-out 3;
}

@keyframes highlightPulse {
  0%,
  100% {
    background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
    transform: scale(1);
  }
  50% {
    background: linear-gradient(120deg, #fde047 0%, #facc15 100%);
    transform: scale(1.05);
  }
}

/* Highlight status bar */
.highlight-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.highlight-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #854d0e;
  font-size: 13px;
}

.highlight-info i {
  width: 16px;
  height: 16px;
}

.highlight-info strong {
  font-weight: 700;
}

.clear-highlights-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #fde047;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #854d0e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-highlights-btn:hover {
  background: white;
  border-color: #facc15;
}

.clear-highlights-btn i {
  width: 14px;
  height: 14px;
}

/* Different highlight colors for different categories */
.detection-highlight[data-type*="creditCard"],
.detection-highlight[data-type*="cvv"],
.detection-highlight[data-type*="cardPin"] {
  background: linear-gradient(120deg, #f5d0fe 0%, #e879f9 50%, #f5d0fe 100%);
  color: #701a75;
}

.detection-highlight[data-type*="mrn"],
.detection-highlight[data-type*="healthPlan"],
.detection-highlight[data-type*="npi"],
.detection-highlight[data-type*="medication"],
.detection-highlight[data-type*="labResult"],
.detection-highlight[data-type*="treatment"] {
  background: linear-gradient(120deg, #fecaca 0%, #f87171 50%, #fecaca 100%);
  color: #7f1d1d;
}

.detection-highlight[data-type*="apiKey"],
.detection-highlight[data-type*="password"],
.detection-highlight[data-type*="aws"],
.detection-highlight[data-type*="privateKey"],
.detection-highlight[data-type*="jwt"] {
  background: linear-gradient(120deg, #fecdd3 0%, #fb7185 50%, #fecdd3 100%);
  color: #881337;
}

/* Tools and MCP Servers Section */
.tools-section,
.mcp-section {
  margin-top: 16px;
  padding: 12px;
  background: var(--component-bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.tools-section .section-title,
.mcp-section .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.tools-section .section-title i,
.mcp-section .section-title i {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.tools-grid,
.mcp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-badge,
.mcp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-family: "SF Mono", "Monaco", "Menlo", monospace;
  transition: all 0.2s ease;
}

.tool-badge {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.tool-badge:hover {
  background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
  transform: translateY(-1px);
}

.mcp-badge {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
  color: #7c3aed;
  border: 1px solid #c4b5fd;
}

.mcp-badge:hover {
  background: linear-gradient(135deg, #e9d5ff 0%, #c4b5fd 100%);
  transform: translateY(-1px);
}

.tool-badge i,
.mcp-badge i {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

/* Analysis Method Indicator */
.analysis-method {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 8px;
  font-size: 12px;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.analysis-method i {
  width: 16px;
  height: 16px;
  color: #b45309;
}

/* Analysis Summary Text */
.analysis-summary-text {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--component-bg);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.analysis-summary-text i {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .analysis-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chat-history-modal-content {
    width: 95%;
    max-width: none;
  }

  .category-cards {
    grid-template-columns: 1fr;
  }
}

#audit-trail-table tbody tr {
  cursor: pointer;
  transition: background 0.1s ease;
}

#audit-trail-table tbody tr:hover {
  background: rgba(51, 111, 228, 0.05);
}

.small {
  font-size: 11px;
}

/* ============================================
   OBSERVABILITY FILTER BAR STYLING
   ============================================ */

.obs-filter-container {
  background: var(--panel-bg, var(--component-bg));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.obs-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.obs-filter-row:last-of-type {
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select:hover {
  border-color: var(--accent);
  background: var(--panel-bg, var(--component-bg));
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.filter-multi {
  min-height: 38px;
  max-height: 120px;
}

.filter-multi option {
  padding: 6px 8px;
  border-radius: 4px;
  margin: 2px 0;
}

.filter-multi option:checked {
  background: var(--accent);
  color: white;
}

.filter-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  flex: 1;
}

.filter-input:hover {
  border-color: var(--accent);
}

.filter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.obs-filter-actions {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.obs-filter-actions .btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.obs-filter-actions .btn svg {
  width: 16px;
  height: 16px;
}

/* Responsive design for smaller screens */
@media (max-width: 1200px) {
  .obs-filter-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .obs-filter-row {
    grid-template-columns: 1fr;
  }

  .obs-filter-actions {
    flex-direction: column;
  }

  .obs-filter-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Custom Multi-Select Dropdown Styling */
.custom-multi-select {
  position: relative;
}

.multi-select-btn {
  width: 100%;
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.multi-select-btn::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  opacity: 0.6;
}

.multi-select-btn:hover {
  border-color: var(--accent);
  background: var(--panel-bg, var(--component-bg));
}

.multi-select-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
}

.multi-select-dropdown.active {
  display: block;
}

.multi-select-option {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.multi-select-option:hover {
  background: var(--panel-bg, var(--component-bg));
}

.multi-select-option input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.multi-select-option label {
  flex: 1;
  cursor: pointer;
  margin: 0;
  font-size: 14px;
}

/* Provider Sidebar Items */
.provider-sidebar-item {
  transition: all 0.15s ease;
}

.provider-sidebar-item:hover:not(.selected) {
  background: var(--border) !important;
  border-color: var(--border) !important;
}

.provider-sidebar-item.selected {
  background: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}

.provider-sidebar-item.selected * {
  color: white !important;
}

.provider-sidebar-item.selected span {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* Spin animation for loading icons */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
}

/* ============================================
   HELP TOOLTIPS & INFO ICONS
   ============================================ */

/* Info icon button in sidebar */
.nav-item-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
}

.nav-item-wrapper .nav-item {
  flex: 1;
}

.nav-item-wrapper .tooltip-wrapper {
  position: static;
}

/* Section labels in sidebar */
.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 16px 12px 8px 12px;
  margin-top: 4px;
}

.nav-section-label:first-child {
  margin-top: 0;
  padding-top: 0;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: help;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.info-icon:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.nav-item.active .info-icon {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

.nav-item.active .info-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

/* Tooltip container */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-wrapper .tooltip {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  background: var(--neutral-900);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  width: 300px;
  z-index: 99999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  pointer-events: none;
}

.tooltip-wrapper .tooltip::before {
  display: none;
}

.tooltip-wrapper:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* Inline info icon (for headers and labels) */
.info-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  cursor: help;
  transition: all 0.2s ease;
  margin-left: 6px;
  vertical-align: middle;
}

.info-icon-inline:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Tooltip for inline icons (appears below) */
.tooltip-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-inline .tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--neutral-900);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  width: 260px;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  text-align: left;
  white-space: normal;
}

.tooltip-inline .tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--neutral-900);
}

.tooltip-inline:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* ============================================
   PAGE HELP BANNERS
   ============================================ */

.page-help-banner {
  background: linear-gradient(135deg, #f0f7ff 0%, #f5f5ff 100%);
  border: 1px solid #d0e3ff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.page-help-banner .help-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-help-banner .help-icon i {
  color: white;
  width: 20px;
  height: 20px;
}

.page-help-banner .help-content {
  flex: 1;
}

.page-help-banner .help-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 8px 0;
}

.page-help-banner .help-description {
  font-size: 13px;
  color: #4a6fa5;
  line-height: 1.6;
  margin: 0;
}

.page-help-banner .help-description ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.page-help-banner .help-description li {
  margin-bottom: 4px;
}

/* Collapsible help banner */
.page-help-banner.collapsible {
  cursor: pointer;
}

.page-help-banner.collapsible .help-content {
  transition: max-height 0.3s ease;
}

.page-help-banner.collapsed .help-description {
  display: none;
}

.page-help-banner .collapse-toggle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #c0d4f0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.page-help-banner .collapse-toggle:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

.page-help-banner .collapse-toggle i {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.page-help-banner.collapsed .collapse-toggle i {
  transform: rotate(180deg);
}

/* Section header with info icon */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.section-header h3 {
  margin: 0;
}

.section-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
}

/* Panel section description - appears under h3 headers */
.panel-description {
  font-size: 13px;
  color: var(--text-muted);
  margin: -8px 0 16px 0;
  line-height: 1.5;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.panel-description.no-border {
  border-bottom: none;
  padding-bottom: 0;
}

/* Compact description for smaller sections */
.section-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: -4px 0 12px 0;
  font-style: italic;
}

/* Subsection header with description */
.panel h3 + .panel-description,
.panel h4 + .panel-description {
  margin-top: 4px;
}

/* Card section mini-description */
.card-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}

/* Info box for sections */
.info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.info-box h4 {
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-box p,
.info-box ul {
  font-size: 12px;
  color: #475569;
  margin: 0;
  line-height: 1.6;
}

.info-box ul {
  padding-left: 16px;
  margin-top: 8px;
}

.info-box li {
  margin-bottom: 4px;
}

/* Metric card with tooltip */
.metric-with-tooltip {
  position: relative;
}

.metric-with-tooltip .tooltip-inline {
  position: absolute;
  top: 8px;
  right: 8px;
}

.metric-with-tooltip .tooltip-inline .tooltip {
  right: 0;
  left: auto;
  transform: none;
}

.metric-with-tooltip .tooltip-inline .tooltip::before {
  left: auto;
  right: 20px;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e5e5e5;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--success);
  border-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.toggle-switch:hover .toggle-slider {
  background-color: #d4d4d4;
}

.toggle-switch:hover input:checked + .toggle-slider {
  background-color: #15803d;
}

/* Demo Mode Banner Styles */
.demo-mode-banner {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
  z-index: 1000;
}

.demo-mode-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-mode-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-mode-text strong {
  font-weight: 600;
}

.demo-mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Demo Mode Indicator Badge (for cards/components) */
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Security Events Demo Styles */
.security-event {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.security-event:last-child {
  border-bottom: none;
}

.security-event-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-event-icon.critical {
  background: #fef2f2;
  color: #dc2626;
}

.security-event-icon.high {
  background: #fff7ed;
  color: #ea580c;
}

.security-event-icon.medium {
  background: #fefce8;
  color: #ca8a04;
}

.security-event-icon.low {
  background: #f0fdf4;
  color: #16a34a;
}

.security-event-content {
  flex: 1;
  min-width: 0;
}

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

.security-event-type {
  font-weight: 600;
  font-size: 13px;
}

.security-event-time {
  font-size: 12px;
  color: var(--text-muted);
}

.security-event-description {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.security-event-user {
  font-size: 12px;
  color: var(--text-muted);
}

.security-event-action {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.security-event-action.blocked {
  background: #fef2f2;
  color: #dc2626;
}

.security-event-action.redacted {
  background: #fff7ed;
  color: #ea580c;
}

.security-event-action.warned {
  background: #fefce8;
  color: #ca8a04;
}

.security-event-action.logged {
  background: #f0fdf4;
  color: #16a34a;
}

/* ============================================
   SETUP WIZARD STYLES
   ============================================ */

/* Overlay */
.wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal - Force light theme for readability */
.wizard-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 900px;
  height: 90vh;
  max-height: 780px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s ease;
  position: relative;
  color: #1a1a2e;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progress Bar */
.wizard-progress-bar {
  height: 4px;
  background: #e5e7eb;
  position: relative;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #8b5cf6);
  transition: width 0.5s ease;
  border-radius: 0 2px 2px 0;
}

/* Step Indicators */
.wizard-steps-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.wizard-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.wizard-step-dot span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  border: 2px solid transparent;
}

.wizard-step-dot .step-label {
  font-size: 10px;
  color: #6b7280;
  white-space: nowrap;
}

.wizard-step-dot.active {
  opacity: 1;
}

.wizard-step-dot.active span {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.wizard-step-dot.completed span {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.wizard-step-dot.completed {
  opacity: 1;
}

/* Content Area */
.wizard-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

/* Step Container */
.wizard-step {
  display: none;
  animation: fadeInStep 0.4s ease;
}

.wizard-step.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Step Icon */
.wizard-step-icon {
  text-align: center;
  margin-bottom: 20px;
  color: #1f2937;
}

.wizard-step-icon i {
  color: #22c55e;
}

.wizard-step-icon.success-animation i {
  animation: successPop 0.6s ease;
}

@keyframes successPop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Titles */
.wizard-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin: 0 0 8px 0;
}

.wizard-subtitle {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin: 0 0 24px 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Checklist */
.wizard-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  margin: 24px auto;
}

.wizard-checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #1f2937;
}

.wizard-checklist-item i {
  color: #22c55e;
}

/* Time Estimate */
.wizard-time-estimate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 13px;
  color: #4b5563;
  max-width: fit-content;
  margin: 24px auto 0;
}

.wizard-time-estimate i {
  color: #6b7280;
}

/* Demo Status */
.wizard-demo-status {
  margin: 20px 0;
}

.demo-status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 12px;
}

.demo-status-card .demo-status-icon {
  color: #f59e0b;
}

.demo-status-card .demo-status-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-status-card .demo-status-text strong {
  color: #92400e;
}

.demo-status-card .demo-status-text span {
  font-size: 12px;
  color: #a16207;
}

/* Demo Options */
.wizard-demo-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.wizard-option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.wizard-option-card:hover {
  border-color: #3b82f6;
  background: #f3f4f6;
}

.wizard-option-card.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.wizard-option-card .option-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  border-radius: 10px;
  color: #6b7280;
  flex-shrink: 0;
}

.wizard-option-card.selected .option-icon {
  background: #3b82f6;
  color: white;
}

.wizard-option-card .option-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wizard-option-card .option-content strong {
  font-size: 14px;
  color: #111827;
}

.wizard-option-card .option-content span {
  font-size: 12px;
  color: #6b7280;
}

.wizard-option-card .option-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.wizard-option-card.selected .option-check {
  border-color: #22c55e;
  background: #22c55e;
  color: white;
}

/* Form Styles */
.wizard-form {
  max-width: 400px;
  margin: 0 auto;
}

.wizard-form-group {
  margin-bottom: 20px;
}

.wizard-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.wizard-form-group input,
.wizard-form-group select {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  transition: all 0.2s ease;
}

.wizard-form-group input:focus,
.wizard-form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.wizard-form-group input::placeholder {
  color: #9ca3af;
}

.wizard-form-hint {
  font-size: 11px;
  color: #6b7280;
  margin-top: 6px;
}

/* Size Options */
.wizard-size-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.size-option {
  padding: 14px 8px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.size-option:hover {
  border-color: #3b82f6;
}

.size-option.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.size-option .size-number {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.size-option .size-label {
  font-size: 10px;
  color: #6b7280;
}

/* Import Options */
.wizard-import-options {
  display: flex;
  flex-direction: column; /* Vertical layout */
  gap: 16px;
  /* align-items: stretch is default */
}

.wizard-import-card {
  flex: 1;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.wizard-import-card h3 {
  margin: 0;
  font-size: 15px;
  color: #111827;
}

.wizard-import-card p {
  font-size: 12px;
  color: #6b7280;
  margin: 8px 0 16px;
}

.import-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.import-card-header i {
  color: #6b7280;
}

.wizard-import-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: #9ca3af;
  font-size: 12px;
  margin: 8px 0;
  align-self: center;
}

/* CSV Upload */
.csv-upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
  background: #ffffff;
}

.csv-upload-zone i {
  color: #9ca3af;
}

.csv-upload-zone:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.csv-upload-zone.dragover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.csv-template-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #3b82f6;
  margin-top: 12px;
  text-decoration: none;
}

.csv-template-link:hover {
  text-decoration: underline;
}

.csv-preview {
  margin-top: 16px;
  padding: 12px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.csv-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.csv-preview-count {
  font-size: 13px;
  color: #111827;
}

.csv-preview-table {
  max-height: 150px;
  overflow-y: auto;
  font-size: 12px;
}

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

.csv-preview-table th,
.csv-preview-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  color: #374151;
}

.csv-preview-table th {
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
}

/* Manual Form */
.manual-user-form {
  margin-top: 12px;
}

.wizard-form-row {
  display: flex;
  gap: 8px;
}

.wizard-form-row input,
.wizard-form-row select {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
}

.wizard-form-row input::placeholder {
  color: #9ca3af;
}

.wizard-form-row button {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wizard-add-team {
  width: auto;
  height: auto;
  padding: 10px 16px;
  gap: 6px;
  white-space: nowrap;
}

.manual-users-list {
  margin-top: 12px;
  max-height: 120px;
  overflow-y: auto;
}

.manual-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #ffffff;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #374151;
}

.manual-user-item .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manual-user-item .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3b82f6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.manual-user-item .remove-user {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
}

.manual-user-item .remove-user:hover {
  color: #ef4444;
}

.wizard-skip-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 12px;
  color: #6b7280;
}

/* Step validation messages */
.wizard-validation-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.wizard-validation-msg.error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #b91c1c;
}
.wizard-validation-msg.warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #92400e;
}
.wizard-validation-msg.info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #1e40af;
}
.wizard-validation-msg.success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #15803d;
}
.wizard-validation-msg i {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Providers Grid */
.wizard-providers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.wizard-provider-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
  position: relative;
}

.wizard-provider-card:hover {
  border-color: #9ca3af;
}

.wizard-provider-card.enabled {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
}

.provider-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-logo {
  width: 40px;
  height: 40px;
}

.provider-logo img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.provider-info {
  flex: 1;
}

.provider-info h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.provider-info .provider-type {
  font-size: 11px;
  color: #6b7280;
}

.provider-toggle {
  position: relative;
}

.toggle-input {
  display: none;
}

.toggle-label {
  display: block;
  width: 44px;
  height: 24px;
  background: #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.toggle-label::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-label {
  background: #22c55e;
}

.toggle-input:checked + .toggle-label::after {
  transform: translateX(20px);
}

.provider-card-body {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.provider-card-body .wizard-form-group {
  margin-bottom: 12px;
}

.provider-card-body .wizard-form-group label {
  font-size: 11px;
}

.provider-card-body .wizard-form-group input {
  padding: 10px 12px;
  font-size: 13px;
}

.test-connection {
  width: 100%;
  justify-content: center;
  gap: 8px;
}

.connection-status {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  display: none;
}

.connection-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.connection-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.provider-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.provider-badge.local {
  background: #dbeafe;
  color: #1d4ed8;
}

.provider-badge.popular {
  background: #fef3c7;
  color: #d97706;
}

.provider-badge.enterprise {
  background: #ede9fe;
  color: #7c3aed;
}

.wizard-providers-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
}

.wizard-providers-summary.ready {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

/* Test Container */
.wizard-test-container {
  max-width: 480px;
  margin: 0 auto;
}

.test-config {
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 20px;
}

.test-config .wizard-form-group {
  margin-bottom: 16px;
}

.btn.large {
  padding: 14px 24px;
  font-size: 15px;
  width: 100%;
  justify-content: center;
  gap: 8px;
}

.test-results {
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.test-result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.test-status {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.test-status.success {
  color: #22c55e;
}

.test-status.error {
  color: #ef4444;
}

#test-status-text {
  font-weight: 600;
  color: #111827;
}

.test-result-details {
  margin-bottom: 16px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
}

.result-label {
  color: #6b7280;
}

.result-value {
  color: #111827;
  font-weight: 500;
}

.test-response label {
  font-size: 12px;
  color: #6b7280;
  display: block;
  margin-bottom: 8px;
}

.response-content {
  padding: 12px;
  background: #ffffff;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  max-height: 100px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
}

/* Summary Cards */
.wizard-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.summary-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  border-radius: 10px;
  color: #3b82f6;
}

.summary-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-label {
  font-size: 11px;
  color: #6b7280;
}

.summary-value {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* Next Steps */
.wizard-next-steps {
  margin-top: 32px;
}

.wizard-next-steps h3 {
  font-size: 15px;
  color: #111827;
  margin: 0 0 16px;
  text-align: center;
}

.next-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.next-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: #111827;
  transition: all 0.2s ease;
}

.next-step-item:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.next-step-item span {
  flex: 1;
  font-size: 14px;
}

.next-step-item i:first-child {
  color: #3b82f6;
}

.next-step-item i:last-child {
  color: #9ca3af;
}

/* Footer */
.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.wizard-btn-skip {
  color: #6b7280;
  background: transparent;
  border: none;
}

.wizard-btn-skip:hover {
  color: #374151;
  background: transparent;
}

.wizard-nav-buttons {
  display: flex;
  gap: 10px;
}

.wizard-nav-buttons .btn {
  min-width: 100px;
  justify-content: center;
  gap: 6px;
}

/* Close Button */
.wizard-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e5e7eb;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: all 0.2s ease;
  z-index: 10;
}

.wizard-close:hover {
  background: #d1d5db;
  color: #374151;
}

/* Wizard Button in Header */
.wizard-btn {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-color: transparent;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wizard-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.wizard-btn:disabled {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  cursor: not-allowed;
  opacity: 0.7;
}

.wizard-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.wizard-progress-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  margin-left: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .wizard-modal {
    width: 95%;
    height: 95vh;
    max-height: 95vh;
  }

  .wizard-content {
    padding: 24px 20px;
  }

  .wizard-steps-indicator {
    gap: 4px;
    padding: 16px;
  }

  .wizard-step-dot .step-label {
    display: none;
  }

  .wizard-import-options {
    flex-direction: column;
  }

  .wizard-import-divider {
    padding: 16px 0;
  }

  .wizard-providers-grid {
    grid-template-columns: 1fr;
  }

  .wizard-size-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .wizard-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================================
   Gateway Routes (Cloudflare DNS-style UI)
   ============================================================================ */

.gw-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
}

.gw-add-form {
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border);
  border-top: none;
  padding: 16px 20px;
  animation: gw-slide-down 0.2s ease-out;
}

@keyframes gw-slide-down {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  to {
    opacity: 1;
    max-height: 300px;
  }
}

.gw-form-header {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.gw-form-grid {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.gw-form-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gw-form-field input,
.gw-form-field select {
  width: 100%;
  padding: 7px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
}

.gw-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.gw-table-container {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.gw-table-container .data-table {
  margin: 0;
  border: none;
  border-radius: 0;
}

.gw-table-container .data-table th {
  background: var(--bg-secondary, #f5f5f5);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 10px 14px;
}

.gw-table-container .data-table td {
  padding: 10px 14px;
  font-size: 13px;
  vertical-align: middle;
}

.gw-table-container .data-table tbody tr {
  transition: background 0.1s;
}

.gw-table-container .data-table tbody tr:hover {
  background: var(--bg-secondary, #f9fafb);
}

/* Type badge */
.gw-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: #e5e7eb;
  color: #374151;
}

.gw-type-badge[data-type="openai-compatible"] {
  background: #d1fae5;
  color: #065f46;
}
.gw-type-badge[data-type="anthropic"] {
  background: #fce7f3;
  color: #9d174d;
}
.gw-type-badge[data-type="google"] {
  background: #dbeafe;
  color: #1e40af;
}
.gw-type-badge[data-type="cohere"] {
  background: #fef3c7;
  color: #92400e;
}
.gw-type-badge[data-type="custom"] {
  background: #e5e7eb;
  color: #374151;
}

/* Proxy status indicator */
.gw-proxy-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 0;
}

.gw-proxy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: background 0.2s;
}

.gw-proxy-icon.active {
  color: #f48120;
}

.gw-proxy-icon.passthrough {
  color: #999;
}

.gw-proxy-status-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.gw-proxy-status-cell .gw-cloud-icon {
  width: 20px;
  height: 20px;
}

.gw-proxy-status-cell.active .gw-cloud-icon {
  color: #f48120;
}
.gw-proxy-status-cell.passthrough .gw-cloud-icon {
  color: #999;
}
.gw-proxy-icon.enriched {
  color: #8b5cf6;
}
.gw-proxy-status-cell.enriched .gw-cloud-icon {
  color: #8b5cf6;
}
.gw-proxy-icon.post-process {
  color: #0ea5e9;
}
.gw-proxy-status-cell.post-process .gw-cloud-icon {
  color: #0ea5e9;
}

/* Route actions */
.gw-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.gw-actions button {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--accent);
  transition: background 0.15s;
}

.gw-actions button:hover {
  background: var(--bg-secondary, #f0f0f0);
}

.gw-actions button.danger {
  color: var(--danger);
  border-color: transparent;
}

.gw-actions button.danger:hover {
  background: rgba(220, 38, 38, 0.08);
}

.gw-url-cell {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}

.gw-path-cell {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text);
}

/* ============================================================================
   Gateway Enhanced: Tabs, Health, Analytics, Bulk, Import, Detail
   ============================================================================ */

/* Form Tabs */
.gw-form-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  overflow-x: auto;
}
.gw-form-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.gw-form-tab:hover {
  color: var(--text);
}
.gw-form-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.gw-form-tab-content {
  animation: fadeIn 0.15s ease;
}
.gw-form-tab-content textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}

/* Key-Value (Header) Editor */
.gw-kv-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gw-kv-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.gw-kv-row input {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}
.gw-kv-row button {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--danger, #ef4444);
  cursor: pointer;
  font-size: 14px;
}
.gw-kv-row button:hover {
  background: var(--danger, #ef4444);
  color: white;
}

/* Bulk Action Bar */
.gw-bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 500;
}
.gw-bulk-bar .btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 11px;
  padding: 4px 10px;
}
.gw-bulk-bar .btn:hover {
  background: rgba(255, 255, 255, 0.35);
}
.gw-bulk-bar .btn.danger {
  background: rgba(239, 68, 68, 0.5);
}

/* Import Modal */
.gw-import-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gw-import-content {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Health Dot */
.gw-health-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.gw-health-dot.healthy {
  background: #22c55e;
  box-shadow: 0 0 4px #22c55e;
}
.gw-health-dot.degraded {
  background: #f59e0b;
  box-shadow: 0 0 4px #f59e0b;
}
.gw-health-dot.unhealthy {
  background: #ef4444;
  box-shadow: 0 0 4px #ef4444;
}
.gw-health-dot.unknown {
  background: #6b7280;
}

/* Circuit Breaker Badge */
.gw-circuit-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.gw-circuit-badge.closed {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.gw-circuit-badge.open {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.gw-circuit-badge.half_open {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* Drag Handle */
.gw-drag-handle {
  cursor: grab;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gw-drag-handle:active {
  cursor: grabbing;
}
.sortable-ghost {
  opacity: 0.4;
  background: var(--primary) !important;
}

/* Route Detail Panel */
.gw-route-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 12px;
  overflow: hidden;
}
.gw-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.gw-detail-body {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.gw-detail-section h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.gw-detail-section {
  font-size: 12px;
}
.gw-detail-kv {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.gw-detail-kv:last-child {
  border-bottom: none;
}
.gw-detail-kv .label {
  color: var(--muted);
}
.gw-detail-kv .value {
  font-weight: 500;
}

/* Gateway Analytics Summary Cards */
.gw-analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.gw-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.gw-summary-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.gw-summary-value {
  font-size: 24px;
  font-weight: 700;
}
.gw-health-healthy {
  color: #22c55e;
}
.gw-health-degraded {
  color: #f59e0b;
}
.gw-health-unhealthy {
  color: #ef4444;
}

/* Traffic Charts Grid */
.gw-traffic-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 16px;
}
.gw-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.gw-chart-card h4 {
  font-size: 13px;
  margin: 0 0 8px;
  font-weight: 600;
}

/* Small button variant */
.btn-sm {
  font-size: 11px !important;
  padding: 4px 10px !important;
}

/* Health table uptime bar */
.gw-uptime-bar {
  display: inline-block;
  width: 60px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 6px;
}
.gw-uptime-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: #22c55e;
  transition: width 0.3s;
}

/* Row checkbox column */
.gw-row-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

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