body {
  background-color: #f8f9fa;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.5rem;
}

.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 10px 10px 0 0;
  font-weight: 600;
}

.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.form-control {
  border-radius: 8px;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-control-lg:focus,
.form-select-lg:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.badge {
  font-size: 0.875em;
  padding: 0.5em 0.75em;
  border-radius: 6px;
}

.alert {
  border-radius: 8px;
  border: none;
}

/* Ensure error messages are prominently red with higher specificity */
.alert.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-danger .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.table {
  border-radius: 8px;
  overflow: hidden;
}

.table th {
  border-top: none;
  font-weight: 600;
  background-color: #f8f9fa;
}

.pagination .page-link {
  border-radius: 6px;
  margin: 0 2px;
}

/* Dashboard specific styles */
.dashboard-card {
  min-height: 120px;
}

.financial-summary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.expense-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.income-card {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.subscription-card {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
}

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

  .card-body {
    padding: 1rem;
  }

  .h3 {
    font-size: 1.5rem;
  }
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Custom form styles */
.form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.form-select {
  border-radius: 8px;
}

/* Status badges */
.status-active {
  background-color: #198754;
}

.status-inactive {
  background-color: #6c757d;
}

.status-pending {
  background-color: #ffc107;
  color: #000;
}

.status-invoiced {
  background-color: #0dcaf0;
}

.status-paid {
  background-color: #198754;
}

/* Hover effects for interactive elements */
.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.dropdown-item:hover {
  background-color: #e9ecef;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* Category color utilities */
.category-icon {
  font-size: 2rem;
}

.category-color-indicator {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  display: inline-block;
}

.category-badge {
  color: white;
}

/* Dynamic category colors - these will be overridden by inline styles when needed */
.category-color-primary {
  color: #0d6efd;
}
.category-color-success {
  color: #198754;
}
.category-color-warning {
  color: #ffc107;
}
.category-color-danger {
  color: #dc3545;
}
.category-color-info {
  color: #0dcaf0;
}
.category-color-secondary {
  color: #6c757d;
}
.category-color-light {
  color: #f8f9fa;
}
.category-color-dark {
  color: #212529;
}

/* Invoice Form Specific Styles */
.form-select-lg {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 12px;
  padding-right: 40px;
}

.work-log-card {
  transition: all 0.2s ease-in-out;
  border: 2px solid #e9ecef;
}

.work-log-card:hover {
  border-color: #28a745;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.work-log-card input[type="checkbox"]:checked + label {
  background-color: #f8fff9;
  border-color: #28a745;
}

.form-check-input:checked {
  background-color: #28a745;
  border-color: #28a745;
}

/* Retainer progress bar styling */
.retainer-progress {
  height: 20px;
}

.progress-lg {
  height: 30px;
}

/* Hours remaining badge styling */
.table .badge-success {
  color: #fff;
  background-color: #198754;
}

.table .badge-warning {
  color: #000;
  background-color: #ffc107;
}

.table .badge-danger {
  color: #fff;
  background-color: #dc3545;
}
