/* CSV Import Files Index Styles */
.csv-import-files-index {
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.csv-import-files-table-container {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-top: 2rem;
}

.csv-import-files-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.csv-import-files-table thead {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 2px solid #dee2e6;
}

.csv-import-files-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #495057;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #dee2e6;
}

.csv-import-files-table tbody tr {
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.15s ease-in-out;
}

.csv-import-files-table tbody tr:hover {
  background-color: #f8f9fa;
}

.csv-import-files-table tbody tr:last-child {
  border-bottom: none;
}

.csv-import-files-table td {
  padding: 1rem;
  vertical-align: middle;
  color: #212529;
}

.filename-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-icon i {
  color: white;
  font-size: 1.2rem;
}

.filename {
  font-weight: 600;
  color: #212529;
  font-size: 1rem;
}

.csv-import-files-table .account-name {
  font-weight: 500;
  color: #495057;
}

/* Override the global account-header style for CSV import files table */
.csv-import-files-table .account-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #495057 !important;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #dee2e6;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: capitalize;
}

.status-uploaded {
  background: #e3f2fd;
  color: #1976d2;
}

.status-validated {
  background: #fff3e0;
  color: #f57c00;
}

.status-analyzed {
  background: #e8f5e8;
  color: #388e3c;
}

.status-validation_failed {
  background: #ffebee;
  color: #d32f2f;
}

.status-duplicates_found {
  background: #fff8e1;
  color: #f57f17;
}

.status-ready_for_import {
  background: #e1f5fe;
  color: #0277bd;
}

.status-analysis_failed {
  background: #ffebee;
  color: #d32f2f;
}

.status-completed {
  background: #e8f5e8;
  color: #388e3c;
}

.status-failed {
  background: #ffebee;
  color: #d32f2f;
}

.rows-count {
  font-weight: 600;
  color: #212529;
}

.created-date {
  color: #6c757d;
  font-size: 0.875rem;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.table-actions .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.table-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-actions .btn-outline-primary {
  background-color: transparent;
  border-color: #007bff;
  color: #007bff;
}

.table-actions .btn-outline-primary:hover {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.table-actions .btn-outline-danger {
  background-color: transparent;
  border-color: #dc3545;
  color: #dc3545;
}

.table-actions .btn-outline-danger:hover {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}

.table-actions .btn i {
  font-size: 0.875rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  margin-top: 2rem;
}

.empty-state-icon {
  font-size: 4rem;
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  margin-bottom: 1rem;
  color: #212529;
  font-weight: 600;
}

.empty-state p {
  color: #6c757d;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Invalid Transaction Details Styles */
.invalid-details-section {
  margin-bottom: 2rem;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.invalid-summary {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.invalid-summary-title {
  color: #856404;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.invalid-summary-title i {
  margin-right: 0.5rem;
  color: #f39c12;
}

.invalid-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.invalid-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.invalid-stat .stat-label {
  font-weight: 600;
  color: #856404;
  font-size: 0.875rem;
}

.invalid-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #d63031;
}

.invalid-stat .stat-description {
  font-size: 0.875rem;
  color: #6c5ce7;
}

.invalid-transactions-section {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.invalid-transactions-header {
  background: #f8f9fa;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.invalid-transactions-header .header-main {
  margin-bottom: 1rem;
}

.invalid-transactions-header h4 {
  margin: 0 0 0.5rem 0;
  color: #495057;
  font-size: 1.1rem;
  font-weight: 600;
}

.invalid-transactions-header h4 i {
  margin-right: 0.5rem;
  color: #dc3545;
}

.invalid-transactions-header small {
  color: #6c757d;
  font-size: 0.875rem;
}

.invalid-transactions-header .header-legend {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.invalid-transactions-header .legend-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.invalid-transactions-header .legend-badge .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.invalid-transactions-header .legend-badge .legend-text {
  color: #495057;
  font-size: 0.875rem;
  font-weight: 500;
}

.invalid-transactions-header .legend-help {
  flex: 1;
  min-width: 300px;
}

.invalid-transactions-header .legend-help p {
  margin: 0 0 0.5rem 0;
  color: #6c757d;
  font-size: 0.875rem;
  line-height: 1.4;
}

.invalid-transactions-header .legend-help p:last-child {
  margin-bottom: 0;
}

.invalid-transactions-header .legend-help strong {
  color: #495057;
  font-weight: 600;
}

.invalid-transactions-table {
  padding: 0;
  width: 100%;
}

.invalid-transactions-table .table {
  width: 100%;
  margin: 0;
}

.invalid-transactions-table .table th {
  background: #f8f9fa;
  color: #212529;
  border-color: #dee2e6;
  font-weight: 600;
  padding: 0.75rem;
}

.invalid-transactions-table .table td {
  padding: 0.75rem;
  vertical-align: top;
  border-color: #dee2e6;
  color: #212529;
}

.invalid-row {
  background: white;
}

.invalid-row:hover {
  background: #f8f9fa;
}

.line-number-cell {
  width: 80px;
  text-align: center;
}

.badge-danger {
  background: #dc3545;
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  font-weight: 600;
}

.raw-data-cell {
  width: auto;
}

.error-cell {
  width: auto;
}



/* Analysis Actions Section (within next-step-card) */
.next-step-card .analysis-actions-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.next-step-card .analysis-actions-section .section-header {
  margin-bottom: 1.5rem;
}

.next-step-card .analysis-actions-section .section-title {
  color: #495057;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.next-step-card .analysis-actions-section .section-title i {
  margin-right: 0.5rem;
  color: #6c757d;
}

.next-step-card .analysis-actions-section .action-context {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.next-step-card .analysis-actions-section .action-context p {
  margin: 0;
  color: #6c757d;
  font-size: 0.875rem;
  line-height: 1.5;
}

.next-step-card .analysis-actions-section .action-context strong {
  color: #495057;
  font-weight: 600;
}

/* CSV Import File Show Styles */
.csv-import-file-show {
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.csv-import-file-header {
  background: white;
  border-bottom: 1px solid #e9ecef;
  padding: 0.75rem 2rem;
  margin-bottom: 1rem;
  margin-left: -2rem;
  margin-right: -2rem;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb-link {
  color: #007bff;
  text-decoration: none;
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #6c757d;
}

.breadcrumb-current {
  color: #495057;
  font-weight: 500;
}

.csv-import-file-hero {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.file-info-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.file-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-icon-large i {
  color: white;
  font-size: 2.5rem;
}

.file-details {
  flex: 1;
}

.file-title {
  margin: 0 0 0.5rem 0;
  color: #212529;
  font-size: 2rem;
  font-weight: 700;
}

.file-meta {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.file-account,
.file-status {
  color: #6c757d;
  font-size: 1rem;
}

.file-status .status-badge {
  margin-left: 0.5rem;
}

.file-stats-section,
.error-section,
.file-actions-section {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1.5rem 2rem;
}

.section-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  margin: 0;
  color: #212529;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title i {
  color: #6c757d;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon i {
  color: white;
  font-size: 1.25rem;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #212529;
  line-height: 1;
}

.stat-label {
  color: #6c757d;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.error-message {
  padding: 2rem;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 8px;
  margin: 0 2rem 2rem 2rem;
  color: #c53030;
  font-family: monospace;
  white-space: pre-wrap;
}

.file-actions {
  display: flex;
  gap: 1rem;
  padding: 2rem;
  flex-wrap: wrap;
}

.file-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.file-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* CSV Import File New Styles */
.csv-import-file-new {
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.upload-form-container {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.upload-form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.upload-form-header h1 {
  margin: 0 0 0.5rem 0;
  color: #212529;
  font-size: 2rem;
  font-weight: 700;
}

.upload-form-header p {
  color: #6c757d;
  font-size: 1.1rem;
  margin: 0;
}

.upload-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #212529;
  font-size: 1rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.file-upload-area {
  border: 2px dashed #ced4da;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  background: #f8f9fa;
  transition: all 0.15s ease-in-out;
  position: relative;
}

.file-upload-area:hover {
  border-color: #007bff;
  background: #f0f8ff;
}

.file-upload-area.file-selected {
  border-color: #28a745;
  background: #f8fff9;
  border-style: solid;
}

.file-upload-area.drag-over {
  border-color: #007bff;
  background: #e3f2fd;
  border-style: solid;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.file-upload-content {
  position: relative;
  z-index: 1;
}

.file-upload-content i {
  font-size: 3rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.file-upload-content h3 {
  margin: 0 0 0.5rem 0;
  color: #212529;
  font-size: 1.25rem;
  font-weight: 600;
}

.file-upload-content p {
  margin: 0;
  color: #6c757d;
  font-size: 1rem;
}

.selected-file-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
}

.selected-file-info .file-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.selected-file-info .file-icon i {
  color: white;
  font-size: 1.5rem;
  margin: 0;
}

.selected-file-info .file-details {
  flex: 1;
  text-align: left;
}

.selected-file-info .selected-filename {
  margin: 0 0 0.25rem 0;
  color: #212529;
  font-size: 1.1rem;
  font-weight: 600;
}

.selected-file-info .selected-filesize {
  margin: 0;
  color: #6c757d;
  font-size: 0.875rem;
}

.remove-file-btn {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #dc3545;
  background: white;
  color: #dc3545;
  transition: all 0.15s ease-in-out;
}

.remove-file-btn:hover {
  background: #dc3545;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.file-upload-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #dc3545;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  z-index: 10;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  85% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.error-messages {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  color: #c53030;
}

.error-messages h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.error-messages ul {
  margin: 0;
  padding-left: 1.5rem;
}

.error-messages li {
  margin-bottom: 0.25rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.form-actions .btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.form-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Next Step Indicator Styles */
.next-step-section {
  margin: 2rem 0;
}

.next-step-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 2rem;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.next-step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.next-step-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.next-step-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.next-step-icon i {
  font-size: 1.5rem;
  color: white;
}

.next-step-content {
  flex: 1;
}

.next-step-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.next-step-description {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.next-step-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.next-step-actions .action-groups {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 2rem;
}

.next-step-actions .go-back-group {
  flex: 1;
}

.next-step-actions .go-forward-group {
  flex: 1;
  text-align: right;
}

.next-step-actions .action-context {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
}

.next-step-actions .action-context p {
  margin: 0;
  color: #6c757d;
  font-size: 0.875rem;
  line-height: 1.5;
}

.next-step-actions .action-context strong {
  color: #495057;
  font-weight: 600;
}

.next-step-actions .btn {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.next-step-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Override Bootstrap btn-primary only for specific buttons, not the Import Selections button */
.next-step-actions .btn-primary:not(.btn-import-selections) {
  background: white;
  color: #667eea;
  border: none;
}

.next-step-actions .btn-primary:not(.btn-import-selections):hover {
  background: #f8f9fa;
  color: #667eea;
}

.next-step-actions .btn-outline-primary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.next-step-actions .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.next-step-actions .btn-success {
  background: #28a745;
  color: white;
  border: none;
}

.next-step-actions .btn-success:hover {
  background: #218838;
}

.next-step-actions .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Override for Map Columns button to use standard blue primary styling */
.next-step-actions .btn-map-columns {
  background: #007bff !important;
  color: white !important;
  border: 1px solid #007bff !important;
}

.next-step-actions .btn-map-columns:hover {
  background: #0056b3 !important;
  border-color: #0056b3 !important;
}

/* Responsive styles */
@media (max-width: 768px) {
  .csv-import-files-index,
  .csv-import-file-show,
  .csv-import-file-new {
    padding: 0 1rem;
  }

  .csv-import-file-header {
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .csv-import-files-table-container {
    border-radius: 8px;
  }

  .csv-import-files-table {
    font-size: 0.875rem;
  }

  .csv-import-files-table th,
  .csv-import-files-table td {
    padding: 0.75rem 0.5rem;
  }

  .file-icon {
    width: 32px;
    height: 32px;
  }

  .file-icon i {
    font-size: 1rem;
  }

  .table-actions {
    flex-direction: column;
    gap: 0.25rem;
  }

  .table-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .csv-import-file-hero {
    padding: 1.5rem;
  }

  .file-info-main {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .file-icon-large {
    width: 64px;
    height: 64px;
  }

  .file-icon-large i {
    font-size: 2rem;
  }

  .file-title {
    font-size: 1.5rem;
  }

  .file-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }

  .stat-icon i {
    font-size: 1rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .file-actions {
    flex-direction: column;
    padding: 1.5rem;
  }

  .file-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .upload-form-container {
    padding: 1.5rem;
    margin: 0 1rem 2rem 1rem;
  }

  .upload-form-header h1 {
    font-size: 1.5rem;
  }

  .file-upload-area {
    padding: 2rem 1rem;
  }

  .file-upload-content i {
    font-size: 2.5rem;
  }

  .file-upload-content h3 {
    font-size: 1.1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .next-step-card {
    padding: 1.5rem;
  }

  .next-step-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .next-step-icon {
    width: 50px;
    height: 50px;
  }

  .next-step-icon i {
    font-size: 1.25rem;
  }

  .next-step-title {
    font-size: 1.25rem;
  }

  .next-step-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .csv-import-files-index,
  .csv-import-file-show,
  .csv-import-file-new {
    padding: 0 0.5rem;
  }

  .csv-import-file-header {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .header .d-flex {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .header .btn {
    width: 100%;
    justify-content: center;
  }

  .csv-import-file-header {
    padding: 1rem;
  }

  .csv-import-file-hero {
    padding: 1rem;
  }

  .section-header {
    padding: 1rem;
  }

  .stats-grid {
    padding: 1rem;
  }

  .error-message {
    margin: 0 1rem 1rem 1rem;
    padding: 1rem;
  }

  .file-actions {
    padding: 1rem;
  }

  .upload-form-container {
    padding: 1rem;
    margin: 0 0.5rem 2rem 0.5rem;
  }

  .file-upload-area {
    padding: 1.5rem 1rem;
  }

  .file-upload-content i {
    font-size: 2rem;
  }

  .next-step-card {
    padding: 1rem;
  }

  .next-step-title {
    font-size: 1.1rem;
  }

  .next-step-description {
    font-size: 0.9rem;
  }
}

/* Column Mapping Styles */
.column-mapping-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem;
}

.column-mapping-header {
  text-align: center;
  margin-bottom: 1rem;
}

.column-mapping-header h1 {
  margin: 0 0 0.25rem 0;
  color: #212529;
  font-size: 2rem;
  font-weight: 700;
}

.column-mapping-header p {
  margin: 0;
  color: #6c757d;
  font-size: 1rem;
}

.csv-preview-section {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.csv-preview-section .section-header {
  margin-bottom: 0.75rem;
}

.csv-preview-section .section-header h2 {
  margin: 0 0 0.25rem 0;
  color: #212529;
  font-size: 1.25rem;
  font-weight: 600;
}

.csv-preview-section .section-header p {
  margin: 0;
  color: #6c757d;
}

.csv-preview-table {
  overflow-x: auto;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.preview-table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 0.5rem;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  position: sticky;
  top: 0;
  z-index: 10;
}

.preview-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #f1f3f4;
  color: #212529;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
}

.preview-table tr:hover {
  background-color: #f8f9fa;
}

.column-header {
  text-align: center;
  padding: 0.5rem;
  white-space: nowrap;
  min-width: 80px;
}

.column-index {
  font-size: 0.75rem;
  color: #495057;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25px;
}

.mapping-section {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mapping-section .section-header {
  margin-bottom: 0.75rem;
}

.mapping-section .section-header h2 {
  margin: 0 0 0.25rem 0;
  color: #212529;
  font-size: 1.25rem;
  font-weight: 600;
}

.mapping-section .section-header p {
  margin: 0;
  color: #6c757d;
}

.mapping-help-alert {
  margin-top: 0.75rem;
}

.mapping-help-alert .help-card {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 1px solid #c3e6cb;
  border-left: 4px solid #28a745;
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

.mapping-help-alert .help-card h3 {
  margin: 0 0 0.5rem 0;
  color: #155724;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mapping-help-alert .help-card h3 i {
  color: #28a745;
}

.mapping-help-alert .help-card ul {
  margin: 0;
  padding-left: 1.5rem;
}

.mapping-help-alert .help-card li {
  margin-bottom: 0.25rem;
  color: #155724;
  line-height: 1.4;
}

.mapping-help-alert .help-card li:last-child {
  margin-bottom: 0;
}

.mapping-help-alert .help-card strong {
  color: #0f5132;
  font-weight: 600;
}

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

.mapping-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mapping-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field-name {
  font-weight: 600;
  color: #212529;
  font-size: 1rem;
}

.field-description {
  font-size: 0.875rem;
  color: #6c757d;
}

.mapping-select {
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  transition: all 0.15s ease-in-out;
}

.mapping-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.mapping-help {
  margin-top: 2rem;
}

.help-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
}

.help-card h3 {
  margin: 0 0 1rem 0;
  color: #495057;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.help-card h3 i {
  color: #007bff;
}

.help-card ul {
  margin: 0;
  padding-left: 1.5rem;
}

.help-card li {
  margin-bottom: 0.5rem;
  color: #495057;
  line-height: 1.5;
}

.help-card li:last-child {
  margin-bottom: 0;
}

.help-card strong {
  color: #212529;
}

/* Responsive styles for column mapping */
@media (max-width: 768px) {
  .column-mapping-container {
    padding: 1rem;
  }

  .column-mapping-header h1 {
    font-size: 2rem;
  }

  .csv-preview-section,
  .mapping-section {
    padding: 1.5rem;
  }

  .mapping-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .preview-table th,
  .preview-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .column-header {
    gap: 0.125rem;
  }

  .column-index {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .column-mapping-container {
    padding: 0.5rem;
  }

  .column-mapping-header h1 {
    font-size: 1.75rem;
  }

  .csv-preview-section,
  .mapping-section {
    padding: 1rem;
  }

  .preview-table {
    font-size: 0.75rem;
  }

  .preview-table th,
  .preview-table td {
    padding: 0.375rem;
  }
}



/* Compact Preview Table Styles */
.preview-table.compact {
  font-size: 0.8rem;
}

.preview-table.compact th {
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
}

.preview-table.compact td {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-table.compact .column-header {
  padding: 0.25rem;
  min-width: 60px;
}

.preview-table.compact .column-index {
  font-size: 0.7rem;
  letter-spacing: 0.1px;
}

/* Updated CSV Preview Section for bottom placement */
.csv-preview-section {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.csv-preview-section .section-header {
  margin-bottom: 0.75rem;
}

.csv-preview-section .section-header h2 {
  margin: 0 0 0.25rem 0;
  color: #212529;
  font-size: 1.25rem;
  font-weight: 600;
}

.csv-preview-section .section-header p {
  margin: 0;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Amount Options Group */
.amount-group {
  grid-column: 1 / -1;
}

.amount-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.amount-option {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  background: white;
  transition: all 0.15s ease-in-out;
}

.amount-option:hover {
  border-color: #007bff;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.amount-option.selected {
  border-color: #007bff;
  background: linear-gradient(135deg, #f8f9ff 0%, #e7f3ff 100%);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.option-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.amount-radio {
  margin: 0;
  width: 1.2rem;
  height: 1.2rem;
  accent-color: #007bff;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #212529;
  cursor: pointer;
  margin: 0;
}

.option-label i {
  color: #007bff;
  font-size: 1rem;
}

.option-label span {
  font-size: 1rem;
}

.debit-credit-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.debit-credit-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sub-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
  margin: 0;
}

.amount-select,
.debit-select,
.credit-select {
  opacity: 0.6;
  pointer-events: none;
  background-color: #f8f9fa;
  transition: all 0.15s ease-in-out;
}

.amount-select.enabled,
.debit-select.enabled,
.credit-select.enabled {
  opacity: 1;
  pointer-events: auto;
  background-color: white;
}

/* Initial state - if amount is selected, show single option as selected */
.amount-option:has(.amount-radio:checked) {
  border-color: #007bff;
  background: linear-gradient(135deg, #f8f9ff 0%, #e7f3ff 100%);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

/* Responsive adjustments for amount options */
@media (max-width: 768px) {
  .debit-credit-group {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .amount-options {
    gap: 0.75rem;
  }

  .amount-option {
    padding: 0.75rem;
  }
}

/* Duplicate Details Styling */
.duplicate-details-section {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fff8f0 0%, #fff5e6 100%);
  border: 1px solid #ffc107;
  border-radius: 8px;
}

.duplicate-summary-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #856404;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.duplicate-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.duplicate-stat {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: white;
  border: 1px solid #f0ad4e;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.duplicate-stat .stat-label {
  font-weight: 600;
  color: #856404;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.duplicate-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #dc6545;
  margin-bottom: 0.25rem;
}

.duplicate-stat .stat-description {
  font-size: 0.75rem;
  color: #6c757d;
  line-height: 1.3;
}

/* Legend Styling */
.duplicate-legend {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #d1ecf1;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.duplicate-legend h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legend-text {
  font-size: 0.875rem;
  color: #495057;
  line-height: 1.4;
}

.legend-explanation {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.legend-explanation p {
  font-size: 0.875rem;
  color: #6c757d;
  line-height: 1.4;
  margin: 0;
}

/* Duplicate Resolution Actions Styling */
.duplicate-resolution-actions {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.duplicate-resolution-actions h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.duplicate-resolution-actions h4 i {
  color: #6c757d;
}

.bulk-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.bulk-actions .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s ease-in-out;
}

.bulk-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Next Step Actions - Updated Layout */
.next-step-actions {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-groups {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
}

.action-group {
  flex: 1;
  min-width: 300px;
}

.action-group h5 {
  font-size: 1rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #dee2e6;
}

.action-group h5 i {
  color: #6c757d;
}

/* Duplicate Resolution Group - Allow full width */
.duplicate-resolution-group {
  flex: 1;
  min-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
}

/* Duplicate Resolution Group Button Styling */
.duplicate-resolution-group h5 {
  color: #495057;
  border-bottom-color: #dee2e6;
  text-align: right;
  align-self: flex-end;
  width: 100%;
}

.duplicate-resolution-group .bulk-actions {
  justify-content: flex-end;
  gap: 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: flex-end;
}

.duplicate-resolution-group .bulk-actions .btn {
  margin-right: 0;
  flex: 0 0 auto;
  margin-bottom: 0;
}

/* Go Back Group - Keep compact */
.go-back-group {
  flex: 1;
  min-width: 250px;
}

.go-back-group h5 {
  color: #495057;
  border-bottom-color: #dee2e6;
}

.go-back-group .btn {
  width: 100%;
  max-width: 300px;
  font-weight: normal;
  background-color: white;
  border-color: #6c757d;
  color: #6c757d;
}

.go-back-group .btn:hover {
  background-color: #f8f9fa;
  border-color: #5a6268;
  color: #5a6268;
}

/* Override global bulk-actions red border for duplicate resolution */
.duplicate-resolution-group .bulk-actions {
  border-left: none !important;
}

/* Next Step Actions - Royal Blue with White Text */
.duplicate-resolution-group .btn.btn-secondary,
.duplicate-resolution-group .btn.btn-success {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.duplicate-resolution-group .btn.btn-secondary:hover,
.duplicate-resolution-group .btn.btn-success:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  color: white;
}

/* Import All Duplicates - Warning Styling */
.btn-import-duplicates {
  position: relative;
  border: 2px solid #ffc107 !important;
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
  animation: pulse-warning 2s infinite;
  overflow: hidden;
}

.btn-import-duplicates:hover {
  border-color: #ff8c00 !important;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.5);
}

/* Skip All Duplicates - Add spacing from Import button */
.duplicate-resolution-group .btn.btn-secondary {
  margin-left: 1rem;
}

/* Warning pulse animation - contained within button boundaries */
@keyframes pulse-warning {
  0% {
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.4);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
  }
}

/* Responsive adjustments for action groups */
@media (max-width: 768px) {
  .action-groups {
    flex-direction: column;
    gap: 1.5rem;
  }

  .action-group {
    min-width: auto;
    width: 100%;
  }

  .bulk-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .bulk-actions .btn {
    width: 100%;
  }
}

/* Collapsible Transactions Section */
.duplicate-transactions-section {
  margin-top: 1rem;
}

.duplicate-transactions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #d1ecf1;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  transition: background-color 0.2s ease;
}

.duplicate-transactions-header:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.duplicate-transactions-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #495057;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.duplicate-transactions-header i {
  transition: transform 0.2s ease;
}

.duplicate-transactions-table {
  margin-top: 0;
}

.duplicate-transactions-table .table {
  background: white;
  border: 2px solid #17a2b8;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(23, 162, 184, 0.15);
  margin: 0;
}

.duplicate-transactions-table .table th {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  border-bottom: 2px solid #117a8b;
  padding: 0.75rem 0.5rem;
}

.duplicate-transactions-table .table td {
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
  font-size: 0.875rem;
  border-bottom: 1px solid #e9ecef;
  background: white;
  color: #495057;
}

.duplicate-row.duplicate-existing-duplicate td {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
  color: #856404;
}

.duplicate-row.duplicate-batch-duplicate td {
  background: linear-gradient(135deg, #e8f4f8 0%, #d1ecf1 100%);
  border-left: 4px solid #17a2b8;
  color: #0c5460;
}

.duplicate-transactions-table .badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
}

.badge-warning {
  background-color: #ffc107;
  color: #212529;
  padding: 0.25rem 0.75rem;
}

.badge-info {
  background-color: #17a2b8;
  color: white;
  padding: 0.25rem 0.75rem;
}

.badge-secondary {
  background-color: #6c757d;
  color: white;
  padding: 0.25rem 0.75rem;
}

/* Custom legend badges to match table row colors */
.badge-duplicate-import {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
  color: #856404;
  padding: 0.25rem 0.75rem;
  border: 1px solid #ffc107;
}

.badge-duplicate-existing {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #6c757d;
  padding: 0.25rem 0.75rem;
  border: 1px solid #6c757d;
}

/* Existing Matches Display Styling */
.existing-matches {
  max-width: 100%;
}

.existing-matches strong {
  color: #495057;
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

.existing-transaction-detail {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.3;
}

.existing-transaction-detail:last-child {
  margin-bottom: 0;
}

.existing-transaction-detail .text-muted {
  color: #6c757d !important;
}

/* Grouped Duplicate Display Styling */
.existing-match-row {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid #6c757d;
}

.existing-match-row td {
  padding: 0.75rem 0.5rem;
  font-size: 0.875rem;
  color: #6c757d;
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}

.existing-match-cell {
  background: transparent !important;
  white-space: nowrap;
  width: 1%;
}

/* Visual grouping - add spacing between import transaction groups */
.duplicate-row:not(:last-child) {
  border-bottom: 2px solid #dee2e6;
}

/* Ensure import transaction rows stand out */
.duplicate-row.duplicate-existing-duplicate {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
  color: #856404;
}

/* Action Column Styling */
.action-column {
  width: 120px;
  text-align: center;
  vertical-align: middle;
}

.action-column .form-check {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-column .form-check-input {
  margin-right: 0.5rem;
  margin-left: 0;
  cursor: pointer;
}

.action-column .form-check-label {
  margin-bottom: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
}

/* Import Summary Styling */
.import-summary {
  margin: 2rem 0;
}

.summary-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.summary-card h5 {
  margin: 0 0 1rem 0;
  color: #495057;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-card h5 i {
  color: #007bff;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-item {
  display: grid;
  grid-template-columns: 160px 80px 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #dee2e6;
}

.summary-item.total {
  background: #e7f3ff;
  border-left-color: #007bff;
  font-weight: 600;
}

.summary-label {
  font-weight: 500;
  color: #495057;
}

.summary-value {
  font-weight: 600;
  color: #212529;
  text-align: center;
  background: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.summary-item.total .summary-value {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.summary-description {
  flex: 1;
  color: #6c757d;
  font-size: 0.875rem;
}

/* Responsive adjustments for import summary */
@media (max-width: 768px) {
  .summary-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 0.5rem;
  }
}



/* Responsive adjustments for duplicate details */
@media (max-width: 768px) {
  .duplicate-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .duplicate-stat {
    padding: 0.75rem;
  }

  .duplicate-transactions-table .table th,
  .duplicate-transactions-table .table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
  }

  .existing-transaction-detail {
    padding: 0.375rem;
    font-size: 0.7rem;
  }

  .existing-match-row td {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }

  .action-column {
    width: 100px;
  }

  .action-column .form-check-label {
    font-size: 0.8rem;
  }
}