.s-PermissionCheckEditor {
  min-height: 450px;
}

.s-horizontal-divider {
  margin: 1em 0;
  line-height: 0;
  text-align: center;
}

.s-horizontal-divider span {
  background-color: var(--s-card-bg);
  padding: 1em;
}

.s-horizontal-divider:before {
  content: " ";
  display: block;
  border-top: 1px solid #e3e3e3;
  border-bottom: 1px solid #f7f7f7;
}

/* Multiline Comments cells with scroll (Operator Notes, BoreInfo, Well Actions, AI Logs grids) */
.s-PetrolAi-OperatorNotes-OnNotesGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-AiChat-AiChatLogGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-Reports-AiReportLogGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-Reports-AiReportPromptGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-WellActions-WaActionsGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-BoreInfo-BiMainGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-BoreInfo-BiViewBoreInfoGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-BoreInfo-BiWellCommentsGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-BoreInfo-BiViewWellCommentsGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-BoreInfo-BiOperationalHighlightsGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-BoreInfo-BiViewOperationalHighlightsGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-BoreInfo-BiPlannedActionsGrid .slick-cell.on-notes-comments-cell,
.s-PetrolAi-BoreInfo-BiViewPlannedActionsGrid .slick-cell.on-notes-comments-cell {
  overflow: hidden;
  white-space: normal;
  line-height: 1.3;
}
.s-PetrolAi-OperatorNotes-OnNotesGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-AiChat-AiChatLogGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-Reports-AiReportLogGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-Reports-AiReportPromptGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-WellActions-WaActionsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-BoreInfo-BiMainGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-BoreInfo-BiViewBoreInfoGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-BoreInfo-BiWellCommentsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-BoreInfo-BiViewWellCommentsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-BoreInfo-BiOperationalHighlightsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-BoreInfo-BiViewOperationalHighlightsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-BoreInfo-BiPlannedActionsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap,
.s-PetrolAi-BoreInfo-BiViewPlannedActionsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap {
  overflow-y: auto;
  max-height: 100%;
  font-size: 0.85em;
  line-height: 1.3;
}
.s-PetrolAi-OperatorNotes-OnNotesGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-AiChat-AiChatLogGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-Reports-AiReportLogGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-Reports-AiReportPromptGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-WellActions-WaActionsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-BoreInfo-BiMainGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-BoreInfo-BiViewBoreInfoGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-BoreInfo-BiWellCommentsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-BoreInfo-BiViewWellCommentsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-BoreInfo-BiOperationalHighlightsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-BoreInfo-BiViewOperationalHighlightsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-BoreInfo-BiPlannedActionsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre,
.s-PetrolAi-BoreInfo-BiViewPlannedActionsGrid .slick-cell.on-notes-comments-cell .on-notes-comments-wrap pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: inherit;
}

.operational-highlights-note {
  margin: 0 0 0.75rem 0;
  padding: 0.5rem 0.75rem;
  background: var(--bs-tertiary-bg, #f8f9fa);
  border-left: 3px solid #6c757d;
  font-size: 0.9rem;
  color: var(--bs-body-color, #495057);
}

/*
 * AI Chat / AI Report — dark mode: match .s-sidebar-pane (nav menu), which uses
 * var(--s-card-bg), not --bs-body-bg or --s-sidebar-band-bg (icon strip).
 */
[data-bs-theme="dark"] body.ai-chat-page .ai-chat-sidebar,
[data-bs-theme="dark"] body.ai-chat-page .ai-chat-main,
[data-bs-theme="dark"] body.ai-chat-page .ai-chat-messages,
[data-bs-theme="dark"] body.ai-chat-page .ai-chat-main.chat-is-empty,
[data-bs-theme="dark"] body.ai-report-page .ai-report-sidebar,
[data-bs-theme="dark"] body.ai-report-page .ai-report-main,
[data-bs-theme="dark"] body.ai-report-page .ai-report-preview-stack,
[data-bs-theme="dark"] body.ai-report-page .ai-report-preview-heading {
  background: var(--s-card-bg, #0a182c);
}

[data-bs-theme="dark"] body.ai-chat-page .ai-chat-root,
[data-bs-theme="dark"] body.ai-report-page .ai-report-preview-stack,
[data-bs-theme="dark"] body.ai-report-page .ai-report-root {
  border-color: var(--s-card-border, var(--bs-border-color));
}

[data-bs-theme="dark"] body.ai-report-page .ai-report-preview-heading {
  color: var(--bs-secondary-color, inherit);
  border-bottom-color: var(--s-card-border, var(--bs-border-color));
}

[data-bs-theme="dark"] body.ai-report-page #aiReportEmpty {
  background: var(--s-card-bg, #0a182c) !important;
}

/* List rows: slightly darker than pane so chips remain visible on same hue as nav */
[data-bs-theme="dark"] body.ai-chat-page .ai-chat-session-list .session-item,
[data-bs-theme="dark"] body.ai-report-page .ai-report-saved-list .session-item {
  background: var(--bs-body-bg, #071222);
}