/* ========================================
   CUSTOMER FRONTEND STYLES
   ======================================== */

/* CSS Variables for easy customization */
:root {
  /* Primary Colors */
  --customer-primary: #0d6efd;
  --customer-primary-dark: #0056b3;
  --customer-primary-light: #e7f3ff;
  
  /* Secondary Colors */
  --customer-secondary: #6c757d;
  --customer-secondary-dark: #495057;
  --customer-secondary-light: #f8f9fa;
  
  /* Status Colors */
  --customer-success: #198754;
  --customer-success-light: #d1e7dd;
  --customer-warning: #ffc107;
  --customer-warning-light: #fff3cd;
  --customer-danger: #dc3545;
  --customer-danger-light: #f8d7da;
  --customer-info: #0dcaf0;
  --customer-info-light: #cff4fc;
  
  /* Neutral Colors */
  --customer-light: #f8f9fa;
  --customer-dark: #212529;
  --customer-white: #ffffff;
  --customer-gray: #6c757d;
  --customer-gray-light: #e9ecef;
  --customer-gray-dark: #495057;
  
  /* Typography */
  --customer-font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --customer-font-size-base: 1rem;
  --customer-font-size-sm: 0.875rem;
  --customer-font-size-lg: 1.125rem;
  --customer-font-weight-normal: 400;
  --customer-font-weight-medium: 500;
  --customer-font-weight-bold: 600;
  
  /* Spacing */
  --customer-spacing-xs: 0.25rem;
  --customer-spacing-sm: 0.5rem;
  --customer-spacing-md: 1rem;
  --customer-spacing-lg: 1.5rem;
  --customer-spacing-xl: 2rem;
  --customer-spacing-xxl: 3rem;
  
  /* Border Radius */
  --customer-border-radius: 0.375rem;
  --customer-border-radius-lg: 0.5rem;
  --customer-border-radius-xl: 0.75rem;
  --customer-border-radius-xxl: 1rem;
  
  /* Shadows */
  --customer-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --customer-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --customer-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Transitions */
  --customer-transition: all 0.3s ease;
  --customer-transition-fast: all 0.15s ease;
  --customer-transition-slow: all 0.5s ease;
}

/* ========================================
   BASE STYLES
   ======================================== */

.customer-container {
  font-family: var(--customer-font-family);
  line-height: 1.6;
  color: var(--customer-dark);
}

/* ========================================
   HEADER STYLES
   ======================================== */

.customer-header {
  background: linear-gradient(135deg, var(--customer-primary), var(--customer-primary-dark));
  color: var(--customer-white);
  padding: var(--customer-spacing-xl) 0;
  position: relative;
  overflow: hidden;
}

.customer-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.customer-header-content {
  position: relative;
  z-index: 1;
}

.customer-header h1 {
  font-size: 2.5rem;
  font-weight: var(--customer-font-weight-bold);
  margin-bottom: var(--customer-spacing-sm);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.customer-header p {
  font-size: var(--customer-font-size-lg);
  opacity: 0.9;
  margin-bottom: 0;
}

/* ========================================
   NAVIGATION STYLES
   ======================================== */

.customer-nav {
  background: var(--customer-white);
  box-shadow: var(--customer-shadow-sm);
  border-bottom: 1px solid var(--customer-gray-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.customer-nav .navbar-brand {
  font-weight: var(--customer-font-weight-bold);
  color: var(--customer-primary);
  font-size: var(--customer-font-size-lg);
}

.customer-nav .nav-link {
  color: var(--customer-dark);
  font-weight: var(--customer-font-weight-medium);
  padding: var(--customer-spacing-md) var(--customer-spacing-lg);
  transition: var(--customer-transition);
  border-radius: var(--customer-border-radius);
  margin: 0 var(--customer-spacing-xs);
}

.customer-nav .nav-link:hover,
.customer-nav .nav-link.active {
  color: var(--customer-primary);
  background-color: var(--customer-primary-light);
}

.customer-nav .nav-link i {
  margin-right: var(--customer-spacing-sm);
}

/* ========================================
   MAIN CONTENT STYLES
   ======================================== */

.customer-body {
  min-height: 70vh;
  padding: var(--customer-spacing-xxl) 0;
  background: var(--customer-light);
}

.customer-content {
  background: var(--customer-white);
  border-radius: var(--customer-border-radius-xl);
  box-shadow: var(--customer-shadow);
  padding: var(--customer-spacing-xl);
  margin-bottom: var(--customer-spacing-xl);
}

/* ========================================
   CARD STYLES
   ======================================== */

.customer-card {
  background: var(--customer-white);
  border-radius: var(--customer-border-radius-xl);
  box-shadow: var(--customer-shadow);
  padding: var(--customer-spacing-xl);
  margin-bottom: var(--customer-spacing-lg);
  transition: var(--customer-transition);
  border: 1px solid var(--customer-gray-light);
}

.customer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--customer-shadow-lg);
}

.customer-card-header {
  border-bottom: 1px solid var(--customer-gray-light);
  padding-bottom: var(--customer-spacing-md);
  margin-bottom: var(--customer-spacing-lg);
}

.customer-card-title {
  font-size: var(--customer-font-size-lg);
  font-weight: var(--customer-font-weight-bold);
  color: var(--customer-dark);
  margin-bottom: 0;
}

.customer-card-subtitle {
  color: var(--customer-gray);
  font-size: var(--customer-font-size-sm);
  margin-top: var(--customer-spacing-xs);
}

/* ========================================
   STATISTICS CARDS
   ======================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--customer-spacing-lg);
  margin-bottom: var(--customer-spacing-xl);
}

.stat-card {
  background: var(--customer-white);
  border-radius: var(--customer-border-radius-xl);
  padding: var(--customer-spacing-xl);
  text-align: center;
  box-shadow: var(--customer-shadow);
  transition: var(--customer-transition);
  border: 1px solid var(--customer-gray-light);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--customer-primary), var(--customer-info));
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--customer-shadow-lg);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: var(--customer-font-weight-bold);
  color: var(--customer-primary);
  margin-bottom: var(--customer-spacing-sm);
  line-height: 1;
}

.stat-label {
  color: var(--customer-gray);
  font-weight: var(--customer-font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: var(--customer-font-size-sm);
}

.stat-icon {
  font-size: 2rem;
  color: var(--customer-primary);
  margin-bottom: var(--customer-spacing-md);
  opacity: 0.7;
}

/* ========================================
   ORDER STYLES
   ======================================== */

.order-item {
  background: var(--customer-white);
  border: 1px solid var(--customer-gray-light);
  border-radius: var(--customer-border-radius-lg);
  padding: var(--customer-spacing-lg);
  margin-bottom: var(--customer-spacing-md);
  transition: var(--customer-transition);
}

.order-item:hover {
  border-color: var(--customer-primary);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--customer-spacing-md);
  padding-bottom: var(--customer-spacing-md);
  border-bottom: 1px solid var(--customer-gray-light);
}

.order-number {
  font-size: var(--customer-font-size-lg);
  font-weight: var(--customer-font-weight-bold);
  color: var(--customer-primary);
}

.order-date {
  color: var(--customer-gray);
  font-size: var(--customer-font-size-sm);
}

.order-status {
  padding: var(--customer-spacing-xs) var(--customer-spacing-md);
  border-radius: 20px;
  font-size: var(--customer-font-size-sm);
  font-weight: var(--customer-font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.status-cancelled {
  background: var(--customer-danger-light);
  color: var(--customer-danger);
}

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

.order-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--customer-spacing-md);
  margin-bottom: var(--customer-spacing-md);
}

.detail-item {
  text-align: center;
}

.detail-label {
  font-size: var(--customer-font-size-sm);
  color: var(--customer-gray);
  text-transform: uppercase;
  font-weight: var(--customer-font-weight-bold);
  letter-spacing: 0.5px;
  margin-bottom: var(--customer-spacing-xs);
}

.detail-value {
  font-size: var(--customer-font-size-lg);
  font-weight: var(--customer-font-weight-bold);
  color: var(--customer-dark);
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.customer-btn {
  border-radius: var(--customer-border-radius-lg);
  padding: var(--customer-spacing-sm) var(--customer-spacing-lg);
  font-weight: var(--customer-font-weight-medium);
  transition: var(--customer-transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--customer-spacing-sm);
}

.customer-btn-primary {
  background: var(--customer-primary);
  color: var(--customer-white);
}

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

.customer-btn-outline-primary {
  background: transparent;
  color: var(--customer-primary);
  border: 2px solid var(--customer-primary);
}

.customer-btn-outline-primary:hover {
  background: var(--customer-primary);
  color: var(--customer-white);
  transform: translateY(-1px);
}

.customer-btn-secondary {
  background: var(--customer-secondary);
  color: var(--customer-white);
}

.customer-btn-secondary:hover {
  background: var(--customer-secondary-dark);
  color: var(--customer-white);
}

.customer-btn-success {
  background: var(--customer-success);
  color: var(--customer-white);
}

.customer-btn-warning {
  background: var(--customer-warning);
  color: var(--customer-dark);
}

.customer-btn-danger {
  background: var(--customer-danger);
  color: var(--customer-white);
}

.customer-btn-sm {
  padding: var(--customer-spacing-xs) var(--customer-spacing-md);
  font-size: var(--customer-font-size-sm);
}

.customer-btn-lg {
  padding: var(--customer-spacing-md) var(--customer-spacing-xl);
  font-size: var(--customer-font-size-lg);
}

/* ========================================
   FORM STYLES
   ======================================== */

.customer-form-group {
  margin-bottom: var(--customer-spacing-lg);
}

.customer-form-label {
  display: block;
  margin-bottom: var(--customer-spacing-sm);
  font-weight: var(--customer-font-weight-medium);
  color: var(--customer-dark);
}

.customer-form-control {
  width: 100%;
  padding: var(--customer-spacing-md);
  border: 1px solid var(--customer-gray-light);
  border-radius: var(--customer-border-radius);
  font-size: var(--customer-font-size-base);
  transition: var(--customer-transition);
  background: var(--customer-white);
}

.customer-form-control:focus {
  outline: none;
  border-color: var(--customer-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.customer-form-select {
  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 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
}

/* ========================================
   ALERT STYLES
   ======================================== */

.customer-alert {
  padding: var(--customer-spacing-md);
  border-radius: var(--customer-border-radius);
  margin-bottom: var(--customer-spacing-lg);
  border: 1px solid transparent;
  position: relative;
}

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

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

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

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

.customer-alert-dismissible {
  padding-right: 3rem;
}

.customer-alert-close {
  position: absolute;
  top: 0;
  right: 0;
  padding: var(--customer-spacing-md);
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
}

.customer-alert-close:hover {
  opacity: 1;
}

/* ========================================
   BREADCRUMB STYLES
   ======================================== */

.customer-breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: var(--customer-spacing-lg);
}

.customer-breadcrumb-item {
  color: var(--customer-gray);
}

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

.customer-breadcrumb-item a:hover {
  color: var(--customer-primary-dark);
  text-decoration: underline;
}

.customer-breadcrumb-item.active {
  color: var(--customer-gray);
}

.customer-breadcrumb-item + .customer-breadcrumb-item::before {
  content: ">";
  color: var(--customer-gray);
  margin: 0 var(--customer-spacing-sm);
}

/* ========================================
   TIMELINE STYLES
   ======================================== */

.customer-timeline {
  position: relative;
  padding-left: var(--customer-spacing-xl);
}

.customer-timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--customer-gray-light);
}

.customer-timeline-item {
  position: relative;
  margin-bottom: var(--customer-spacing-lg);
}

.customer-timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--customer-primary);
  border: 2px solid var(--customer-white);
  box-shadow: 0 0 0 2px var(--customer-primary);
}

.customer-timeline-date {
  font-size: var(--customer-font-size-sm);
  color: var(--customer-gray);
  margin-bottom: var(--customer-spacing-xs);
}

.customer-timeline-title {
  font-weight: var(--customer-font-weight-bold);
  margin-bottom: var(--customer-spacing-xs);
  color: var(--customer-dark);
}

.customer-timeline-description {
  color: var(--customer-gray);
  font-size: var(--customer-font-size-sm);
}

/* ========================================
   LOADING STATES
   ======================================== */

.customer-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--customer-spacing-xxl);
}

.customer-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--customer-gray-light);
  border-top: 3px solid var(--customer-primary);
  border-radius: 50%;
  animation: customer-spin 1s linear infinite;
}

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

.customer-loading-text {
  margin-left: var(--customer-spacing-md);
  color: var(--customer-gray);
  font-weight: var(--customer-font-weight-medium);
}

/* ========================================
   EMPTY STATES
   ======================================== */

.customer-empty-state {
  text-align: center;
  padding: var(--customer-spacing-xxl);
  color: var(--customer-gray);
}

.customer-empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--customer-spacing-lg);
  opacity: 0.5;
  color: var(--customer-gray);
}

.customer-empty-state-title {
  font-size: var(--customer-font-size-lg);
  font-weight: var(--customer-font-weight-bold);
  margin-bottom: var(--customer-spacing-md);
  color: var(--customer-dark);
}

.customer-empty-state-description {
  margin-bottom: var(--customer-spacing-xl);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .customer-header h1 {
    font-size: 2rem;
  }
  
  .customer-header p {
    font-size: var(--customer-font-size-base);
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .order-details {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--customer-spacing-sm);
  }
  
  .customer-nav .nav-link {
    padding: var(--customer-spacing-sm) var(--customer-spacing-md);
    margin: 0;
  }
  
  .customer-content {
    padding: var(--customer-spacing-lg);
  }
  
  .customer-card {
    padding: var(--customer-spacing-lg);
  }
}

@media (max-width: 576px) {
  .customer-body {
    padding: var(--customer-spacing-lg) 0;
  }
  
  .customer-header {
    padding: var(--customer-spacing-lg) 0;
  }
  
  .customer-header h1 {
    font-size: 1.75rem;
  }
  
  .order-details {
    grid-template-columns: 1fr;
  }
  
  .customer-content {
    padding: var(--customer-spacing-md);
  }
  
  .customer-card {
    padding: var(--customer-spacing-md);
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.customer-text-center { text-align: center; }
.customer-text-left { text-align: left; }
.customer-text-right { text-align: right; }

.customer-mb-0 { margin-bottom: 0; }
.customer-mb-1 { margin-bottom: var(--customer-spacing-xs); }
.customer-mb-2 { margin-bottom: var(--customer-spacing-sm); }
.customer-mb-3 { margin-bottom: var(--customer-spacing-md); }
.customer-mb-4 { margin-bottom: var(--customer-spacing-lg); }
.customer-mb-5 { margin-bottom: var(--customer-spacing-xl); }

.customer-mt-0 { margin-top: 0; }
.customer-mt-1 { margin-top: var(--customer-spacing-xs); }
.customer-mt-2 { margin-top: var(--customer-spacing-sm); }
.customer-mt-3 { margin-top: var(--customer-spacing-md); }
.customer-mt-4 { margin-top: var(--customer-spacing-lg); }
.customer-mt-5 { margin-top: var(--customer-spacing-xl); }

.customer-p-0 { padding: 0; }
.customer-p-1 { padding: var(--customer-spacing-xs); }
.customer-p-2 { padding: var(--customer-spacing-sm); }
.customer-p-3 { padding: var(--customer-spacing-md); }
.customer-p-4 { padding: var(--customer-spacing-lg); }
.customer-p-5 { padding: var(--customer-spacing-xl); }

.customer-d-none { display: none; }
.customer-d-block { display: block; }
.customer-d-flex { display: flex; }
.customer-d-grid { display: grid; }

.customer-justify-content-center { justify-content: center; }
.customer-justify-content-between { justify-content: space-between; }
.customer-justify-content-end { justify-content: flex-end; }

.customer-align-items-center { align-items: center; }
.customer-align-items-start { align-items: flex-start; }
.customer-align-items-end { align-items: flex-end; }

.customer-w-100 { width: 100%; }
.customer-h-100 { height: 100%; }

.customer-rounded { border-radius: var(--customer-border-radius); }
.customer-rounded-lg { border-radius: var(--customer-border-radius-lg); }
.customer-rounded-xl { border-radius: var(--customer-border-radius-xl); }

.customer-shadow { box-shadow: var(--customer-shadow); }
.customer-shadow-sm { box-shadow: var(--customer-shadow-sm); }
.customer-shadow-lg { box-shadow: var(--customer-shadow-lg); }

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes customer-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.customer-fade-in {
  animation: customer-fade-in 0.5s ease-out;
}

@keyframes customer-slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.customer-slide-in-left {
  animation: customer-slide-in-left 0.5s ease-out;
}

@keyframes customer-slide-in-right {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.customer-slide-in-right {
  animation: customer-slide-in-right 0.5s ease-out;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .customer-nav,
  .customer-header,
  .customer-footer,
  .customer-btn {
    display: none !important;
  }
  
  .customer-body {
    padding: 0;
    background: white;
  }
  
  .customer-content,
  .customer-card {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .customer-card {
    break-inside: avoid;
  }
}
