.uc-orders {
  --order-space: 20px;
  --order-new-bg: #6d28d9; --order-new-ink: #ffffff;
  --order-processing-bg: #fef3c7; --order-processing-ink: #92400e;
  --order-shipping-bg: #dbeafe; --order-shipping-ink: #1d4ed8;
  --order-pickup-bg: #ccfbf1; --order-pickup-ink: #115e59;
  --order-delivered-bg: #dcfce7; --order-delivered-ink: #166534;
  --order-cancelled-bg: #fee2e2; --order-cancelled-ink: #b91c1c;
  --order-returned-bg: #ffedd5; --order-returned-ink: #9a3412;
  --order-unknown-bg: #eef2f6; --order-unknown-ink: #475569;
  display: grid; gap: var(--order-space); color: var(--uc-ink);
}
:root[data-theme="dark"] .uc-orders {
  --order-new-bg: #c4b5fd; --order-new-ink: #2e1065;
  --order-processing-bg: #433419; --order-processing-ink: #fde68a;
  --order-shipping-bg: #172f50; --order-shipping-ink: #9cc6ff;
  --order-pickup-bg: #153a38; --order-pickup-ink: #99f6e4;
  --order-delivered-bg: #143a2a; --order-delivered-ink: #86efac;
  --order-cancelled-bg: #4c2028; --order-cancelled-ink: #fda4af;
  --order-returned-bg: #472b1d; --order-returned-ink: #fdba74;
  --order-unknown-bg: #343644; --order-unknown-ink: #d6d9e6;
}
.uc-orders :is(h1,h2,h3,h4) { color:var(--uc-ink); }
.uc-orders-heading,.uc-order-section-heading,.uc-orders-pagination,.uc-orders-pagination>div { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.uc-orders-heading h1 { margin:0; font-size:28px; font-weight:650; letter-spacing:-.02em; }
.uc-orders-heading p { margin:6px 0 0; color:var(--uc-muted); }
.uc-orders-heading p span { display:block; font-size:12px; margin-top:4px; }
.uc-orders-heading>div:last-child,.uc-order-detail-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.uc-orders input,.uc-orders select { min-height:38px; min-width:0; max-width:100%; border:1px solid var(--uc-line); border-radius:8px; padding:8px 10px; background:var(--uc-surface); color:var(--uc-ink); font:inherit; font-size:13px; }
.uc-orders input::placeholder { color:var(--uc-placeholder); }
.uc-orders :focus-visible { outline:2px solid var(--uc-violet); outline-offset:3px; }
.uc-orders ::selection { background:var(--uc-violet-soft); color:var(--uc-ink); }
.uc-orders-filters { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.uc-orders-filters label { margin:0; }
.uc-orders-search { flex:1 1 260px; }
.uc-orders-search input { width:100%; }
.uc-orders-date { display:flex; align-items:center; gap:6px; color:var(--uc-muted); font-size:12px; }
.uc-orders-table-wrap { overflow:auto; background:var(--uc-surface); border:1px solid var(--uc-line); border-radius:12px; }
.uc-orders-table { width:100%; min-width:940px; border-collapse:collapse; font-size:13px; }
.uc-orders-table th { background:var(--uc-surface-alt); text-align:left; color:var(--uc-muted); font-size:12px; font-weight:600; padding:12px 14px; }
.uc-orders-table td { padding:15px 14px; border-top:1px solid var(--uc-line); vertical-align:middle; }
.uc-orders-table tr[data-op-order] { cursor:pointer; }
.uc-orders-table tr[data-op-order]:hover { background:var(--uc-surface-alt); }
.uc-orders-table small,.uc-orders-table time { display:block; color:var(--uc-muted); font-size:11px; }
.uc-orders-table time { margin-top:3px; font-variant-numeric:tabular-nums; }
.uc-orders-number { border:0; padding:4px 0; background:none; color:var(--uc-violet-strong); font:inherit; font-weight:600; text-align:left; max-width:230px; overflow-wrap:anywhere; }
.uc-orders-item-preview { display:flex; gap:10px; align-items:center; max-width:330px; }
.uc-orders-item-preview img,.uc-order-product img { object-fit:contain; border-radius:6px; background:var(--uc-surface); flex-shrink:0; }
.uc-orders-item-preview strong { font-weight:500; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.uc-orders-item-preview small { margin-top:4px; }
.uc-orders-money { font-variant-numeric:tabular-nums; white-space:nowrap; }
.uc-order-status { display:inline-block; padding:5px 10px; background:var(--order-status-bg,var(--order-unknown-bg)); color:var(--order-status-ink,var(--order-unknown-ink)); border:1px solid color-mix(in srgb,currentColor 22%,transparent); border-radius:6px; font-size:12px; line-height:18px; font-weight:650; white-space:nowrap; }
.uc-order-status.is-new { --order-status-bg:var(--order-new-bg); --order-status-ink:var(--order-new-ink); }
.uc-order-status.is-processing { --order-status-bg:var(--order-processing-bg); --order-status-ink:var(--order-processing-ink); }
.uc-order-status.is-shipping { --order-status-bg:var(--order-shipping-bg); --order-status-ink:var(--order-shipping-ink); }
.uc-order-status.is-pickup { --order-status-bg:var(--order-pickup-bg); --order-status-ink:var(--order-pickup-ink); }
.uc-order-status.is-delivered { --order-status-bg:var(--order-delivered-bg); --order-status-ink:var(--order-delivered-ink); }
.uc-order-status.is-cancelled { --order-status-bg:var(--order-cancelled-bg); --order-status-ink:var(--order-cancelled-ink); }
.uc-order-status.is-returned { --order-status-bg:var(--order-returned-bg); --order-status-ink:var(--order-returned-ink); }
.uc-orders-handled { margin-top:5px; }
.uc-orders-table .uc-order-watch-mark { display:block; border:0; background:none; color:var(--uc-muted); padding:4px 0; margin-top:2px; font:inherit; font-size:11px; line-height:18px; text-decoration:underline dotted; text-underline-offset:3px; cursor:pointer; }
.uc-orders-table .uc-order-watch-mark:hover,.uc-orders-table .uc-order-watch-mark:focus-visible { color:var(--uc-violet-strong); }
.uc-order-watch-tooltip { position:fixed; inset:auto; margin:0; box-sizing:border-box; width:320px; max-width:calc(100vw - 24px); max-height:min(320px,50dvh); overflow:auto; padding:14px 16px; border:1px solid var(--uc-line); border-radius:8px; background:var(--uc-surface); color:var(--uc-ink); font-size:13px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; scrollbar-color:var(--uc-scroll-thumb) transparent; }
.uc-orders-filter-progress { color:var(--uc-muted); font-size:12px; }
.uc-orders-filters button:disabled { opacity:.5; cursor:default; }
@media(pointer:coarse) { .uc-orders-table .uc-order-watch-mark { min-height:44px; } }
.uc-order-watch { padding-bottom:18px; border-bottom:1px solid var(--uc-line); }
.uc-orders .uc-order-watch h3,.uc-orders .uc-order-history h3 { margin:0 0 8px; font-size:18px; line-height:1.4; font-weight:650; }
.uc-orders .uc-order-history h4 { margin:18px 0 10px; font-size:14px; line-height:1.4; font-weight:650; overflow-wrap:anywhere; }
.uc-order-watch p,.uc-order-history p { color:var(--uc-muted); font-size:13px; line-height:1.5; margin:0 0 12px; }
.uc-order-watch form { display:grid; gap:9px; }
.uc-order-watch label { color:var(--uc-ink); font-size:13px; }
.uc-order-watch-toggle { display:flex; align-items:center; gap:8px; }
.uc-order-watch-toggle input { min-height:18px; width:18px; height:18px; accent-color:var(--uc-violet); }
.uc-order-watch textarea { box-sizing:border-box; width:100%; resize:vertical; min-height:80px; max-height:240px; padding:10px; border:1px solid var(--uc-line); border-radius:8px; background:var(--uc-surface); color:var(--uc-ink); font:inherit; font-size:13px; line-height:1.5; caret-color:var(--uc-violet); }
.uc-order-watch textarea::placeholder { color:var(--uc-placeholder); }
.uc-order-watch-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.uc-order-watch-draft { font-size:12px; color:var(--uc-muted); }
.uc-order-history { margin-top:24px; }
.uc-order-history-list { list-style:none; padding:0; margin:0; }
.uc-order-history-list li { display:grid; grid-template-columns:130px minmax(0,1fr); gap:14px; padding:12px 0; border-top:1px solid var(--uc-line); }
.uc-order-history-list time { color:var(--uc-muted); font-size:12px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.uc-order-history-list small { display:block; margin-top:5px; color:var(--uc-muted); font-size:12px; overflow-wrap:anywhere; }
.uc-order-history-list strong { font-size:13px; overflow-wrap:anywhere; }
@media(max-width:540px) { .uc-order-history-list li { grid-template-columns:1fr; gap:6px; } .uc-order-watch-actions .uc-button { width:100%; white-space:normal; } }
.uc-orders-pagination { color:var(--uc-muted); font-size:13px; }
.uc-orders-empty { padding:70px 24px; text-align:center; border:1px solid var(--uc-line); border-radius:12px; background:var(--uc-surface); }
.uc-orders-empty h2 { font-size:20px; margin:0 0 10px; }
.uc-orders-empty p { color:var(--uc-muted); max-width:520px; margin:0 auto 20px; }
.uc-orders-error { padding:14px 16px; border:1px solid var(--uc-danger); border-radius:8px; color:var(--uc-danger); }
.uc-orders-sync { color:var(--uc-muted); font-size:12px; }
.uc-orders-sync summary,.uc-order-source summary,.uc-orders-settings summary { cursor:pointer; padding:6px 0; }
.uc-orders-sync>div { background:var(--uc-surface); border:1px solid var(--uc-line); border-radius:10px; padding:0 16px; margin-top:10px; }
.uc-orders-sync section { display:flex; gap:12px; align-items:center; flex-wrap:wrap; padding:14px 0; border-bottom:1px solid var(--uc-line); }
.uc-orders-sync section:last-child { border-bottom:0; }
.uc-orders-sync section>div:first-child { flex:1 1 240px; }
.uc-orders-sync strong,.uc-orders-sync span { display:block; }
.uc-orders-sync strong { color:var(--uc-ink); margin-bottom:4px; }
.uc-orders-hook { flex-basis:100%; }
.uc-orders-hook input { width:min(100%,650px); margin-right:8px; }
.uc-order-drawer { position:fixed; inset:0 0 0 auto; margin:0; width:min(760px,100%); height:100dvh; max-width:100%; max-height:100dvh; border:0; border-left:1px solid var(--uc-line); border-radius:0; padding:0; background:var(--uc-surface); color:var(--uc-ink); overflow:hidden; }
.uc-order-drawer[open] { display:flex; flex-direction:column; }
.uc-order-drawer::backdrop { background:rgb(14 16 30 / 35%); }
.uc-order-drawer>header { padding:22px 24px; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; border-bottom:1px solid var(--uc-line); flex-shrink:0; }
.uc-order-drawer>header>div { min-width:0; }
.uc-order-drawer>header>button { flex-shrink:0; white-space:nowrap; }
.uc-order-drawer h2 { font-size:20px; margin:4px 0 0; overflow-wrap:anywhere; }
.uc-order-title { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.uc-order-title h2 { min-width:0; }
.uc-order-marketplace-link { display:inline-flex; align-items:center; gap:6px; font-size:12px; }
.uc-order-marketplace-link svg { width:16px; height:16px; flex-shrink:0; }
.uc-order-drawer small { color:var(--uc-muted); font-size:12px; }
.uc-order-drawer-body { padding:24px; overflow:auto; overscroll-behavior:contain; scrollbar-color:var(--uc-scroll-thumb) transparent; }
.uc-order-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:24px 0; padding-bottom:22px; border-bottom:1px solid var(--uc-line); }
.uc-order-summary dt,.uc-order-delivery dt { color:var(--uc-muted); font-size:12px; font-weight:400; }
.uc-order-summary dd { margin:6px 0 0; font-weight:600; font-variant-numeric:tabular-nums; }
.uc-order-shipment { margin-bottom:30px; }
.uc-order-section-heading h2,.uc-order-section-heading h3 { margin:0; overflow-wrap:anywhere; }
.uc-order-section-heading h3,.uc-order-timeline h3 { font-size:16px; }
.uc-order-shipment h4 { margin:24px 0 12px; font-size:14px; font-weight:600; }
.uc-order-product { display:flex; gap:14px; padding:16px 0; border-bottom:1px solid var(--uc-line); }
.uc-order-product>div { flex:1; min-width:0; }
.uc-order-product strong,.uc-order-product small { display:block; overflow-wrap:anywhere; }
.uc-order-product strong { font-size:14px; font-weight:600; }
.uc-order-product small { margin-top:5px; }
.uc-order-product p { margin:8px 0; font-size:13px; font-variant-numeric:tabular-nums; }
.uc-order-purchase-links { display:flex; gap:8px; flex-wrap:wrap; }
.uc-order-purchase-links span { color:var(--uc-muted); font-size:12px; }
.uc-order-delivery>div { display:grid; grid-template-columns:150px minmax(0,1fr); gap:12px; margin:10px 0; }
.uc-order-delivery dd { margin:0; font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; }
.uc-order-source { font-size:12px; color:var(--uc-muted); }
.uc-order-source pre { padding:14px; max-height:420px; overflow:auto; color:var(--uc-ink); background:var(--uc-surface-alt); border-radius:8px; font-size:11px; white-space:pre-wrap; overflow-wrap:anywhere; }
.uc-order-timeline { margin-top:30px; border-top:1px solid var(--uc-line); padding-top:22px; }
.uc-order-timeline>div { display:flex; gap:20px; padding:12px 0; }
.uc-order-timeline time { min-width:95px; color:var(--uc-muted); font-size:12px; }
.uc-order-timeline small { display:block; margin-top:5px; }
.uc-orders-settings { max-width:820px; padding:24px; background:var(--uc-surface); border:1px solid var(--uc-line); border-radius:12px; }
.uc-orders-settings h2 { font-size:20px; }
.uc-orders-settings h3 { margin-top:30px; font-size:16px; }
.uc-orders-settings form { display:grid; gap:16px; padding:18px 0; }
.uc-orders-settings label { display:grid; gap:6px; font-size:13px; }
.uc-orders-settings .uc-orders-check { display:flex; gap:8px; align-items:center; }
.uc-orders-check input { min-height:16px; accent-color:var(--uc-violet); }
.uc-orders-settings fieldset { border:1px solid var(--uc-line); border-radius:8px; padding:12px; display:grid; gap:10px; }
.uc-orders-settings legend { font-size:13px; float:none; width:auto; margin:0; padding:0 6px; }
.uc-orders-settings p,.uc-orders-settings small { color:var(--uc-muted); }
.uc-orders-deliveries>div { display:grid; grid-template-columns:1fr 1fr auto; gap:8px; padding:12px 0; border-top:1px solid var(--uc-line); font-size:12px; }
.uc-orders-deliveries small { grid-column:1/-1; }
@media(max-width:700px) {
  .uc-orders-table { min-width:0; }
  .uc-orders-table thead { display:none; }
  .uc-orders-table tbody { display:block; }
  .uc-orders-table tr[data-op-order] { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); padding:12px 6px; border-top:1px solid var(--uc-line); }
  .uc-orders-table tr[data-op-order]:first-child { border-top:0; }
  .uc-orders-table td { border:0; padding:6px 10px; }
  .uc-orders-table td:nth-child(-n+2) { grid-column:1/-1; }
  .uc-orders-table td[data-label]::before { content:attr(data-label); display:block; font-size:11px; color:var(--uc-muted); margin-bottom:5px; }
  .uc-orders-number { max-width:100%; }
  .uc-orders-heading { align-items:flex-start; flex-direction:column; }
  .uc-orders-heading>div:last-child { width:100%; }
  .uc-orders-filters>label { flex:1 1 145px; }
  .uc-orders-filters select { width:100%; }
  .uc-orders-filters .uc-orders-search { flex-basis:100%; }
  .uc-order-drawer>header,.uc-order-drawer-body { padding:18px; }
  .uc-order-summary { grid-template-columns:1fr 1fr; }
  .uc-order-delivery>div { grid-template-columns:110px minmax(0,1fr); }
  .uc-orders-settings { padding:18px; }
  .uc-orders-settings .uc-order-section-heading { align-items:flex-start; flex-direction:column; }
  .uc-orders-pagination { align-items:flex-start; flex-direction:column; }
  .uc-orders-deliveries>div { grid-template-columns:1fr 1fr; }
  .uc-orders-deliveries time { grid-column:1/-1; }
}
@media(prefers-reduced-motion:no-preference) { .uc-order-drawer[open] { animation:uc-order-enter .18s ease-out; } @keyframes uc-order-enter { from { transform:translateX(18px); } to { transform:translateX(0); } } }

.uc-wechat-settings { margin-bottom:24px; }
.uc-settings>header h1 { color:var(--uc-ink); }
.uc-wechat-settings .uc-order-section-heading>span,.uc-wechat-muted { color:var(--uc-muted); font-size:13px; }
.uc-wechat-binding { display:flex; flex-wrap:wrap; align-items:center; gap:24px; margin:20px 0; }
.uc-wechat-binding>div { flex:1 1 230px; }
.uc-wechat-binding img { flex:none; background:white; max-width:100%; height:auto; }
.uc-orders-settings .uc-wechat-preferences { display:grid; gap:18px; border:0; padding:0; margin:0; min-width:0; }
.uc-orders-settings .uc-wechat-choice { display:flex; align-items:flex-start; gap:12px; cursor:pointer; }
.uc-wechat-choice input { flex:none; min-height:16px; width:16px; height:16px; padding:0; margin-top:4px; accent-color:var(--uc-violet); }
.uc-wechat-choice span { display:grid; gap:4px; }
.uc-wechat-choice small { font-weight:400; color:var(--uc-muted); }
.uc-wechat-preferences>button { justify-self:start; }
.uc-wechat-stores { display:grid; gap:8px; }
.uc-wechat-unlink { margin:18px 0; }
.uc-wechat-settings summary { cursor:pointer; }
.uc-wechat-settings p,.uc-wechat-settings small { overflow-wrap:anywhere; }
.uc-wecom-settings .uc-order-detail-actions { margin:18px 0; }
.uc-wecom-settings .uc-order-detail-actions:last-child { margin-bottom:0; }
.uc-wecom-settings input:not([type="checkbox"]),.uc-wecom-settings select { width:100%; min-width:0; }
.uc-wecom-settings [data-wq-detail="recipient"] label { margin-top:12px; }
.uc-wecom-settings [data-wq-stores][hidden] { display:none; }
.uc-order-problem-tabs { display:flex; gap:4px; flex-wrap:wrap; border-bottom:1px solid var(--uc-line); }
.uc-order-problem-tabs button { display:flex; align-items:center; gap:8px; border:0; border-bottom:2px solid transparent; padding:12px 14px; background:transparent; color:var(--uc-muted); font:inherit; font-size:14px; cursor:pointer; }
.uc-order-problem-tabs button:hover { background:var(--uc-surface-alt); color:var(--uc-ink); }
.uc-order-problem-tabs button.is-current { color:var(--uc-violet-strong); border-bottom-color:var(--uc-violet); font-weight:600; }
.uc-order-problem-tabs span { font-size:12px; font-variant-numeric:tabular-nums; }
.uc-orders-table small.uc-problem-inline { color:var(--order-processing-ink); margin-top:6px; max-width:220px; line-height:1.5; }
.uc-orders-table small.uc-problem-inline.is-urgent { color:var(--order-cancelled-ink); }
.uc-order-problem { padding:0 0 24px; margin:0 0 24px; border-bottom:1px solid var(--uc-line); }
.uc-order-problem h3 { font-size:18px; margin:0 0 12px; }
.uc-problem-timing { font-weight:600; margin:0 0 6px; }
.uc-problem-meta { font-size:13px; color:var(--uc-muted); line-height:1.6; overflow-wrap:anywhere; }
.uc-problem-message-label { display:block; font-size:14px; font-weight:600; margin:20px 0 8px; }
.uc-orders textarea { width:100%; min-width:0; resize:vertical; padding:12px; border:1px solid var(--uc-line); border-radius:8px; background:var(--uc-surface); color:var(--uc-ink); font:inherit; font-size:14px; line-height:1.6; caret-color:var(--uc-violet); }
.uc-orders textarea[readonly],.uc-problem-preview { background:var(--uc-surface-alt); }
.uc-problem-message { min-height:150px; field-sizing:content; overflow:hidden; }
.uc-problem-journal { margin-top:18px; font-size:12px; color:var(--uc-muted); }
.uc-problem-journal summary { cursor:pointer; }
.uc-problem-settings h2 { margin:0 0 10px; }
.uc-problem-settings .uc-problem-fields { border:0; padding:0; min-width:0; gap:14px; }
.uc-problem-fields h3 { margin:22px 0 0; }
.uc-problem-fields p { margin:0; }
.uc-problem-fields input[type="number"] { width:100%; }
.uc-problem-thresholds { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:6px; }
.uc-problem-shop-rules>div { display:grid; grid-template-columns:minmax(130px,1fr) repeat(2,minmax(90px,140px)); align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid var(--uc-line); }
.uc-problem-tags { display:flex; flex-wrap:wrap; gap:6px; }
.uc-problem-tags .uc-button { min-height:32px; padding:6px 9px; font-size:12px; white-space:normal; text-align:left; }
.uc-problem-preview-actions { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; margin-top:6px; }
.uc-problem-preview-actions label { flex:1 1 100%; }
.uc-problem-preview-actions select { width:100%; }
.uc-problem-preview { padding:16px; border-radius:8px; font-size:14px; }
.uc-problem-preview p { white-space:pre-wrap; overflow-wrap:anywhere; margin:12px 0; line-height:1.6; }
.uc-problem-settings :disabled { cursor:not-allowed; opacity:.6; }
.uc-problem-settings fieldset:disabled { opacity:1; }
:root[data-theme="dark"] .uc-problem-settings .uc-button--primary { color:var(--uc-page); }
:root[data-theme="dark"] .uc-problem-settings .uc-button--secondary { color:var(--uc-violet-strong); }
@media(max-width:700px) {
  .uc-order-problem-tabs { gap:0; }
  .uc-order-problem-tabs button { padding:10px 8px; font-size:13px; }
  .uc-problem-thresholds { grid-template-columns:1fr; gap:12px; }
  .uc-problem-shop-rules>div { grid-template-columns:1fr 1fr; }
  .uc-problem-shop-rules>div>.uc-orders-check { grid-column:1/-1; }
  .uc-problem-preview-actions>.uc-button { flex:1 1 160px; }
}
:root[data-theme="dark"] .uc-wecom-settings .uc-button--primary { color:var(--uc-page); }
