/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */

/* Custom styles for AtlasFinance */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8f9fa;
}

/* Navigation enhancements */
.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Card enhancements */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
}

/* Dashboard metrics cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-danger {
  border: none;
}

.card.bg-primary .opacity-75,
.card.bg-success .opacity-75,
.card.bg-warning .opacity-75,
.card.bg-danger .opacity-75 {
  opacity: 0.7 !important;
}

/* Invoice status badges */
.badge {
  font-weight: 500;
  padding: 0.5em 0.75em;
}

/* Table enhancements */
.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.035);
}

.table-warning {
  background-color: #fff3cd !important;
}

/* Button group styling */
.btn-group-sm .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Form styling */
.form-label.required::after {
  content: " *";
  color: #dc3545;
  font-weight: bold;
}

.form-control:focus,
.form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Login page styling */
.vh-100 {
  min-height: 100vh;
}

.login-card {
  max-width: 400px;
  margin: 0 auto;
}

/* Alert styling */
.alert {
  border: none;
  border-radius: 0.375rem;
}

.alert-dismissible .btn-close {
  padding: 0.75rem 1rem;
}

/* Invoice PDF preview */
.invoice-preview {
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

/* Status color customizations */
.text-overdue {
  color: #dc3545 !important;
  font-weight: 600;
}

.bg-draft {
  background-color: #6c757d !important;
}

.bg-sent {
  background-color: #0d6efd !important;
}

.bg-paid {
  background-color: #198754 !important;
}

.bg-overdue {
  background-color: #dc3545 !important;
}

.bg-cancelled {
  background-color: #212529 !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  }
  
  .table-responsive {
    border: none;
  }
  
  .btn-group-sm .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
  }
}

/* Print styles for invoices */
@media print {
  .no-print {
    display: none !important;
  }
  
  .card {
    border: none !important;
    box-shadow: none !important;
  }
  
  .card-body {
    padding: 0 !important;
  }
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

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

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

/* Animation for page transitions */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

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

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Dashboard layout improvements */
.dashboard-card {
  transition: transform 0.2s ease-in-out;
}

.dashboard-card:hover {
  transform: translateY(-2px);
}

/* Loading state */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
