/* ── IBM Design Language & Reset ─────────────────────────────── */
:root {
  --blue-60: #0f62fe;
  --blue-70: #0043ce;
  --gray-100: #161616;
  --gray-90: #262626;
  --gray-80: #393939;
  --gray-70: #525252;
  --gray-60: #6f6f6f;
  --gray-30: #c6c6c6;
  --gray-20: #e0e0e0;
  --gray-10: #f4f4f4;
  --cool-gray-10: #f2f4f8;
  --white: #ffffff;
  --font: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

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

html, body {
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 14px;
  color: var(--gray-100);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ── App shell ────────────────────────────────────────────────── */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* ── Navigation (IBM Carbon style) ────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--gray-20);
  flex-shrink: 0;
}

.nav-inner {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.nav-ibm {
  height: 100%;
  padding-right: 16px;
  border-right: 1px solid var(--gray-20);
  display: flex;
  align-items: center;
}

.nav-ibm svg {
  display: block;
  height: 20px;
  width: auto;
}

.nav-product {
  padding-left: 16px;
  font-size: 0.875rem;
  color: var(--gray-80);
  font-weight: 600;
  flex: 1;
}

.nav-product span {
  color: var(--gray-60);
  font-weight: 400;
  margin-right: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.health-result {
  font-size: 0.75rem;
  color: var(--gray-60);
  font-family: var(--mono);
}

/* Status bar */
.status-bar {
  border-top: 1px solid var(--gray-20);
  padding: 8px 16px;
  background: var(--gray-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-pills {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 0; /* IBM Plex Carbon style is completely square */
  border: 1px solid transparent;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pill-amber  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.pill-amber .pill-dot  { background: #f59e0b; }

.pill-blue   { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.pill-blue .pill-dot   { background: #3b82f6; }

.pill-slate  { background: var(--white); color: var(--gray-70); border: 1px solid var(--gray-20); }
.pill-slate .pill-dot  { background: var(--gray-60); }

.pill-green  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.pill-green .pill-dot  { background: #22c55e; }

.pill-dim    { opacity: 0.65; }

.config-pills { padding-top: 0; }

/* ── Workspace ────────────────────────────────────────────────── */
.workspace {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: var(--cool-gray-10);
}

/* ── Panels ───────────────────────────────────────────────────── */
.panel {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  gap: 16px;
}

.panel::-webkit-scrollbar { width: 4px; }
.panel::-webkit-scrollbar-thumb { background: var(--gray-30); }

.panel-left {
  width: 42%;
  min-width: 340px;
  border-right: 1px solid var(--gray-20);
  background: var(--white);
}

.panel-right {
  flex: 1;
  min-width: 0;
  background: var(--cool-gray-10);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-70);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-20);
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-20);
  border-radius: 0; /* Completely square Carbon style */
  padding: 20px;
  box-shadow: none; /* No drop shadows in authentic flat IBM Carbon */
  flex-shrink: 0;
}

.card-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-60);
  margin-bottom: 16px;
}

/* ── Upload card ──────────────────────────────────────────────── */
.upload-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.upload-label {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}

.upload-hint {
  font-size: 0.72rem;
  color: #b0bec5;
}

/* ── Metadata card ────────────────────────────────────────────── */
.metadata-card {
  display: flex;
  flex-direction: column;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-70);
}

.select-wrap {
  position: relative;
}

.form-select {
  width: 100%;
  padding: 8px 32px 8px 12px;
  font-family: var(--font) !important;
  font-size: 14px !important;
  color: var(--gray-100);
  background: var(--gray-10);
  border: 1px solid transparent;
  border-bottom: 1px solid var(--gray-30);
  border-radius: 0;
  appearance: none;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  outline: none;
}

.form-select:focus {
  border-color: var(--blue-60);
  background: var(--white);
  outline: 2px solid var(--blue-60);
  outline-offset: -2px;
}

.form-select option, select option, option {
  font-size: 14px !important;
  font-family: var(--font) !important;
  background: var(--white);
  color: var(--gray-100);
}

.select-arrow {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #94a3b8;
}

/* ── Preview card ─────────────────────────────────────────────── */
.preview-card { min-height: 160px; }

.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
  text-align: center;
}

.preview-empty p {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
}

.preview-hint {
  font-size: 0.72rem !important;
  color: #cbd5e1 !important;
  font-weight: 400 !important;
}

/* ── Metric cards ─────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

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

.metric-icon-slate { background: #f1f5f9; color: #64748b; }
.metric-icon-red   { background: #fef2f2; color: #dc2626; }
.metric-icon-blue  { background: #eff6ff; color: #2563eb; }
.metric-icon-green { background: #f0fdf4; color: #16a34a; }

.metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.metric-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 3px;
}

/* ── Filter tabs ──────────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #e2e8f0;
  border-radius: 9px;
}

.tab {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.tab:hover:not(.tab-active) { background: #f1f5f9; color: #334155; }

.tab-active {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Findings placeholder ─────────────────────────────────────── */
.findings-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 52px 24px;
  text-align: center;
  background: #ffffff;
}

.findings-empty-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
}

.findings-empty-hint {
  font-size: 0.75rem;
  color: #cbd5e1;
  max-width: 280px;
  line-height: 1.5;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0; /* Authentic Carbon square borders */
  border: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.btn:disabled {
  background: var(--gray-30) !important;
  color: var(--gray-60) !important;
  cursor: not-allowed;
  opacity: 1 !important;
}

.btn-primary {
  background: var(--blue-60);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-70);
}

.btn-secondary {
  background: var(--gray-80);
  color: var(--white);
  border: 1px solid var(--gray-80);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-90);
  border-color: var(--gray-90);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--gray-70);
  background: transparent;
  border: 1px solid var(--gray-20);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--gray-10);
  color: var(--gray-100);
}

.btn-full { width: 100%; }

.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-30);
  display: inline-block;
  flex-shrink: 0;
  transition: background 0.3s;
}

.health-dot.ok    { background: #24a148; } /* Carbon green-50 */
.health-dot.error { background: #da1e28; } /* Carbon red-60 */

/* ── Sample document card ─────────────────────────────────────── */
.sample-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sample-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

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

.preview-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 99px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* ── Document text display ────────────────────────────────────── */
.doc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 12px;
}

.doc-meta-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-meta-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-meta-sub {
  font-size: 0.7rem;
  color: #94a3b8;
}

.doc-text {
  font-size: 0.8rem;
  line-height: 1.7;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px 2px;
}

.doc-text::-webkit-scrollbar { width: 3px; }
.doc-text::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }

/* ── Spinner ──────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

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

/* ── Findings list ────────────────────────────────────────────── */
.findings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.findings-count {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
  padding: 0 2px;
}

/* ── Finding card ─────────────────────────────────────────────── */
.finding-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.finding-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}

.finding-card.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.finding-header {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.finding-confidence {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Type badges */
.badge-contradiction { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-overlap       { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-gap           { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-stricter      { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* Severity badges */
.badge-sev-high   { background: #fef2f2; color: #dc2626; }
.badge-sev-medium { background: #fff7ed; color: #c2410c; }
.badge-sev-low    { background: #f8fafc; color: #64748b; }

/* Status badges */
.badge-status {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 99px;
}
.badge-status-open             { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-status-requires_follow_up { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-status-resolved         { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── Finding body ─────────────────────────────────────────────── */
.finding-section-ref {
  font-size: 0.74rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 7px;
}

.finding-excerpt-block {
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  padding: 8px 10px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 8px;
}

.finding-excerpt-block.ref-block {
  border-left-color: #e2e8f0;
  background: #f1f5f9;
}

.excerpt-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 4px;
}

.excerpt-text {
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.55;
  font-style: italic;
}

.finding-vs {
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 4px 0;
}

.finding-ref-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}

.finding-divider {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 10px 0;
}

.finding-explanation {
  font-size: 0.77rem;
  color: #4b5563;
  line-height: 1.55;
}

.finding-action {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.75rem;
  color: #1d4ed8;
  line-height: 1.5;
  margin-top: 6px;
}

.finding-action-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.finding-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

/* ── Document text highlight ──────────────────────────────────── */
mark.highlight {
  background: #fef08a;
  color: #713f12;
  border-radius: 2px;
  padding: 0 2px;
  font-style: normal;
}

/* ── Run button feedback states ───────────────────────────────── */
#run-btn.running {
  background: #1d4ed8;
  opacity: 0.8;
  cursor: not-allowed;
}

/* ── Metrics updated state ────────────────────────────────────── */
.metric-value.updated {
  color: #2563eb;
}

/* ── Extra status badge variants ──────────────────────────────── */
.badge-status-false_positive     { background: #faf5ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.badge-status-accepted_deviation { background: #f0fdfa; color: #0d9488; border: 1px solid #99f6e4; }

/* ── Review section inside finding card ───────────────────────── */
.review-section {
  border-top: 1px solid #f1f5f9;
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.review-section-label {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b0bec5;
}

.review-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.review-btn {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  line-height: 1.4;
}

.review-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

/* Active state per review status */
.review-btn.active-requires_follow_up {
  background: #fffbeb; border-color: #fde68a; color: #92400e; font-weight: 700;
}
.review-btn.active-false_positive {
  background: #faf5ff; border-color: #ddd6fe; color: #6d28d9; font-weight: 700;
}
.review-btn.active-accepted_deviation {
  background: #f0fdfa; border-color: #99f6e4; color: #0d9488; font-weight: 700;
}
.review-btn.active-resolved {
  background: #f0fdf4; border-color: #bbf7d0; color: #166534; font-weight: 700;
}

.review-comment {
  width: 100%;
  min-height: 50px;
  max-height: 110px;
  padding: 6px 9px;
  font-size: 0.77rem;
  font-family: inherit;
  color: #374151;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}

.review-comment:focus {
  border-color: #93c5fd;
  background: #ffffff;
}

/* ── Review progress summary ──────────────────────────────────── */
.review-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.review-summary-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-right: 4px;
}

.review-count {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
}

.review-count-requires_follow_up { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.review-count-false_positive     { background: #faf5ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.review-count-accepted_deviation { background: #f0fdfa; color: #0d9488; border: 1px solid #99f6e4; }
.review-count-resolved           { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── Panel title row (with download button) ───────────────────── */
.panel-title-row {
  justify-content: space-between;
  align-items: center;
}

.panel-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-title-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Download success message ─────────────────────────────────── */
.download-msg {
  font-size: 0.72rem;
  font-weight: 600;
  color: #16a34a;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.download-msg.visible {
  opacity: 1;
}

/* ── Run ID label ──────────────────────────────────────────────── */
.run-id-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
}

.run-id-value {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.67rem;
  background: #f1f5f9;
  color: #475569;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  letter-spacing: 0.03em;
}

/* ── Feedback save warning ─────────────────────────────────────── */
.feedback-warning {
  font-size: 0.72rem;
  font-weight: 500;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s, max-height 0.25s, padding 0.25s;
}

.feedback-warning.visible {
  opacity: 1;
  max-height: 40px;
  padding: 5px 10px;
  margin-bottom: 6px;
}

/* ── btn-xs modifier ──────────────────────────────────────────── */
.btn-xs {
  padding: 3px 8px !important;
  font-size: 0.68rem !important;
}

/* ── Run history section ───────────────────────────────────────── */
.run-history-section {
  border-top: 1px solid #f1f5f9;
  margin-top: 16px;
  padding-top: 12px;
  flex-shrink: 0;
}

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

.run-history-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.run-history-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  background: #fff;
}

.history-empty {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  padding: 14px 12px;
  margin: 0;
}

/* ── History item card ─────────────────────────────────────────── */
.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.1s;
}

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

.history-item:hover { background: #f8fafc; }

.history-item-main {
  flex: 1;
  min-width: 0;
}

.history-item-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.history-item-meta {
  font-size: 0.67rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 4px;
}

.history-runid {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.65rem;
  color: #64748b;
}

.history-sep { color: #cbd5e1; }

.history-item-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.hist-findings,
.hist-high,
.hist-reviewed {
  font-size: 0.63rem;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 99px;
  white-space: nowrap;
}

.hist-findings { background: #f1f5f9; color: #64748b; }
.hist-high     { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.hist-reviewed { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── History Load button ───────────────────────────────────────── */
.history-load-btn {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  white-space: nowrap;
}

.history-load-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

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

/* ── Engine info bar ─────────────────────────────────────────────── */
.engine-info {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px 0;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid transparent;
}

.engine-info.mode-mock {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.18);
  color: #64748b;
}

.engine-info.mode-orchestrate {
  background: rgba(217, 119, 6, 0.07);
  border-color: rgba(217, 119, 6, 0.22);
  color: #92400e;
}

.engine-info-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.engine-info-label {
  font-weight: 700;
  margin-right: 2px;
}




/* ── Document purpose radio toggle ──────────────────────────────── */
.purpose-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 0 0;
  padding: 8px 10px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
}

.purpose-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.purpose-option {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
}

.purpose-option input[type="radio"] {
  accent-color: #6366f1;
  width: 13px;
  height: 13px;
  cursor: pointer;
}

/* ── Reference document selector ────────────────────────────────── */
.ref-select-section {
  padding: 10px 0 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  margin-top: 10px;
}

.ref-select-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

/* ── Document library ────────────────────────────────────────────── */
.doc-library-section {
  margin-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding-top: 10px;
  flex-shrink: 0;
}

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

.doc-library-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.doc-library-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 200px;
  overflow-y: auto;
}

.doc-library-empty {
  font-size: 0.71rem;
  color: #64748b;
  margin: 0;
  padding: 6px 0;
}

.doc-library-group-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 6px 0 3px 0;
}

.doc-library-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.doc-library-item:hover {
  background: rgba(148, 163, 184, 0.1);
}

.doc-library-item-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #393939;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

.doc-library-item-name:hover {
  color: #0f62fe; /* Carbon primary blue */
  text-decoration: underline;
}

.doc-text-truncated-note {
  margin-top: 15px;
  padding: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  font-size: 0.68rem;
  font-family: 'IBM Plex Sans', sans-serif;
  text-align: center;
  border-radius: 4px;
}

.doc-library-item-badge {
  font-size: 0.63rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.doc-library-item-badge.badge-reference {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.doc-library-item-badge.badge-incoming {
  background: rgba(20, 184, 166, 0.12);
  color: #5eead4;
}

.doc-delete-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.68rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}

.doc-delete-btn:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

/* ── Compared against ────────────────────────────────────────────── */
.compared-against {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.69rem;
  font-weight: 500;
  color: #94a3b8;
  padding: 3px 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: rgba(148, 163, 184, 0.07);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Legacy finding badge ────────────────────────────────────────── */
.badge-legacy {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
}


/* ── Progress bar ────────────────────────────────────────────────── */
.progress-section {
  margin: 0 0 14px 0;
  padding: 12px 14px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 10px;
}

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

.progress-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  font-weight: 600;
  color: #a5b4fc;
}

.progress-percent {
  font-size: 0.73rem;
  font-weight: 700;
  color: #818cf8;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 5px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 7px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8, #a5b4fc);
  background-size: 200% 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
  animation: progress-shimmer 1.8s linear infinite;
}

@keyframes progress-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.progress-message {
  font-size: 0.69rem;
  color: #6366f1;
  margin: 0;
  opacity: 0.85;
}

/* spin animation for icon */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.progress-spin-icon {
  animation: spin 1.1s linear infinite;
  flex-shrink: 0;
}


/* ── Reference document preview card ────────────────────────────── */
.ref-preview-card {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  animation: fadeIn 0.25s ease;
}

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

.ref-preview-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: #a5b4fc;
}

.ref-preview-filename {
  font-size: 0.72rem;
  font-weight: 600;
  color: #a5b4fc;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ref-preview-length {
  font-size: 0.69rem;
  color: #6366f1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ref-preview-text {
  font-size: 0.68rem;
  line-height: 1.5;
  color: #94a3b8;
  max-height: 72px;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
}

.ref-preview-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 22px;
  background: linear-gradient(transparent, rgba(15, 17, 26, 0.9));
  pointer-events: none;
}

.ref-preview-error {
  font-size: 0.7rem;
  color: #f87171;
  margin-top: 2px;
}

/* ── Reference text loaded badge (right panel header) ───────────── */
.ref-text-loaded {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.67rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
}

.ref-text-loaded.loaded {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.ref-text-loaded.not-loaded {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
}


/* ── Engine info badges (orchestrate mode detail) ────────────────── */
.engine-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
  margin-left: 5px;
  flex-shrink: 0;
}

.engine-badge-nosend {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.engine-badge-sent {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.engine-badge-fallback {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

/* Active orchestrate engine accent */
.mode-orchestrate-active .engine-info-label {
  color: #34d399;
}


/* ══════════════════════════════════════════════════════════════════
   DEMO READINESS CARD
   ══════════════════════════════════════════════════════════════════ */

.readiness-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 12, 20, 0.55);
  padding: 0 20px;
}

.readiness-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  color: #94a3b8;
  font-size: 0.72rem;
}

.readiness-trigger-left {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.readiness-label {
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
}

/* .btn-ghost-sm — compact ghost button used in readiness trigger */
.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.btn-ghost-sm:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}
.btn-ghost-sm:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── Readiness badge ─────────────────────────────────────────────── */
.readiness-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.readiness-badge-idle {
  color: #64748b;
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.2);
}
.readiness-badge-running {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  animation: badge-pulse 1s infinite alternate;
}
.readiness-badge-ready {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
}
.readiness-badge-fail {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
}
@keyframes badge-pulse {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

/* ── Readiness panel (expandable) ───────────────────────────────── */
.readiness-panel {
  padding: 4px 0 12px 0;
  animation: fadeIn 0.2s ease;
}

.readiness-checks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.readiness-check-row {
  display: grid;
  grid-template-columns: 22px 180px 1fr;
  align-items: start;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 6px;
  transition: background 0.12s;
}
.readiness-check-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.readiness-check-icon {
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.readiness-check-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
}

.readiness-check-msg {
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.45;
}

/* Status colour classes applied to the row */
.readiness-check-row.status-ok    .readiness-check-name { color: #a7f3d0; }
.readiness-check-row.status-warn  .readiness-check-name { color: #fde68a; }
.readiness-check-row.status-fail  .readiness-check-name { color: #fca5a5; }

.readiness-check-row.status-ok   { border-left: 2px solid rgba(52, 211, 153, 0.35); }
.readiness-check-row.status-warn { border-left: 2px solid rgba(251, 191, 36, 0.35); }
.readiness-check-row.status-fail { border-left: 2px solid rgba(248, 113, 113, 0.35); }

/* ── Summary banner ──────────────────────────────────────────────── */
.readiness-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  animation: fadeIn 0.25s ease;
}
.readiness-summary.summary-ready {
  color: #34d399;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
}
.readiness-summary.summary-fail {
  color: #f87171;
  background: rgba(248, 113, 113, 0.07);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

/* ── Timestamp ───────────────────────────────────────────────────── */
.readiness-timestamp {
  margin-top: 5px;
  font-size: 0.62rem;
  color: #374151;
  padding-left: 6px;
}


/* ══════════════════════════════════════════════════════════════════
   UI POLISH — DEMO COPY CLEANUP
   ══════════════════════════════════════════════════════════════════ */

/* ── Brand subtitle (longer text — smaller, muted) ─────────────── */
.brand-subtitle {
  font-size: 0.685rem;
  color: #475569;
  max-width: 340px;
  white-space: normal;
  line-height: 1.35;
}

/* ── Reference dropdown helper text ───────────────────────────── */
.ref-select-hint {
  margin-top: 5px;
  font-size: 0.67rem;
  color: #4b5563;
  line-height: 1.45;
}

/* ── Document library helper text ─────────────────────────────── */
.doc-library-hint {
  font-size: 0.65rem;
  color: #374151;
  line-height: 1.45;
  padding: 0 0 6px 0;
  margin: 0;
}
.doc-library-hint code {
  font-family: 'SF Mono', 'Fira Mono', monospace;
  font-size: 0.62rem;
  color: #64748b;
  background: rgba(100, 116, 139, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
}

/* ── Finding card excerpt blocks — visual distinction ─────────── */
.finding-excerpt-block {
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 0 5px 5px 0;
  padding: 7px 10px;
  margin-bottom: 4px;
}

.finding-excerpt-block.ref-block {
  border-left-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.02);
}

.excerpt-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 4px;
}

.finding-excerpt-block .excerpt-text {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.5;
  font-style: italic;
}

/* ── Finding explanation + action — readable typography ────────── */
.finding-explanation {
  font-size: 0.73rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 6px;
}
.finding-explanation::before {
  content: 'Finding: ';
  font-weight: 600;
  color: #94a3b8;
}

.finding-action {
  font-size: 0.71rem;
  color: #64748b;
  line-height: 1.55;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 6px;
  margin-top: 4px;
}
.finding-action::before {
  content: 'Action: ';
  font-weight: 600;
  color: #64748b;
}

/* ── Finding "vs." separator — cleaner ─────────────────────────── */
.finding-vs {
  font-size: 0.62rem;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 0;
}

.finding-ref-name {
  font-size: 0.68rem;
  color: #64748b;
  margin-bottom: 4px;
  font-style: italic;
}

/* ── Severity badge — more visual weight ──────────────────────── */
.badge-sev-high {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 700;
}
.badge-sev-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-sev-low {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.2);
}

/* ── Type badge polish ────────────────────────────────────────── */
.badge-contradiction {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.22);
}
.badge-overlap {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.22);
}
.badge-gap {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.22);
}

/* ── Review section — cleaner label ──────────────────────────── */
.review-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #374151;
  margin-bottom: 6px;
}

/* ── Finding confidence — muted ──────────────────────────────── */
.finding-confidence {
  font-size: 0.64rem;
  color: #4b5563;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Finding section ref — clearer heading ───────────────────── */
.finding-section-ref {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Responsive adjustments for smaller screens (tablets & narrow browser windows) ── */
@media (max-width: 991px) {
  .workspace {
    flex-direction: column !important;
    overflow-y: auto !important;
  }
  .panel-left {
    width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--gray-20) !important;
    overflow-y: visible !important;
    height: auto !important;
  }
  .panel-right {
    width: 100% !important;
    max-width: 100% !important;
    overflow-y: visible !important;
    height: auto !important;
  }
}

/* ── Login Overlay (Carbon flat dark theme layout) ──────────────────── */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #161616; /* IBM Charcoal background */
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 380px;
  background: var(--white);
  border: 1px solid var(--gray-20);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-100);
  margin-bottom: 4px;
}

.login-header p {
  font-size: 0.8rem;
  color: var(--gray-60);
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-error-msg {
  margin-top: 12px;
  font-size: 0.75rem;
  color: #da1e28; /* Carbon red error */
  background: #fff0f0;
  padding: 8px 12px;
  border-left: 3px solid #da1e28;
}

