button, input { font: inherit; }
.bar .filter-btn {
  flex: none; height: 36px; max-width: 140px; padding: 0 12px; border: 0; border-radius: 10px;
  background: color-mix(in srgb, var(--teal) 10%, #fff); color: var(--teal);
  font-weight: 700; font-size: 13px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.page { max-width: 720px; margin: 0 auto; padding: 8px 0 24px; }
.state {
  margin: 24px 16px; padding: 28px 20px; border-radius: 16px; background: #fff;
  text-align: center; border: 1px solid var(--line);
}
.state[hidden], #orders-list[hidden] { display: none; }
.ocard {
  display: block; width: 100%; margin: 0 0 10px; padding: 14px;
  border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: #fff; text-align: left; cursor: pointer; color: inherit;
}
@media (min-width: 720px) {
  .page { padding: 8px 8px 24px; }
  .ocard { border-radius: 14px; border: 1px solid var(--line); }
}
.ocard-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.ocard-head .partner {
  flex: 1; min-width: 0; font-weight: 800; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge {
  flex: none; height: 24px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; display: inline-flex; align-items: center;
  background: #EEF2F1; color: #616161;
}
.badge.pending { background: #FFF4E5; color: #F2994A; }
.badge.confirmed { background: #E8F5E9; color: #219653; }
.badge.awaiting_pickup { background: #FFF0E0; color: #F2994A; }
.badge.shipping { background: #E3F2FD; color: #2D9CDB; }
.badge.completed { background: #E8F8EF; color: #27AE60; }
.badge.cancelled, .badge.failed { background: #FDECEA; color: #EB5757; }
.oline {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center;
  margin-top: 8px;
}
.oline img, .oline .ph {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #E7EEEC;
}
.oline .ph { display: grid; place-items: center; font-size: 18px; }
.oline .meta { min-width: 0; }
.oline .name {
  font-weight: 700; font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.oline .qty { color: var(--muted); font-size: 12px; margin-top: 2px; }
.oline .price { font-weight: 800; font-size: 13px; color: var(--orange); white-space: nowrap; }
.ocard-more { margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.ocard-foot {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline;
  justify-content: space-between;
}
.ocard-foot .ship { color: var(--muted); font-size: 12px; }
.ocard-foot .total { font-weight: 800; font-size: 14px; }
.ocard-track { margin-top: 6px; color: var(--teal); font-size: 12px; font-weight: 600; }

.sheet {
  position: fixed; inset: 0; z-index: 40; display: none;
  align-items: flex-end; justify-content: center;
}
.sheet.is-open { display: flex; }
.sheet-backdrop {
  position: absolute; inset: 0; border: 0; background: rgba(16,24,23,.45); cursor: pointer;
}
.sheet-panel {
  position: relative; z-index: 1; width: min(560px, 100%);
  max-height: min(88vh, 820px); overflow: auto;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0; background: #fff;
  box-shadow: 0 -8px 28px rgba(16,24,23,.12);
}
.sheet-handle {
  display: block; width: 36px; height: 4px; margin: 4px auto 12px;
  border-radius: 999px; background: rgba(28,36,35,.16);
}
.sheet-panel h2 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.sheet-sub { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.sheet-sec { margin: 0 0 14px; }
.sheet-sec h3 {
  margin: 0 0 8px; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.filter-opt, .detail-line {
  display: flex; gap: 10px; align-items: flex-start; width: 100%;
  padding: 12px; margin: 0 0 8px; border: 1.5px solid #E3EBE9;
  border-radius: 12px; background: #fff; text-align: left; cursor: pointer; color: inherit;
}
.filter-opt.on { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 8%, #fff); }
.filter-opt strong { display: block; font-size: 14px; }
.filter-opt span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.detail-line { cursor: default; align-items: center; }
.detail-line img, .detail-line .ph {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #E7EEEC; flex: none;
}
.detail-line .ph { display: grid; place-items: center; }
.detail-kv { display: grid; gap: 6px; font-size: 13px; }
.detail-kv div { display: flex; justify-content: space-between; gap: 12px; }
.detail-kv .muted { color: var(--muted); }
.detail-kv .sum { font-weight: 800; font-size: 15px; }
.detail-actions {
  display: flex; flex-direction: column; gap: 8px; margin-top: 8px;
}
.detail-actions button {
  height: 46px; border: 0; border-radius: 12px; font-weight: 800; cursor: pointer;
}
.detail-actions .primary { background: var(--teal); color: #fff; }
.detail-actions .danger { background: #FDECEA; color: #B42318; }
.detail-actions button:disabled { opacity: .55; cursor: default; }
.copy-btn {
  border: 0; background: transparent; color: var(--teal);
  font-weight: 700; font-size: 12px; cursor: pointer; padding: 0;
}
.detail-actions .outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff; color: var(--teal); border: 1px solid rgba(28,36,35,.2);
}
.detail-actions .outline svg { width: 18px; height: 18px; }
.rv-trail { flex: none; }
.rv-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none;
  color: var(--orange); font-weight: 800; font-size: 13px; cursor: pointer;
}
.rv-btn svg { width: 18px; height: 18px; }
.rv-done { font-size: 12px; font-weight: 700; color: rgba(0,0,0,.45); }
.rv-spin, .lb-spin {
  display: inline-block; width: 18px; height: 18px; border-radius: 999px;
  border: 2px solid rgba(11,110,110,.2); border-top-color: var(--teal); animation: rv-spin .8s linear infinite;
}
@keyframes rv-spin { to { transform: rotate(360deg); } }
.fs-page {
  position: fixed; inset: 0; z-index: 60; overflow: auto; background: var(--bg);
  -webkit-overflow-scrolling: touch;
}
.fs-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 4px; min-height: 52px;
  padding: 6px 8px; background: rgba(232,238,237,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.fs-bar strong { flex: 1; font-size: 17px; font-weight: 800; padding: 0 4px; }
.fs-bar button {
  width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.fs-bar button svg { width: 22px; height: 22px; }
.fs-bar button:disabled { opacity: .4; }
.rv-body { max-width: 560px; margin: 0 auto; padding: 16px 16px 32px; }
.rv-item { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: #fff; }
.rv-item img, .rv-item .ph { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: #E7EEEC; flex: none; display: grid; place-items: center; }
.rv-item strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.3; }
.rv-item .q { margin-top: 6px; font-size: 13px; color: var(--muted); }
.rv-item .s { margin-top: 4px; font-size: 12px; color: rgba(28,36,35,.45); }
.rv-h { margin: 20px 0 12px; font-size: 16px; font-weight: 800; }
.rv-stars { display: flex; justify-content: center; gap: 4px; }
.rv-stars button { width: 52px; height: 52px; border: 0; background: none; cursor: pointer; color: rgba(0,0,0,.26); display: grid; place-items: center; }
.rv-stars button.on { color: #F2C94C; }
.rv-stars svg { width: 36px; height: 36px; }
.rv-mood { text-align: center; font-weight: 700; color: rgba(28,36,35,.7); }
.rv-text { position: relative; margin-top: 20px; }
.rv-text textarea {
  width: 100%; min-height: 120px; padding: 12px 14px; border: 0; border-radius: 12px; background: #fff;
  font: inherit; resize: vertical; outline: none;
}
.rv-text textarea:focus { box-shadow: inset 0 0 0 1.5px var(--teal); }
.rv-count { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }
.rv-sub { margin: 4px 0 10px; font-size: 12px; color: rgba(28,36,35,.5); }
.rv-h.media { margin: 8px 0 0; font-size: 15px; }
.rv-seg { display: flex; border: 1px solid rgba(28,36,35,.3); border-radius: 999px; overflow: hidden; }
.rv-seg button {
  flex: 1; height: 40px; border: 0; background: transparent; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink);
}
.rv-seg button + button { border-left: 1px solid rgba(28,36,35,.3); }
.rv-seg button.on { background: color-mix(in srgb, var(--teal) 16%, #fff); color: #0A4F4F; }
.rv-seg svg { width: 18px; height: 18px; }
.rv-strip { display: flex; gap: 10px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
.rv-tile { position: relative; flex: none; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: #E7EEEC; }
.rv-tile img, .rv-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-tile .play { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.8); pointer-events: none; }
.rv-tile .play svg { width: 28px; height: 28px; }
.rv-rm {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0;
}
.rv-rm svg { width: 14px; height: 14px; }
.rv-add {
  flex: none; width: 96px; height: 96px; border-radius: 12px; border: 1px solid var(--line); background: #E7EEEC;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--teal); font-size: 12px; font-weight: 700; cursor: pointer;
}
.rv-add svg { width: 26px; height: 26px; }
.rv-add:disabled { color: rgba(28,36,35,.35); cursor: default; }
.rv-submit {
  width: 100%; height: 48px; margin-top: 20px; border: 0; border-radius: 999px; background: var(--teal); color: #fff;
  font-weight: 700; cursor: pointer; display: grid; place-items: center;
}
.rv-submit:disabled { opacity: .6; cursor: default; }
.rv-submit .rv-spin { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.lb-page { background: #E8EEEC; padding-bottom: 88px; }
.lb-wrap { max-width: 520px; margin: 16px auto 24px; padding: 0 16px; }
.lb-card { padding: 20px 20px 24px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); color: #000; }
.lb-head { display: flex; align-items: flex-start; gap: 12px; }
.lb-head > div:first-child { flex: 1; }
.lb-brand { font-size: 18px; font-weight: 900; letter-spacing: .4px; }
.lb-kind { margin-top: 2px; font-size: 12px; font-weight: 600; color: rgba(0,0,0,.55); }
.lb-status { text-align: right; font-size: 12px; font-weight: 800; }
.lb-status span { display: block; font-size: 11px; font-weight: 400; color: rgba(0,0,0,.5); }
.lb-hr { height: 1px; margin: 14px 0; background: rgba(0,0,0,.12); }
.lb-box { padding: 12px; border: 1.4px solid rgba(0,0,0,.87); }
.lb-cap { font-size: 11px; font-weight: 800; color: rgba(0,0,0,.45); letter-spacing: .6px; }
.lb-carrier { margin: 4px 0 12px; font-size: 16px; font-weight: 900; }
.lb-code { margin-top: 6px; text-align: center; font: 900 28px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; word-break: break-all; }
.lb-note { margin-top: 4px; text-align: center; font-size: 12px; font-weight: 600; color: rgba(0,0,0,.55); }
.lb-sec { margin-top: 16px; }
.lb-sec + .lb-sec { margin-top: 14px; }
.lb-sec .lb-cap { margin-bottom: 6px; }
.lb-name { font-size: 16px; font-weight: 800; }
.lb-phone { font-size: 14px; font-weight: 700; }
.lb-addr { margin-top: 4px; font-size: 13px; line-height: 1.35; }
.lb-partner { font-size: 14px; font-weight: 700; }
.lb-line { display: flex; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.lb-line span { flex: 1; }
.lb-line b { font-weight: 800; }
.lb-kv { display: flex; padding: 2px 0; font-size: 13px; }
.lb-kv span { flex: 1; }
.lb-kv b { font-weight: 800; }
.lb-kv.em span { font-weight: 800; }
.lb-kv.em b { font-size: 15px; }
.lb-id { margin-top: 8px; font-size: 11px; color: rgba(0,0,0,.45); }
.lb-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.1);
}
.lb-foot button {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 520px; height: 48px; margin: 0 auto;
  border: 0; border-radius: 999px; background: var(--teal); color: #fff; font-weight: 700; cursor: pointer;
}
.lb-foot svg { width: 20px; height: 20px; }
@media print {
  body.lb-printing > *:not(.lb-page) { display: none !important; }
  body.lb-printing { background: #fff; padding: 0; }
  body.lb-printing .lb-page { position: static; overflow: visible; background: #fff; padding: 0; }
  body.lb-printing .fs-bar, body.lb-printing .lb-foot { display: none !important; }
  body.lb-printing .lb-wrap { margin: 0 auto; }
  body.lb-printing .lb-card { box-shadow: none; }
}

