
/* =========================
   WINDBAZAAR ORDERS
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  padding-bottom: 105px;
  font-family: Arial, sans-serif;
  color: #fff;
  background:
    radial-gradient(circle at top, #251044, transparent 40%),
    #080810;
}

a {
  color: inherit;
  text-decoration: none;
}

/* HEADER */

.top-header {
  height: 65px;
  padding: 0 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #292238;
  background: rgba(12, 10, 22, .95);
}

.brand {
  font-size: 21px;
  font-weight: bold;
}

.brand span {
  color: #a66aff;
}

.profile-link {
  color: #b78aff;
  font-size: 14px;
}

/* MAIN */

.orders-container {
  width: 92%;
  max-width: 850px;
  margin: 30px auto;
}

.page-heading {
  margin-bottom: 22px;
}

.page-heading h1 {
  font-size: 27px;
  margin-bottom: 7px;
  background: linear-gradient(90deg, #fff, #bd91ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-heading p {
  color: #9993a9;
  font-size: 13px;
}

/* SUMMARY */

.order-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 27px;
}

.summary-card {
  min-width: 0;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #3b2c50;
  border-radius: 13px;
  background: linear-gradient(135deg, #1b162a, #171324);
}

.summary-icon {
  font-size: 21px;
}

.summary-card strong {
  display: block;
  font-size: 21px;
  margin-bottom: 4px;
}

.summary-card small {
  color: #9993a9;
  font-size: 10px;
}

/* SECTION HEADER */

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.section-heading h2 {
  font-size: 18px;
}

.section-heading button,
#refreshBtn {
  padding: 8px 12px;
  border: 1px solid #67449b;
  border-radius: 8px;
  background: #211633;
  color: #c7a5ff;
  font-size: 12px;
  cursor: pointer;
  transition: .2s;
}

.section-heading button:hover,
#refreshBtn:hover {
  background: #382050;
}

#refreshBtn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ORDER LIST */

.orders-list,
#ordersList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
}

/* COMPACT ORDER CARD */

.order-card {
  padding: 14px 15px;
  border: 1px solid #3a2c4e;
  border-radius: 13px;
  background: linear-gradient(135deg, #1b162a, #11101c);
  transition: .2s;
}

.order-card:hover {
  border-color: #7651a5;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
}

.order-card-header h3 {
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.order-id {
  color: #bda0e9;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.order-date {
  color: #8e879d;
  font-size: 10px;
  margin-top: 5px;
}

/* STATUS */

.order-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  white-space: normal;
}

.status-pending,
.pending-verification {
  background: #493817;
  color: #ffd47a;
}

.status-verifying,
.verifying {
  background: #183957;
  color: #82caff;
}

.status-paid,
.status-processing,
.paid,
.processing {
  background: #31204e;
  color: #c7a1ff;
}

.status-completed,
.completed {
  background: #16412c;
  color: #76e5a5;
}

.status-rejected,
.rejected {
  background: #4a2029;
  color: #ff9aa8;
}

/* PRODUCT */

.order-product {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.product-placeholder {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #51208a, #1c3b7b);
  font-size: 22px;
}

.product-info {
  min-width: 0;
}

.product-info h3 {
  font-size: 14px;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.product-info p {
  color: #a49bb3;
  font-size: 11px;
}

/* DETAILS */

.order-card-details,
.order-details {
  padding-top: 11px;
  border-top: 1px solid #332941;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.order-card-details p,
.detail-item {
  color: #aaa2b6;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.order-card-details strong,
.detail-item strong {
  color: #e6ddf5;
  font-size: 11px;
  font-weight: 700;
}

.detail-item small {
  display: block;
  margin-bottom: 4px;
  color: #928a9e;
  font-size: 10px;
}

.order-total {
  color: #c7a0ff !important;
}

/* MESSAGES */

#loadingMessage,
#emptyMessage,
#errorMessage,
.info-message,
.empty-state,
.error-message {
  padding: 24px 14px;
  border: 1px solid #30243f;
  border-radius: 13px;
  background: #151222;
  text-align: center;
  color: #aaa2b6;
  font-size: 13px;
}

#loadingMessage {
  color: #c7a5ff;
}

#errorMessage,
.error-message {
  color: #ff9aa8;
}

.empty-state[hidden],
.error-message[hidden] {
  display: none;
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.empty-state h3 {
  color: white;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 12px;
}

.empty-state a {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #913cff, #496eff);
  color: white;
  font-size: 12px;
}

/* SUPPORT */

.support-text {
  margin-top: 23px;
  text-align: center;
  color: #aaa2b6;
  font-size: 12px;
  line-height: 1.8;
}

.support-text a {
  color: #b78aff;
}

/* BOTTOM NAVIGATION */

.bottom-nav {
  position: fixed;
  z-index: 100;
  bottom: 0;
  left: 0;
  width: 100%;
  min-height: 68px;
  padding: 9px 5px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #302441;
  background: rgba(13, 11, 22, .97);
  backdrop-filter: blur(12px);
}

.bottom-nav a {
  min-width: 55px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #898294;
}

.bottom-nav a span {
  font-size: 22px;
}

.bottom-nav a small {
  font-size: 10px;
}

.bottom-nav a.active {
  color: #b78aff;
}

/* TABLET & DESKTOP */

@media (min-width: 768px) {
  .bottom-nav {
    max-width: 520px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 15px;
    border: 1px solid #403052;
    border-radius: 16px;
  }
}

/* MOBILE */

@media (max-width: 480px) {
  .orders-container {
    margin: 23px auto;
  }

  .page-heading h1 {
    font-size: 24px;
  }

  .order-summary {
    gap: 7px;
  }

  .summary-card {
    padding: 12px 7px;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .summary-icon {
    font-size: 19px;
  }

  .summary-card strong {
    font-size: 18px;
  }

  .summary-card small {
    font-size: 9px;
  }

  .order-card {
    padding: 12px;
  }

  .order-card-details,
  .order-details {
    gap: 9px 7px;
  }

  .order-card-details p,
  .order-card-details strong {
    font-size: 10px;
  }
}



/* REJECTED ORDER EXPLANATION */
.rejection-notice {
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 112, 132, .38);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(104, 30, 48, .32), rgba(35, 18, 32, .72));
}
.rejection-notice strong {
  display: block;
  color: #ff9aa8;
  font-size: 13px;
  margin-bottom: 6px;
}
.rejection-notice p {
  color: #e5cbd2;
  font-size: 12px;
  line-height: 1.6;
}
.rejection-notice a {
  display: inline-block;
  margin-top: 9px;
  color: #c7a1ff;
  font-size: 12px;
  font-weight: 700;
}
.order-delivery-box,.order-message-box{margin-top:14px;padding:13px;border:1px solid #342b4c;background:#100e1d;border-radius:11px;overflow-wrap:anywhere}
.order-delivery-box h4{margin:0 0 10px;color:#bba3ff}
.order-code-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:7px 0;padding:9px;background:#090914;border:1px solid #29263b;border-radius:8px}
.order-code-row code{color:#84e6b2;overflow-wrap:anywhere;word-break:break-word}
.order-code-row button{background:#5130a6;color:white;border:0;border-radius:7px;padding:7px 10px;cursor:pointer;flex:0 0 auto}
.order-delivery-box pre{white-space:pre-wrap;overflow-wrap:anywhere;color:#e4ddf5;font-family:inherit}
.order-message-box p{margin:8px 0 0;line-height:1.6}
.email-delivery-status{color:#aaa6bb;font-size:12px}

.brand-with-slot{display:inline-flex;align-items:center;gap:9px;text-decoration:none;min-width:0}.brand-logo-slot{width:34px;height:34px;object-fit:contain;flex:0 0 34px}.brand-wordmark{white-space:nowrap;color:inherit}.brand-wordmark span{color:var(--blue,#00d9ff)}
.brand .brand-wordmark{color:inherit}.brand .brand-wordmark span{color:#a66aff}
