/* Nexora Executive Financial & Operational Reports Styles (v8.0 Design System Law) */
.nx-report-list-tools {
  padding: 14px 0 10px;
  border-top: 1px solid var(--line, #e8e2ee);
}
.nx-report-filter-form {
  padding: 14px 16px;
  border-radius: 14px;
  background: #faf8fc;
  border: 1px solid #eee8f2;
  margin-bottom: 14px;
}
.nx-report-list-tools .nx-report-filter-form {
  margin-bottom: 0;
}
.nx-report-fields {
  display: flex;
  gap: 10px 12px;
  flex-wrap: wrap;
  align-items: end;
}
.nx-report-fields label,
.nx-report-panel-toolbar > label,
.nx-report-export-options > label,
.nx-merchant-report > .panel-head > label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted, #685e74);
  min-width: 124px;
}
.nx-report-fields .select,
.nx-report-fields input[type=date],
.nx-report-panel-toolbar .select,
.nx-report-export-options .select,
.nx-merchant-report > .panel-head .select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 38px;
  box-sizing: border-box;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid #e8e2ee;
  background: #fff;
  color: var(--ink, #1b1823);
  padding: 0 11px;
  font-variant-numeric: tabular-nums;
}
.nx-report-fields .select:focus,
.nx-report-fields input[type=date]:focus {
  border-color: #9e78b5;
  box-shadow: 0 0 0 3px #a383b415;
  outline: none;
}
.nx-report-fields .ghost-button,
.nx-report-fields .text-button {
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  font-size: 13px;
  white-space: nowrap;
}
.nx-report-fields .ghost-button[type=submit] {
  background: #11131b;
  border-color: #11131b;
  color: #fff;
  font-weight: 600;
}
.nx-report-fields .ghost-button[type=submit]:hover {
  background: #24212f;
}
.nx-report-fields .text-button {
  border-radius: 999px;
}
.nx-report-fields input[type=date] { max-width: 164px; }
.nx-report-fields input[name=channel] { max-width: 184px; }

.nx-report-coverage {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted, #685e74);
  padding: 8px 12px;
  border-radius: 12px;
  background: #fcfaff;
  border: 1px solid #eee8f2;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.nx-report-meta-bar > .nx-report-coverage {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}
.nx-report-form-error { margin: 8px 0 0; }
.nx-report-form-error:empty { display: none; margin: 0; }

p.nx-report-note,
.nx-report-filter-form .nx-report-note,
.nx-report-list-tools .nx-report-note,
.nx-merchant-report .nx-report-note {
  display: block;
  margin: 9px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted, #685e74);
}
.nx-report-coverage p { margin: 3px 0; }
.nx-report-snapshot {
  color: #4d3c5e;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nx-report-coverage details { padding: 4px 0; }

.nx-report-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  flex-wrap: wrap;
  padding: 12px 0 4px;
}
.nx-report-meta-bar > .nx-report-coverage,
.nx-report-meta-bar > .nx-report-note {
  flex: 1 1 340px;
  min-width: 0;
  margin: 0;
  padding: 0;
}

/* CSV Export Controls */
.nx-report-export-options {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.nx-report-list-tools .nx-report-export-options {
  padding: 0;
  margin-left: auto;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nx-report-list-tools .nx-report-export-options > label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}
.nx-report-list-tools .nx-report-export-options .select {
  width: auto;
  min-width: 148px;
  height: 36px;
  font-size: 12px;
  border-radius: 10px;
}
.nx-report-export-options [data-report-export],
#cash-overview [data-cash-export] {
  background: #f4ecfa;
  border-color: #e2d1f2;
  color: #5d39bd;
  font-weight: 600;
}
.nx-report-export-options [data-report-export]:hover:not(:disabled),
#cash-overview [data-cash-export]:hover:not(:disabled) {
  background: #eadcf8;
  border-color: #d3bfdc;
}
.nx-report-export-options > [role=status] {
  font-size: 12px;
  color: var(--muted, #685e74);
  align-self: center;
  overflow-wrap: anywhere;
}
.nx-report-export-options [hidden] { display: none !important; }
#cash-overview [hidden] { display: none !important; }

.nx-report-dirty-note {
  color: #825d24 !important;
  background: #fff4e5 !important;
  border: 1px solid #eed9b7 !important;
  border-radius: 9px !important;
  padding: 6px 10px !important;
  font-weight: 500;
}

/* Executive KPI Cards & Semantic Pills */
.nx-report-mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 0 4px;
}
.nx-report-mini-stats article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #faf8fc;
  border: 1px solid #eee8f2;
  position: relative;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.nx-report-mini-stats article:hover {
  border-color: #dfd2eb;
  box-shadow: 0 6px 18px #4b2d6e08;
}
.nx-report-mini-stats span,
.nx-report-mini-stats small {
  font-size: 12px;
  color: var(--muted, #685e74);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.nx-report-mini-stats strong {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.4px;
  color: var(--ink, #1b1823);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.nx-report-stats {
  margin-bottom: 16px;
}
.nx-report-stats article {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff, #fcfaff);
  border: 1px solid #ece4f3;
  box-shadow: 0 6px 22px #4d2f6d06;
}
.nx-report-stats article > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.nx-report-stats strong {
  overflow-wrap: anywhere;
  font-size: clamp(19px, 2.2vw, 27px);
  font-variant-numeric: tabular-nums;
  color: var(--ink, #1b1823);
}
.nx-report-stats article[data-tone=positive] strong,
.nx-report-mini-stats article[data-tone=positive] strong {
  color: #2f6140;
}
.nx-report-stats article[data-tone=negative] strong,
.nx-report-mini-stats article[data-tone=negative] strong {
  color: #a63d58;
}

.nx-kpi-pill {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2eef5;
  color: #5b4f66;
  border: 1px solid #e8e2ee;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.nx-kpi-pill.pos {
  background: #eaf6ee;
  border-color: #dcebe2;
  color: #3d6f4b;
}
.nx-kpi-pill.neg {
  background: #fce2e8;
  border-color: #efd7df;
  color: #a63d58;
}
.nx-kpi-pill.warn {
  background: #fff4e5;
  border-color: #eed9b7;
  color: #825d24;
}
.nx-kpi-pill.brand {
  background: #f4ecfa;
  border-color: #e5d4f4;
  color: #5d39bd;
}

/* Cash Overview & Report Panel */
#cash-overview [data-cash-summary]:empty {
  display: none;
}
#cash-overview .nx-report-mini-stats {
  padding: 4px 0 6px;
}
#cash-overview .nx-report-mini-stats article {
  background: linear-gradient(155deg, #ffffff, #fbf8fe);
  border-color: #eae1f2;
  box-shadow: 0 5px 18px #4b2d6e06;
}
#cash-overview .nx-report-coverage {
  margin-bottom: 0;
}
#cash-overview .nx-report-coverage .toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #ece4f2;
}
.nx-merchant-report {
  margin-bottom: 18px;
}
.nx-merchant-report > .nx-report-filter-form,
.nx-merchant-report > .nx-report-panel-toolbar,
.nx-merchant-report > .nx-report-stats,
.nx-merchant-report > .nx-report-coverage,
.nx-merchant-report > .form-error {
  margin-left: 0;
  margin-right: 0;
}
.nx-report-panel-toolbar {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
  padding: 0 0 14px;
}
.nx-report-panel-toolbar .nx-report-export-options {
  padding: 0;
  margin-left: auto;
}
.nx-report-preview small {
  display: block;
  margin-top: 4px;
  color: var(--muted, #685e74);
}
.nx-report-preview td {
  max-width: 320px;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

@media(max-width:900px) {
  .nx-report-mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media(max-width:700px) {
  .nx-report-list-tools { padding: 12px 0 6px; }
  .nx-report-filter-form,
  .nx-report-list-tools .nx-report-filter-form { padding: 12px; }
  .nx-report-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-report-fields label { min-width: 0; }
  .nx-report-fields input[type=date],
  .nx-report-fields input[name=channel] { max-width: none; }
  .nx-report-fields .ghost-button,
  .nx-report-fields .text-button { min-width: 0; width: 100%; }
  .nx-report-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-report-mini-stats strong { font-size: 16px; }
  .nx-report-meta-bar { align-items: stretch; }
  .nx-report-meta-bar > .nx-report-coverage,
  .nx-report-meta-bar > .nx-report-note { flex: none; width: 100%; }
  .nx-report-export-options { gap: 9px; }
  .nx-report-list-tools .nx-report-export-options { margin-left: 0; width: 100%; justify-content: flex-start; }
  .nx-report-list-tools .nx-report-export-options > label { width: 100%; justify-content: space-between; }
  .nx-report-list-tools .nx-report-export-options .select { flex: 1 1 auto; }
  .nx-report-export-options > label { min-width: 0; flex: 1 1 180px; }
  .nx-report-panel-toolbar { align-items: stretch; }
  .nx-report-panel-toolbar > label { flex: 1 1 130px; min-width: 0; }
  .nx-report-panel-toolbar .nx-report-export-options { margin-left: 0; width: 100%; }
  .nx-merchant-report > .panel-head { flex-wrap: wrap; gap: 12px; }
}
@media(prefers-reduced-motion:reduce) {
  .nx-report-mini-stats article { transition: none; }
}
