.finance-export-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

.finance-export-preview-dialog {
  width: min(1480px, 94vw);
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.25);
  color: #0f172a;
}

.finance-export-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #e6eaf0;
}

.finance-export-preview-heading h2 {
  margin: 3px 0 7px;
  font-size: 22px;
  line-height: 1.3;
}

.finance-export-preview-heading p {
  margin: 0;
  color: #667085;
  font-size: 14px;
}

.finance-export-preview-eyebrow {
  color: #1677ff;
  font-size: 12px;
  font-weight: 650;
}

.finance-export-preview-close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  background: #f4f6f8;
  color: #475467;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.finance-export-preview-close:hover {
  background: #e9edf2;
  color: #101828;
}

.finance-export-preview-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 28px;
  background: #f8fafc;
  border-bottom: 1px solid #e6eaf0;
}

.finance-export-preview-summary-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.finance-export-preview-summary-item span {
  color: #667085;
  font-size: 13px;
}

.finance-export-preview-summary-item strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.finance-export-preview-table-wrap {
  min-height: 260px;
  overflow: auto;
}

.finance-export-preview-table {
  width: 100%;
  min-width: 1240px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13px;
}

.finance-export-preview-table th,
.finance-export-preview-table td {
  padding: 12px 14px;
  border-right: 1px solid #e7ebf0;
  border-bottom: 1px solid #e7ebf0;
  text-align: left;
  vertical-align: top;
}

.finance-export-preview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f2f5f9;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.finance-export-preview-table tbody tr:hover td {
  background: #f8fbff;
}

.finance-export-preview-table th:nth-child(1),
.finance-export-preview-table td:nth-child(1) { width: 130px; }
.finance-export-preview-table th:nth-child(2),
.finance-export-preview-table td:nth-child(2) { width: 70px; }
.finance-export-preview-table th:nth-child(3),
.finance-export-preview-table td:nth-child(3) { width: 270px; }
.finance-export-preview-table th:nth-child(4),
.finance-export-preview-table td:nth-child(4) { width: 90px; }
.finance-export-preview-table th:nth-child(5),
.finance-export-preview-table td:nth-child(5) { width: 90px; }
.finance-export-preview-table th:nth-child(6),
.finance-export-preview-table td:nth-child(6) { width: 110px; }
.finance-export-preview-table th:nth-child(7),
.finance-export-preview-table td:nth-child(7) { width: 120px; }
.finance-export-preview-table th:nth-child(8),
.finance-export-preview-table td:nth-child(8) { width: 360px; }

.finance-export-preview-table td:nth-child(1),
.finance-export-preview-table td:nth-child(6),
.finance-export-preview-table td:nth-child(7) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.finance-export-preview-detail {
  color: #344054;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.finance-export-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  border-top: 1px solid #e6eaf0;
  background: #fff;
}

.finance-export-preview-note {
  color: #667085;
  font-size: 13px;
}

.finance-export-preview-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.finance-export-preview-cancel,
.finance-export-preview-download {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.finance-export-preview-cancel {
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #344054;
}

.finance-export-preview-download {
  border: 1px solid #1677ff;
  background: #1677ff;
  color: #fff;
}

.finance-export-preview-download:hover { background: #0f67dc; }
.finance-export-preview-download:disabled { cursor: wait; opacity: 0.65; }
.finance-export-preview-cancel:focus-visible,
.finance-export-preview-download:focus-visible,
.finance-export-preview-close:focus-visible {
  outline: 3px solid rgba(22, 119, 255, 0.24);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .finance-export-preview-overlay { padding: 10px; }
  .finance-export-preview-dialog { width: 100%; max-height: 94vh; border-radius: 12px; }
  .finance-export-preview-header { padding: 18px 18px 14px; }
  .finance-export-preview-summary { grid-template-columns: 1fr; padding: 14px 18px; }
  .finance-export-preview-footer { align-items: stretch; flex-direction: column; padding: 14px 18px; }
  .finance-export-preview-actions { width: 100%; }
  .finance-export-preview-cancel,
  .finance-export-preview-download { flex: 1; }
}
