:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --success-color: #4cc9f0;
  --danger-color: #f72585;
  --warning-color: #f8961e;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* .container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
} */

.profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.profile-avatar {
  margin-right: 1.5rem;
}

.avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
}

.avatar-initials {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
}

.profile-info h1 {
  margin: 0;
  color: var(--dark-color);
  font-weight: 700;
}

.welcome {
  color: #6c757d;
  margin: 0.5rem 0 0;
}

.order-list {
  display: grid;
  gap: 1.5rem;
}

.order-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.order-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.order-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.order-info {
  display: flex;
  flex-direction: column;
}

.order-id {
  font-weight: 600;
  color: var(--dark-color);
}

.order-date {
  font-size: 0.85rem;
  color: #6c757d;
}

.status-badge {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-pending .dot {
  background: var(--warning-color);
}

.status-processing .dot {
  background: var(--primary-color);
}

.status-completed .dot {
  background: var(--success-color);
}

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

.status-pending {
  color: var(--warning-color);
  background: rgba(248, 150, 30, 0.1);
}

.status-processing {
  color: var(--primary-color);
  background: rgba(67, 97, 238, 0.1);
}

.status-completed {
  color: var(--success-color);
  background: rgba(76, 201, 240, 0.1);
}

.status-cancelled {
  color: var(--danger-color);
  background: rgba(247, 37, 133, 0.1);
}

.order-body {
  padding: 1.5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.product-card {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: 8px;
  background: #f8f9fa;
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  background: #e9ecef;
}

.product-image-container {
  width: 60px;
  height: 60px;
  margin-right: 1rem;
  flex-shrink: 0;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.product-details {
  flex-grow: 1;
}

.product-name {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.product-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #6c757d;
}

.product-price,
.product-total {
  font-weight: 600;
  color: var(--dark-color);
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #eee;
}

.order-total {
  font-weight: 600;
  font-size: 1.1rem;
}

.total-amount {
  color: var(--primary-color);
  margin-left: 0.5rem;
}

.order-actions {
  display: flex;
  gap: 0.75rem;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
}

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

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid #dee2e6;
  color: #495057;
}

.btn-outline:hover {
  background: #f1f3f5;
  transform: translateY(-2px);
}

.btn-delete {
  background: transparent;
  color: var(--danger-color);
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 0.5rem;
  border-radius: 50%;
}

.btn-delete:hover {
  background: rgba(247, 37, 133, 0.1);
  transform: scale(1.1);
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.empty-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.empty-description {
  color: #6c757d;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.alert-danger {
  background: rgba(247, 37, 133, 0.1);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

@media (max-width: 768px) {
  .order-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .order-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-avatar {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

/* Order Tracking Styles */
.order-tracking {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.order-tracking h4 {
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.tracking-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tracking-number {
    font-size: 15px;
}

.carrier-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
    font-weight: 500;
}

.track-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.track-link:hover {
    text-decoration: underline;
}

.tracking-pending {
    background: #fff8e1;
    color: #ff8f00;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
}

.tracking-pending i {
    margin-right: 8px;
}

/* Tracking Progress */
.tracking-progress {
    margin-top: 20px;
}

.steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    color: #9e9e9e;
}

.step.completed .step-icon {
    background: #4caf50;
    color: white;
}

.step.active .step-icon {
    background: #2196f3;
    color: white;
    animation: pulse 1.5s infinite;
}

.step-label {
    font-size: 12px;
    color: #757575;
    text-align: center;
    max-width: 80px;
}

.step.completed .step-label,
.step.active .step-label {
    color: #333;
    font-weight: 500;
}

.step-connector {
    height: 2px;
    background: #e0e0e0;
    flex-grow: 1;
    margin-top: 20px;
}

.step-connector.completed {
    background: #4caf50;
}

/* Timeline for tracking modal */
.tracking-timeline {
    margin-top: 20px;
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e0e0e0;
}

.timeline-item.active .timeline-marker {
    background: #2196f3;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
}

.timeline-content {
    padding: 5px 0;
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-date {
    font-size: 12px;
    color: #757575;
    margin-bottom: 5px;
}

.timeline-description {
    font-size: 14px;
    color: #616161;
}

/* Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(33, 150, 243, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0);
    }
}
#trackingModal .modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.tracking-simple {
    padding: 15px;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tracking-id {
    font-weight: bold;
    color: #333;
}

.tracking-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-processing {
    background-color: #cce5ff;
    color: #004085;
}

.status-shipped {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-delivered {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.status-returned {
    background-color: #fff3cd;
    color: #856404;
}

.tracking-progress {
    margin: 20px 0;
    position: relative;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-step {
    text-align: center;
    position: relative;
    flex: 1;
}

.progress-step.active .step-icon {
    background-color: #4CAF50;
    color: white;
}

.progress-step.active .step-label {
    font-weight: bold;
    color: #333;
}

.step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 5px;
    color: #999;
    font-size: 14px;
}

.step-label {
    font-size: 12px;
    color: #999;
}

.progress-line {
    height: 3px;
    background-color: #e0e0e0;
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    z-index: -1;
}

.progress-line-fill {
    height: 100%;
    background-color: #4CAF50;
}

.tracking-details {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.tracking-detail {
    display: flex;
    margin-bottom: 10px;
}

.tracking-detail:last-child {
    margin-bottom: 0;
}

.detail-icon {
    margin-right: 10px;
    color: #666;
}

.detail-content {
    flex: 1;
}

.detail-title {
    font-weight: 500;
    margin-bottom: 3px;
}

.detail-text {
    color: #666;
    font-size: 14px;
}

.return-info {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
}

.return-info h6 {
    color: #ff9800;
    margin-bottom: 10px;
}

.return-info p {
    margin-bottom: 5px;
}

.return-info strong {
    color: #333;
}