html { touch-action:manipulation; }
body.network-pending::before { content:''; position:fixed; inset:0 auto auto 0; width:100%; height:3px; z-index:2000; pointer-events:none; background:linear-gradient(90deg,transparent 0%,var(--sea-accent) 45%,transparent 80%); background-size:200% 100%; animation:network-progress 1.2s linear infinite; }
@keyframes network-progress { from { background-position:200% 0; } to { background-position:0 0; } }
@media(prefers-reduced-motion:reduce) { body.network-pending::before { animation:none; background:var(--sea-accent); } }
.notice-popup { position:fixed; z-index:1000; top:20px; left:50%; transform:translateX(-50%); width:min(420px,calc(100vw - 36px)); max-height:calc(100dvh - 40px); overflow:auto; padding:18px 20px; border:1px solid var(--line); border-radius:14px; background:var(--sea-surface); color:var(--sea-text); box-shadow:0 8px 32px #17255426; pointer-events:none; }
.notice-popup h2 { margin:0 0 6px; font-size:17px; }
.notice-popup p { margin:0; overflow-wrap:anywhere; }
.notice-popup.error { border-color:#e6a99c; background:#fff3ef; }
.notice-popup.error p { color:#9b2d17; }
button,.admin-link { min-height:34px; padding:6px 11px; border-radius:7px; font-size:14px; line-height:20px; }
.admin-link { display:inline-flex; align-items:center; justify-content:center; border:1px solid transparent; }
header button { min-height:32px; padding:5px 10px; }
.confirmation-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.confirmation-actions button { width:100%; }
.copy-order-dialog { width:min(760px,94vw); max-height:90dvh; overflow-y:auto; }
.copy-order-dialog h2,.copy-order-dialog h3 { margin:0; }
.copy-order-hint { margin:14px 0; font-size:13px; line-height:1.65; }
.copy-price-notice { margin:12px 0; padding:10px 12px; border-radius:9px; background:var(--sea-tint); color:var(--sea-text); font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.copy-order-dialog textarea { font-size:14px; line-height:1.65; }
.copy-order-error { padding:9px 12px; border-radius:8px; white-space:pre-line; overflow-wrap:anywhere; }
.copy-preview,.copy-task-section { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.copy-preview dl { display:grid; grid-template-columns:100px minmax(0,1fr); gap:8px 12px; font-size:14px; line-height:1.6; }
.copy-preview dt { color:var(--sea-muted); }
.copy-preview dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.copy-order-warnings { padding-left:20px; color:#884900; font-size:13px; line-height:1.7; }
.copy-task-list { display:grid; gap:10px; margin-top:12px; }
.copy-task { border:1px solid var(--line); border-radius:10px; padding:12px; min-width:0; }
.copy-task strong,.copy-task p { overflow-wrap:anywhere; }
.copy-task p { margin:7px 0 0; font-size:13px; line-height:1.6; }
.copy-task .actions { margin-top:10px; gap:8px; }
.copy-task .actions button { min-height:30px; padding:4px 9px; font-size:13px; flex:none; }
@media(max-width:560px) { .copy-order-dialog { padding:17px; } .copy-order-dialog textarea { font-size:16px; } .copy-preview dl { grid-template-columns:72px minmax(0,1fr); gap:7px 9px; } }
#orderConfirmText { overflow-wrap:anywhere; }
#adminWallet { display:flex; flex-wrap:wrap; gap:4px 12px; }
#wallet { display:inline-flex; flex-direction:column; gap:2px; min-width:0; max-width:100%; }
.wallet-expiry-hint { color:var(--sea-muted); font-size:11px; font-weight:400; line-height:1.4; }
.report-row small { display:block; margin-top:6px; color:var(--sea-muted); }
.report-range { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.report-range label { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
#photoUpload { display:inline-flex; min-height:34px; align-items:center; background:var(--sea-tint); color:var(--sea-accent); }
.order-search { display:flex; align-items:center; gap:8px; margin:0; }
.order-search input { width:min(200px,42vw); height:34px; margin:0; padding:6px 10px; font-size:14px; }
.order-search button { min-height:34px; }

.order-tools { align-items:center; gap:8px; margin-top:18px; }
.orders-table { border-collapse:separate; border-spacing:0; --order-actions-width:150px; }
.orders-table th:nth-last-child(-n+2),.orders-table td:nth-last-child(-n+2) { position:sticky; right:0; z-index:1; background:var(--sea-surface); border-left:1px solid var(--line); }
.orders-table th:nth-last-child(2),.orders-table td:nth-last-child(2) { right:var(--order-actions-width); box-shadow:-8px 0 12px -10px #17255480; }
.orders-table th:nth-last-child(-n+2) { z-index:2; background:var(--sea-field); }
.record-actions { vertical-align:middle; white-space:nowrap; }
.processing-badge.paused { background:#fff1cf; color:#946000; }
.processing-badge.ended { background:#edf0f4; color:#657184; }
.record-actions button { min-height:30px; padding:4px 9px; font-size:13px; }
.record-actions button+button { margin-left:6px; }
.mobile-order-list { display:none; }
.order-source { display:block; margin-top:4px; color:var(--sea-muted); font-size:12px; line-height:1.5; white-space:normal; overflow-wrap:anywhere; }
.order-password { display:block; margin-top:0; color:var(--sea-muted); font-size:11px; font-weight:400; line-height:1.4; white-space:normal; overflow-wrap:anywhere; user-select:text; }
.order-pagination { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:20px; color:var(--sea-muted); }
.page-size { border:1px solid var(--line); border-radius:7px; padding:5px 9px; font-size:14px; line-height:20px; white-space:nowrap; }
.page-numbers,.page-jump { display:flex; align-items:center; gap:8px; margin:0; }
.order-pagination button { min-height:32px; padding:5px 9px; }
.page-numbers button,.page-arrow { min-width:32px; padding:5px; }
.page-numbers button[aria-current="page"] { background:var(--sea-accent); border-color:var(--sea-accent); color:white; }
.page-numbers .page-ellipsis { padding:0 4px; }
.page-jump label { font-weight:400; }
.page-jump input { width:54px; height:32px; margin:0; padding:5px 6px; text-align:center; }
@media(max-width:560px) { .order-pagination { justify-content:flex-start; gap:6px; } .page-numbers { gap:4px; } .page-numbers button,.page-arrow { min-width:30px; padding:5px; } }
.order-composer-dialog { width:min(960px,94vw); max-height:90dvh; overflow-y:auto; padding:20px; }
.composer-dialog-bar { display:flex; justify-content:flex-end; }
.order-composer-dialog .order-form { margin:0; padding:0; border:0; border-radius:0; box-shadow:none; }
.order-composer-dialog .order-form h2 { padding-right:70px; margin-top:-34px; min-height:34px; display:flex; align-items:center; }
@media(max-width:560px) {
  main { padding-inline:18px; }
  button,.admin-link { min-height:36px; padding:7px 10px; }
  header button { min-height:32px; padding:5px 9px; }
  .order-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:14px; }
  .order-tools > button,.order-tools > a { display:flex; align-items:center; justify-content:center; width:100%; min-width:0; height:36px; padding:6px 8px; text-align:center; }
  #photoUpload { min-height:36px; }
  .order-search { display:grid; grid-column:1/-1; grid-template-columns:minmax(0,1fr) 48px 48px; width:100%; min-width:0; gap:8px; }
  .order-search input { width:100%; min-width:0; height:36px; padding:6px 9px; font-size:16px; }
  .order-search button { width:100%; min-height:36px; height:36px; padding:6px 4px; white-space:nowrap; }
  .order-composer-dialog .order-form h2 { min-height:36px; margin-top:-36px; }
  .order-table-view { display:none; }
  #orderSummary,#taishanAdmin { padding:0; border:0; background:transparent; box-shadow:none; }
  .mobile-order-list { display:grid; gap:14px; min-width:0; }
  .mobile-order-card { min-width:0; padding:16px 14px; border:1px solid var(--line); border-left:4px solid #3b9cf3; border-radius:15px; background:var(--sea-surface); box-shadow:0 3px 12px #17255408; }
  .mobile-order-heading { display:flex; align-items:flex-start; gap:6px; }
  .mobile-order-identity { display:flex; align-items:center; flex-wrap:wrap; gap:7px; flex:1; min-width:0; padding-top:7px; }
  .mobile-order-account { min-width:0; max-width:100%; font-size:18px; font-weight:750; overflow-wrap:anywhere; }
  .mobile-order-login { min-width:0; max-width:100%; }
  .mobile-order-card .processing-badge { max-width:100%; padding:4px 8px; border-radius:7px; font-size:12px; line-height:1.5; white-space:normal; overflow-wrap:anywhere; }
  .mobile-order-card .processing-badge.paused { background:#fff1cf; color:#946000; }
  .mobile-order-card .mobile-order-more { flex:none; min-width:36px; min-height:32px; padding:6px 0 6px 6px; border:0; background:transparent; }
  .mobile-order-subtitle { margin:12px 0 15px; color:var(--sea-muted); line-height:1.6; overflow-wrap:anywhere; }
  .mobile-order-details { display:grid; grid-template-columns:34px minmax(0,1fr); gap:8px 12px; margin:0; line-height:1.65; }
  .mobile-order-details dt { color:var(--sea-muted); font-size:13px; padding-top:1px; }
  .mobile-order-details dd { margin:0; min-width:0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
  .mobile-order-reports { display:flex; flex-wrap:wrap; gap:7px; margin-top:15px; }
  .mobile-order-reports .report-pill { padding:3px 8px; border:1px solid var(--line); border-radius:7px; background:var(--sea-field); color:var(--sea-muted); font-size:13px; }
  .mobile-order-reports .report-pill.on { background:#e3f4ee; border-color:#83c7ae; color:#047857; }
  .mobile-order-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }
  .mobile-order-actions.review-order-actions { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .mobile-order-actions button { width:100%; min-width:0; min-height:32px; padding:5px; border-color:#aac9ee; background:var(--sea-tint); font-size:14px; line-height:20px; }
  .mobile-order-actions .order-pause { border-color:#e2a03a; background:#fff1cf; color:#8a5200; }
  .mobile-order-actions .order-delete { border-color:#d65b68; background:#c93950; color:white; }
  .mobile-order-actions .order-single-action { grid-column:1/-1; }
}
.order-form .report-range input[type="radio"] { width:auto; accent-color:var(--sea-accent); }
.report-stepper { display:inline-flex; width:154px; max-width:100%; }
.report-stepper button { flex:0 0 40px; padding:0; border-radius:0; }
.report-stepper button:first-child { border-radius:8px 0 0 8px; }
.report-stepper button:last-child { border-radius:0 8px 8px 0; }
.report-stepper input { width:0; flex:1; padding:4px; text-align:center; border-radius:0; appearance:textfield; }
.report-stepper input::-webkit-inner-spin-button { appearance:none; }
.order-form .form-row:has(input:required,select:required) > span:first-child::before { content:'* '; color:#d43535; }
.order-form .form-row input[type="search"] { margin-bottom:8px; }
@media(max-width:560px) { .report-stepper { width:clamp(100px,35vw,154px); } .report-stepper button { flex-basis:32px; } }
