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

.entities-page-header {
  padding: 0.25rem 0 0.5rem;
  border-bottom: 1px solid #e5e9f0;
  margin-bottom: 0.6rem;
}

.entities-page-header .app-page-title {
  color: #5b21b6;
}

.entities-table-container {
  background: white;
  border: 1px solid #e5e9f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: none;
  margin-top: 0.5rem;
}

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

.entities-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #dfe6ef;
}

.entities-table th {
  padding: 0.65rem 0.8rem;
  text-align: left;
  font-weight: 600;
  color: #495057;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #dee2e6;
}

.entities-table tbody tr {
  border-bottom: 1px solid #f1f3f4;
  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: 0.7rem 0.8rem;
  vertical-align: middle;
  color: #212529;
}

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

.entity-avatar-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  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.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.entity-name {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
}

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

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

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

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

.table-actions .btn {
  padding: 0.3rem 0.45rem;
  font-size: 0.75rem;
  border-radius: 6px;
  min-width: 30px;
  height: 30px;
  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 {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.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-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
  background: transparent;
}

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

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

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

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

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

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .entities-table-container {
    overflow-x: auto;
  }
  .entities-table {
    min-width: 600px;
  }
  .entities-table th,
  .entities-table td {
    padding: 0.75rem 0.5rem;
  }
  .entity-avatar-small {
    width: 35px;
    height: 35px;
  }
  .entity-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;
  }
}

@media (max-width: 480px) {
  .header .d-flex {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  .header .btn {
    align-self: flex-start;
  }
}

/* Entities Show Styles (partial, add the rest as needed) */
.entity-show {
  width: 100%;
  max-width: none;
}

.entity-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

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

.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumb-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: white;
}

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

.entity-avatar-large {
  width: 100px;
  height: 100px;
  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);
}

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

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

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

.entity-actions-header {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.entity-actions-header .btn {
  background: rgba(255, 255, 255, 0.15);
  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: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.875rem;
}

.entity-actions-header .btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.entity-actions-header .btn-outline-primary {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.entity-actions-header .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.entity-actions-header .btn-outline-danger {
  background: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.3);
  color: #ff6b6b;
}

.entity-actions-header .btn-outline-danger:hover {
  background: rgba(220, 53, 69, 0.25);
  border-color: rgba(220, 53, 69, 0.5);
  color: white;
}

/* Stats Overview */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 2rem auto;
  padding: 0 1rem;
}

.stat-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #dee2e6;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

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

.stat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #212529;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Account Card Styles for Entity Show View */
.accounts-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2.5rem 1rem;
}

.section-header {
  margin-bottom: 2rem;
}

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

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

.section-title i {
  color: #667eea;
}

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

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

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

/* Entity Show Page Account Cards - More Specific Selectors */
.entity-show .accounts-section .account-card {
  background: white !important;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  position: relative;
}

.entity-show .accounts-section .account-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #dee2e6;
}

.entity-show .accounts-section .account-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f3f4;
  background: transparent !important;
}

.entity-show .accounts-section .account-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
  margin-left: 0.25rem;
}

.entity-show .accounts-section .account-icon i {
  color: white;
  font-size: 1.25rem;
}

.entity-show .accounts-section .account-info {
  flex: 1;
  min-width: 0;
  padding-top: 0.125rem;
}

.entity-show .accounts-section .account-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #212529 !important;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.entity-show .accounts-section .account-institution {
  color: #6c757d !important;
  font-size: 0.875rem;
  font-weight: 500;
}

.accounts-section .account-details {
  margin-bottom: 1.75rem;
}

.accounts-section .account-balance {
  margin-bottom: 1.25rem;
}

.accounts-section .balance-label {
  display: block;
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.375rem;
  font-weight: 600;
}

.accounts-section .balance-amount {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #212529;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.accounts-section .account-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f3f4;
}

.accounts-section .account-type {
  background: #e8f5e8;
  color: #28a745;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.25px;
}

.accounts-section .account-updated {
  color: #6c757d;
  font-size: 0.75rem;
  font-weight: 500;
}

.accounts-section .account-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f3f4;
}

.accounts-section .account-actions .btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.accounts-section .account-actions .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.accounts-section .account-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.accounts-section .account-actions .btn-outline-danger {
  color: #dc3545;
  border: 1px solid #dc3545;
  background: transparent;
}

.accounts-section .account-actions .btn-outline-danger:hover {
  background: #dc3545;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.empty-accounts {
  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-accounts h3 {
  color: #495057;
  margin-bottom: 1rem;
  font-weight: 600;
}

.empty-accounts p {
  color: #6c757d;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .entity-hero {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  .entity-avatar-large {
    width: 80px;
    height: 80px;
  }
  .entity-initial-large {
    font-size: 2rem;
  }
  .entity-title {
    font-size: 2rem;
  }
  .entity-meta {
    justify-content: center;
  }
  .entity-actions-header {
    justify-content: center;
  }
  .stats-overview {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .section-header-content {
    flex-direction: column;
    align-items: stretch;
  }
  .section-actions {
    align-self: flex-start;
  }
  .accounts-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .account-card {
    padding: 1rem;
  }
  .account-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .account-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .entity-header {
    padding: 1.5rem 0;
  }
  .entity-title {
    font-size: 1.75rem;
  }
  .stat-card {
    padding: 1rem;
  }
  .stat-icon {
    width: 50px;
    height: 50px;
  }
  .stat-icon i {
    font-size: 1.25rem;
  }
  .stat-number {
    font-size: 1.5rem;
  }
}

/* Entity Show Refresh */
.entity-show {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem 1rem;
}

.entity-show .entity-header {
  background: linear-gradient(135deg, #6d28d9 0%, #4c1d95 100%);
  color: white;
  border-radius: 14px;
  margin: 0 0 0.75rem;
  padding: 0.8rem 0;
  position: relative;
  overflow: hidden;
}

.entity-show .entity-header .header-accent-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.entity-show .header-content {
  max-width: none;
  padding: 0 0.8rem;
  position: relative;
}

.entity-show .entity-hero {
  gap: 0.75rem;
}

.entity-show .entity-avatar-large {
  width: 48px;
  height: 48px;
  border-width: 2px;
}

.entity-show .entity-initial-large {
  font-size: 1.2rem;
}

.entity-show .entity-title {
  font-size: 1.3rem;
  margin: 0;
}

.entity-show .entity-info-main {
  min-width: 180px;
}

.entity-show .entity-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  background: #f8fafc;
  border: 1px solid #e5e9f0;
  border-radius: 14px;
  box-shadow: none;
  padding: 0.625rem;
  margin: 0 0 0.75rem;
  gap: 0.625rem;
}

.entity-show .action-subcard {
  padding: 0.65rem 0.75rem;
  margin: 0;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #ffffff;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
  min-height: 54px;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.entity-show .action-subcard-clickable {
  cursor: pointer;
}

.entity-show .action-subcard-clickable:hover {
  background: #f8fafc;
  border-color: #c9d5f4;
  box-shadow: 0 3px 8px rgba(31, 47, 122, 0.12);
  transform: translateY(-1px);
}

.entity-show .subcard-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5f8ff;
  border: 1px solid #e1e8ff;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2845ae;
  flex-shrink: 0;
}

.entity-show .action-subcard-text {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.entity-show .subcard-title {
  font-size: 0.93rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
}

.entity-show .action-subcard-value {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-show .entity-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #94a3b8;
  text-decoration: none;
  flex-shrink: 0;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.entity-show .account-type-edit-trigger:hover {
  color: #2845ae;
  border-color: #c7d2fe;
  background: #eef2ff;
}

.entity-show .action-subcard-form {
  margin: 0;
  width: 100%;
}

.entity-show .action-subcard-form .action-subcard {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.entity-show .action-subcard-danger .subcard-icon {
  background: #fff5f5;
  border-color: #f2c9cf;
  color: #bb2d3b;
}

.entity-show .action-subcard-editing {
  align-items: stretch;
  min-height: auto;
}

.entity-show .action-subcard-editing-compact {
  padding: 0.5rem 0.6rem;
}

.entity-show .entity-inline-form {
  width: 100%;
  display: block;
}

.entity-show .subcard-inline-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.entity-show .entity-inline-editor-row,
.entity-show .account-type-inline-editor-row {
  align-items: center;
  gap: 0.375rem;
}

.entity-show .entity-inline-fields {
  flex: 1 1 auto;
  min-width: 0;
}

.entity-show .assignment-inline-editor-shell {
  position: relative;
  overflow: visible;
}

.entity-show .assignment-display-shell {
  position: relative;
  overflow: visible;
}

.entity-show .assignment-inline-saved-notice {
  position: absolute;
  top: -0.45rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #d4edda;
  border: 1px solid #b7e1c0;
  color: #155724;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  animation: assignment-save-notice-fade 2.4s ease forwards;
}

.entity-show .entity-select-inline {
  margin: 0;
}

.entity-show .subcard-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

#entity_tax_classification_assignment {
  display: block;
}

@keyframes assignment-save-notice-fade {
  0% {
    opacity: 0;
    transform: translateY(-2px);
  }
  12% {
    opacity: 1;
    transform: translateY(0);
  }
  68% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-2px);
  }
}

.entity-show .stats-overview {
  max-width: none;
  margin: 0 0 0.75rem;
  padding: 0;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entity-show .stat-card {
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: none;
  padding: 0.75rem;
  gap: 0.7rem;
}

.entity-show .stat-card:hover {
  transform: none;
  box-shadow: none;
}

.entity-show .stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.entity-show .stat-icon i {
  font-size: 0.9rem;
}

.entity-show .stat-number {
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

.entity-show .stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.35px;
}

.entity-show .entity-surface-section {
  border: 1px solid #e5e9f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 0.65rem;
  margin-bottom: 0.75rem;
}

.entity-show .entity-surface-section.cf-section {
  max-width: none;
  width: auto;
  margin-left: 0;
  margin-right: 0;
}

.entity-show .entity-surface-section.cf-section .cf-list {
  border: 1px solid #e6ebf2;
  box-shadow: none;
}

.entity-show .entity-surface-section .cf-section-header,
.entity-show .entity-surface-section .section-header {
  padding: 0 0.25rem 0.5rem;
}

.entity-show .entity-surface-section .cf-section-header {
  align-items: center;
}

.entity-show .accounts-section {
  max-width: none;
  padding: 0.65rem;
  margin-bottom: 1rem;
}

.entity-show .entity-section-header {
  margin-bottom: 0.65rem;
}

.entity-show .entity-section-header .section-header-content {
  align-items: center;
}

.entity-show .app-collapsible .app-collapsible-toggle {
  top: calc(50% - 4px);
  right: 0.25rem;
}

.entity-show .section-title {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
}

.entity-show .section-subtitle {
  font-size: 0.8rem;
}

.entity-accounts-table-wrap {
  background: #fff;
}

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

.entity-accounts-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #dfe6ef;
}

.entity-accounts-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.65rem 0.8rem;
}

.entity-accounts-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid #eef2f7;
}

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

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

.entity-account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}

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

@media (max-width: 768px) {
  .entity-show .stats-overview {
    grid-template-columns: 1fr;
  }

  .entity-show .entity-action-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .entity-show .action-subcard {
    min-height: 48px;
  }

  .entity-accounts-table-wrap {
    overflow-x: auto;
  }

  .entity-accounts-table {
    min-width: 520px;
  }

  .entity-show .subcard-inline-row {
    flex-direction: column;
    align-items: stretch;
  }

  .entity-show .subcard-inline-actions {
    justify-content: flex-start;
  }
}