/* Container */
.track-card {
    max-width: 920px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
  }

  .track-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  }

  /* Header */
  .track-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .track-info { min-width: 0; }
  .track-info h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .track-info .muted {
    font-size: .9rem;
    color: #6c757d;
    margin-top: 0.25rem;
  }

  /* Input Form */
  .input-inline {
    display: flex;
    gap: .5rem;
    max-width: 520px;
    align-items: stretch;
  }
  .input-inline .form-control {
    flex: 1 1 auto;
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    height: auto;
  }
  .input-inline .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
  }
  .input-inline .btn {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
  }
  .input-inline .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  .input-inline .btn:active {
    transform: translateY(0);
  }

  /* Loading state for button */
  .btn.loading {
    pointer-events: none;
    opacity: 0.8;
  }

  .ri-spin {
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* Badge */
  .track-badge {
    display: inline-block;
    padding: .5rem .85rem;
    border-radius: .6rem;
    font-weight: 600;
    font-size: .9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: fadeInScale 0.4s ease;
  }

  .track-badge.bg-secondary,
  .track-badge.bg-warning,
  .track-badge.bg-danger {
    color: #fff !important;
  }

  @keyframes fadeInScale {
    from {
      opacity: 0;
      transform: scale(0.9);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  /* Stepper */
  .stepper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .step {
    flex: 1 1 0;
    text-align: center;
    position: relative;
    padding: 0 8px;
    min-width: 70px;
  }
  .step .dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 2px solid #dee2e6;
    background: #fff;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 1.1rem;
    color: #adb5bd;
  }
  .step .label {
    margin-top: .65rem;
    font-size: .875rem;
    color: #6c757d;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.3s ease;
  }

  /* connector line between dots */
  .step::after {
    content: "";
    position: absolute;
    top: 24px;
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
    height: 3px;
    background: #dee2e6;
    z-index: 0;
    transition: all 0.4s ease;
  }
  .step:last-child::after { display: none; }

  /* completed / active */
  .step.completed .dot {
    background: #198754;
    color: #fff;
    border-color: #198754;
  }
  .step.active .dot {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
  }

  .step.completed .label,
  .step.active .label {
    color: #212529;
    font-weight: 600;
  }

  .step.completed::after {
    background: #198754;
  }
  .step.active::after {
    background: #0d6efd;
  }

  /* responsive: stack on small screens */
  @media (max-width: 640px) {
    .stepper { flex-direction: column; gap: .8rem; align-items: stretch; }
    .step { text-align: left; display: flex; gap: 1rem; align-items: center; }
    .step::after { display: none; }
    .step .label { margin: 0; }
    .step .dot {
      width: 44px;
      height: 44px;
      font-size: 1rem;
    }
  }

  /* items */
  .order-items {
    margin-top: 1.5rem;
    animation: fadeIn 0.5s ease 0.2s both;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .order-items h6 {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .order-items ul {
    padding-left: 0;
    margin: .5rem 0;
    list-style: none;
  }
  .order-items ul li {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
  }
  .order-items ul li:hover {
    background: #e9ecef;
    transform: translateX(4px);
  }
  .order-items ul li:last-child {
    margin-bottom: 0;
  }

  /* Alert messages */
  .alert {
    border-radius: 10px;
    border: none;
    animation: slideDown 0.4s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Action buttons */
  .d-flex.justify-content-end.mt-3 {
    gap: 0.75rem;
  }
  .btn-outline-secondary,
  .btn-outline-primary {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    transition: all 0.3s ease;
    border-width: 2px;
  }
  .btn-outline-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  .btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
  }

  /* Result area animation */
  #track-result {
    animation: fadeInUp 0.5s ease;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Order info styling */
  #track-result .d-flex.align-items-center {
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 10px;
    margin-bottom: 1rem;
  }

  .text-muted {
    font-size: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
  }

  #order-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
  }

  #order-date {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
  }

  #order-total {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
