/* Modern Card Styles */
.modern-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.modern-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Admin Card Styles */
.admin-card .modern-card-header {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  gap: 1rem;
}

.admin-card .user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #007bff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.admin-card .user-info {
  flex-grow: 1;
}

.admin-card .user-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
}

.admin-card .user-role {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 123, 255, 0.1);
  color: #007bff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.admin-card .user-meta {
  text-align: right;
  margin-right: 1rem;
}

.admin-card .user-date {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

/* Expense Card Styles */
.expense-card {
  background: #fff;
  border-left: 4px solid #28a745;
}

.expense-card .expense-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem 0.75rem;
}

.expense-card .expense-business {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
}

.expense-card .expense-business i {
  color: #28a745;
  font-size: 1.25rem;
}

.expense-card .expense-grid {
  padding: 0.75rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.expense-card .expense-item {
  background: rgba(255, 255, 255, 0.7);
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.expense-card .expense-comment {
  grid-column: 1 / -1;
}

.expense-card .expense-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.expense-card .expense-value {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}

/* Business Card Styles */
.business-card {
  background: #fff;
  border-left: 4px solid #fd7e14;
}

.business-card .business-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem 0.75rem;
}

.business-card .business-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fd7e14;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.business-card .business-icon {
  margin-left: 1rem;
  color: #fd7e14;
  font-size: 1.5rem;
}

.business-card .business-body {
  padding: 0.75rem 1.5rem 1.5rem;
}

.business-card .business-name {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #2c3e50;
}

.business-card .partners-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.business-card .partners-list {
  background: rgba(255, 255, 255, 0.7);
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.business-card .partner-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: #495057;
}

.business-card .partner-item:last-child {
  margin-bottom: 0;
}

.business-card .partner-item i {
  color: #fd7e14;
}

/* Footer Sections */
.admin-footer,
.business-footer,
.expense-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.5);
  margin-top: auto;
}

/* Action Buttons */
.card-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.expense-card .expense-actions,
.business-card .business-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  min-width: 120px;
  justify-content: center;
}

.edit-btn {
  background: #ffc107;
  color: #000;
  border: 1px solid #ffc107;
}

.edit-btn:hover {
  background: #e0a800;
  border-color: #e0a800;
}

.delete-btn {
  background: #dc3545;
  color: white;
  border: 1px solid #dc3545;
}

.delete-btn:hover {
  background: #c82333;
  border-color: #c82333;
}

/* Legacy card support */
.card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

/* Mobile Responsive Styles */
@media (max-width: 576px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .card-body {
    padding: 1rem !important;
  }

  .btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }

  .display-4 {
    font-size: 2rem !important;
  }

  .display-5 {
    font-size: 1.5rem !important;
  }

  /* Modern card mobile adjustments */
  .modern-card {
    margin-bottom: 1rem;
    border-radius: 12px;
  }

  .modern-card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .admin-card .modern-card-header {
    padding: 1rem;
    flex-wrap: wrap;
  }

  .admin-card .user-avatar {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .admin-card .user-name {
    font-size: 1.1rem;
  }

  .admin-card .user-meta {
    margin-right: 0;
    margin-top: 0.5rem;
    width: 100%;
    text-align: left;
  }

  .expense-card .expense-header,
  .business-card .business-header {
    padding: 1rem 1rem 0.5rem;
  }

  .expense-card .expense-grid {
    padding: 0.5rem 1rem 1rem;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .expense-card .expense-item {
    padding: 0.5rem;
  }

  .business-card .business-body {
    padding: 0.5rem 1rem 1rem;
  }

  .business-card .business-name {
    font-size: 1.1rem;
  }

  .action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: 100px;
  }

  .action-btn span {
    display: none;
  }

  .admin-footer,
  .business-footer,
  .expense-footer {
    padding: 0.75rem 1rem;
  }

  .card-actions {
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  .expense-card .expense-grid {
    grid-template-columns: 1fr;
  }
  
  .card-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

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

@media (max-width: 480px) {
  .action-btn span {
    display: inline;
  }
  
  .action-btn {
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.1rem !important;
  }

  .card-title {
    font-size: 1rem !important;
  }

  h1,
  h2,
  h3,
  h4,
  h5 {
    line-height: 1.3;
  }
}

@media (max-width: 576px) {
  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-dialog.modal-lg {
    max-width: calc(100vw - 1rem);
  }
}

@media (max-width: 576px) {
  .form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }
}

.data-card .card-body {
  position: relative;
}

.data-card .btn-group {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

@media (max-width: 576px) {
  .data-card .btn-group {
    position: static;
    margin-top: 0.5rem;
    justify-content: center;
  }
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

@media print {
  .btn,
  .modal,
  .navbar {
    display: none !important;
  }

  .card {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  * {
    transition: none !important;
    animation: none !important;
  }
}

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state i {
  opacity: 0.3;
  margin-bottom: 1rem;
}

.card .btn-group .btn {
  border-radius: 0.375rem;
  margin: 0 0.125rem;
}

.card .btn-group .btn:first-child {
  margin-left: 0;
}

.card .btn-group .btn:last-child {
  margin-right: 0;
}

.badge {
  font-size: 0.75em;
  padding: 0.35em 0.65em;
}

.is-invalid {
  border-color: #dc3545;
}

.invalid-feedback {
  display: block;
  font-size: 0.875em;
  color: #dc3545;
  margin-top: 0.25rem;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
