/* ===== PAGE ===== */
.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0d6efd;
  margin-bottom: 2rem;
}

/* ===== GRID ===== */
.order-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ===== CARD ===== */
.order-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  border: 1px solid #eef2f7;
}

.order-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(13, 110, 253, 0.12);
}

/* ===== HEADER ===== */
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.order-id {
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
  word-break: break-all;
}

/* ===== BADGES ===== */
.badge {
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge.pending {
  background: #fff3cd;
  color: #856404;
}

.badge.processing {
  background: #e7f1ff;
  color: #0d6efd;
}

.badge.shipped {
  background: #cce5ff;
  color: #004085;
}

.badge.delivered {
  background: #d4edda;
  color: #155724;
}

.badge.cancelled {
  background: #f8d7da;
  color: #842029;
}

/* ===== BODY ===== */
.order-card-body {
  font-size: 0.9rem;
  color: #495057;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.order-card-body p {
  margin: 0.25rem 0;
}

.order-card-body strong {
  color: #212529;
  font-weight: 600;
}

/* ===== FOOTER ===== */
.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ===== STATUS SELECT ===== */
.status-form .form-select {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid #ced4da;
  background: #f8f9fa;
  cursor: pointer;
}

.status-form .form-select:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

/* ===== BUTTON ===== */
.btn-modern {
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: #0d6efd;
  color: #fff;
}

.btn-primary:hover {
  background: #0b5ed7;
  transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
  .order-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-modern {
    text-align: center;
  }

  .status-form .form-select {
    width: 100%;
  }
}

/* ===== FOOTER FLEX ===== */
.order-card-footer {
  display: flex;
  flex-wrap: wrap;       /* allow wrapping on small screens */
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;          /* spacing between dropdown & button */
  margin-top: 1rem;
}

/* STATUS SELECT */
.status-form .form-select {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid #ced4da;
  background: #f8f9fa;
  cursor: pointer;
  min-width: 140px;      /* ensures dropdown isn’t too small */
  flex: 1;                /* take available space on larger screens */
}

.status-form .form-select:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

/* VIEW BUTTON */
.btn-modern {
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;        /* prevent shrinking */
}

/* BUTTON COLOR */
.btn-primary {
  background: #0d6efd;
  color: #fff;
}

.btn-primary:hover {
  background: #0b5ed7;
  transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
  .order-card-footer {
    flex-direction: column;   /* stack dropdown & button */
    align-items: stretch;     /* full width */
  }

  .status-form .form-select,
  .btn-modern {
    width: 100%;              /* full width on mobile */
  }

  .btn-modern {
    margin-top: 0.5rem;       /* spacing below dropdown */
    text-align: center;
  }
}
