/* Automotive Repair Management System - Main Styles */
@import url('design-system.css');

/* Custom Components */
/* ================== */

/* Hero Section Background */
.hero-section-bg {
  min-height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
  position: relative;
  overflow: hidden;
}

.hero-section-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zm0 30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zm0-30V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E') repeat;
  opacity: 0.3;
  animation: backgroundPan 60s linear infinite;
}

@keyframes backgroundPan {
  from { background-position: 0 0; }
  to { background-position: 6000px 0; }
}


/* Navigation */
.navbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-3) 0;
  position: sticky;
  top: 0;
  z-index: var(--z-index-sticky);
}

.navbar-brand {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: white !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.navbar-brand:hover {
  color: white !important;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: var(--font-weight-medium);
  padding: var(--spacing-2) var(--spacing-4);
  border-radius: var(--radius-md);
  transition: var(--transition-all);
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
}

.navbar-nav .nav-link:hover {
  color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.2);
}

/* Breadcrumb */
.breadcrumb {
  background-color: var(--bg-primary);
  padding: var(--spacing-3) 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--gray-200);
}

.breadcrumb-item {
  font-size: var(--font-size-sm);
  color: var(--gray-600);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--gray-400);
  margin: 0 var(--spacing-2);
}

.breadcrumb-item a {
  color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-6);
  margin-bottom: var(--spacing-8);
}

.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  text-align: center;
  transition: var(--transition-all);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px; /* Thicker border */
  background: linear-gradient(90deg, var(--primary), var(--info));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.stat-card:hover {
  transform: translateY(-5px); /* More pronounced lift */
  box-shadow: var(--shadow-lg);
}

.stat-card-icon {
  font-size: 2.8rem; /* Slightly larger icon */
  margin-bottom: var(--spacing-3);
  opacity: 0.9;
}

.stat-card-value {
  font-size: var(--font-size-4xl); /* Larger value */
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-2);
  color: var(--gray-900);
}

.stat-card-label {
  font-size: var(--font-size-sm);
  color: var(--gray-600);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--spacing-1);
}

.stat-card-change {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

/* Action Cards */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-6);
  margin-bottom: var(--spacing-8);
}

.action-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--spacing-6);
  transition: var(--transition-all);
  position: relative;
  box-shadow: var(--shadow-base); /* Start with a slightly more visible shadow */
}

.action-card:hover {
  box-shadow: var(--shadow-lg); /* Stronger shadow on hover */
  transform: translateY(-4px); /* More pronounced lift */
}

.action-card-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  margin-bottom: var(--spacing-4);
}

.action-card-icon {
  font-size: 3rem; /* Larger icon */
  color: var(--primary); /* Keep primary color */
  background-color: var(--primary-light); /* Light background for icon */
  padding: var(--spacing-3);
  border-radius: var(--radius-md);
}

.action-card-title {
  font-size: var(--font-size-xl); /* Slightly larger title */
  font-weight: var(--font-weight-semibold);
  color: var(--gray-900);
  margin: 0;
}

.action-card-description {
  color: var(--gray-600);
  margin-bottom: var(--spacing-4);
  line-height: var(--line-height-relaxed);
}

.action-card-buttons {
  display: flex;
  gap: var(--spacing-3);
  flex-wrap: wrap;
}

/* Tables */
.table-container {
  background-color: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-6); /* Add some bottom margin */
}

.table-header {
  background-color: var(--gray-100); /* Lighter background for header */
  padding: var(--spacing-4) var(--spacing-6);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--gray-900);
  margin: 0;
}

.table-actions {
  display: flex;
  gap: var(--spacing-3);
}

.table-responsive {
  overflow-x: auto;
}

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

.table th {
  background-color: var(--gray-50);
  padding: var(--spacing-3) var(--spacing-4);
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
  text-transform: uppercase; /* Uppercase table headers */
  font-size: var(--font-size-xs); /* Smaller font for headers */
  letter-spacing: 0.05em; /* Add letter spacing */
}

.table td {
  padding: var(--spacing-4);
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
  color: var(--gray-800); /* Slightly darker text for content */
}

.table tbody tr:hover {
  background-color: var(--gray-100); /* More noticeable hover effect */
}

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

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-1);
  padding: var(--spacing-1) var(--spacing-2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge-success {
  background-color: var(--success-light);
  color: var(--success);
}

.status-badge-warning {
  background-color: var(--warning-light);
  color: var(--warning);
}

.status-badge-error {
  background-color: var(--error-light);
  color: var(--error);
}

.status-badge-info {
  background-color: var(--info-light);
  color: var(--info);
}

.status-badge-secondary {
  background-color: var(--secondary-light);
  color: var(--secondary);
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-4);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-4);
}

.form-actions {
  display: flex;
  gap: var(--spacing-3);
  justify-content: flex-end;
  margin-top: var(--spacing-6);
  padding-top: var(--spacing-6);
  border-top: 1px solid var(--gray-200);
}

.search-container {
  position: relative;
  max-width: 400px;
}

.search-input {
  padding-left: 2.5rem;
}

.search-icon {
  position: absolute;
  left: var(--spacing-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
}

/* Filters */
.filter-bar {
  display: flex;
  gap: var(--spacing-4);
  align-items: center;
  background-color: var(--bg-primary);
  padding: var(--spacing-4) var(--spacing-6);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-6);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.filter-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--gray-700);
  white-space: nowrap;
}

.filter-select {
  min-width: 150px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-2);
  margin-top: var(--spacing-6);
}

.pagination-item {
  padding: var(--spacing-2) var(--spacing-3);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  color: var(--gray-700);
  text-decoration: none;
  transition: var(--transition-all);
  font-weight: var(--font-weight-medium);
}

.pagination-item:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-400);
}

.pagination-item.active {
  background-color: var(--primary);
  border-color: var(--primary);
    color: white;
}

.pagination-item:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Alerts */
.alert {
  padding: var(--spacing-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-4);
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-3);
}

.alert-success {
  background-color: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.alert-warning {
  background-color: var(--warning-light);
  border-color: var(--warning);
  color: var(--warning);
}

.alert-error {
  background-color: var(--error-light);
  border-color: var(--error);
  color: var(--error);
}

.alert-info {
  background-color: var(--info-light);
  border-color: var(--info);
  color: var(--info);
}

.alert-icon {
  font-size: var(--font-size-lg);
  margin-top: var(--spacing-1);
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-1);
}

.alert-message {
  margin: 0;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-overlay);
    display: flex;
  align-items: center;
    justify-content: center;
  z-index: var(--z-index-modal);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-all);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: var(--transition-all);
}

.modal.is-open .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: var(--spacing-6);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--gray-900);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--font-size-xl);
  color: var(--gray-400);
  cursor: pointer;
  padding: var(--spacing-2);
  border-radius: var(--radius-md);
  transition: var(--transition-colors);
}

.modal-close:hover {
  color: var(--gray-600);
  background-color: var(--gray-100);
}

.modal-body {
  padding: var(--spacing-6);
}

.modal-footer {
  padding: var(--spacing-6);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-3);
}

/* Loading States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-index-modal);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Empty States */
.empty-state {
  text-align: center;
  padding: var(--spacing-12) var(--spacing-6);
  color: var(--gray-500);
  background-color: var(--gray-50); /* Subtle background */
  border: 1px dashed var(--gray-200); /* Dashed border */
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-6); /* Add some bottom margin */
}

.empty-state-icon {
  font-size: 5rem; /* Larger icon */
  margin-bottom: var(--spacing-4);
  opacity: 0.6;
  color: var(--gray-400); /* Softer icon color */
}

.empty-state-title {
  font-size: var(--font-size-xl); /* Larger title */
  font-weight: var(--font-weight-bold); /* Bolder title */
  margin-bottom: var(--spacing-2);
  color: var(--gray-800); /* Darker title color */
}

.empty-state-description {
  margin-bottom: var(--spacing-6); /* More space below description */
  max-width: 500px; /* Wider description */
  margin-left: auto;
  margin-right: auto;
  line-height: var(--line-height-relaxed); /* More relaxed line height */
  color: var(--gray-600); /* Slightly darker description color */
}

/* Footer */
.footer {
  background-color: var(--gray-900);
  color: var(--gray-300);
  padding: var(--spacing-8) 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-4);
}

.footer-text {
  font-size: var(--font-size-sm);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: var(--spacing-4);
}

.footer-link {
  color: var(--gray-300);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: var(--transition-colors);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .action-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .table-actions {
    flex-direction: column;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .navbar-nav {
    flex-direction: column;
    gap: var(--spacing-1);
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .modal-content {
    width: 95%;
    margin: var(--spacing-4);
  }
}

@media (max-width: 480px) {
  .stat-card,
  .action-card {
    padding: var(--spacing-4);
  }
  
  .table-header {
    flex-direction: column;
    gap: var(--spacing-3);
    align-items: stretch;
  }
  
  .pagination {
    flex-wrap: wrap;
  }
} 