/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --ey-bg: #2e2e38;
  --ey-yellow: #ffe600;
  --ey-text: #ffffff;
  --ey-muted: rgba(255, 255, 255, 0.7);
  --ey-border: rgba(255, 255, 255, 0.14);
  --ey-surface: rgba(255, 255, 255, 0.05);
}

html,
body {
  font-family: "Roboto", system-ui, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ey-bg);
  color: var(--ey-text);
}

body.devise-layout {
  background: var(--ey-bg);
  color: var(--ey-text);
}

/* Flash messages (dark app shell) */
.notice {
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 6px;
  margin: 16px;
}

.alert {
  padding: 12px 16px;
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 6px;
  margin: 16px;
}

/* Admin dashboard (EY board) */
.admin-dashboard {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  min-height: 100vh;
  box-sizing: border-box;
}

.admin-dashboard header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ey-border);
}

.admin-dashboard header p {
  margin: 0;
  color: var(--ey-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.admin-dashboard h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ey-yellow);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.admin-dashboard h2 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ey-yellow);
  letter-spacing: 0.01em;
}

.admin-dashboard h3 {
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ey-yellow);
}

.admin-dashboard main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-dashboard main > p {
  margin: 0;
}

.admin-dashboard .dataset-show-header-actions a {
  color: var(--ey-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.admin-dashboard .dataset-show-header-actions a:hover {
  color: var(--ey-yellow);
  border-bottom-color: var(--ey-yellow);
}

.admin-dashboard .btn-primary {
  border-bottom: none;
}

.admin-dashboard .btn-primary:hover {
  border-bottom: none;
}

.board-back {
  font-size: 0.9375rem;
}

.board-muted {
  color: var(--ey-muted);
  margin: 0;
}

.board-stats {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ey-muted);
}

.board-section {
  padding: 0;
}

.board-section--compact {
  margin-top: -0.25rem;
}

.board-section--form {
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--ey-surface);
  border: 1px solid var(--ey-border);
  border-radius: 10px;
}

.admin-dashboard .btn-sign-out {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--ey-text);
  border: 1px solid var(--ey-border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

.admin-dashboard .btn-sign-out:hover {
  border-color: var(--ey-yellow);
  color: var(--ey-yellow);
}

/* Devise panels - boxed and centered (dark theme, aligned with backoffice) */
.devise-panel {
  max-width: 400px;
  margin: 60px auto;
  padding: 32px;
  background: var(--ey-surface);
  border: 1px solid var(--ey-border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.devise-panel h2 {
  margin: 0 0 24px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ey-yellow);
  letter-spacing: -0.02em;
}

.devise-panel .field {
  margin-bottom: 16px;
}

.devise-panel .field p {
  margin: 0 0 4px 0;
}

.devise-panel label {
  color: var(--ey-text);
  font-size: 0.9375rem;
}

.devise-panel .field input[type="email"],
.devise-panel .field input[type="password"],
.devise-panel .field input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--ey-border);
  border-radius: 6px;
  font-size: 1rem;
  color: var(--ey-text);
  box-sizing: border-box;
}

.devise-panel .field input::placeholder {
  color: var(--ey-muted);
}

.devise-panel .field input:focus {
  outline: none;
  border-color: rgba(255, 230, 0, 0.45);
  box-shadow: 0 0 0 2px rgba(255, 230, 0, 0.15);
}

.devise-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--ey-text);
  margin: 0;
}

.devise-checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--ey-yellow);
  margin: 0;
  flex-shrink: 0;
}

.devise-panel .actions {
  margin-top: 24px;
}

.devise-panel .actions input[type="submit"] {
  display: inline-block;
  width: 100%;
  padding: 0.625rem 1.25rem;
  background: var(--ey-yellow);
  color: var(--ey-bg);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.devise-panel .actions input[type="submit"]:hover {
  filter: brightness(1.06);
}

.devise-panel .field + .field {
  margin-top: 4px;
}

.devise-panel a {
  color: var(--ey-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.devise-panel a:hover {
  color: var(--ey-yellow);
  border-bottom-color: var(--ey-yellow);
}

.devise-panel > p {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--ey-muted);
}

.devise-panel button[type="submit"] {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--ey-surface);
  color: var(--ey-text);
  border: 1px solid var(--ey-border);
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
}

.devise-panel button[type="submit"]:hover {
  border-color: var(--ey-yellow);
  color: var(--ey-yellow);
}

.devise-panel #error_explanation {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  color: #fecaca;
  font-size: 0.875rem;
}

.devise-panel #error_explanation h2 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fecaca;
}

.devise-panel #error_explanation ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* Center flash messages on devise pages (same colors as global .notice / .alert) */
.devise-layout .notice,
.devise-layout .alert {
  max-width: 464px;
  margin-left: auto;
  margin-right: auto;
}

/* Datasets */
.dataset-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.dataset-list li {
  padding: 0.875rem 1rem;
  border: 1px solid var(--ey-border);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem 1rem;
  background: var(--ey-surface);
}

.dataset-list li form {
  margin: 0;
  display: inline;
}

.dataset-list a {
  font-weight: 500;
  color: var(--ey-text);
  border-bottom: none;
}

.dataset-list a:hover {
  color: var(--ey-yellow);
}

.status {
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.status-ready {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.status-pending {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
}

.status-processing {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.status-error {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

.btn-primary {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: var(--ey-yellow);
  color: var(--ey-bg);
  border-radius: 6px;
  text-decoration: none;
  margin: 0;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
  filter: brightness(1.05);
  color: var(--ey-bg);
}

.btn-danger {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(220, 38, 38, 0.85);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-danger:hover {
  background: #b91c1c;
  color: white;
}

.btn-danger--compact {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
}

.dataset-show-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dataset-show-delete {
  margin-top: 0.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ey-border);
}

.dataset-show-delete form {
  margin: 0;
}

.dataset-show-header-actions form {
  margin: 0;
  display: inline;
}

.dataset-nav {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 0.75rem 0;
  flex-wrap: wrap;
}

.dataset-upload-form {
  margin: 0;
}

.dataset-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0;
}

.dataset-upload-row input[type="file"] {
  max-width: min(100%, 28rem);
  color: var(--ey-muted);
}

.dataset-upload-row label {
  color: var(--ey-muted);
  font-size: 0.9375rem;
}

.dataset-create-form {
  margin: 0;
}

.dataset-create-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.dataset-name-input {
  flex: 1;
  min-width: 12rem;
  padding: 0.625rem 0.875rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--ey-border);
  border-radius: 6px;
  color: var(--ey-text);
  font-size: 1rem;
  box-sizing: border-box;
}

.dataset-name-input::placeholder {
  color: var(--ey-muted);
}

.btn-nav {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--ey-yellow);
  border: 1px solid var(--ey-yellow);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-nav:hover {
  background: var(--ey-yellow);
  color: var(--ey-bg);
  border-bottom: none;
}

.btn-regenerate {
  display: inline-block;
  padding: 0.5rem 0.875rem;
  background: rgba(5, 150, 105, 0.35);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.btn-regenerate:hover {
  background: rgba(5, 150, 105, 0.5);
  color: #ecfdf5;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.report-actions a {
  margin: 0;
}

.report-actions form {
  margin: 0;
  display: inline;
}

.report-page > header {
  margin-bottom: 0;
  padding-bottom: 0.75rem;
  border-bottom: none;
}

.report-subheader {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ey-border);
}

.report-subheader .report-actions {
  justify-content: flex-end;
}

.report-subheader--split {
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.report-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.report-edit-unavailable {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ey-muted);
  max-width: 22rem;
  text-align: right;
}

.chat-report-edit-banner {
  margin: 0 0 1rem 0;
  padding: 0.75rem 1rem;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--ey-text);
}

.chat-report-edit-banner code {
  font-size: 0.85em;
  padding: 0.1rem 0.35rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

/* Report — chat as right sidebar */
.report-page--has-report-chat.admin-dashboard {
  max-width: min(90rem, 100%);
}

.report-page__with-chat {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1.5rem;
  min-width: 0;
  width: 100%;
}

.report-page__with-chat > main {
  flex: 1 1 auto;
  min-width: 0;
}

.report-chat-sidebar {
  flex: 0 0 clamp(280px, 26vw, 400px);
  width: clamp(280px, 26vw, 400px);
  max-width: 100%;
  min-height: min(70vh, 640px);
  max-height: calc(100vh - 8rem);
  position: sticky;
  top: 1rem;
  align-self: flex-start;
  z-index: 30;
  box-sizing: border-box;
}

.report-chat-sidebar__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  max-height: inherit;
  min-height: 0;
  padding: 1rem 1.125rem;
  background: var(--ey-bg);
  border: 1px solid var(--ey-border);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}

/* Form wraps chat head (incl. rule toggles) + body so checkboxes submit with the message */
.report-chat-sidebar__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

/* PVNBP one-shot: hidden sibling form + button[form=...] inside Funzioni personalizzate */
.report-chat-pvnbp-apply-form--hidden {
  display: none;
}

.report-chat-rules-panel .report-chat-pvnbp-apply-wrap {
  /* margin-top: 0.75rem; */
  padding-top: 0.75rem;
  /* border-top: 1px solid var(--ey-border); */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-chat-pvnbp-apply-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ey-muted, #6b7280);
}

.report-chat-pvnbp-apply-wrap .report-chat-pvnbp-apply {
  width: 100%;
}

.report-chat-sidebar__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0.75rem;
}

.report-chat-sidebar--collapsed {
  flex: 0 0 3.25rem;
  width: 3.25rem;
  min-width: 3.25rem;
  min-height: 0;
  max-height: none;
}

.report-chat-sidebar--collapsed .report-chat-sidebar__inner {
  padding: 0.5rem;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
}

.report-chat-sidebar--collapsed .report-chat-sidebar__body {
  display: none;
}

.report-chat-sidebar--collapsed .report-chat-sidebar__hint {
  display: none;
}

.report-chat-sidebar--collapsed .report-chat-sidebar__head {
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.report-chat-sidebar--collapsed .report-chat-sidebar__head-main {
  align-items: center;
}

.report-chat-sidebar--collapsed .report-chat-sidebar__title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.75rem;
  margin: 0;
  letter-spacing: 0.05em;
}

.report-chat-sidebar__head {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.report-chat-sidebar__head-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-width: 0;
}

/* Rules panel — collapsible <details>, closed by default; checkboxes in form */
.report-chat-sidebar .report-chat-rules-panel {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(254, 202, 202, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 0.8125rem;
  overflow: hidden;
}

.report-chat-sidebar .report-chat-rules-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid transparent;
}

.report-chat-sidebar .report-chat-rules-panel[open] > .report-chat-rules-panel__summary {
  border-bottom-color: rgba(254, 202, 202, 0.2);
}

.report-chat-sidebar .report-chat-rules-panel__summary::-webkit-details-marker {
  display: none;
}

.report-chat-sidebar .report-chat-rules-panel__summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  text-align: left;
}

.report-chat-sidebar .report-chat-rules-panel__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ey-yellow);
}

.report-chat-sidebar .report-chat-rules-panel__summary-cue {
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--ey-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.report-chat-sidebar .report-chat-rules-panel__summary-icon {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid rgba(254, 202, 202, 0.75);
  border-bottom: 2px solid rgba(254, 202, 202, 0.75);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-top: 0.15rem;
  transition: transform 0.15s ease;
}

.report-chat-sidebar .report-chat-rules-panel[open] > .report-chat-rules-panel__summary .report-chat-rules-panel__summary-icon {
  transform: rotate(225deg);
}

.report-chat-sidebar .report-chat-rules-panel__content {
  padding: 0;
  border-top: 1px solid rgba(254, 202, 202, 0.15);
}

.report-chat-sidebar .report-chat-rules-panel__head-hint {
  margin: 0;
  padding: 0.45rem 0.65rem 0.35rem;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--ey-muted);
}

.report-chat-sidebar .report-chat-rules-panel__body {
  padding: 0.35rem 0.65rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.report-chat-sidebar .report-chat-rules-panel__row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--ey-text);
}

.report-chat-sidebar .report-chat-rules-panel__row input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.report-chat-sidebar .report-chat-rules-panel__row-text {
  display: block;
  min-width: 0;
}

.report-chat-sidebar .report-chat-rules-panel__label {
  font-weight: 600;
  font-size: 0.78rem;
  display: block;
}

.report-chat-sidebar .report-chat-rules-panel__desc {
  display: block;
  opacity: 0.88;
  font-size: 0.68rem;
  margin-top: 0.12rem;
  line-height: 1.35;
  color: var(--ey-muted);
}

.report-chat-sidebar .report-chat-rules-panel__empty {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--ey-muted);
}

.report-chat-sidebar .report-chat-rules-panel__empty code {
  font-size: 0.65rem;
  word-break: break-all;
}

.chat-page .report-chat-rules-panel {
  margin-bottom: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  font-size: 0.875rem;
  overflow: hidden;
}

.chat-page .report-chat-rules-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
  background: #f9fafb;
  border-bottom: 1px solid transparent;
}

.chat-page .report-chat-rules-panel[open] > .report-chat-rules-panel__summary {
  border-bottom-color: #e5e7eb;
}

.chat-page .report-chat-rules-panel__summary::-webkit-details-marker {
  display: none;
}

.chat-page .report-chat-rules-panel__summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  text-align: left;
}

.chat-page .report-chat-rules-panel__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #374151;
}

.chat-page .report-chat-rules-panel__summary-cue {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.chat-page .report-chat-rules-panel__summary-icon {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-top: 0.15rem;
  transition: transform 0.15s ease;
}

.chat-page .report-chat-rules-panel[open] > .report-chat-rules-panel__summary .report-chat-rules-panel__summary-icon {
  transform: rotate(225deg);
}

.chat-page .report-chat-rules-panel__content {
  border-top: 1px solid #e5e7eb;
}

.chat-page .report-chat-rules-panel__head-hint {
  margin: 0;
  padding: 0.45rem 0.75rem 0.35rem;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

.chat-page .report-chat-rules-panel__body {
  padding: 0.35rem 0.75rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.chat-page .report-chat-rules-panel__row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  cursor: pointer;
}

.chat-page .report-chat-rules-panel__desc {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.12rem;
  line-height: 1.35;
}

.chat-page .report-chat-rules-panel__empty {
  margin: 0;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

.chat-page .report-chat-rules-panel__empty code {
  font-size: 0.7rem;
}

.report-chat-toggle {
  flex-shrink: 0;
}

.report-chat-sidebar__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ey-yellow);
}

.report-chat-sidebar__hint {
  font-size: 0.8125rem;
  color: var(--ey-muted);
  line-height: 1.35;
}

.report-chat-sidebar .chat-form {
  flex-shrink: 0;
}

.report-chat-sidebar .chat-messages {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: min(50vh, 360px);
  overflow-y: auto;
  margin-bottom: 0;
}

.report-chat-sidebar .chat-report-edit-banner {
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .report-page__with-chat {
    flex-direction: column;
  }

  .report-chat-sidebar {
    position: relative;
    top: 0;
    flex: 1 1 auto;
    width: 100%;
    max-height: none;
    min-height: 320px;
  }

  .report-chat-sidebar--collapsed {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }

  .report-chat-sidebar--collapsed .report-chat-sidebar__title {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .report-chat-sidebar--collapsed .report-chat-sidebar__head {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
}

/* Chat */
.chat-page .chat-messages {
  min-height: 220px;
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  padding: 1rem 1.125rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--ey-border);
  border-radius: 10px;
}

.chat-placeholder {
  color: var(--ey-muted);
  font-style: italic;
  margin: 0;
}

.chat-message {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 8px;
}

.chat-message-user {
  background: rgba(255, 230, 0, 0.12);
  border: 1px solid rgba(255, 230, 0, 0.25);
  margin-left: 1.5rem;
  color: var(--ey-text);
}

.chat-message-assistant {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ey-border);
  margin-right: 1.5rem;
  color: var(--ey-text);
}

.assistant-content {
  margin-top: 8px;
}

.report-chat-sidebar .assistant-content--md .report-md-root {
  overflow-x: auto;
  max-width: 100%;
}

.report-chat-sidebar .assistant-content--md strong {
  color: #fecaca;
  font-weight: 700;
}

.report-chat-sidebar .assistant-content--md .report-table-wrap--integrated {
  border-top: 2px solid rgba(254, 202, 202, 0.45);
  border-bottom: 1px solid var(--ey-border);
  margin: 0.5rem 0 0.75rem;
}

.report-chat-sidebar .assistant-content--md .report-table--from-markdown {
  font-size: 0.8125rem;
}

.report-chat-sidebar .assistant-content--md .report-table--from-markdown thead th {
  border-bottom-color: rgba(254, 202, 202, 0.55);
  color: #fecaca;
}

.report-chat-sidebar .assistant-content--md .report-table--from-markdown tbody td {
  color: var(--ey-text);
}

.report-chat-sidebar .assistant-content--md .report-md-heading {
  color: #fecaca;
}

.report-chat-sidebar .assistant-content--md .report-alert-toast {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.8125rem;
  border-color: rgba(254, 202, 202, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  color: var(--ey-text);
}

.report-chat-sidebar .assistant-content--md .report-alert-toast--info {
  border-left-color: #60a5fa;
  background: rgba(30, 58, 138, 0.35);
}

.report-chat-sidebar .assistant-content--md .report-alert-toast--success {
  border-left-color: #34d399;
  background: rgba(6, 78, 59, 0.35);
}

.report-chat-sidebar .assistant-content--md .report-alert-toast--warning {
  border-left-color: #fbbf24;
  background: rgba(120, 53, 15, 0.35);
}

.report-chat-sidebar .assistant-content--md .report-alert-toast--danger {
  border-left-color: #f87171;
  background: rgba(127, 29, 29, 0.4);
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chat-input {
  flex: 1;
  min-width: 12rem;
  padding: 0.625rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--ey-border);
  border-radius: 6px;
  color: var(--ey-text);
  font-size: 1rem;
}

.btn-send {
  padding: 0.625rem 1.25rem;
  background: var(--ey-yellow);
  color: var(--ey-bg);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-send:hover {
  filter: brightness(1.05);
}

@keyframes chat-form-send-spin {
  to {
    transform: rotate(360deg);
  }
}

.chat-form.chat-form--loading {
  position: relative;
}

.chat-form.chat-form--loading .btn-send {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  min-width: 5.5rem;
}

/* Spinner on <button> only — ::after does not render on <input type="submit"> */
.chat-form.chat-form--loading .btn-send::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.125rem;
  height: 1.125rem;
  margin: -0.5625rem 0 0 -0.5625rem;
  box-sizing: border-box;
  border: 2px solid rgba(0, 0, 0, 0.35);
  border-top-color: #000000;
  border-radius: 50%;
  animation: chat-form-send-spin 0.65s linear infinite;
}

.report-chat-sidebar:has(.chat-form--loading) #report-chat-messages {
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.chat-page:has(.chat-form--loading) .chat-messages {
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

/* Report — light “paper” body inside dark shell (classic blue / gray accents) */
.report-page article.report {
  background: #ffffff;
  color: #111827;
  padding: 1.5rem 1.75rem 2rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
}

.report-page article.report a {
  color: #2563eb;
  border-bottom: none;
}

.report-page article.report a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.report-page article.report h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e3a8a;
  letter-spacing: normal;
}

/* Integrated report theme (full page) */
.report-page article.report.report-integrated h2.report-section-title {
  color: #7f1d1d;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-left: 0;
}

.report-page article.report.report-integrated h2.report-cover-title {
  font-size: 1.65rem;
  color: #7f1d1d;
  padding-left: 0;
}

.report-page article.report.report-integrated .report-section-subheading {
  margin: 1.25rem 0 0.75rem 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #7f1d1d;
  letter-spacing: normal;
  padding-left: 0;
}

.report-page article.report.report-integrated .chart-container {
  margin: 0.75rem 0 1.25rem;
}

.report-page article.report h2:first-child {
  margin-top: 0;
}

.report-page article.report .report-cover-title {
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.report-page article.report .report-section-subtitle {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.report-page article.report.report-integrated .report-section-subtitle,
.report-page article.report.report-integrated .report-section-integrated__subtitle {
  color: #7f1d1d;
  font-weight: 700;
}

.report-page article.report > .report-section:first-child h2 {
  margin-top: 0;
}

.report-section__toolbar {
  display: none;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.report-edit-active .report-section__toolbar {
  display: flex;
}

.report-section__hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-right: auto;
}

.report-section__restore {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #9ca3af;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
}

.report-section__restore:hover {
  background: #f3f4f6;
}

.report-section__output-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  font-weight: 600;
}

.report-section__output-btn:hover {
  background: #dbeafe;
}

.report-edit-active .report-section--context {
  outline: 3px solid #dc2626;
  outline-offset: 2px;
  border-radius: 8px;
}

.report-edit-active .report-section--output {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
  border-radius: 8px;
}

.report-page article.report:not(.report-integrated) h3 {
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #1d4ed8;
  letter-spacing: normal;
}

.report-page article.report p {
  color: #374151;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9375rem;
}

.report-table th,
.report-table td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  border: 1px solid #e5e7eb;
}

.report-table th {
  background: #f3f4f6;
  font-weight: 600;
  color: #1e3a8a;
}

.report-table td {
  color: #111827;
}

.report-meta {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.report-narrative {
  margin: 0.75rem 0 1.5rem 0!important;
  padding: 1rem 1.125rem;
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  border-radius: 0 6px 6px 0;
  color: #374151;
}

.report-page article.report.report-integrated .report-narrative:not(.report-narrative--integrated) {
  border-left-color: #7f1d1d;
  background: #fafafa;
}

/* Narrative blocks aligned with section titles / tables (flush left, no border-left indent) */
.report-page article.report.report-integrated .report-narrative.report-narrative--integrated {
  padding: 0.75rem 0 0 0;
  margin: 0.75rem 0 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.report-narrative p {
  margin: 0 0 8px 0;
}

.report-narrative p:last-child {
  margin-bottom: 0;
}

/* Highlight / toaster callouts — markdown: :::alert info|success|warning|danger ... ::: */
.report-md-root .report-alert-toast {
  margin: 0.75rem 0 1rem;
  padding: 0.875rem 1rem 0.875rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left-width: 4px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #1f2937;
}

.report-md-root .report-alert-toast .report-narrative--integrated {
  margin: 0;
}

.report-md-root .report-alert-toast .report-md-heading {
  margin-top: 0;
}

.report-md-root .report-alert-toast--info {
  border-left-color: #2563eb;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 55%);
}

.report-md-root .report-alert-toast--success {
  border-left-color: #059669;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 55%);
}

.report-md-root .report-alert-toast--warning {
  border-left-color: #d97706;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 55%);
}

.report-md-root .report-alert-toast--danger {
  border-left-color: #dc2626;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 55%);
}

/* Bar chart (CSS-only) — light context inside report */
.report-page article.report .bar-chart {
  margin: 1rem 0;
}

.report-page article.report .bar-chart-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 12px;
}

.report-page article.report .bar-chart-label {
  min-width: 120px;
  font-size: 0.875rem;
  color: #4b5563;
}

.report-page article.report .bar-chart-bar-wrap {
  flex: 1;
  position: relative;
  height: 26px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.report-page article.report .bar-chart-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  border-radius: 4px;
  min-width: 2px;
  transition: width 0.3s ease;
}

.report-page article.report .bar-chart-bar--integrated {
  background: linear-gradient(90deg, #7f1d1d, #991b1b);
}

.report-page article.report .bar-chart-bar-negative {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}

.report-page article.report .bar-chart-bar-negative.bar-chart-bar--integrated {
  background: linear-gradient(90deg, #9f1239, #be123c);
}

.report-page article.report .bar-chart-value {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  z-index: 1;
  text-shadow: none;
}

/* Group’s Performance — vertical KPI bars (integrated report style) */
.group-performance-kpis {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 1rem;
}

.kpi-vchart {
  border: 1px solid #e5e7eb;
  border-radius: 0 10px 10px 10px;
  overflow: hidden;
  background: #fff;
}

.kpi-vchart__head {
  background: linear-gradient(180deg, #b91c1c 0%, #991b1b 100%);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 10px 0 0;
}

.kpi-vchart__head-text {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.kpi-vchart__unit {
  font-weight: 600;
  letter-spacing: normal;
  opacity: 0.95;
}

.kpi-vchart__body {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1rem 1.125rem 1.125rem;
}

.kpi-vchart__plot {
  flex: 0 0 42%;
  max-width: 320px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-end;
  gap: 1.25rem;
  padding-bottom: 0.25rem;
}

.kpi-vchart__plot--dual {
  flex: 0 0 48%;
  max-width: 400px;
  align-items: flex-end;
}

.kpi-vchart__dual-year {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.kpi-vchart__dual-pair {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

.kpi-vchart__dual-metric {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.kpi-vchart__bar-stack--dual-slot {
  max-width: 80px;
}

.kpi-vchart__value--secondary {
  color: #6b7280;
  font-size: 0.8125rem;
  font-weight: 600;
}

.kpi-vchart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.kpi-vchart__value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #b91c1c;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.kpi-vchart__value--accent {
  color: #b91c1c;
}

.kpi-vchart__tick {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: #d1d5db;
  margin-bottom: 0.35rem;
}

.kpi-vchart__bar-stack {
  width: 100%;
  height: 148px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid #9ca3af;
}

.kpi-vchart__bar {
  width: 72%;
  min-height: 6px;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.08);
}

.kpi-vchart__bar--current {
  background: linear-gradient(180deg, #7f1d1d 0%, #991b1b 100%);
}

.kpi-vchart__bar--prior {
  background: linear-gradient(180deg, #fecaca 0%, #fca5a5 55%, #fdba74 100%);
}

.kpi-vchart__bar--secondary {
  background: linear-gradient(180deg, #d1d5db 0%, #9ca3af 100%);
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.06);
}

.kpi-vchart__axis {
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  color: #6b7280;
  text-align: center;
  line-height: 1.25;
}

.kpi-vchart__narrative {
  flex: 1;
  min-width: 0;
  align-self: flex-start;
  padding-top: 0;
}

.kpi-vchart__narrative p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #374151;
}

@media (max-width: 720px) {
  .kpi-vchart__body {
    flex-direction: column;
  }

  .kpi-vchart__plot {
    flex: 1 1 auto;
    max-width: none;
  }

  .kpi-vchart__plot--dual {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Life segment — stacked direct premiums (two periods, legend) */
.report-stacked-chart {
  margin: 1rem 0 1.25rem;
}

.report-stacked-chart__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #7f1d1d;
  margin: 0 0 0.65rem 0;
  letter-spacing: 0.02em;
}

.report-stacked-chart__unit {
  font-weight: 600;
  margin-left: 0.35rem;
}

.report-stacked-chart__panel {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 1.25rem 1.5rem;
  padding: 1rem 1.125rem 1.125rem;
  border: 1px solid #e5e7eb;
  border-radius: 0 10px 10px 10px;
  background: #fff;
}

.report-stacked-chart__bars {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-end;
  gap: 2rem;
  flex: 1;
  min-width: 0;
}

.report-stacked-chart__col-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.report-stacked-chart__col {
  width: 92px;
  min-height: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.report-stacked-chart__stack {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  height: 100%;
  width: 100%;
}

.report-stacked-chart__seg {
  position: relative;
  min-height: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.report-stacked-chart__stack > .report-stacked-chart__seg:first-child {
  border-radius: 0 0 8px 8px;
}

.report-stacked-chart__stack > .report-stacked-chart__seg:last-child {
  border-radius: 8px 8px 0 0;
}

.report-stacked-chart__seg--savings {
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.08);
}

.report-stacked-chart__seg--protection {
  background: linear-gradient(180deg, #4b5563 0%, #374151 100%);
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.08);
}

.report-stacked-chart__seg--unit_linked {
  background: linear-gradient(180deg, #fecaca 0%, #fdba74 100%);
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.06);
}

.report-stacked-chart__seg-value {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
  padding: 0 2px;
  text-align: center;
  line-height: 1.25;
}

.report-stacked-chart__seg--unit_linked .report-stacked-chart__seg-value {
  color: #1f2937;
  text-shadow: none;
}

.report-stacked-chart__axis {
  font-size: 0.6875rem;
  color: #6b7280;
  text-align: center;
  line-height: 1.25;
}

.report-stacked-chart__legend {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  max-width: 12rem;
  font-size: 0.8125rem;
  color: #374151;
  line-height: 1.45;
}

.report-stacked-chart__legend li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.report-stacked-chart__legend li:last-child {
  margin-bottom: 0;
}

.report-stacked-chart__swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.report-stacked-chart__swatch--savings {
  background: #991b1b;
}

.report-stacked-chart__swatch--protection {
  background: #4b5563;
}

.report-stacked-chart__swatch--unit_linked {
  background: linear-gradient(180deg, #fecaca 0%, #fdba74 100%);
}

@media (max-width: 720px) {
  .report-stacked-chart__panel {
    flex-direction: column;
    align-items: stretch;
  }

  .report-stacked-chart__legend {
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
  }

  .report-stacked-chart__legend li {
    margin-bottom: 0;
  }
}

/* Integrated report — Operating result by segment (table + narrative) */
.report-page article.report .report-section-integrated {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.report-page article.report .report-section-integrated__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #7f1d1d;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.02em;
  padding-left: 0;
  padding-top: 20px;
}

.report-page article.report .report-section-integrated__subtitle {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #7f1d1d;
  margin: 0 0 0.35rem 0;
  letter-spacing: normal;
  padding-left: 0;
}

.report-page article.report .report-section-integrated__unit {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #7f1d1d;
  margin: 0 0 0.75rem 0;
  padding-left: 0;
}

.report-page article.report .report-table-wrap--integrated {
  border-top: 2px solid #7f1d1d;
  border-bottom: 1px solid #9ca3af;
}

.report-page article.report .report-table--integrated {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.875rem;
  border: none;
}

.report-page article.report .report-table--integrated thead th {
  border: none;
  border-bottom: 2px solid #7f1d1d;
  background: transparent;
  color: #374151;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
}

.report-page article.report .report-table--integrated thead th:first-child,
.report-page article.report .report-table--integrated tbody th:first-child,
.report-page article.report .report-table--integrated tbody td:first-child {
  padding-left: 0;
}

.report-page article.report .report-table--integrated tbody th,
.report-page article.report .report-table--integrated tbody td {
  border: none;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  color: #374151;
}

.report-page article.report .report-table--integrated tbody th {
  font-weight: 400;
  text-align: left;
}

.report-page article.report .report-table--integrated .report-table__row--total th,
.report-page article.report .report-table--integrated .report-table__row--total td {
  font-weight: 700;
}

.report-page article.report .report-table--integrated {
  border-style: hidden;
}

.report-page article.report .report-table--integrated tbody tr:nth-child(even) th,
.report-page article.report .report-table--integrated tbody tr:nth-child(even) td {
  background: #f9fafb;
}

.report-page article.report .report-table--integrated .report-table__col--highlight {
  background: #f3f4f6 !important;
}

.report-page article.report .report-table--integrated tbody tr:nth-child(even) td.report-table__col--highlight,
.report-page article.report .report-table--integrated tbody tr:nth-child(even) th.report-table__col--highlight {
  background: #e8eaed !important;
}

.report-page article.report .report-table__cell-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.report-page article.report .report-section-integrated__analysis {
  margin-top: 0;
  padding-top: 0;
}

/* Narrative after comparative table: separator line only, same horizontal alignment as title */
.report-page article.report .report-section-integrated .report-section-integrated__analysis .report-narrative--integrated {
  margin-top: 0;
  padding: 1rem 0 0 0;
  border-top: 1px solid #e5e7eb;
}

.report-page article.report .report-narrative--integrated p {
  margin: 0 0 0.65rem 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #4b5563;
}

.report-page article.report .report-narrative--integrated p:last-child {
  margin-bottom: 0;
}

/* Bold emphasis: same red accent as static .report-accent / KPI tone */
.report-page article.report.report-integrated .report-md-root strong,
.report-page article.report.report-integrated .report-narrative--integrated strong,
.report-page article.report.report-integrated .kpi-vchart__narrative--md strong {
  color: #7f1d1d;
  font-weight: 700;
}

/* Markdown renderer: headings + lists (aligned with integrated palette) */
.report-page article.report .report-md-root .report-md-heading {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.report-page article.report .report-md-root .report-md-heading:first-child {
  margin-top: 0;
}

.report-page article.report .report-md-root h1.report-md-heading,
.report-page article.report .report-md-root h2.report-md-heading {
  letter-spacing: -0.02em;
}

.report-page article.report .report-md-list-wrap .report-md-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #4b5563;
}

.report-page article.report .report-md-list__item {
  margin-bottom: 0.35rem;
}

.report-page article.report .report-md-list__item::marker {
  color: #7f1d1d;
}

.report-page article.report .report-md-list__item:last-child {
  margin-bottom: 0;
}

.report-page article.report .life-nbv-narrative {
  margin-top: 0;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.report-page article.report .report-accent {
  color: #7f1d1d;
  font-weight: 600;
}

/* Markdown-derived tables: same shell + typography as static integrated tables */
.report-page article.report.report-integrated .report-table-wrap--integrated .report-table--from-markdown {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
  margin: 0;
  border-style: hidden;
}

.report-page article.report.report-integrated .report-md-root .report-table-wrap--integrated {
  margin: 0.75rem 0 1.25rem;
}

.report-page article.report.report-integrated .report-table--from-markdown thead th,
.report-page article.report.report-integrated .report-table--from-markdown tbody td {
  border: none;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  color: #374151;
}

.report-page article.report.report-integrated .report-table--from-markdown thead th:first-child,
.report-page article.report.report-integrated .report-table--from-markdown tbody td:first-child {
  padding-left: 0;
}

.report-page article.report.report-integrated .report-table--from-markdown thead th {
  border-bottom: 2px solid #7f1d1d;
  background: transparent;
  font-weight: 700;
}

.report-page article.report.report-integrated .report-table--from-markdown tbody tr:nth-child(even) td {
  background: #f9fafb;
}

.report-page article.report.report-integrated .report-table--from-markdown td strong,
.report-page article.report.report-integrated .report-table--from-markdown th strong {
  color: #7f1d1d;
  font-weight: 700;
}

.report-page article.report .report-table--lob thead th {
  text-align: left;
  font-size: 0.8125rem;
}

.report-page article.report .report-table--lob thead th.report-table__cell-num {
  text-align: right;
}

.report-page article.report .report-table--lob tbody td:not(.report-table__cell-num) {
  font-size: 0.8125rem;
  color: #374151;
}
