:root {
  --report-background: #f8faf9;
  --report-foreground: #18201b;
  --report-card: #ffffff;
  --report-muted: #f2f5f3;
  --report-muted-foreground: #647069;
  --report-primary: #1e552a;
  --report-primary-foreground: #ffffff;
  --report-border: #dfe6e1;
  --report-input: #cfd8d2;
  --report-ring: rgba(30, 85, 42, 0.2);
  --report-destructive: #b42318;
  --report-success: #166534;
  --report-warning: #a15c07;
  --report-radius: 10px;
  --report-shadow: 0 1px 2px rgba(16, 24, 20, 0.04), 0 8px 24px rgba(16, 24, 20, 0.04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body { margin: 0; padding-top: 66px; background: var(--report-background); color: var(--report-foreground); font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--report-ring); outline-offset: 1px; }

/* Keep the shared CRM header readable when its desktop menu is wider than the available center area. */
#header-menu-container .center-section,
#header-menu-container .modern-menu-container { justify-content: flex-start !important; }

.report-hub-page.page-container { width: 100%; max-width: 1680px; min-width: 0; margin: 0 auto; padding: 20px 24px 48px; display: grid; gap: 14px; }
.report-hub-page > * { min-width: 0; }
.report-hub-page .breadcrumb { display: flex; align-items: center; gap: 8px; color: #6b7280; font-size: 16px; }
.report-hub-page .breadcrumb a { color: inherit; text-decoration: none; }
.report-hub-page .breadcrumb a:hover { color: var(--report-primary); text-decoration: underline; }
.report-hub-page .breadcrumb [aria-current="page"] { color: #374151; font-weight: 700; }
.report-page-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 42px; padding: 0 2px; }
.report-page-title-row { flex: 0 1 auto; flex-wrap: nowrap; }
.report-page-title-row h1 { margin: 0; color: var(--report-primary); font-size: 26px; line-height: 1.15; letter-spacing: -.02em; white-space: nowrap; }
.report-card__header p, .report-catalog-item p, .report-empty, .report-feedback, .report-history__meta { margin: 0; color: var(--report-muted-foreground); line-height: 1.5; }
.report-page-header .page-back-button { min-height: 36px; padding: 7px 11px; border-color: var(--report-border); box-shadow: none; }

.report-workspace-nav { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; padding: 3px; width: fit-content; border: 1px solid var(--report-border); border-radius: 9px; background: #fff; }
.report-workspace-nav a { padding: 8px 12px; border-radius: 6px; color: var(--report-muted-foreground); font-size: 13px; font-weight: 700; text-decoration: none; }
.report-workspace-nav a:hover { background: var(--report-muted); color: var(--report-foreground); }
.report-workspace-nav a.is-active { background: #e8f3eb; color: var(--report-primary); }

.report-toolbar, .report-card { background: var(--report-card); border: 1px solid var(--report-border); border-radius: var(--report-radius); box-shadow: var(--report-shadow); }
.report-toolbar { padding: 12px; display: flex; align-items: end; gap: 10px; }
.report-field { display: grid; gap: 6px; flex: 1 1 260px; }
.report-field--compact { flex: 0 0 200px; }
.report-field > span, .report-legend { color: var(--report-muted-foreground); font-size: 12px; font-weight: 700; }
.report-field input, .report-field select, .report-form-group input, .report-form-group select, .report-combobox__trigger, .report-combobox__search { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--report-input); border-radius: 8px; background: #fff; color: var(--report-foreground); }

.report-main-grid { display: grid; grid-template-columns: minmax(300px, 34%) minmax(520px, 66%); gap: 18px; align-items: start; }
.report-card { min-width: 0; padding: 20px; }
.report-catalog-card { position: sticky; top: 128px; }
.report-card__header { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 16px; }
.report-card__header h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.015em; }
.report-card__header p { font-size: 13px; }
.report-catalog { display: grid; gap: 8px; max-height: calc(100vh - 330px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-right: 4px; }
.report-catalog-item { width: 100%; padding: 14px; border: 1px solid var(--report-border); border-radius: 8px; background: #fff; color: inherit; text-align: left; cursor: pointer; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.report-catalog-item:hover { background: #fafcfb; border-color: #b8c8bc; }
.report-catalog-item.is-selected { border-color: var(--report-primary); background: #f2f7f3; box-shadow: inset 3px 0 0 var(--report-primary); }
.report-catalog-item[data-report-key="renewal-send-updates"] { border-color: #b7d4be; background: #f5faf6; }
.report-catalog-item[data-report-key="renewal-send-updates"]:hover,
.report-catalog-item[data-report-key="renewal-send-updates"].is-selected { border-color: var(--report-primary); background: #eaf5ec; }
.report-catalog-item__title { margin: 0 0 5px; font-size: 15px; font-weight: 800; }
.report-catalog-item p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; }
.report-catalog-item__meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.report-chip, .report-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: var(--report-muted); color: #47524b; font-size: 11px; font-weight: 700; }
.report-pagination.report-pagination--catalog { justify-content: space-between; align-items: center; }

.report-config-panel, #reportParameterForm { display: grid; gap: 18px; }
.report-form-section { display: grid; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--report-border); }
fieldset.report-form-section { margin: 0; padding: 0 0 18px; border-top: 0; border-right: 0; border-left: 0; }
.report-form-section:last-child { border-bottom: 0; }
.report-form-section__heading { display: flex; align-items: center; gap: 9px; }
.report-step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--report-muted); color: var(--report-primary); font-size: 12px; font-weight: 800; }
.report-form-section__heading strong { font-size: 14px; }
.report-form-section__heading small { display: block; margin-top: 1px; color: var(--report-muted-foreground); font-weight: 400; }
.report-special-form__list { display: grid; gap: 7px; margin: 0; padding-left: 22px; color: var(--report-muted-foreground); font-size: 13px; line-height: 1.45; }
.report-form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.report-form-group { display: grid; gap: 6px; min-width: 0; }
.report-form-group label { font-size: 13px; font-weight: 700; }

.report-combobox { position: relative; }
.report-combobox__trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; text-align: left; }
.report-combobox__trigger:disabled { cursor: default; background: var(--report-muted); }
.report-combobox__value { min-width: 0; }
.report-combobox__value strong, .report-combobox__value small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-combobox__value strong { font-size: 13px; }
.report-combobox__value small { margin-top: 2px; color: var(--report-muted-foreground); font-size: 11px; }
.report-combobox__popover { position: absolute; z-index: 40; inset: calc(100% + 6px) 0 auto; padding: 7px; border: 1px solid var(--report-border); border-radius: 9px; background: #fff; box-shadow: 0 18px 45px rgba(16,24,20,.14); }
.report-combobox__popover[hidden] { display: none; }
.report-combobox__search { margin-bottom: 7px; }
.report-combobox__results { max-height: 260px; overflow: auto; }
.report-company-option { display: grid; gap: 3px; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.report-company-option:hover, .report-company-option[aria-selected="true"] { background: var(--report-muted); }
.report-company-option strong { font-size: 13px; }
.report-company-option small { color: var(--report-muted-foreground); font-size: 11px; word-break: break-all; }
.report-combobox__empty { padding: 16px 10px; text-align: center; color: var(--report-muted-foreground); font-size: 13px; }

.report-checkbox-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.report-checkbox-option { display: flex; gap: 10px; min-height: 76px; padding: 13px; border: 1px solid var(--report-border); border-radius: 8px; background: #fff; cursor: pointer; }
.report-checkbox-option:has(input:checked) { border-color: var(--report-primary); background: #f4f8f5; }
.report-checkbox-option input { width: 16px; min-height: auto; margin: 2px 0 0; accent-color: var(--report-primary); }
.report-checkbox-option strong, .report-checkbox-option span span { display: block; }
.report-checkbox-option strong { font-size: 13px; }
.report-checkbox-option span span { margin-top: 3px; color: var(--report-muted-foreground); font-size: 12px; line-height: 1.4; }
.report-scope-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--report-border); border-radius: 8px; background: var(--report-border); }
.report-scope-summary__item { padding: 11px 12px; background: #fafcfb; }
.report-scope-summary__item span, .report-scope-summary__item strong { display: block; }
.report-scope-summary__item span { color: var(--report-muted-foreground); font-size: 11px; }
.report-scope-summary__item strong { margin-top: 3px; font-size: 13px; }
.report-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.report-actions[hidden] { display: none !important; }
.report-primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 9px 16px; border: 1px solid var(--report-primary); border-radius: 8px; background: var(--report-primary); color: var(--report-primary-foreground); font-weight: 800; cursor: pointer; }
.report-primary-button:hover { background: #174520; }
.report-primary-button:disabled { opacity: .55; cursor: not-allowed; }
.report-error, .report-feedback.is-error { color: var(--report-destructive); }
.report-feedback.is-success { color: var(--report-success); }
.report-error { font-size: 12px; }

.report-history-controls { display: flex; align-items: end; gap: 8px; }
.report-field--history { min-width: 190px; flex: 0 0 auto; }
.report-field--history select { min-height: 36px; padding: 6px 9px; }
.report-history-refresh { min-height: 36px; padding: 6px 12px; }
.report-history { min-width: 0; }
.report-history__table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--report-border); border-radius: 8px; }
.report-history__table { width: 100%; min-width: 1050px; border-collapse: collapse; }
.report-history__table th, .report-history__table td { padding: 11px 12px; border-bottom: 1px solid var(--report-border); text-align: left; vertical-align: top; font-size: 13px; }
.report-history__table th { background: #f7f9f8; color: #465149; font-size: 12px; font-weight: 800; }
.report-history__table tbody tr:last-child td { border-bottom: 0; }
.report-history__table tbody tr:hover { background: #fbfcfb; }
.report-status--queued { background:#fff7ed; color:var(--report-warning); }
.report-status--running { background:#eff6ff; color:#1d4ed8; }
.report-status--succeeded { background:#ecfdf3; color:var(--report-success); }
.report-status--failed,.report-status--expired,.report-status--cancelled { background:#fef2f2; color:var(--report-destructive); }
.report-table-actions { display:flex; gap:6px; flex-wrap:wrap; }
.report-link-button { padding: 6px 9px; border: 1px solid var(--report-border); border-radius: 6px; background: #fff; color: var(--report-foreground); cursor: pointer; }
.report-link-button:disabled { opacity:.5; cursor:not-allowed; }
.report-pagination { display:flex; justify-content:flex-end; gap:8px; padding-top:14px; }
.report-toast-region { position:fixed; right:20px; bottom:20px; z-index:2000; display:grid; gap:8px; }
.report-toast { min-width:280px; max-width:420px; padding:12px 14px; border-radius:8px; background:#172019; color:#fff; box-shadow:0 16px 40px rgba(0,0,0,.18); }

@media (min-width: 768px) {
  .report-hub-page .breadcrumb {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    z-index: 10;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 72px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    text-align: center;
  }
  .report-hub-page.page-container { padding-top: 68px; }
}

@media (max-width: 1050px) {
  .report-main-grid { grid-template-columns: 1fr; }
  .report-catalog-card { position: static; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 76px; }
  .report-hub-page.page-container { width:100%; padding:10px 12px 36px; gap:12px; }
  .report-hub-page .breadcrumb { overflow-x:auto; white-space:nowrap; font-size:13px; }
  .report-page-header { align-items:stretch; flex-direction:column; gap:10px; }
  .report-page-title-row { justify-content:flex-start; }
  .report-page-title-row h1 { font-size:23px; white-space:normal; }
  .report-workspace-nav { width:100%; }
  .report-workspace-nav a { flex:1; text-align:center; }
  .report-toolbar { align-items:stretch; flex-direction:column; }
  .report-toolbar .report-field { flex:0 0 auto; width:100%; }
  .report-field--compact { flex-basis:auto; }
  .report-catalog { max-height:min(46vh, 440px); }
  .report-card__header { align-items:stretch; flex-direction:column; }
  .report-history-controls { align-items:stretch; flex-direction:column; }
  .report-field--history { width:100%; min-width:0; }
  .report-form-row, .report-checkbox-grid, .report-scope-summary { grid-template-columns:1fr; }
  .report-card { padding:16px; }
  .sidebar-floating-toggle { top:auto !important; bottom:18px !important; left:18px !important; }
}
