/* Accounts Index Styles */
.accounts-index {
  width: 100%;
  max-width: none;
}

/* Disconnected Accounts Section */
.disconnected-accounts-section {
  margin-bottom: 2rem;
  width: 100%;
}

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

.disconnected-accounts-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0.5rem;
  border-radius: 8px;
  margin: -0.5rem -0.5rem 1.5rem -0.5rem;
}

.disconnected-accounts-header:hover {
  background-color: #f8f9fa;
}

.disconnected-accounts-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.disconnected-accounts-toggle:hover {
  background: #dee2e6;
  color: #495057;
}

.disconnected-accounts-toggle i {
  font-size: 0.875rem;
  transition: transform 0.2s ease;
}

.disconnected-accounts-toggle.collapsed i {
  transform: rotate(-90deg);
}

.disconnected-accounts-body {
  transition: all 0.3s ease;
  overflow: hidden;
}

.disconnected-accounts-body.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.disconnected-accounts-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.disconnected-accounts-content {
  flex: 1;
}

.disconnected-accounts-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #212529;
  margin: 0 0 0.5rem 0;
}

.disconnected-accounts-description {
  color: #6c757d;
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

.disconnected-accounts-list {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.disconnected-accounts-subtitle {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.disconnected-account-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.disconnected-account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.disconnected-account-initial {
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.disconnected-account-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.disconnected-account-name {
  font-weight: 600;
  color: #212529;
  font-size: 0.875rem;
}

.disconnected-account-institution {
  color: #6c757d;
  font-size: 0.75rem;
}

.disconnected-accounts-actions {
  display: flex;
  justify-content: flex-end;
}

.disconnected-accounts-actions .btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.15);
}

.disconnected-accounts-actions .btn-danger:hover {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.25);
}

@media (max-width: 768px) {
  .disconnected-accounts-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .disconnected-accounts-toggle {
    margin-top: 0.5rem;
  }

  .disconnected-accounts-actions {
    justify-content: center;
  }

  .disconnected-accounts-list {
    padding: 0.75rem;
  }

  .disconnected-account-item {
    padding: 0.5rem;
  }

  .disconnected-account-avatar {
    width: 28px;
    height: 28px;
  }

  .disconnected-account-initial {
    font-size: 0.75rem;
  }
}

.accounts-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;
}

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

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

.accounts-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;
}

.accounts-table th.account-entity-header {
  background: inherit;
  /* Inherit all other th styles */
}

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

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

.accounts-table tbody tr:last-child {
  border-bottom: none;
}

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

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

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

.account-initial-small {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
}

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

.institution-name {
  color: #6c757d;
  font-size: 0.875rem;
}

.type-badge {
  display: inline-block;
  background: #e8f5e8;
  color: #28a745;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: capitalize;
}

.classification-badge {
  display: inline-block;
  background: #e9ecef;
  color: #495057;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: capitalize;
}

.balance-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.balance-amount {
  display: inline-flex;
  align-items: baseline;
  font-weight: 600;
  color: #212529;
  font-size: 1rem;
}

.dollars {
  text-align: right;
}

.decimal-point,
.cents {
  text-align: left;
}

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

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

.table-actions .btn {
  padding: 0.5rem;
  font-size: 0.875rem;
  border-radius: 6px;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid;
  transition: all 0.2s ease;
  font-weight: 500;
}

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

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

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

.table-actions .btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
  background: transparent;
}

.table-actions .btn-outline-secondary:hover {
  color: white;
  background: #6c757d;
}

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

@media (max-width: 768px) {
  .accounts-table-container {
    overflow-x: auto;
  }
  .accounts-table {
    min-width: 600px;
  }
  .accounts-table th,
  .accounts-table td {
    padding: 0.75rem 0.5rem;
  }
  .account-avatar-small {
    width: 35px;
    height: 35px;
  }
  .account-initial-small {
    font-size: 0.875rem;
  }
  .table-actions {
    flex-direction: column;
    gap: 0.25rem;
  }
  .table-actions .btn {
    padding: 0.25rem 0.375rem;
    font-size: 0.75rem;
  }
}

/* Accounts Show Styles */
.account-show {
  max-width: 100%;
  margin-top: 0;
  padding-top: 0;
}

/* Accounts Edit Styles */
.account-edit {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
}

/* Edit Header - Similar to show page but with edit-specific styling */
.edit-header {
  background: linear-gradient(135deg, #2845ae 0%, #1a223f 100%);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.edit-header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.edit-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.edit-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.edit-initial {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
}

.edit-info-main {
  flex: 1;
  min-width: 300px;
}

.edit-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.edit-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.edit-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.edit-actions .btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.edit-actions .btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* Assignment Card */
.assignment-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin: 0 2rem 2rem 2rem;
}

.assignment-form h3 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #212529;
  font-size: 1.25rem;
}

.assignment-description {
  color: #6c757d;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.entity-selection {
  margin-bottom: 2rem;
}

.entity-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  color: #212529;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.entity-select:focus {
  outline: none;
  border-color: #2845ae;
  box-shadow: 0 0 0 3px rgba(40, 69, 174, 0.1);
}

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

.assignment-actions .btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.assignment-actions .btn-primary {
  background: linear-gradient(135deg, #2845ae 0%, #1a223f 100%);
  color: #fff;
}

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

.assignment-actions .btn-outline-secondary {
  background: #fff;
  color: #666;
  border: 1px solid #ccc;
}

.assignment-actions .btn-outline-secondary:hover {
  background: #f8f9fa;
  border-color: #999;
}

/* Unlink Section Styles */
.unlink-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 12px;
  border-left: 4px solid #e53e3e;
}

.unlink-content h4 {
  margin: 0 0 0.5rem 0;
  color: #c53030;
  font-size: 1.125rem;
  font-weight: 600;
}

.unlink-description {
  margin: 0 0 1rem 0;
  color: #742a2a;
  font-size: 0.875rem;
  line-height: 1.5;
}

.unlink-content .btn-outline-danger {
  background-color: transparent;
  border-color: #e53e3e;
  color: #e53e3e;
  font-weight: 500;
  transition: all 0.2s ease;
}

.unlink-content .btn-outline-danger:hover {
  background-color: #e53e3e;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(229, 62, 62, 0.2);
}

/* Header Section */
.account-header {
  background: linear-gradient(135deg, #2845ae 0%, #1a223f 100%);
  color: white;
  padding: 1.25rem 0;
  margin-bottom: 1rem;
  margin-top: 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1em;
}

.account-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.account-avatar-large {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-right: 1.5rem;
}

.account-initial-large {
  color: white;
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.account-info-main {
  flex: 1;
  min-width: 300px;
}

.account-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.375rem 0;
  line-height: 1.2;
}

.account-meta {
  display: flex;
  align-items: center;
  gap: 1;
  flex-wrap: wrap;
}

.account-header .institution-badge, .account-header .type-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
  backdrop-filter: blur(10px);
}

.account-number-display {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.account-number-text {
  font-family: monospace;
  letter-spacing: 0.5px;
}

.btn-copy-account-number {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 0.75rem;
}

.btn-copy-account-number:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.btn-copy-account-number:active {
  transform: scale(0.95);
}

.account-actions-header {
  display: flex;
  gap: 0.75;
  flex-wrap: wrap;
}

.account-actions-header .btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.account-actions-header .btn:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* Stats Overview - Removed in favor of compact stats in action row */

/* Section Styling */
.section-header {
  margin-bottom: 1rem;
}

.section-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1;
  flex-wrap: wrap;
}

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

.section-title i {
  color: #2845ae;
}

.section-subtitle {
  color: #6c757d;
  font-size: 0.875rem;
  margin: 0;
}

.section-actions {
  flex-shrink: 0;
}

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

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

.entity-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.entity-initial-small {
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.entity-name {
  font-weight: 600;
  color: #212529;
  font-size: 0.8rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: block;
  line-height: 1.2;
}

.entity-info {
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.entity-details {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.connection-info {
  min-width: 0;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.connection-info p {
  font-size: 0.8rem !important;
  line-height: 1.3;
  margin: 0;
}

.connection-info .connection-status-badge {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
}

.connection-info .institution-name {
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 0.8rem;
  color: #6c757d;
  line-height: 1.2;
}

.no-entity-info {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #6c757d;
  font-size: 0.75rem;
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
}

/* Ensure buttons align vertically across all subcards */
.account-action-row .subcard-actions .btn {
  height: 32px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.classification-badge {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.1rem 0.4rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: capitalize;
  line-height: 1.1;
}

.no-entity-assigned {
  text-align: center;
  padding: 1.5rem;
}

.no-entity-icon {
  font-size: 2rem;
  color: #dee2e6;
  margin-bottom: 0.75rem;
}

.no-entity-assigned h3 {
  color: #495057;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.no-entity-assigned p {
  color: #6c757d;
  margin: 0;
  font-size: 0.875rem;
}

/* Connection Management */
.connection-actions {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Transactions Table */
.transactions-table-container {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

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

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

.entities-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;
}

.entities-table tbody tr {
  border-bottom: 1px solid #f1f3f5;
  transition: background-color 0.15s ease-in-out;
}

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

.entities-table tbody tr:last-child {
  border-bottom: none;
}

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

.transaction-date {
  display: block;
  font-weight: 600;
  color: #212529;
}

.transaction-time {
  display: block;
  font-size: 0.875rem;
  color: #6c757d;
}

.transaction-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.transaction-amount.positive {
  color: #28a745;
}

.transaction-amount.negative {
  color: #dc3545;
}

.transaction-description {
  font-weight: 500;
}

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

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.posted {
  background: #d4edda;
  color: #155724;
}

/* Tabulator Spreadsheet Styles */
.transactions-table-container .tabulator {
  border: none;
  background: white;
  width: 100%;
  /* Disable text selection for spreadsheet-like behavior */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.transactions-table-container .tabulator-tableHolder {
  background: white;
  width: 100%;
  /* Disable text selection */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.transactions-table-container .tabulator-cell {
  /* Disable text selection on cells */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: cell; /* Show cell cursor */
}

.transactions-table-container .tabulator-col {
  /* Enable column header selection */
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.transactions-table-container .tabulator-col:hover {
  background-color: #f0f0f0;
}

.transactions-table-container .tabulator-row.tabulator-selectable {
  cursor: pointer;
}

.transactions-table-container .tabulator-row.tabulator-selectable:hover {
  background-color: #f8f9fa;
}

/* Row number column styling */
.transactions-table-container .tabulator-cell[data-field="rowNumber"] {
  background-color: #f8f9fa;
  border-right: 2px solid #dee2e6;
  font-weight: 500;
}

.transactions-table-container .tabulator-cell[data-field="rowNumber"]:hover {
  background-color: #e9ecef;
}

.transactions-table-container .tabulator-row.tabulator-selected .tabulator-cell[data-field="rowNumber"] {
  background-color: #cfe2ff;
  border-right-color: #0d6efd;
}

.transactions-table-container .tabulator-header .tabulator-col[data-field="rowNumber"] {
  background-color: #f8f9fa;
  border-right: 2px solid #dee2e6;
}

.transactions-table-container .tabulator-row.tabulator-selected {
  background-color: #e3f2fd;
}

.transactions-table-container .tabulator-row.tabulator-selected:hover {
  background-color: #bbdefb;
}

.transactions-table-container .tabulator-cell.tabulator-selected {
  background-color: #b3d9ff;
}

.transactions-table-container .tabulator-cell.tabulator-selected:hover {
  background-color: #99ccff;
}

/* Column selection styles */
.transactions-table-container .tabulator-cell.tabulator-cell-selected {
  background-color: #b3d9ff !important;
}

.transactions-table-container .tabulator-col.tabulator-col-selected {
  background-color: #cfe2ff !important;
  font-weight: 600;
}

/* Allow text selection only in input fields if we add editing later */
.transactions-table-container .tabulator-cell input,
.transactions-table-container .tabulator-cell textarea {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.status-badge.error {
  background: #f8d7da;
  color: #721c24;
}

.enhanced-data-row {
  background: #f8f9fa;
}

.enhanced-data-row td {
  padding: 1rem;
  border-top: 1px solid #e9ecef;
}

.empty-transactions {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border: 2px dashed #dee2e6;
  border-radius: 12px;
}

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

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

.empty-transactions p {
  color: #6c757d;
  font-size: 1rem;
  margin: 0;
}

.account-action-row {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  padding: 0;
  margin-bottom: 1rem;
  gap: 0;
  flex-wrap: wrap;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}
.action-row-entity {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.assign-entity-btn {
  margin-left: 1rem;
}
.action-row-connection {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.connection-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8f9fa;
  color: #2845ae;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.connection-status-badge.disconnected {
  background: #f8d7da;
  color: #721c24;
}
.connection-status-badge.connected {
  background: #d4edda;
  color: #155724;
}
@media (max-width: 900px) {
  .account-action-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .action-subcard {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
  }
  .action-subcard:last-child {
    border-bottom: none;
  }
  .action-subcard-divider {
    display: none;
  }
  .action-row-entity, .action-row-connection {
    justify-content: flex-start;
  }
}

.subcard-header.compact-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  padding-bottom: 0;
}
.subcard-header .subcard-icon {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2845ae;
  flex-shrink: 0;
}
.subcard-header .subcard-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #212529;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.action-subcard {
  padding: 0.5rem 0.875rem;
  margin: 0;
  border-right: 1px solid #e9ecef;
  flex: 0 0 auto;
  min-width: 140px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.action-subcard:last-child {
  border-right: none;
}
.subcard-content {
  margin-bottom: 0.25rem;
  min-width: 0;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  flex: 0 1 auto;
}
.subcard-actions {
  margin-top: 0.25rem;
  margin-bottom: 0;
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Stat value styling */
.stat-value-wrapper {
  min-width: 0;
  overflow: hidden;
}
.stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #212529;
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.3;
}

/* Divider between stats and actions */
.action-subcard-divider {
  width: 1px;
  background: #e9ecef;
  margin: 0.5rem 0;
  flex-shrink: 0;
  align-self: stretch;
}

.transactions-section {
  max-width: 1200px;
  width: 100%;
  padding: 0;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

/* Custom Pagination with Date Labels */
.pagy-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
}

.pagy-nav > * + * {
  margin-left: 0.5rem !important;
}

.pagy-nav > * {
  margin-right: 0.5rem !important;
}

.pagy-nav > *:last-child {
  margin-right: 0 !important;
}

.pagy-nav a,
.pagy-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.pagy-nav a {
  color: #495057;
  background: white;
  border-color: #e9ecef;
}

.pagy-nav a:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagy-nav .current {
  background: linear-gradient(135deg, #2845ae 0%, #1a223f 100%);
  color: white;
  border-color: #2845ae;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 8px rgba(40, 69, 174, 0.3);
  z-index: 1;
  position: relative;
  /* Keep the same padding as other elements for consistent spacing */
  padding: 0.5rem;
  min-width: 40px;
  height: 40px;
}

.pagy-nav .disabled {
  color: #adb5bd;
  background: #f8f9fa;
  border-color: #e9ecef;
  cursor: not-allowed;
}

.pagy-nav .gap {
  color: #6c757d;
  background: transparent;
  border: none;
  cursor: default;
}