.reports-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 6px 0 28px;
  color: #111827;
}

.reports-hero,
.reports-section,
.reports-scheduled {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(17, 24, 39, .06);
}

.reports-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

.reports-hero h1,
.reports-section h2,
.reports-wizard h2,
.reports-wizard h3 {
  margin: 0;
  letter-spacing: 0;
  color: #0f172a;
}

.reports-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
}

.reports-hero p,
.reports-section p,
.reports-empty-card p,
.reports-scheduled p {
  margin: 8px 0 0;
  color: #64748b;
}

.reports-eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.reports-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.reports-btn:hover {
  transform: translateY(-1px);
}

.reports-btn-primary {
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 118, 110, .22);
}

.reports-btn-secondary {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.reports-btn-ghost {
  background: #ffffff;
  color: #475569;
  border-color: #cbd5e1;
}

.reports-section {
  padding: 22px;
}

.reports-section-head,
.reports-scheduled {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.reports-section-chip,
.reports-scheduled span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.reports-quick-grid,
.reports-library-grid,
.reports-option-grid,
.reports-filter-grid {
  display: grid;
  gap: 14px;
}

.reports-quick-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 18px;
}

.reports-template-card,
.reports-empty-card,
.reports-option,
.reports-filter-option,
.reports-preview-card {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
}

.reports-template-card {
  display: flex;
  min-height: 184px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.reports-template-card:hover,
.reports-template-card:focus {
  border-color: #14b8a6;
  box-shadow: 0 16px 30px rgba(20, 184, 166, .13);
  outline: none;
}

.reports-template-kicker {
  font-size: 11px;
  font-weight: 900;
  color: #7c2d12;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.reports-template-card strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.25;
}

.reports-template-card span:not(.reports-template-kicker) {
  color: #64748b;
  line-height: 1.45;
}

.reports-template-card em {
  margin-top: auto;
  color: #0f766e;
  font-style: normal;
  font-weight: 800;
}

.reports-library-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.reports-empty-card {
  min-height: 180px;
  padding: 18px;
  overflow: hidden;
}

.reports-empty-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #14b8a6, #f59e0b);
  margin-bottom: 14px;
}

.reports-empty-card h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

.reports-template-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  max-height: 520px;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.reports-library-template {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  text-align: left;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
}

.reports-library-template.is-system {
  border-color: rgba(20, 184, 166, .24);
}

.reports-library-template.is-user {
  border-color: rgba(37, 99, 235, .22);
}

.reports-library-template-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.reports-library-template-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.reports-library-template strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.25;
}

.reports-library-template-meta {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.reports-library-template-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.reports-library-template-badge.is-system {
  color: #0f766e;
  border-color: rgba(20, 184, 166, .32);
  background: #ecfdf5;
}

.reports-library-template-badge.is-user {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, .28);
  background: #eff6ff;
}

.reports-library-template-description,
.reports-library-empty-note {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.reports-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reports-template-action,
.reports-template-actions button {
  appearance: none;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease;
}

.reports-template-action:hover,
.reports-template-actions button:hover {
  border-color: #0f766e;
  background: #ffffff;
  color: #0f766e;
  transform: translateY(-1px);
}

.reports-template-action.is-primary {
  border-color: rgba(15, 118, 110, .28);
  background: #0f766e;
  color: #ffffff;
}

.reports-template-action.is-primary:hover {
  background: #115e59;
  color: #ffffff;
}

.reports-template-action.is-danger:hover {
  border-color: rgba(220, 38, 38, .36);
  color: #dc2626;
}

.reports-scheduled {
  padding: 20px 22px;
}

.reports-modal[hidden] {
  display: none;
}

.reports-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.reports-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .54);
}

.reports-wizard {
  position: relative;
  width: min(980px, 100%);
  max-height: min(88vh, 840px);
  overflow: auto;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
}

.reports-wizard-head,
.reports-wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
}

.reports-wizard-actions {
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.reports-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-weight: 900;
  cursor: pointer;
}

.reports-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 16px 22px 0;
}

.reports-progress span {
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
}

.reports-progress span.is-active {
  background: #0f766e;
}

.reports-wizard-body {
  padding: 22px;
}

.reports-wizard-step {
  display: none;
}

.reports-wizard-step.is-active {
  display: block;
}

.reports-option-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 16px;
}

.reports-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 16px;
}

.reports-option,
.reports-filter-option {
  min-height: 82px;
  padding: 14px;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.reports-option.is-selected,
.reports-filter-option.is-selected {
  border-color: #0f766e;
  background: #ecfdf5;
}

.reports-option strong,
.reports-filter-option strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.reports-option span,
.reports-filter-option span {
  color: #64748b;
  font-size: 13px;
}

.reports-criteria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.reports-criteria-control {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.reports-criteria-control span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.reports-criteria-control select,
.reports-criteria-control input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  padding: 9px 11px;
}

.reports-criteria-control select:focus,
.reports-criteria-control input:focus {
  border-color: #2bb59b;
  box-shadow: 0 0 0 3px rgba(43, 181, 155, .16);
  outline: none;
}

.reports-criteria-note {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 13px;
}

.reports-preview-card {
  margin-top: 16px;
  padding: 18px;
}

.reports-preview-head,
.reports-preview-meta {
  display: grid;
  gap: 14px;
}

.reports-preview-head {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.reports-preview-head span,
.reports-preview-meta dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.reports-preview-head strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 22px;
}

.reports-preview-meta {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 16px 0;
}

.reports-preview-meta dl,
.reports-preview-meta dd,
.reports-preview-meta dt {
  margin: 0;
}

.reports-preview-meta dd {
  margin-top: 4px;
  color: #111827;
  font-weight: 800;
}

.reports-preview-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reports-template-state {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.reports-preview-layout article {
  min-height: 120px;
  padding: 16px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.reports-preview-layout h4 {
  margin: 0 0 8px;
  color: #0f172a;
}

.reports-debug-panel {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid rgba(31, 41, 55, 0.14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.reports-debug-panel h3 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.reports-debug-status {
  margin: 0 0 14px;
  color: #475569;
  font-weight: 700;
}

.reports-debug-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: #f8fafc;
}

.reports-debug-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.reports-debug-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px 14px;
  margin: 0;
}

.reports-debug-list div {
  min-width: 0;
}

.reports-debug-list dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.reports-debug-list dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.reports-chart-placeholder div {
  height: 58px;
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, #14b8a6 0 18px, #e0f2fe 18px 32px);
}

.reports-table-placeholder span {
  display: block;
  height: 12px;
  margin-top: 10px;
  border-radius: 999px;
  background: #cbd5e1;
}

@media (max-width: 760px) {
  .reports-hero,
  .reports-section-head,
  .reports-scheduled,
  .reports-preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .reports-preview-layout {
    grid-template-columns: 1fr;
  }

  .reports-wizard-actions .reports-btn {
    flex: 1 1 140px;
  }
}

@media (max-width: 1180px) {
  .reports-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .reports-library-grid {
    grid-template-columns: 1fr;
  }

  .reports-library-template-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Phase R2.3 visual polish: align Reports & Insights with the LIT-AMS dashboard language. */
.reports-page {
  max-width: 1530px;
  margin: 0 auto;
  padding: 10px 0 36px;
  gap: 18px;
}

.reports-hero,
.reports-section,
.reports-scheduled {
  border-color: rgba(191, 219, 254, .72);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.reports-hero {
  position: relative;
  min-height: 164px;
  padding: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgba(191, 219, 254, .62), transparent 30%),
    linear-gradient(135deg, rgba(224, 247, 255, .95), rgba(240, 253, 250, .92) 52%, rgba(255, 255, 255, .98));
}

.reports-hero::after {
  content: "";
  position: absolute;
  right: 32px;
  bottom: -46px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .34);
  pointer-events: none;
}

.reports-hero-copy,
.reports-hero-actions {
  position: relative;
  z-index: 1;
}

.reports-hero h1 {
  max-width: 760px;
  margin-top: 6px;
  font-size: clamp(32px, 3vw, 46px);
}

.reports-hero p {
  max-width: 720px;
  color: #475569;
  font-size: 15px;
  line-height: 1.55;
}

.reports-eyebrow,
.reports-template-kicker {
  color: #0f766e;
  font-weight: 900;
  letter-spacing: .12em;
}

.reports-btn {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 900;
}

.reports-btn-primary {
  background: var(--primary, #2bb59b);
  box-shadow: 0 14px 28px rgba(43, 181, 155, .25);
}

.reports-btn-primary:hover {
  background: var(--primary-dark, #1f9d86);
}

.reports-btn-secondary {
  border-color: rgba(43, 181, 155, .24);
  background: rgba(204, 251, 241, .64);
  color: #0f766e;
}

.reports-btn-ghost {
  background: #fff;
  color: #334155;
}

.reports-section {
  padding: 22px;
}

.reports-section-head h2,
.reports-scheduled h2 {
  font-size: 22px;
}

.reports-section-head p,
.reports-scheduled p {
  color: #475569;
  line-height: 1.5;
}

.reports-section-chip,
.reports-scheduled span {
  border: 1px solid rgba(20, 184, 166, .22);
  background: rgba(204, 251, 241, .7);
  color: #0f766e;
}

.reports-quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.reports-template-card {
  position: relative;
  min-height: 230px;
  padding: 18px;
  gap: 12px;
  border-color: #dbe4ee;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .96));
  box-shadow: 0 16px 34px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.reports-template-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #2bb59b, #60a5fa, #f59e0b);
  opacity: .72;
}

.reports-template-card:hover,
.reports-template-card:focus-visible {
  border-color: rgba(43, 181, 155, .42);
  box-shadow: 0 20px 42px rgba(15, 23, 42, .10);
  transform: translateY(-2px);
}

.reports-template-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.reports-template-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(43, 181, 155, .24);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(204, 251, 241, .82), rgba(239, 246, 255, .96));
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
}

.reports-template-card strong {
  font-size: 18px;
}

.reports-template-card span:not(.reports-template-kicker):not(.reports-template-icon):not(.reports-template-top):not(.reports-template-meta) {
  color: #526581;
}

.reports-template-meta {
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.reports-template-card em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(43, 181, 155, .24);
  border-radius: 999px;
  background: rgba(204, 251, 241, .64);
}

.reports-library-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  grid-template-areas:
    "templates generated"
    "templates favorites"
    "templates shared";
  align-items: start;
  gap: 16px;
}

.reports-library-panel--templates {
  grid-area: templates;
}

.reports-library-panel--generated-reports {
  grid-area: generated;
}

.reports-library-panel--favorites {
  grid-area: favorites;
}

.reports-library-panel--shared-reports {
  grid-area: shared;
}

.reports-empty-card,
.reports-library-template,
.reports-preview-card,
.reports-option,
.reports-filter-option {
  border-color: #dbe4ee;
  border-radius: 16px;
}

.reports-empty-card {
  min-height: 164px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .045);
}

.reports-library-panel--templates {
  min-height: 520px;
}

.reports-empty-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(43, 181, 155, .92), rgba(96, 165, 250, .84));
  box-shadow: 0 10px 22px rgba(43, 181, 155, .16);
}

.reports-empty-card h3 {
  font-size: 17px;
}

.reports-template-list {
  gap: 12px;
  max-height: 680px;
  padding: 2px 6px 2px 0;
}

.reports-library-template {
  grid-template-columns: minmax(0, 1fr);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(248, 250, 252, .94));
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.reports-library-template.is-system {
  border-left: 4px solid #2bb59b;
}

.reports-library-template.is-user {
  border-left: 4px solid #60a5fa;
}

.reports-library-template strong {
  font-size: 16px;
}

.reports-library-template-meta {
  color: #526581;
  font-weight: 800;
}

.reports-library-template-badge {
  padding: 5px 10px;
  border-radius: 999px;
}

.reports-template-actions {
  gap: 9px;
}

.reports-template-action,
.reports-template-actions button {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
}

.reports-template-action.is-primary {
  border-color: rgba(43, 181, 155, .25);
  background: var(--primary, #2bb59b);
}

.reports-template-action.is-primary:hover {
  background: var(--primary-dark, #1f9d86);
}

.reports-library-empty-note,
.reports-template-list > p {
  margin: 0;
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, .34);
  border-radius: 14px;
  background: rgba(248, 250, 252, .78);
  color: #64748b;
}

.reports-wizard {
  border-radius: 18px;
}

.reports-wizard-head,
.reports-wizard-actions {
  padding: 20px 24px;
}

.reports-progress span {
  height: 6px;
}

.reports-progress span.is-active {
  background: var(--primary, #2bb59b);
}

.reports-option,
.reports-filter-option,
.reports-preview-layout article {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.reports-option.is-selected,
.reports-filter-option.is-selected {
  border-color: rgba(43, 181, 155, .42);
  background: rgba(204, 251, 241, .58);
}

.reports-live-preview {
  margin-top: 18px;
}

.reports-live-preview[hidden] {
  display: none;
}

.reports-intelligence-preview {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(43, 181, 155, .24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 98% 0%, rgba(191, 219, 254, .44), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(240, 253, 250, .62));
  box-shadow: 0 18px 38px rgba(15, 23, 42, .07);
}

.reports-intelligence-preview::before {
  content: "Compact wizard preview";
  justify-self: start;
  padding: 5px 10px;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 999px;
  background: rgba(204, 251, 241, .7);
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.reports-preview-coming-soon {
  padding: 18px;
}

.reports-intelligence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .24);
}

.reports-preview-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.reports-intelligence-head h4,
.reports-intelligence-panel h4 {
  margin: 0;
  color: #0f172a;
  letter-spacing: 0;
}

.reports-intelligence-head p {
  margin: 7px 0 0;
  color: #64748b;
  line-height: 1.45;
}

.reports-intelligence-stamp {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.reports-intelligence-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.reports-intelligence-kpi,
.reports-intelligence-panel {
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

.reports-intelligence-kpi {
  min-height: 112px;
  padding: 16px;
}

.reports-intelligence-kpi span {
  display: block;
  color: #526581;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.reports-intelligence-kpi strong {
  display: block;
  margin-top: 9px;
  color: #020617;
  font-size: 26px;
  line-height: 1.05;
}

.reports-intelligence-kpi small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  line-height: 1.35;
}

.reports-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reports-intelligence-panel {
  padding: 16px;
}

.reports-intelligence-track .reports-intelligence-kpi {
  min-height: auto;
  margin-top: 12px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.reports-track-mini-rows {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.reports-full-view[hidden] {
  display: none;
}

.reports-full-shell {
  display: grid;
  gap: 22px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(14, 165, 233, .12), transparent 32%),
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 24px 54px rgba(15, 23, 42, .08);
}

.reports-full-head,
.reports-full-track-head,
.reports-full-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.reports-full-head {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .24);
}

.reports-full-head h2,
.reports-full-track h3 {
  margin: 0;
  color: #0f172a;
  letter-spacing: 0;
}

.reports-full-head p,
.reports-full-track p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.45;
}

.reports-full-meta {
  display: grid;
  gap: 7px;
  min-width: min(320px, 100%);
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.reports-full-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.reports-full-actions .reports-btn[disabled] {
  cursor: not-allowed;
  opacity: .62;
}

.reports-full-kpis .reports-intelligence-kpi {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.reports-mapping-quality {
  border-color: #bfd7ff;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.reports-presentation-mode-note {
  border-color: rgba(59, 130, 246, .24);
  background: linear-gradient(135deg, rgba(239, 246, 255, .95), rgba(255, 255, 255, .96));
}

.reports-presentation-mode-note p {
  margin: 6px 0 0;
  color: #526070;
  font-size: 13px;
}

.reports-presentation-section {
  border-color: rgba(15, 23, 42, .12);
}

.reports-mode-detailed_table .reports-full-kpis {
  display: none;
}

.reports-mode-insights_patterns .reports-mapping-quality {
  border-color: rgba(245, 158, 11, .32);
  background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.reports-mode-trend_analysis .reports-full-breakdowns,
.reports-mode-performance_breakdown .reports-full-breakdowns {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.reports-mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.reports-mapping-grid .reports-intelligence-kpi {
  min-height: 96px;
  padding: 13px;
}

.reports-agent-split-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.reports-agent-split-kpis .reports-intelligence-kpi,
.reports-agent-stream-breakdown .reports-intelligence-kpi {
  min-height: 98px;
  border-color: rgba(37, 99, 235, .16);
  background: linear-gradient(180deg, rgba(248, 250, 252, .98), rgba(255, 255, 255, .96));
}

.reports-agent-stream-breakdown {
  border-top: 1px solid rgba(219, 228, 238, .95);
  padding-top: 14px;
}

.reports-full-track {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(219, 228, 238, .95);
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
}

.reports-full-track-head {
  align-items: stretch;
}

.reports-full-track-head .reports-intelligence-kpi {
  flex: 0 0 min(260px, 100%);
  min-height: auto;
}

.reports-full-breakdowns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.reports-sales-focus-section {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid rgba(219, 228, 238, .95);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, .95), rgba(255, 255, 255, .98));
}

.reports-sales-focus-section h4 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
}

.reports-sales-focus-section > .reports-library-empty-note {
  margin: 6px 0 14px;
}

.reports-criteria-warning {
  border-color: rgba(245, 158, 11, .32);
  background: rgba(255, 251, 235, .82);
  color: #92400e;
}

.reports-full-report-placeholder {
  border-color: rgba(96, 165, 250, .34);
  background: linear-gradient(180deg, rgba(239, 246, 255, .98), rgba(255, 255, 255, .96));
}

.reports-full-report-placeholder p {
  margin: 8px 0 14px;
  color: #475569;
  line-height: 1.45;
}

.reports-full-report-placeholder .reports-template-action[disabled] {
  cursor: not-allowed;
  opacity: .72;
  transform: none;
}

.reports-full-report-note {
  display: block;
  margin-top: 10px;
  color: #64748b;
  font-weight: 800;
}

.reports-intelligence-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.reports-intelligence-list li {
  position: relative;
  padding-left: 18px;
  color: #475569;
  line-height: 1.45;
}

.reports-intelligence-list li::before {
  content: "";
  position: absolute;
  top: .62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2bb59b;
}

.reports-bar-list {
  display: grid;
  gap: 11px;
  margin-top: 12px;
}

.reports-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.reports-bar-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-bar-head strong {
  flex: 0 0 auto;
  color: #0f172a;
}

.reports-bar-track {
  height: 9px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.reports-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2bb59b, #60a5fa);
}

.reports-intelligence-detail {
  overflow: hidden;
}

.reports-intelligence-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.reports-intelligence-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 13px;
}

.reports-intelligence-table th,
.reports-intelligence-table td {
  padding: 10px 9px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.reports-intelligence-table th {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.reports-intelligence-table td {
  color: #1e293b;
}

@media (max-width: 1180px) {
  .reports-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-library-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "templates"
      "favorites"
      "generated"
      "shared";
  }

  .reports-library-panel--templates {
    min-height: 0;
  }

  .reports-intelligence-kpis,
  .reports-intelligence-grid,
  .reports-full-breakdowns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .reports-page {
    padding: 0 0 28px;
  }

  .reports-hero {
    padding: 24px;
  }

  .reports-quick-grid {
    grid-template-columns: 1fr;
  }

  .reports-template-card {
    min-height: 0;
  }

  .reports-intelligence-head {
    flex-direction: column;
  }

  .reports-full-head,
  .reports-full-track-head {
    flex-direction: column;
  }

  .reports-full-meta {
    text-align: left;
  }

  .reports-intelligence-kpis,
  .reports-intelligence-grid,
  .reports-full-breakdowns {
    grid-template-columns: 1fr;
  }
}


/* ---------------------------------------------------------------------------
   Print, added 2026-08-31. The Print button sets .reports-printing on <body>;
   everything except the full report view is taken out of the sheet, so what
   comes out of the printer is the report and not the application around it.
   This is also how a PDF is produced - the browser's own "Save as PDF".
   --------------------------------------------------------------------------- */
@media print {
  body.reports-printing > *:not(.app-shell),
  body.reports-printing .sidebar,
  body.reports-printing .topbar,
  body.reports-printing .reports-hero,
  body.reports-printing .reports-section,
  body.reports-printing .reports-modal,
  body.reports-printing .reports-full-actions {
    display: none !important;
  }

  body.reports-printing #reportsFullReportView,
  body.reports-printing .reports-full-report-view {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  body.reports-printing .app-shell {
    display: block !important;
    grid-template-columns: none !important;
  }

  /* Ink, not screen: flat backgrounds, and keep the numbers readable. */
  body.reports-printing .reports-full-shell,
  body.reports-printing .reports-intelligence-panel,
  body.reports-printing .reports-full-kpis > * {
    background: #fff !important;
    box-shadow: none !important;
    border: 1px solid #d4d4d8 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.reports-printing table { width: 100%; border-collapse: collapse; }
  body.reports-printing th,
  body.reports-printing td {
    border: 1px solid #d4d4d8;
    padding: 4px 6px;
    font-size: 10pt;
  }
  /* A long detail table should repeat its header on each sheet. */
  body.reports-printing thead { display: table-header-group; }

  @page { margin: 12mm; }
}