body { min-height: 100vh; background: #eef1ef; }

.order-page {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 18px 108px;
  background: #fafbfa;
}

.order-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  height: 66px;
}

.order-header a { color: #26342d; font-size: 32px; line-height: 1; }
.order-header h1 { margin: 0; color: #17241e; font-size: 19px; text-align: center; letter-spacing: -.04em; }

.order-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 15px;
  border: 1px solid #e3e8e5;
  border-radius: 14px;
  background: #fff;
}

.order-search span { position: relative; width: 16px; height: 16px; border: 1.7px solid #85908a; border-radius: 50%; }
.order-search span::after { position: absolute; right: -4px; bottom: -3px; width: 6px; height: 1.7px; transform: rotate(45deg); background: #85908a; content: ""; }
.order-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #26342d; font: inherit; font-size: 12px; }
.order-search input::placeholder { color: #a4aca8; }

.order-filters { display: flex; gap: 22px; margin-top: 18px; border-bottom: 1px solid #e5e9e7; }
.order-filters button { position: relative; padding: 0 1px 12px; color: #8a938e; font-size: 12px; font-weight: 700; }
.order-filters button.is-active { color: #18261f; }
.order-filters button.is-active::after { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: #18261f; content: ""; }

.order-results { display: grid; gap: 13px; padding-top: 17px; }
.order-card { overflow: hidden; border: 1px solid #e4e9e6; border-radius: 17px; background: #fff; box-shadow: 0 5px 17px rgba(31, 54, 43, .035); }
.order-card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 15px; border-bottom: 1px solid #eef1ef; }
.order-card-head time { color: #2e3b35; font-size: 12px; font-weight: 800; }
.order-card-head button { color: #78827d; font-size: 10px; font-weight: 650; }
.order-card-head button b { margin-left: 3px; font-size: 15px; font-weight: 400; }
.order-card-body { padding: 15px; }

.order-state { margin-bottom: 12px; color: #52615a; font-size: 11px; font-weight: 800; }
.order-state.available { color: #126a4b; }
.order-state.expired { color: #9a594e; }
.order-state.muted { color: #858e89; }

.order-product { display: flex; gap: 12px; }
.order-product img { width: 74px; height: 74px; flex: 0 0 74px; border-radius: 11px; object-fit: cover; background: #eef2ef; }
.order-product > div { display: flex; min-width: 0; flex-direction: column; padding: 2px 0; }
.order-product strong { overflow: hidden; color: #25322c; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.order-product span { margin-top: 7px; color: #8b9490; font-size: 10px; }
.order-product b { margin-top: auto; color: #17241e; font-size: 14px; font-weight: 800; }

.order-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 14px; }
.order-actions > * { display: grid; place-items: center; min-height: 39px; border: 1px solid #dfe5e2; border-radius: 10px; color: #46534d; font-size: 11px; font-weight: 750; }
.order-actions button:only-child { grid-column: 1 / -1; }
.order-actions a { color: #176b4e; border-color: #cfe0d8; background: #f6faf8; }

.order-actions.has-three-actions {
  grid-template-columns: repeat(3, 1fr);
}

.order-actions .customer-cancel-button {
  color: #7b514a;
  border-color: #e5d7d4;
  background: #fff;
}

.detail-cancel-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
  padding: 12px 13px;
  border: 1px solid #e6eae8;
  border-radius: 11px;
  background: #fafbfa;
}

.detail-cancel-guide span {
  color: #747e79;
  font-size: 11px;
}

.detail-cancel-guide button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #e2d3d0;
  border-radius: 8px;
  background: #fff;
  color: #7b514a;
  font-size: 11px;
  font-weight: 750;
}

.order-cancel-confirm {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.order-cancel-confirm.is-visible {
  display: flex;
}

.order-cancel-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 28, 24, .42);
}

.order-cancel-confirm section {
  position: relative;
  width: min(100%, 330px);
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(18, 28, 23, .18);
  text-align: center;
}

.order-cancel-confirm h2 {
  margin: 0;
  color: #202b26;
  font-size: 18px;
}

.order-cancel-confirm p {
  margin: 9px 0 19px;
  color: #77817c;
  font-size: 12px;
  line-height: 1.55;
}

.order-cancel-confirm section > div {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
}

.order-cancel-confirm section button {
  min-height: 43px;
  border: 1px solid #dfe4e1;
  border-radius: 10px;
  background: #fff;
  color: #58635e;
  font-size: 12px;
  font-weight: 750;
}

.order-cancel-confirm section button.is-danger {
  border-color: #92564c;
  background: #92564c;
  color: #fff;
}

.order-empty { padding: 70px 0; text-align: center; }
.order-empty strong { color: #52605a; font-size: 13px; }
.order-empty p { margin: 7px 0 0; color: #99a19d; font-size: 10px; }

.order-detail { position: fixed; inset: 0; z-index: 70; display: none; align-items: flex-end; justify-content: center; }
.order-detail.is-visible { display: flex; }
.order-detail-backdrop { position: absolute; inset: 0; width: 100%; background: rgba(15, 27, 22, .42); }
.order-detail-panel { position: relative; z-index: 1; width: min(100%, 430px); max-height: 84vh; padding: 20px 18px 28px; overflow-y: auto; border-radius: 25px 25px 0 0; background: #fff; box-shadow: 0 -20px 50px rgba(18, 38, 29, .18); }
.order-detail-panel > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.order-detail-panel h2 { margin: 0; color: #17241e; font-size: 19px; letter-spacing: -.04em; }
.order-detail-panel header button { width: 35px; height: 35px; border-radius: 50%; background: #f1f4f2; color: #65716b; font-size: 21px; }
.detail-order-number { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid #edf0ee; }
.detail-order-number span { font-size: 12px; font-weight: 800; }
.detail-order-number small { color: #9aa29e; font-size: 9px; }
.detail-product { padding: 17px 0; border-bottom: 8px solid #f5f7f6; }
.detail-product > div:last-child { display: flex; gap: 12px; }
.detail-product img { width: 72px; height: 72px; border-radius: 11px; object-fit: cover; }
.detail-product img + div { display: flex; flex-direction: column; padding: 2px 0; }
.detail-product strong { font-size: 13px; }
.detail-product span { margin-top: 6px; color: #909894; font-size: 10px; }
.detail-product b { margin-top: auto; font-size: 14px; }
.detail-section { padding-top: 18px; }
.detail-section h3 { margin: 0 0 14px; font-size: 15px; }
.detail-section dl { margin: 0; }
.detail-section dl div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; font-size: 11px; }
.detail-section dt { color: #838d88; }
.detail-section dd { margin: 0; color: #28362f; text-align: right; }
.detail-bank-row dd { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.detail-bank-row dd span { font-weight: 750; }
.detail-bank-row button {
  min-width: 37px;
  height: 25px;
  padding: 0 8px;
  border: 1px solid #d7e2dc;
  border-radius: 7px;
  background: #f3f7f5;
  color: #315f49;
  font-size: 9px;
  font-weight: 750;
}
.detail-primary { display: grid; place-items: center; min-height: 45px; margin-top: 18px; border-radius: 12px; background: #126a4b; color: #fff; font-size: 12px; font-weight: 800; }

.order-toast { position: fixed; left: 50%; bottom: 92px; z-index: 80; padding: 11px 15px; transform: translate(-50%, 12px); border-radius: 12px; background: #1e2a24; color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transition: .18s ease; }

.order-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
