/* ============ PAGE LAYOUT ============ */
.order-detail-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ============ BACK BUTTON ============ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--white);
  color: var(--green-dark);
  text-decoration: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  transition: all 0.2s;
  margin-bottom: 1.5rem;
}

.back-btn:hover {
  background: var(--green-pale);
  border-color: var(--green-mid);
  transform: translateX(-2px);
}

/* ============ ORDER HEADER ============ */
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.5rem;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.order-title {
  color: var(--green-dark);
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.8rem;
  margin: 0;
}

.order-id {
  color: var(--amber);
}

/* ============ STATUS BADGES ============ */
.status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-pending {
  background: var(--amber);
  color: var(--white);
}

.status-confirmed {
  background: var(--green-mid);
  color: var(--white);
}

.status-shipped {
  background: var(--green-light);
  color: var(--white);
}

.status-delivered {
  background: var(--green-dark);
  color: var(--cream);
}

.status-cancelled {
  background: #b85450;
  color: var(--white);
}

/* ============ CARDS GRID ============ */
.order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.order-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-header {
  background: var(--green-dark);
  color: var(--cream);
  padding: 14px 20px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.card-header.alt {
  background: var(--green-mid);
}

.card-body {
  padding: 20px;
}

/* ============ CUSTOMER INFO ============ */
.info-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  font-family: var(--font-sans);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  flex: 0 0 140px;
  font-weight: 600;
  color: var(--green-dark);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  flex: 1;
  color: var(--text-dark);
  font-size: 1rem;
}

/* ============ ORDER ITEMS ============ */
.items-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.items-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--cream-dark);
  font-family: var(--font-sans);
  color: var(--text-dark);
}

.items-list li:last-child {
  border-bottom: none;
}

.item-name {
  font-weight: 500;
  font-size: 1rem;
}

.item-qty {
  background: var(--green-pale);
  color: var(--green-dark);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-sans);
}

/* ============ STATUS SECTION ============ */
.status-section {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.status-section .card-header {
  background: var(--amber);
}

.status-current {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
}

.status-label {
  font-family: var(--font);
  font-weight: 600;
  color: var(--green-dark);
  font-size: 1rem;
}

/* ============ UPDATE FORM ============ */
.update-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--cream);
  border-top: 1px solid var(--border);
}

.update-form select {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.update-form select:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(61, 107, 61, 0.15);
}

.update-btn {
  padding: 12px 28px;
  background: var(--green-mid);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.5px;
}

.update-btn:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.update-btn:active {
  transform: translateY(0);
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .order-detail-wrapper {
    padding: 16px 12px;
  }

  .order-title {
    font-size: 1.4rem;
  }

  .order-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .info-row {
    flex-direction: column;
    gap: 4px;
  }

  .info-label {
    flex: none;
    font-size: 0.8rem;
  }

  .status-current {
    flex-direction: column;
    align-items: flex-start;
  }

  .update-form {
    flex-direction: column;
    align-items: stretch;
  }

  .update-form select {
    min-width: 100%;
  }

  .update-btn {
    width: 100%;
    padding: 14px;
  }
}