

.statement-modal-overlay,
.statement-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.statement-modal-overlay.active,
.statement-modal.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.statement-modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 1140px;
  max-height: 92vh;
  border-radius: 18px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: statementSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes statementSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.statement-header {
  padding: 1.25rem 1.75rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.statement-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.statement-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #c5a059 0%, #9a763c 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(197, 160, 89, 0.35);
}

.statement-title-main {
  font-family: var(--font-heading, inherit);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.statement-title-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.statement-btn-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.statement-btn-close:hover {
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
  border-color: transparent;
}

.statement-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
  background: #f8fafc;
}

.statement-controls-bar {
  background: #ffffff;
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.statement-quick-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.statement-pill-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.statement-pill-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.statement-pill-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.statement-date-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.statement-date-input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.38rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  outline: none;
  background: #ffffff;
}

.statement-date-input:focus {
  border-color: #c5a059;
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.statement-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.statement-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.statement-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.statement-kpi-card.kpi-opening::before { background: #64748b; }
.statement-kpi-card.kpi-debit::before { background: #ef4444; }
.statement-kpi-card.kpi-credit::before { background: #10b981; }
.statement-kpi-card.kpi-balance::before { background: #c5a059; }

.statement-kpi-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.statement-kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.statement-kpi-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 0.35rem;
}

.statement-recon-banner {
  border-radius: 14px;
  padding: 1rem 1.35rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.statement-recon-banner.pending {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  color: #92400e;
}

.statement-recon-banner.confirmed {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.statement-recon-banner.disputed {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
  color: #991b1b;
}

.statement-recon-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.statement-recon-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.statement-recon-banner.pending .statement-recon-icon {
  background: rgba(217, 119, 6, 0.15);
  color: #d97706;
}

.statement-recon-banner.confirmed .statement-recon-icon {
  background: rgba(5, 150, 105, 0.15);
  color: #059669;
}

.statement-recon-banner.disputed .statement-recon-icon {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

.statement-recon-text h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.statement-recon-text p {
  margin: 2px 0 0 0;
  font-size: 0.78rem;
  opacity: 0.9;
}

.statement-recon-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.statement-table-wrap {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.statement-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.statement-table th {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.statement-table td {
  padding: 0.8rem 1rem;
  font-size: 0.82rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.statement-table tr:last-child td {
  border-bottom: none;
}

.statement-table tr:hover td {
  background: #f8fafc;
}

.statement-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.statement-badge.info { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.statement-badge.success { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
.statement-badge.danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.statement-badge.warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.statement-footer {
  padding: 1.1rem 1.75rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.statement-footer-info {
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.statement-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media print {
  body * {
    visibility: hidden;
  }
  #statementPrintFrame, #statementPrintFrame * {
    visibility: visible;
  }
  #statementPrintFrame {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}
