/* =========================================================
   ORDER PAGE
========================================================= */
.order-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  color: #4d4743;
}
/* =========================================================
   CARD
========================================================= */
.order-page .card {
  background: #fff;
  border: 1px solid #eee9e5;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(80, 60, 50, 0.03);
}
/* =========================================================
   LEFT
========================================================= */
.order-main {
  min-width: 0;
}
/* =========================================================
   SEARCH
========================================================= */
.order-search {
  padding: 18px 20px;
  margin-bottom: 14px;
}
.search-title {
  font-size: 18px;
  color: #4b4541;
  margin-bottom: 12px;
  font-weight: 600;
}
.search-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr 110px;
  gap: 12px;
}
.search-input {
  height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid #e9e4df;
  border-radius: 8px;
  background: #fff;
  padding: 0 14px;
}
.search-input i {
  font-size: 14px;
  color: #88807b;
  margin-right: 10px;
}
.search-input input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #4d4743;
}
.search-input input::placeholder {
  color: #aaa39e;
}
.check-order-btn {
  height: 42px;
  border: none;
  border-radius: 8px;
  background: #df607d;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
}
.check-order-btn:hover {
  background: #d95472;
}
/* =========================================================
   ORDER DETAIL
========================================================= */
.order-detail {
  padding: 20px 22px 18px;
}
/* =========================================================
   HEADER
========================================================= */
.order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0ebe7;
}
.order-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.order-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff1f3;
  color: #df6078;
  font-size: 16px;
}
.order-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #403b37;
}
.order-header p {
  margin: 0;
  font-size: 13px;
  color: #96908b;
}
.order-status {
  padding: 7px 16px;
  border-radius: 20px;
  background: #fde5ea;
  color: #dc6077;
  font-size: 13px;
  font-weight: 500;
}
/* =========================================================
   ORDER TIMELINE
========================================================= */
.order-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 35px 0;
}
.timeline-item {
  position: relative;
  text-align: center;
  min-width: 0;
}
/* =========================================================
   CIRCLE
========================================================= */
.timeline-circle {
  position: relative;
  z-index: 3;
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid #ddd;
  color: #aaa;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}
/* =========================================================
   LINE
========================================================= */
.timeline-line {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 4px;
  background: #e6e0dc;
  z-index: 1;
  overflow: hidden;
}
.timeline-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: #e88aa5;
  transition: width 0.5s ease;
}
/* =========================================================
   COMPLETED STEP
========================================================= */
.timeline-item.active .timeline-circle {
  background: #e88aa5;
  border-color: #e88aa5;
  color: #fff;
}
.timeline-item.active .timeline-line::after {
  width: 100%;
}
/* =========================================================
   CURRENT STEP
========================================================= */
.timeline-item.current .timeline-circle {
  background: #fff;
  border-color: #e88aa5;
  color: #e88aa5;
  box-shadow: 0 0 0 5px rgba(232, 138, 165, 0.15);
  transform: scale(1.08);
}
.timeline-item.current strong {
  color: #e88aa5;
}
/* =========================================================
   TEXT
========================================================= */
.timeline-item strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #555;
}
.timeline-item span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #999;
}
/* =========================================================
   CANCELLED
========================================================= */
.timeline-item.cancelled .timeline-circle {
  background: #fff;
  border-color: #d9534f;
  color: #d9534f;
}
.timeline-item.cancelled strong {
  color: #d9534f;
}
.timeline-item.cancelled .timeline-line::after {
  width: 0;
}
/* LINE */
.timeline-item.active .timeline-line {
  background: #efb0bd;
}
/* =========================================================
   NOTE
========================================================= */
.order-note {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 8px;
  background: #fff3f3;
  color: #817772;
  font-size: 13px;
}
.order-note i {
  color: #df6078;
  font-size: 15px;
}
/* =========================================================
   PRODUCT SECTION
========================================================= */
.order-product-section {
  margin-top: 18px;
}
.product-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.product-section-header h3 {
  margin: 0;
  font-size: 15px;
  color: #49433f;
  font-weight: 600;
}
.product-section-header a {
  color: #77706b;
  font-size: 13px;
  text-decoration: none;
}
.product-section-header a i {
  margin-left: 4px;
}
/* =========================================================
   PRODUCT
========================================================= */
.order-product {
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #f0ebe7;
  border-radius: 10px;
}
.order-product-image {
  width: 72px;
  height: 62px;
  flex: 0 0 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f2ee;
}
.order-product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.order-product-info {
  min-width: 0;
  padding-left: 14px;
}
.order-product-info h4 {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 600;
  color: #48423e;
}
.order-product-info p {
  margin: 3px 0;
  font-size: 13px;
  color: #99928d;
}
.order-product-price {
  margin-left: auto;
  padding-left: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #df6078;
}
/* =========================================================
   BACK
========================================================= */
.back-order {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 16px 0 0 4px;
  color: #df6078;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
}
/* =========================================================
   SIDEBAR
========================================================= */
.order-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
/* =========================================================
   SUMMARY
========================================================= */
.summary-card {
  padding: 18px 20px;
}
.summary-card > h3 {
  margin: 0 0 14px;
  font-size: 16px;
  color: #403a36;
  font-weight: 600;
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: #77706b;
}
.summary-row strong {
  font-weight: 500;
  color: #69615c;
}
.summary-row .discount {
  color: #58a48a;
}
/* =========================================================
   TOTAL
========================================================= */
.summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee8e4;
  font-size: 14px;
  color: #5c5651;
  font-weight: 500;
}
.summary-total strong {
  color: #df6078;
  font-size: 18px;
  font-weight: 700;
}
/* =========================================================
   COUPON
========================================================= */
.coupon-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  background: #fff7f5;
}
.coupon-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: #59524d;
  font-weight: 500;
}
.coupon-title i {
  color: #df6078;
  font-size: 15px;
}
.coupon-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 8px;
}
.coupon-row input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid #e9e1dd;
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
  font-size: 14px;
}
.coupon-row button {
  height: 40px;
  border: none;
  border-radius: 8px;
  background: #e36a84;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
}
.coupon-row button:hover {
  background: #d95875;
}
/* =========================================================
   CUSTOMER
========================================================= */
.customer-info {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eee9e5;
}
.customer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #514a46;
}
.customer-title i {
  color: #df6078;
  font-size: 15px;
}
.customer-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 13.5px;
}
.customer-row span {
  color: #a09a95;
}
.customer-row strong {
  color: #68615c;
  font-weight: 400;
  line-height: 1.45;
}
/* =========================================================
   DELIVERY NOTE
========================================================= */
.delivery-note {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  background: #fff1f0;
}
.delivery-note-icon {
  color: #df6078;
  font-size: 16px;
  margin-top: 2px;
}
.delivery-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13.5px;
  color: #55504b;
  font-weight: 600;
}
.delivery-note p {
  margin: 0;
  font-size: 13px;
  color: #96908b;
  line-height: 1.45;
}
/* =========================================================
   SUPPORT
========================================================= */
.support-card {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
}
.support-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff0f2;
  color: #df6078;
  font-size: 15px;
}
.support-content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: #514b47;
  font-weight: 600;
}
.support-content p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #99928d;
}
.support-content a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid #efc3cb;
  border-radius: 20px;
  color: #df6078;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: 0.2s ease;
}
.support-content a:hover {
  background: #fff3f4;
}
/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px) {
  .order-page {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .order-sidebar {
    order: 2;
  }
}
@media (max-width: 600px) {
  .order-page {
    padding: 14px 14px 36px;
  }
  .order-search {
    padding: 16px;
  }
  .search-title {
    font-size: 16px;
  }
  .search-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .check-order-btn {
    width: 100%;
    height: 44px;
  }
  .order-detail {
    padding: 16px;
  }
  .order-header h2 {
    font-size: 15px;
  }
  .order-header p {
    font-size: 12.5px;
  }
  .order-status {
    font-size: 12.5px;
    padding: 6px 12px;
  }
  .order-timeline {
    padding: 20px 4px 14px;
    overflow-x: auto;
  }
  .timeline-item strong {
    font-size: 12px;
  }
  .timeline-item span {
    font-size: 11px;
  }
  .order-note {
    font-size: 13px;
    min-height: 42px;
  }
  .product-section-header h3 {
    font-size: 14px;
  }
  .order-product-info h4 {
    font-size: 13.5px;
  }
  .order-product-info p {
    font-size: 12.5px;
  }
  .order-product-price {
    font-size: 14px;
  }
  .summary-card {
    padding: 16px;
  }
  .summary-card > h3 {
    font-size: 15px;
  }
  .summary-row {
    font-size: 13.5px;
  }
  .summary-total strong {
    font-size: 17px;
  }
  .customer-row {
    grid-template-columns: 100px 1fr;
    font-size: 13px;
  }
  .support-content a {
    font-size: 13px;
  }
}
/* =========================================================
                    FONT AWESOME
========================================================= */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css");
/* =========================================================
                    RESET
========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  background: #f7f4ef;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #45423f;
}
/* =========================================================
                MAIN WRAPPER – 3 THẺ STATUS ĐẶC BIỆT
========================================================= */
.order-status-wrapper {
  width: 100%;
  margin: 0 0 14px;
  display: none; /* Mặc định ẨN */
  justify-content: stretch;
}

/* 3 thẻ mặc định ẨN */
#delivered-card,
#cancelled-card,
#empty-card {
  display: none;
}

.order-status-card {
  width: 100%;
  position: relative;
  min-height: 245px;
  background: #fff;
  border: 1px solid #eee9e5;
  border-radius: 12px;
  overflow: hidden;
  padding: 20px 22px;
  box-shadow: 0 2px 14px rgba(80, 60, 50, 0.03);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.order-status-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(80, 60, 50, 0.06);
}
/* =========================================================
                CARD MAIN
========================================================= */
.order-card-main {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  min-height: 165px;
}
/* =========================================================
                    STATUS
========================================================= */
.order-status-card .order-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.status-icon {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
}
.order-status-card .order-status.delivered .status-icon,
.delivered .status-icon {
  background: #5bb39b;
}
.order-status-card .order-status.delivered,
.delivered {
  color: #55a78f;
}
.order-status-card .order-status.cancelled .status-icon,
.cancelled .status-icon {
  background: #ed6681;
}
.order-status-card .order-status.cancelled,
.cancelled {
  color: #e55773;
}
/* =========================================================
                    ORDER INFO
========================================================= */
.order-code {
  font-size: 12px;
  color: #6c6862;
  margin-bottom: 5px;
}
.order-code strong {
  font-weight: 600;
  color: #55514c;
}
.order-date {
  font-size: 12px;
  color: #8b857e;
}
/* =========================================================
                ILLUSTRATION
========================================================= */
.order-illustration {
  height: 54px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  color: #9cc9bb;
  font-size: 35px;
  opacity: 0.65;
}
.cancelled-icon {
  color: #f2a9b8;
}
/* =========================================================
                    TEXT
========================================================= */
.order-info h3 {
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: #4c4844;
  margin-top: 3px;
  margin-bottom: 5px;
}
.order-info p {
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: #88827b;
  padding: 0 4px;
}
/* =========================================================
                PROGRESS BOX
========================================================= */
.order-progress {
  border: 1px solid #eee8e1;
  border-radius: 7px;
  padding: 10px 9px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
}
.progress-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #87817a;
}
.progress-item span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  font-size: 9px;
  background: #e9e7e1;
  color: white;
}
.progress-item.active span {
  background: #58a991;
}
.cancelled-progress .progress-item.active span {
  background: #eb6680;
}
.cancelled-progress .progress-item.failed span {
  background: #eb6680;
}
.progress-item label {
  white-space: nowrap;
}
/* =========================================================
                    ACTIONS
========================================================= */
.order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.order-actions button {
  height: 36px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
  border: none;
}
.btn-primary {
  border: 1px solid #e45b76;
  background: #e85d79;
  color: white;
}
.btn-primary:hover {
  background: #d94c68;
}
.btn-outline {
  border: 1px solid #f0cdd4;
  background: #fffdfa;
  color: #dc6177;
}
.btn-outline:hover {
  background: #fff2f5;
}
/* =========================================================
                EMPTY CARD
========================================================= */
.empty-card {
  min-height: 245px;
  display: none; /* Mặc định ẩn, JS sẽ set flex khi cần */
  justify-content: center;
  align-items: center;
  padding: 20px;
}
/* =========================================================
                EMPTY CONTENT
========================================================= */
.empty-content {
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 2;
}
.empty-title {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #4e4b47;
  margin-bottom: 16px;
}
.empty-title i {
  font-size: 13px;
}
/* =========================================================
                    SEARCH ICON
========================================================= */
.search-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #f2ccd4;
  margin: 0 auto 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #e7657d;
  font-size: 18px;
  background: #fffafa;
}
.empty-content h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #4c4844;
}
.empty-content p {
  max-width: 280px;
  margin: 0 auto 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #8a847d;
}
/* =========================================================
                    RETRY
========================================================= */
.retry-button {
  width: 100px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #f0bdc9;
  background: #fff0f3;
  color: #df6279;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.retry-button:hover {
  background: #ffe4ea;
}
/* =========================================================
                DECORATION
========================================================= */
.empty-decoration {
  position: absolute;
  color: #e8b9a7;
  opacity: 0.6;
  pointer-events: none;
}
.empty-decoration.left {
  left: 15px;
  bottom: 5px;
  font-size: 50px;
  transform: rotate(-25deg);
}
.empty-decoration.right {
  right: 15px;
  top: 25px;
  font-size: 45px;
  transform: rotate(20deg);
}
/* =========================================================
   CANCELLED BUTTON
========================================================= */
.cancelled-button {
  background: #e85d79;
}
.cancelled-button:hover {
  background: #d94c68;
}
/* =========================================================
                    TABLET / MOBILE – status cards
========================================================= */
@media (max-width: 620px) {
  .order-status-wrapper {
    width: 100%;
    margin: 0 0 12px;
  }
  .order-status-card {
    min-height: 230px;
    padding: 16px;
  }
  .order-card-main {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .empty-card {
    min-height: 230px;
  }
  .order-info h3 {
    font-size: 14px;
  }
  .order-info p {
    font-size: 12px;
  }
  .progress-item {
    font-size: 11px;
  }
  .order-actions button {
    font-size: 12px;
    height: 34px;
  }
}
/* =========================================================
                SMALL MOBILE
========================================================= */
@media (max-width: 400px) {
  .order-status-card {
    padding: 14px;
  }
  .order-progress {
    padding: 8px 6px;
  }
  .progress-item {
    gap: 5px;
    font-size: 10px;
  }
  .progress-item span {
    width: 14px;
    height: 14px;
    font-size: 8px;
  }
}