/* Delivery display only: authenticated data remains in the existing API. */
.delivery-config-block{padding:10px 0;display:flex;flex-direction:column;align-items:flex-start;gap:9px;min-width:0;color:#334155}
.delivery-config-block strong{font-size:14px;color:#0f172a}
.delivery-complete-link,.delivery-complete-text{display:block;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font:13px/1.7 ui-monospace,monospace;margin:0;color:#334155}
.delivery-complete-link{color:#2563eb;text-underline-offset:3px}
.delivery-config-block button{max-width:100%}
.proxy-preview{overflow-wrap:anywhere;word-break:break-word;min-width:0}
.desktop-proxy-body{min-width:0}.proxy-cell{overflow-wrap:anywhere}
.delivery-qr-only{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:8px 0}.delivery-qr-only img{width:112px;height:112px;object-fit:contain;border:1px solid #e2e8f0;background:#fff;border-radius:8px}.delivery-qr-only p{font-size:12px;line-height:1.6;color:#64748b;margin:0}
.delivery-extra-link{margin-top:10px;border-top:1px solid #e2e8f0}.subscription-raw{background:transparent!important;border-color:#e2e8f0!important;color:#334155}
.proxy-detail-fields dd code,.proxy-complete code{overflow-wrap:anywhere;white-space:pre-wrap;word-break:break-word}
.proxy-info-icon{width:15px;height:15px;flex:none;margin-left:5px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
/* Single-line customer note text; editing still uses the same bounded input/API. */
.desktop-note-control .desktop-note-input{display:block!important;box-sizing:border-box;width:min(100%,96px);min-width:0;max-width:100%;height:40px;min-height:40px;max-height:40px;padding:6px 8px;resize:none;overflow:auto;line-height:1.55;border:1px solid #dce6f2;border-radius:8px;background:#fff;color:#334155;white-space:pre-wrap;overflow-wrap:anywhere;field-sizing:fixed}
.desktop-note-control .customer-note-display{display:block!important;box-sizing:border-box;width:min(100%,124px);min-width:0;max-width:100%;height:40px;min-height:40px;max-height:40px;padding:4px 0;border:0;border-radius:4px;background:transparent;color:#334155;cursor:text;overflow:hidden;text-align:left;font:inherit}
.desktop-note-control .customer-note{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.6}
.desktop-note-control .note-placeholder{color:#8292a8}
.desktop-note-control .customer-note[hidden]{display:none!important}
.desktop-note-control:not(.note-editing)>.desktop-note-input{display:none!important}
.desktop-note-control.note-editing>.customer-note-display{display:none!important}
.desktop-note-control .desktop-note-input{scrollbar-width:none}
.desktop-note-control .desktop-note-input::-webkit-scrollbar{width:0;height:0}
.desktop-note-control .customer-note-display:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
#customerNoteDialog{width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto}
#customerNoteInput{box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:112px;min-height:112px;max-height:112px;resize:none;overflow:auto;scrollbar-width:thin;white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px}
.service-note-label{display:none!important}.service-note-status{display:block;font-size:12px;color:#b42318;overflow-wrap:anywhere}
.service-note-status:empty{display:none}
@media(max-width:1023px){.desktop-note-control .desktop-note-input{width:min(100%,144px);height:44px;min-height:44px;max-height:44px;font-size:16px}.desktop-note-control .customer-note-display{width:min(100%,144px);height:44px;min-height:44px;max-height:44px;cursor:pointer}.proxy-mobile-label .proxy-info-hover{min-height:32px;gap:3px}}
@media(max-width:759px){.delivery-complete-link,.delivery-complete-text{font-size:14px}.delivery-qr-only img{width:136px;height:136px}.delivery-config-block{max-width:100%}}

/* Only service configuration lists: long content belongs in independent layers. */
.unified-delivery .service-proxy-body{display:grid;grid-template-rows:32px 32px;gap:6px;min-width:0}
.unified-delivery .proxy-preview{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal!important;line-height:16px;height:32px;max-height:32px;max-width:100%;overflow:hidden}
.unified-delivery .proxy-icon-actions{display:flex;align-items:center;gap:5px;flex-wrap:nowrap;min-width:0}
.unified-delivery .proxy-icon-button{display:inline-grid!important;place-items:center;flex:none;width:30px;min-width:30px;height:30px;min-height:30px;padding:5px}
.unified-delivery .delivery-note{position:relative;min-width:0}
.unified-delivery .resource-region .country-flag{flex:0 0 24px;width:24px;height:18px;object-fit:contain}
.delivery-note-info,.delivery-note-slot{height:28px;min-height:28px;margin-top:4px}
.delivery-note-trigger{display:inline-flex;align-items:center;gap:2px;min-height:28px;max-width:100%;padding:2px 0;border:0;background:transparent;color:#466487;font:inherit;font-size:12px;font-weight:600;white-space:nowrap;cursor:help}
.delivery-note-trigger:focus-visible{outline:2px solid #2563eb;outline-offset:2px;border-radius:4px}
.delivery-note-text[hidden]{display:none!important}
.unified-delivery .service-note-status{position:absolute;z-index:2;left:0;right:0;top:100%;padding:3px 5px;background:#fff4f2;border-radius:4px;font-size:11px;line-height:16px;max-height:38px;overflow:auto}
.service-legacy-link{display:block;max-width:100%;height:18px;margin-top:3px;padding:0;border:0;background:none;color:#2563eb;text-decoration:underline;font:inherit;font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;cursor:pointer}
#proxyDetailDialog{width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
#proxyDetailContent{max-height:min(64dvh,650px);overflow:auto;overscroll-behavior:contain;margin-top:12px;min-width:0}
.proxy-empty-region{min-height:140px}.qr-empty-region{min-height:260px;min-width:0;width:100%}
@media(min-width:1024px){
  .unified-delivery tbody>tr{height:132px}
  .unified-delivery tbody>tr>td{padding:10px!important;vertical-align:middle}
  .unified-delivery .resource-region{display:flex;align-items:center;min-width:0;max-height:40px;overflow:hidden}
  .unified-delivery .resource-region>span:last-child{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal;line-height:20px;max-height:40px;overflow:hidden}
  .unified-delivery td:first-child>small{max-height:32px;line-height:16px;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
  .unified-delivery .renew-price{max-height:32px;line-height:16px;overflow:hidden;white-space:normal}
  .unified-delivery td:nth-child(7)>small:last-child:not(.renew-price){max-height:16px;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .unified-delivery td:nth-child(8)>small{max-height:32px;line-height:16px;overflow:hidden;white-space:normal}
  .unified-delivery td:nth-child(8)>.renew-error{max-height:16px;overflow:hidden;font-size:10px!important;line-height:16px}
}
@media(max-width:1023px){
  .unified-delivery{display:block;min-width:0!important;width:100%}
  .unified-delivery thead{display:none}
  .unified-delivery tbody{display:grid;gap:12px;padding:12px}
  .unified-delivery tbody>tr{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;min-width:0;padding:14px;border:1px solid #dce6f2;border-radius:12px}
  .unified-delivery tbody>tr>td{display:block;min-width:0;width:auto;max-width:100%;padding:0!important;border:0;font-size:14px}
  .unified-delivery td::before{display:block;margin-bottom:6px;color:#64748b;font-size:12px}
  .unified-delivery td:first-child{grid-column:1/-1;grid-row:1;padding-right:82px!important}
  .unified-delivery td:first-child .resource-region>span:last-child{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;line-height:20px;max-height:40px;overflow:hidden;white-space:normal}
  .unified-delivery td:first-child>small{display:block;height:18px;margin-top:4px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .unified-delivery td:nth-child(2){grid-row:2;grid-column:1/-1}
  .unified-delivery td:nth-child(3){grid-row:3;grid-column:1/-1}
  .unified-delivery td:nth-child(4){grid-row:4;grid-column:1/-1}
  .unified-delivery td:nth-child(5){position:absolute;right:14px;top:14px;max-width:78px}
  .unified-delivery td:nth-child(5)::before,.unified-delivery td.proxy-cell::before{content:none}
  .unified-delivery td:nth-child(6){grid-row:5;grid-column:1/-1}
  .unified-delivery td:nth-child(6)::before{content:'到期时间'}
  .unified-delivery td:nth-child(4)::before{content:none;display:none;height:0;margin:0}
  .unified-delivery td:nth-child(7){grid-row:6;grid-column:1}
  .unified-delivery td:nth-child(8){grid-row:6;grid-column:2}
  .unified-delivery td:nth-child(7)::before{content:'续费'}
  .unified-delivery td:nth-child(8)::before{content:'自动续费'}
  .unified-delivery .proxy-mobile-label{display:flex;margin:0 0 4px}
  .unified-delivery .service-proxy-body{grid-template-rows:20px 44px;gap:4px}
  .unified-delivery .proxy-preview{height:20px;max-height:20px;line-height:20px;-webkit-line-clamp:1;line-clamp:1}
  .unified-delivery .proxy-icon-button{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:10px!important}
  .unified-delivery .proxy-icon-actions{gap:10px}
  /* Stack customer note + delivery remark; never absolute-overlap on mobile cards. */
  .unified-delivery .delivery-note{display:flex;flex-direction:column;align-items:stretch;gap:8px;position:relative;min-width:0;width:100%}
  .unified-delivery .desktop-note-control{position:relative;z-index:1;width:100%;max-width:100%;min-width:0}
  .unified-delivery .desktop-note-control .customer-note-display{width:100%!important;max-width:100%!important;height:auto!important;min-height:44px;max-height:none!important;overflow:visible}
  .unified-delivery .desktop-note-control .customer-note{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;white-space:normal;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;line-height:1.55}
  .unified-delivery .delivery-note-info,.unified-delivery .delivery-note-slot{position:static;top:auto;right:auto;z-index:1;display:block;width:100%;max-width:100%;height:auto;min-height:44px;margin:0}
  .unified-delivery .delivery-note-trigger{display:inline-flex;align-items:flex-start;width:100%;max-width:100%;height:auto;min-height:44px;padding:7px 2px;cursor:pointer;white-space:normal}
  .unified-delivery .delivery-note-preview{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;max-width:100%;white-space:normal;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;line-height:1.5}
  .unified-delivery .renew-price{max-height:36px;line-height:18px;overflow:auto;white-space:normal}
  .unified-delivery .owned-button{max-width:100%;min-height:44px}
}


/* Delivery admin note: show truncated text + hover/popover for full content */
.delivery-note-empty{display:inline-block;min-height:28px;line-height:28px;color:#94a3b8;font-size:13px}
.delivery-note-preview{display:block;max-width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.5;font-weight:500;color:#334155}
.delivery-note-trigger{max-width:100%}
.unified-delivery .delivery-note-empty{margin-top:4px}
@media(max-width:1023px){
  .unified-delivery .delivery-note-empty{position:static;height:auto;min-height:0;margin:0;width:100%}
  .unified-delivery .delivery-note-preview,.delivery-note-preview{max-width:100%}
}

/* hide service-note-label */
.service-note-label{display:none!important}
