/* static/css/custom.css */

:root {
  /* Primary Brand Colors */
  --bs-primary: #2563eb;
  --bs-primary-dark: #1d4ed8;
  --bs-secondary: #64748b;
  
  /* Status Colors */
  --bs-success: #059669;
  --bs-warning: #d97706;
  --bs-danger: #dc2626;
  --bs-info: #0891b2;
  
  /* Neutral Colors */
  --bs-gray-50: #f8fafc;
  --bs-gray-100: #f1f5f9;
  --bs-gray-200: #e2e8f0;
  --bs-gray-300: #cbd5e1;
  --bs-gray-400: #94a3b8;
  --bs-gray-500: #64748b;
  --bs-gray-600: #475569;
  --bs-gray-700: #334155;
  --bs-gray-800: #1e293b;
  --bs-gray-900: #0f172a;
  
  /* Fonts */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Global Styles */
body {
  font-family: var(--font-family-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--bs-gray-700);
  background-color: var(--bs-gray-50);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--bs-gray-800);
}

.text-muted {
  color: var(--bs-gray-500) !important;
}

/* Links */
a {
  color: var(--bs-primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--bs-primary-dark);
  text-decoration: underline;
}

/* Buttons */
.btn {
  font-weight: 400;
  border-radius: 0.375rem;
  padding: 0.5rem 0.5rem;
  font-size: 0.875rem;
  transition: all 0.15s ease-in-out;
}

.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--bs-primary-dark);
  border-color: var(--bs-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline-primary {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* Cards */
.card {
  border: 1px solid var(--bs-gray-200);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: var(--bs-gray-50);
  border-bottom: 1px solid var(--bs-gray-200);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--bs-gray-800);
}

/* Forms */
.form-control {
  border: 1px solid var(--bs-gray-300);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--bs-gray-700);
  margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
  border-radius: 0.5rem;
  border: none;
  padding: 1rem 1.25rem;
}

.alert-success {
  background-color: #f0fdf4;
  color: #166534;
  border-left: 4px solid var(--bs-success);
}

.alert-info {
  background-color: #f0f9ff;
  color: #075985;
  border-left: 4px solid var(--bs-info);
}

.alert-warning {
  background-color: #fffbeb;
  color: #9a3412;
  border-left: 4px solid var(--bs-warning);
}

.alert-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border-left: 4px solid var(--bs-danger);
}

/* Badges */
.badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

/* Status Badges */
.status--active {
  background-color: #dcfce7;
  color: #166534;
}

.status--inactive {
  background-color: #fef3c7;
  color: #92400e;
}

.status--pending {
  background-color: #e0f2fe;
  color: #0e7490;
}

.status--error {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Tables */
.table {
  font-size: 0.875rem;
}

.table th {
  font-weight: 600;
  color: var(--bs-gray-700);
  border-bottom: 2px solid var(--bs-gray-200);
  padding: 0.75rem;
}

.table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--bs-gray-200);
}

.table-hover tbody tr:hover {
  background-color: var(--bs-gray-50);
}

/* Dropdowns */
.dropdown-menu {
  border: 1px solid var(--bs-gray-200);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--bs-gray-700);
  transition: background-color 0.15s ease-in-out;
}

.dropdown-item:hover {
  background-color: var(--bs-gray-50);
  color: var(--bs-gray-800);
}

.dropdown-header {
  font-weight: 600;
  color: var(--bs-gray-800);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--bs-gray-300);
  border-top: 2px solid var(--bs-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Utilities */
.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow {
  box-shadow: var(--shadow) !important;
}

.shadow-md {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .table-responsive {
    font-size: 0.8125rem;
  }
}