/* Custom styles for the jewelry order management system */

/* General styles */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #8b5cf6;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #212529;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Navbar Styles */
.navbar.bg-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.navbar-brand {
  font-size: 1.5rem;
  transition: transform 0.2s;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  transition: all 0.3s ease;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Card styles */
.card {
  border-radius: 1rem;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  background: white;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: none;
  border-radius: 1rem 1rem 0 0 !important;
  padding: 1.25rem 1.5rem;
}

.card-header .card-title {
  color: white;
  margin-bottom: 0;
}

.card-body {
  padding: 1.5rem;
}

/* Table styles */
.table-responsive {
  border-radius: 0.375rem;
  overflow: hidden;
}

.table th {
  font-weight: 600;
  color: #495057;
}

/* Image preview */
.image-preview {
  max-height: 150px;
  object-fit: contain;
  border-radius: 0.375rem;
}

.image-thumbnail {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 0.25rem;
  cursor: pointer;
}

/* Hover card for image preview */
.hover-card {
  position: relative;
  display: inline-block;
}

.hover-card-content {
  display: none;
  position: absolute;
  z-index: 1000;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 0.75rem;
  width: 300px;
}

.hover-card:hover .hover-card-content {
  display: block;
}

/* Action buttons */
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
}

/* Form styles */
.form-label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* Model selection cards */
.model-card {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

/* Status badge styles */
.badge {
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.model-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.model-card.selected {
  border-color: #0d6efd;
}

.model-image {
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 0.375rem;
  margin-bottom: 0.5rem;
}

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Dialog/Modal styles */
.modal-header {
  border-bottom: 1px solid #dee2e6;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
}

/* Tooltip */
.tooltip-wrapper {
  position: relative;
}

.tooltip-wrapper .tooltip-content {
  visibility: hidden;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  text-align: center;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.tooltip-wrapper:hover .tooltip-content {
  visibility: visible;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .card-header {
    padding: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .table {
    font-size: 0.875rem;
  }

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

  .badge {
    font-size: 0.7rem;
    padding: 0.3em 0.5em;
  }
}

/* Filter Card Improvements */
.filter-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

/* Table Enhancements */
.table thead th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 1rem 0.75rem;
  border: none;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
  transform: scale(1.01);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Button Enhancements */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5568d3 0%, #63357d 100%);
}

/* Form Control Improvements */
.form-control, .form-select {
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 0.625rem 0.875rem;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Badge Improvements */
.badge {
  padding: 0.4em 0.75em;
  font-weight: 500;
  border-radius: 0.375rem;
}

/* Alert Positioning */
.alert {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  max-width: 500px;
  animation: slideInRight 0.3s ease;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-radius: 0.75rem;
  border: none;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile Filters */
@media (max-width: 992px) {
  .filter-row .col-md-3,
  .filter-row .col-md-4 {
    margin-bottom: 0.75rem;
  }
}

/* Mobile Order Cards */
.order-card {
  border-left: 4px solid;
  transition: all 0.3s ease;
  cursor: pointer;
  margin: 0.75rem;
  border-radius: 0.75rem;
}

.order-card:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}

.order-card-primary { border-left-color: #0d6efd; }
.order-card-info { border-left-color: #0dcaf0; }
.order-card-warning { border-left-color: #ffc107; }
.order-card-success { border-left-color: #198754; }
.order-card-secondary { border-left-color: #6c757d; }
.order-card-danger { border-left-color: #dc3545; }
.order-card-cyan { border-left-color: #17a2b8; }
.order-card-purple { border-left-color: #6f42c1; }

/* Empty State */
.empty-state {
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state i {
  font-size: 4rem;
  color: #dee2e6;
  margin-bottom: 1.5rem;
}

/* Pagination Improvements */
.pagination {
  margin: 0;
}

.pagination .page-link {
  border-radius: 0.375rem;
  margin: 0 0.25rem;
  border: none;
  color: #667eea;
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
}

.pagination .page-link:hover {
  background-color: #f8f9fa;
  color: #4f46e5;
}

/* Card Footer */
.card-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 1rem 1rem;
  padding: 1rem;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading State */
.loading {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Form Section Styles */
.form-section {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border-left: 4px solid var(--primary-color);
  margin-bottom: 1.5rem;
}

.form-section-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}

/* Admin Panel Tabs */
.nav-tabs {
  border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
  border: none;
  color: #6c757d;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  margin-right: 0.5rem;
  border-radius: 0.5rem 0.5rem 0 0;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
  background-color: #f8f9fa;
  color: var(--primary-color);
}

.nav-tabs .nav-link.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

/* Section Dividers */
.section-divider {
  border-bottom: 2px solid #e9ecef;
  margin: 2rem 0;
}

/* Mobile Adjustments for Forms */
@media (max-width: 768px) {
  .form-section {
    padding: 1rem;
  }

  .form-section-title {
    font-size: 1rem;
  }
}
