:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#17324d;background:#f5f8f7;line-height:1.45;color-scheme:light}*{box-sizing:border-box}body{margin:0;min-width:320px;background:linear-gradient(180deg,#e8f4f1 0,#f8faf9 42%,#f5f8f7 100%)}button,input{font:inherit}button{cursor:pointer}.shell{width:min(100% - 32px,760px);margin:0 auto;padding:24px 0 48px}.auth-card{max-width:480px;margin:7vh auto 0;padding:28px;background:#fff;border:1px solid #d6e6e1;border-radius:24px;box-shadow:0 18px 50px #164e3b12}.brand-mark{width:52px;height:52px;display:grid;place-items:center;border-radius:16px;background:#0f766e;color:#fff;font-weight:800;letter-spacing:.04em}.eyebrow{margin:0 0 6px;color:#0f766e;font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.auth-card h1,.topbar h1{margin:0 0 10px;font-size:clamp(26px,6vw,38px);line-height:1.12}.muted{color:#64748b}.small{font-size:13px}.stack{display:grid;gap:14px}.auth-card form{margin-top:22px}.auth-card label{display:grid;gap:7px;font-weight:700;font-size:14px}.auth-card input{width:100%;padding:13px 14px;border:1px solid #cbded9;border-radius:12px;background:#fbfefd;color:#17324d;outline:none}.auth-card input:focus{border-color:#0f766e;box-shadow:0 0 0 3px #0f766e1c}.primary{border:0;border-radius:12px;padding:14px 16px;background:#0f766e;color:#fff;font-weight:800}.primary:active{transform:scale(.98)}.form-message{min-height:20px;margin:0;color:#b42318;font-size:13px}.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:18px 0 24px}.text-button,.icon-button{border:0;background:transparent;color:#0f766e;font-weight:800}.hero-card{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:22px;border-radius:22px;background:#0f766e;color:#fff;box-shadow:0 14px 34px #0f766e2b}.hero-card .eyebrow,.hero-card .muted{color:#d5f4ed}.hero-card h2{margin:0;font-size:24px}.badge{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 8px;border-radius:999px;background:#fef3c7;color:#92400e;font-size:12px;font-weight:800}.section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:28px 0 12px}.section-heading h2{margin:0;font-size:20px}.order-card{width:100%;text-align:left;border:1px solid #d6e6e1;border-radius:18px;padding:17px;background:#fff;color:#17324d;box-shadow:0 8px 24px #164e3b0d}.order-card:active{transform:scale(.99)}.order-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.order-number{margin:0;font-weight:800}.order-date{margin:3px 0 0;color:#64748b;font-size:13px}.order-total{margin:0;font-weight:800;white-space:nowrap}.status{display:inline-flex;margin-top:14px;padding:6px 9px;border-radius:999px;background:#e6f4f1;color:#0f766e;font-size:12px;font-weight:800}.order-dialog{width:min(calc(100% - 24px),620px);border:0;border-radius:22px;padding:0;background:#fff;color:#17324d;box-shadow:0 24px 80px #0f172a55}.order-dialog::backdrop{background:#0f172a88}.dialog-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:22px;border-bottom:1px solid #e2e8f0}.dialog-head h2{margin:0;font-size:22px}.icon-button{font-size:28px;line-height:1}.dialog-body{padding:22px}.timeline{display:grid;gap:14px;margin:18px 0}.timeline-item{position:relative;padding-left:20px;border-left:2px solid #b7ddd4}.timeline-item::before{content:"";position:absolute;left:-7px;top:3px;width:10px;height:10px;border-radius:50%;background:#0f766e}.timeline-item strong{display:block}.timeline-item p{margin:3px 0;color:#64748b;font-size:13px}.hidden{display:none!important}@media(max-width:420px){.shell{width:min(100% - 20px,760px);padding-top:12px}.auth-card{padding:22px;margin-top:3vh}.topbar{margin-top:8px}.hero-card{padding:18px}.hero-card h2{font-size:20px}.order-row{display:grid;gap:6px}.order-total{white-space:normal}}

.action-row{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}.tracking-line{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0;padding:10px 12px;border:1px solid #cbded9;border-radius:12px;background:#f4faf8}.tracking-line code{font-weight:800;letter-spacing:.03em;overflow-wrap:anywhere}.compact-copy-button{padding:8px 11px;font-size:13px}.copy-feedback{font-size:12px;color:#237a6d;font-weight:700}.button-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.secondary{border:1px solid #cbded9;background:#fff;color:#17324d;border-radius:12px;padding:11px 14px;font-weight:700;cursor:pointer}.secondary:disabled{opacity:.55;cursor:not-allowed}.primary:disabled{opacity:.7;cursor:wait}.primary[aria-busy="true"],.secondary[aria-busy="true"]{position:relative}.primary[aria-busy="true"]::after,.secondary[aria-busy="true"]::after{content:"";display:inline-block;width:12px;height:12px;margin-left:8px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-2px;animation:portalSpin .7s linear infinite}@keyframes portalSpin{to{transform:rotate(360deg)}}

/* Order-status milestone timeline */
.timeline{margin:16px 0 8px;padding:18px 16px;border:1px solid #dce9e5;border-radius:20px;background:linear-gradient(145deg,#f8fcfb 0%,#eef7f4 100%);box-shadow:0 12px 30px rgba(23,50,77,.06)}
.milestone-list{list-style:none;margin:0;padding:0}
.milestone{position:relative;display:grid;grid-template-columns:34px 1fr;column-gap:12px;min-height:76px}
.milestone:last-child{min-height:58px}
.milestone-rail{position:absolute;left:16px;top:34px;bottom:0;width:2px;background:#d8e5e1}
.milestone:last-child .milestone-rail{display:none}
.milestone-dot{z-index:1;display:flex;width:34px;height:34px;align-items:center;justify-content:center;border:2px solid #c9d9d5;border-radius:50%;background:#fff;color:#92a8a3;font-size:13px;font-weight:800;box-shadow:0 4px 12px rgba(23,50,77,.08)}
.milestone-copy{padding:2px 0 18px;min-width:0}
.milestone-copy strong{display:block;color:#17324d;font-size:14px;line-height:1.35}
.milestone-copy span{display:block;margin-top:2px;color:#0f766e;font-size:13px;font-weight:800}
.milestone-copy p{margin:5px 0 0;color:#718096;font-size:12px;line-height:1.45}
.milestone-copy small{display:block;margin-top:5px;color:#526b68;font-size:11px}
.milestone.completed .milestone-dot{border-color:#0f766e;background:#0f766e;color:#fff}
.milestone.completed .milestone-rail{background:#0f766e}
.milestone.current .milestone-dot{border-color:#0f766e;background:#fff;color:#0f766e;box-shadow:0 0 0 5px rgba(15,118,110,.12),0 6px 16px rgba(15,118,110,.18)}
.milestone.current .milestone-copy strong{color:#0f766e}
.milestone.upcoming .milestone-copy{opacity:.62}
.milestone-cancelled{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #f1c7c0;border-radius:16px;background:#fff7f5;color:#9f3a2e}
.milestone-cancelled .milestone-icon{display:flex;width:34px;height:34px;align-items:center;justify-content:center;border-radius:50%;background:#e76f51;color:#fff;font-size:22px;font-weight:700}
.milestone-cancelled strong{display:block;font-size:14px}.milestone-cancelled p{margin:4px 0 0;color:#9a6b63;font-size:12px}
@media (max-width:420px){.timeline{padding:16px 12px}.milestone{grid-template-columns:32px 1fr;column-gap:10px}.milestone-dot{width:32px;height:32px}.milestone-rail{left:15px}.milestone-copy strong{font-size:13px}}

/* Subtle motion for loading and status changes */
@keyframes portalFadeUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes milestonePulse{0%,100%{box-shadow:0 0 0 5px rgba(15,118,110,.12),0 6px 16px rgba(15,118,110,.18)}50%{box-shadow:0 0 0 9px rgba(15,118,110,.03),0 7px 18px rgba(15,118,110,.22)}}
.portal-view:not(.hidden){animation:portalFadeUp .35s ease-out both}
.order-card{transition:transform .18s ease,box-shadow .18s ease}.order-card:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(23,50,77,.09)}
.milestone.current .milestone-dot{animation:milestonePulse 2.6s ease-in-out infinite}
.milestone{animation:portalFadeUp .38s ease-out both}.milestone:nth-child(2){animation-delay:.04s}.milestone:nth-child(3){animation-delay:.08s}.milestone:nth-child(4){animation-delay:.12s}.milestone:nth-child(5){animation-delay:.16s}
.status-history{margin-top:22px;padding-top:18px;border-top:1px solid #dce9e5}.status-history h4{margin:0 0 12px;color:#526b68;font-size:13px;letter-spacing:.02em}.status-history-row{position:relative;display:flex;gap:10px;padding:8px 0;color:#718096}.status-history-row>div{min-width:0}.status-history-row strong{display:block;color:#526b68;font-size:12px;line-height:1.35}.status-history-row time{display:block;margin-top:3px;font-size:11px;color:#8b9b98}.status-history-dot{width:8px;height:8px;flex:0 0 8px;margin-top:5px;border-radius:50%;background:#bfd1cc}.status-history-row.latest strong{color:#0f766e}.status-history-row.latest .status-history-dot{background:#0f766e;box-shadow:0 0 0 4px rgba(15,118,110,.12)}
@media (prefers-reduced-motion:reduce){.portal-view:not(.hidden),.milestone,.milestone.current .milestone-dot{animation:none!important}.order-card{transition:none}}

.order-items{display:grid;gap:10px;margin:12px 0 16px}.order-item{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:11px;padding:10px;border:1px solid #dce9e5;border-radius:16px;background:#fbfefd}.order-item-image{width:56px;height:56px;object-fit:cover;border-radius:12px;background:#e6f4f1}.order-item-image-frame{position:relative;display:block;width:56px;height:56px;overflow:hidden;border-radius:12px;background:#e6f4f1}.image-skeleton{position:absolute;inset:0;border-radius:12px;background:linear-gradient(110deg,#e6f4f1 25%,#f8fcfb 45%,#e6f4f1 65%);background-size:220% 100%;animation:imageSkeleton 1.2s ease-in-out infinite;transition:opacity .2s ease}.image-skeleton.is-hidden{opacity:0;animation:none}.image-cdn{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .22s ease}.image-cdn.is-loaded{opacity:1}.image-load-failed{background:#e6f4f1}.order-item-placeholder{display:grid;place-items:center;color:#0f766e;font-size:12px;font-weight:900}@keyframes imageSkeleton{0%{background-position:140% 0}100%{background-position:-40% 0}}.order-item-copy{min-width:0}.order-item-copy strong{display:block;overflow-wrap:anywhere;color:#17324d;font-size:14px;line-height:1.35}.order-item-copy span,.order-item-copy small{display:block;color:#718096;font-size:11px;line-height:1.4}.order-item-copy span{margin-top:3px}.order-item-total{white-space:nowrap;color:#0f766e;font-size:13px}.order-summary{margin:2px 0 10px}.order-total-line{margin:0 0 14px;padding-top:12px;border-top:1px solid #e2e8f0}@media(max-width:420px){.order-item{grid-template-columns:48px minmax(0,1fr);gap:9px}.order-item-image,.order-item-image-frame{width:48px;height:48px}.order-item-total{grid-column:2;justify-self:start;margin-top:-5px}}@media(prefers-reduced-motion:reduce){.image-skeleton{animation:none}.image-cdn{transition:none}}

/* Masked customer-code fields with an accessible show/hide control */
.code-field{display:flex;align-items:stretch;gap:8px;margin-top:6px}.code-field input{flex:1;min-width:0;margin-top:0}.code-toggle{flex:0 0 auto;border:1px solid #b9d6d0;border-radius:10px;background:#f4fbf9;color:#0f766e;padding:0 13px;font:inherit;font-size:13px;font-weight:800;cursor:pointer}.code-toggle:hover{background:#e7f5f1}.code-toggle:focus-visible{outline:3px solid rgba(15,118,110,.28);outline-offset:2px}@media(max-width:360px){.code-field{gap:6px}.code-toggle{padding:0 10px;font-size:12px}}


/* Final responsive polish: keep the document scrollable and keep detail content inside the viewport. */
html{min-height:100%;overflow-x:hidden}body{min-height:100dvh;overflow-x:hidden;-webkit-text-size-adjust:100%}.shell{min-width:0}.portal-view{min-width:0}.topbar{position:sticky;top:0;z-index:10;margin:0 -8px 18px;padding:14px 8px 12px;background:rgba(245,248,247,.94);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}.topbar-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.text-button,.secondary,.primary,.icon-button{min-height:44px}.hero-card{min-width:0}.hero-card>div{min-width:0}.hero-card h2,.hero-card p,.order-number,.order-date,.order-total{overflow-wrap:anywhere}.order-card{min-width:0}.order-dialog{max-height:calc(100dvh - 24px);overflow:hidden}.dialog-body{max-height:calc(100dvh - 112px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.dialog-head{position:sticky;top:0;z-index:2;background:#fff}.action-row{align-items:stretch}.action-row>*{min-width:0}@media(max-width:600px){.shell{width:min(100% - 20px,760px);padding:10px 0 30px}.topbar{margin-left:-2px;margin-right:-2px;padding-left:2px;padding-right:2px}.topbar-actions{justify-content:flex-start;width:100%}.topbar-actions .text-button{flex:1 1 120px}.hero-card{display:grid;grid-template-columns:1fr;gap:12px;padding:18px}.section-heading{align-items:flex-start;flex-wrap:wrap}.section-heading h2{font-size:18px}.order-card{padding:15px}.order-dialog{width:calc(100% - 16px);border-radius:18px}.dialog-head{padding:16px}.dialog-body{padding:16px}.action-row{display:grid;grid-template-columns:1fr}.action-row>*{width:100%}.profile-card{min-width:0}.profile-card input,.profile-card textarea{max-width:100%}}@media(max-width:360px){.shell{width:calc(100% - 16px)}.auth-card{padding:18px}.topbar h1{font-size:25px}.hero-card h2{font-size:19px}.order-item{grid-template-columns:44px minmax(0,1fr)}.order-item-image{width:44px;height:44px}}
/* Customer submissions: compact, thumb-friendly controls */
.order-card-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;margin-top:12px;padding-top:10px;border-top:1px solid #edf3f1;color:#64748b;font-size:12px;line-height:1.4;text-align:left}.mini-proof{color:#0f766e;font-weight:800;overflow-wrap:anywhere}.order-detail-hero{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}.order-feature-card{margin:18px 0;padding:16px;border:1px solid #d6e6e1;border-radius:18px;background:#fff;box-shadow:0 8px 20px rgba(23,50,77,.05)}.payment-proof-card{border-color:#ecd9b6;background:linear-gradient(145deg,#fffdf8,#fffaf0)}.feature-heading{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px}.feature-heading h3{margin:2px 0 4px;color:#17324d;font-size:17px;line-height:1.3}.feature-heading .eyebrow{margin:0;color:#0f766e}.submission-pill{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800;line-height:1.3;text-align:center}.submission-pill.pending{background:#fff4d8;color:#9a670f}.submission-pill.approved{background:#e6f4f1;color:#0f766e}.submission-pill.rejected{background:#fff0ed;color:#b42318}.submission-pill.selected{background:#e6f4f1;color:#0f766e}.proof-status{display:flex;flex-direction:column;align-items:flex-end;gap:3px;max-width:180px}.submission-meta{display:block;color:#64748b;font-size:11px;line-height:1.35;text-align:right}.review-note{margin:8px 0 0;padding:8px 10px;border-left:3px solid #b7791f;color:#7c5a20;font-size:12px;line-height:1.45}.delivery-options{display:grid;gap:9px;margin:14px 0 4px}.delivery-option{position:relative;display:flex;align-items:flex-start;gap:10px;min-width:0;padding:12px;border:1px solid #d6e6e1;border-radius:14px;background:#fbfefd;cursor:pointer;transition:border-color .18s ease,background .18s ease,transform .18s ease}.delivery-option:hover{border-color:#7fbdb3;transform:translateY(-1px)}.delivery-option.selected{border-color:#0f766e;background:#e6f4f1;box-shadow:0 0 0 3px rgba(15,118,110,.08)}.delivery-option input{width:18px;height:18px;flex:0 0 18px;margin:1px 0 0;accent-color:#0f766e}.delivery-option span{display:block;min-width:0}.delivery-option strong{display:block;color:#17324d;font-size:13px;line-height:1.4;overflow-wrap:anywhere}.delivery-option small{display:block;margin-top:3px;color:#64748b;font-size:11px;line-height:1.4;overflow-wrap:anywhere}.compact-actions{align-items:center;margin-bottom:0}.compact-actions .form-message{margin:0;flex:1;min-width:150px}.full-width{width:100%}.file-picker{display:flex;align-items:center;justify-content:center;min-height:46px;margin:14px 0 10px;padding:10px 14px;border:1px dashed #b7791f;border-radius:13px;background:#fffaf0;color:#8b641b;font-size:13px;font-weight:800;cursor:pointer}.file-picker input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.file-picker:focus-within{outline:3px solid rgba(183,121,31,.2);outline-offset:2px}.local-proof-preview{display:grid;gap:6px;margin:10px 0 12px;padding:8px;border:1px solid #ecd9b6;border-radius:14px;background:#fff}.local-proof-preview img{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:10px;background:#f6f2e8}.local-proof-preview span{color:#7c5a20;font-size:11px;line-height:1.35;overflow-wrap:anywhere}.proof-preview-link{display:grid;gap:6px;margin:12px 0;text-decoration:none;color:#2563eb;font-size:12px;font-weight:800}.proof-preview{display:block;width:100%;max-height:220px;object-fit:contain;border:1px solid #e7dcc3;border-radius:12px;background:#fff}.success-note{margin:12px 0 0;color:#0f766e;font-size:12px;line-height:1.45}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 18px 12px;border-bottom:1px solid #dce9e5;background:#fff}.dialog-head h2{margin:3px 0 0;color:#17324d;font-size:21px;line-height:1.25;overflow-wrap:anywhere}.dialog-head .eyebrow{margin:0}.dialog-footer{position:sticky;bottom:0;padding:12px 18px calc(12px + env(safe-area-inset-bottom));border-top:1px solid #dce9e5;background:rgba(255,255,255,.96);z-index:3}.dialog-footer .secondary{min-height:46px}.icon-button{flex:0 0 auto;min-width:44px;min-height:44px}.order-dialog{width:min(calc(100vw - 24px),720px);max-width:720px;max-height:min(90dvh,900px);padding:0;border:1px solid #d6e6e1;border-radius:22px;overflow:hidden;background:#fff;box-shadow:0 24px 60px rgba(23,50,77,.22)}.order-dialog::backdrop{background:rgba(23,50,77,.42);backdrop-filter:blur(3px)}#dialog-content{min-height:0;overflow-y:auto;overscroll-behavior:contain}#dialog-content>.dialog-body{padding:16px 18px 22px}.dialog-body h3{margin:18px 0 8px;color:#17324d;font-size:16px;line-height:1.35}.form-message{overflow-wrap:anywhere;line-height:1.45}.secondary,.primary{min-height:44px;white-space:normal;overflow-wrap:anywhere}@media(max-width:520px){.order-feature-card{padding:14px}.feature-heading{display:block}.feature-heading .submission-pill,.proof-status{margin-top:8px;align-items:flex-start}.submission-meta{text-align:left}.compact-actions{display:block}.compact-actions .primary{width:100%}.compact-actions .form-message{margin-top:8px}.dialog-head{padding:14px 14px 10px}.dialog-footer{padding-left:14px;padding-right:14px}.order-dialog{width:calc(100vw - 16px);max-height:94dvh;border-radius:18px}#dialog-content>.dialog-body{padding:13px 14px 18px}.delivery-option{padding:11px}}

/* Delivery detail fields: compact, readable, and safe on narrow screens */
.delivery-method-details{display:grid;gap:8px;margin:12px 0;padding:12px;border:1px solid #dce9e5;border-radius:14px;background:#f8fcfb}.delivery-method-details.hidden{display:none}.field-label{display:block;color:#526b68;font-size:12px;font-weight:800;line-height:1.4}.delivery-method-details input,.delivery-method-details textarea{box-sizing:border-box;width:100%;min-width:0;border:1px solid #cbded9;border-radius:10px;background:#fff;color:#17324d;font:inherit;font-size:14px;padding:11px 12px}.delivery-method-details textarea{resize:vertical;line-height:1.45}.field-hint{margin:0;color:#718096;font-size:11px;line-height:1.45}.fixed-slot{display:inline-flex;justify-self:start;align-items:center;padding:5px 8px;border-radius:999px;background:#e6f4f1;color:#0f766e;font-size:11px;font-weight:800}.delivery-summary-details{max-width:260px;overflow-wrap:anywhere}.delivery-method-details input:focus,.delivery-method-details textarea:focus{outline:3px solid rgba(15,118,110,.16);border-color:#0f766e}@media(max-width:520px){.delivery-method-details{padding:11px}.delivery-summary-details{max-width:none}}

/* Payment-proof upload feedback: clear, compact, and mobile-friendly */
.upload-progress{display:grid;gap:8px;margin:10px 0 12px;padding:11px 12px;border:1px solid #cfe3de;border-radius:13px;background:#f5fbf9;color:#526b68}.upload-progress-label{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;line-height:1.4}.upload-progress-label strong{color:#0f766e;font-variant-numeric:tabular-nums}.upload-progress-track{height:9px;overflow:hidden;border-radius:999px;background:#dce9e5}.upload-progress-track span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#0f766e,#54a79b);transition:width .2s ease}.payment-proof-card .secondary.full-width{margin-top:9px}.payment-proof-card button:disabled{cursor:wait;opacity:.7}@media(max-width:420px){.upload-progress{padding:10px}.upload-progress-label{font-size:11px}}

/* Customer payment status replacement: two clear, thumb-friendly Cantonese choices */
.payment-status-card{border-color:#cfe3de;background:linear-gradient(145deg,#fbfffe,#f3faf8)}
.payment-status-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 4px}
.payment-status-option{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:13px;border:1px solid #d7dde3;border-radius:14px;background:#f7f8fa;cursor:pointer;transition:border-color .18s ease,background .18s ease,transform .18s ease,box-shadow .18s ease}
.payment-status-option:hover{transform:translateY(-1px)}
.payment-status-option[data-payment-status="paid"]{border-color:#b8dfc2;background:#f2fbf4}
.payment-status-option[data-payment-status="paid"]:hover{border-color:#4aa866}
.payment-status-option[data-payment-status="paid"] strong{color:#237a3e}
.payment-status-option[data-payment-status="paid"].selected{border-color:#2f9e52;background:#dcf4e3;box-shadow:0 0 0 3px rgba(47,158,82,.13)}
.payment-status-option[data-payment-status="not_yet_paid"]{border-color:#d3d8df;background:#f3f4f6}
.payment-status-option[data-payment-status="not_yet_paid"]:hover{border-color:#98a2af}
.payment-status-option[data-payment-status="not_yet_paid"] strong{color:#596574}
.payment-status-option[data-payment-status="not_yet_paid"].selected{border-color:#7b8794;background:#e5e7eb;box-shadow:0 0 0 3px rgba(123,135,148,.13)}
.payment-status-option input{width:18px;height:18px;flex:0 0 18px;margin:1px 0 0}.payment-status-option[data-payment-status="paid"] input{accent-color:#2f9e52}.payment-status-option[data-payment-status="not_yet_paid"] input{accent-color:#7b8794}
.payment-status-option span{display:block;min-width:0}
.payment-status-option strong{display:block;color:#17324d;font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.payment-status-option small{display:block;margin-top:3px;color:#64748b;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.payment-status-card .form-message{margin:10px 0 0;color:#526b68;font-size:12px}
@media(max-width:420px){.payment-status-options{grid-template-columns:1fr}.payment-status-option{padding:12px}}

/* Everything About Thai brand treatment */
.brand-lockup,.portal-brand{display:flex;align-items:center;gap:12px}.brand-lockup{margin-bottom:20px}.brand-logo{width:72px;height:72px;object-fit:contain;border-radius:18px;background:#fffaf5;box-shadow:0 6px 18px rgba(214,112,91,.16)}.portal-logo{width:48px;height:48px;object-fit:contain;border-radius:12px;background:#fffaf5}.brand-subtitle{margin:2px 0 0;color:#64748b;font-size:12px;font-weight:700}.portal-brand h1{margin-bottom:0}.portal-brand .eyebrow{margin-bottom:2px}.auth-card{border-color:#efd6c9;box-shadow:0 18px 50px rgba(214,112,91,.12)}.hero-card{background:linear-gradient(135deg,#0f766e 0%,#176b61 68%,#d6705b 180%);box-shadow:0 14px 34px rgba(15,118,110,.2)}.primary{background:#0f766e}.primary:hover{background:#0b625b}.status,.submission-pill.selected,.submission-pill.approved{background:#e6f4f1;color:#0f766e}.eyebrow,.text-button,.icon-button{color:#0f766e}@media(max-width:420px){.brand-logo{width:64px;height:64px}.portal-logo{width:42px;height:42px}.brand-lockup,.portal-brand{gap:9px}}

/* Login entrance animation: subtle, fast, and safe for reduced-motion users */
@keyframes loginCardEnter{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes loginLogoEnter{from{opacity:0;transform:scale(.88) rotate(-3deg)}to{opacity:1;transform:scale(1) rotate(0)}}
@keyframes loginContentEnter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.auth-card{animation:loginCardEnter .42s cubic-bezier(.22,.8,.26,1) both}.brand-logo{animation:loginLogoEnter .52s cubic-bezier(.22,.8,.26,1) .08s both}.auth-card h1,.auth-card>p:not(.eyebrow),.auth-card form,.auth-card>#show-setup{animation:loginContentEnter .36s ease-out .16s both}.brand-lockup{min-width:0}.brand-lockup>div{min-width:0}.brand-subtitle{overflow-wrap:anywhere}.portal-brand{min-width:0}.portal-brand>div{min-width:0}.portal-brand h1{overflow-wrap:anywhere}
@media(max-width:380px){.auth-card{padding:18px}.brand-lockup{align-items:flex-start;gap:10px}.brand-logo{width:58px;height:58px;border-radius:14px}.brand-subtitle{font-size:11px;line-height:1.35}.auth-card h1{font-size:26px}.portal-logo{width:40px;height:40px}.portal-brand h1{font-size:23px}}
@media(prefers-reduced-motion:reduce){.auth-card,.brand-logo,.auth-card h1,.auth-card>p:not(.eyebrow),.auth-card form,.auth-card>#show-setup{animation:none!important}}

.support-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:12px;padding:10px 14px;border:1px solid #b9ddd6;border-radius:12px;background:#f0faf7;color:#0f766e;font-size:13px;font-weight:800;text-decoration:none}.support-link:hover{background:#e6f4f1}.history-hint{margin:-6px 0 10px}.sync-status-copy{min-width:0}.is-loading{cursor:wait}@media(max-width:520px){.support-link{width:100%}.history-hint{line-height:1.45}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}

.saved-profile-panel{margin:10px 0 14px;padding:12px;border:1px solid #cce8e1;border-radius:14px;background:#f4fbf9}.saved-profile-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.saved-profile-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}.saved-profile-chip{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px;border:1px solid #b7ded5;border-radius:12px;background:#fff;color:#17324d;text-align:left;cursor:pointer}.saved-profile-chip:hover,.saved-profile-chip:focus{border-color:#0f766e;outline:3px solid rgba(15,118,110,.12)}.saved-profile-chip strong{font-size:13px}.saved-profile-chip span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#667085;font-size:11px}.sticky-order-summary{position:sticky;bottom:10px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;padding:12px 14px;border:1px solid #b7ded5;border-radius:14px;background:rgba(248,252,251,.96);box-shadow:0 8px 24px rgba(23,33,43,.08);color:#667085}.sticky-order-summary strong{color:#0f766e;font-size:18px}@media(max-width:420px){.saved-profile-list{grid-template-columns:1fr}.saved-profile-heading{align-items:flex-start;flex-direction:column}.sticky-order-summary{bottom:6px}}

.saved-profile-row{display:flex;align-items:stretch;gap:8px;margin-top:8px}.saved-profile-row .saved-profile-chip{flex:1;text-align:left}.saved-profile-delete{min-width:52px;display:flex;align-items:center;justify-content:center;color:#b42318;border:1px solid #f1c7c2;border-radius:12px;background:#fff7f5}@media(max-width:600px){.saved-profile-row{gap:6px}.saved-profile-delete{min-width:56px;min-height:44px}}


/* Brand polish v0: calm enterprise operations + warm Thai commerce */
:root{--brand-teal:#0f766e;--brand-ink:#17324d;--brand-paper:#faf9f6;--brand-mint:#e6f4f1;--brand-border:#dce9e5;--brand-muted:#667085;--brand-shadow:0 8px 24px rgba(23,50,77,.06)}
body{background:radial-gradient(circle at 12% 0%,rgba(230,244,241,.85),transparent 34%),var(--brand-paper);color:var(--brand-ink)}
.auth-view{min-height:100dvh;display:grid;place-items:center;padding:24px 16px}.auth-card{width:min(100%,460px);padding:28px;border:1px solid var(--brand-border);border-radius:24px;background:rgba(255,255,255,.96);box-shadow:0 16px 44px rgba(23,50,77,.1)}.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:20px}.auth-brand img{width:52px;height:52px;border-radius:15px;object-fit:contain}.auth-brand .eyebrow{margin:0;color:var(--brand-teal);font-weight:900;letter-spacing:.08em}.auth-card h1{margin:0;color:var(--brand-ink);font-size:28px;line-height:1.22;letter-spacing:-.02em}.auth-card .muted{line-height:1.55}
.portal-brand{min-width:0}.portal-logo{width:48px;height:48px;border-radius:14px;object-fit:contain;background:#fff;border:1px solid var(--brand-border);box-shadow:var(--brand-shadow)}.portal-brand>div{min-width:0}.portal-brand h1{letter-spacing:-.02em}.topbar{border-bottom:1px solid rgba(220,233,229,.78)}
.hero-card{border:1px solid var(--brand-border);background:linear-gradient(145deg,#fff 0%,#f1faf7 100%);box-shadow:var(--brand-shadow)}.hero-card h2{color:var(--brand-ink);letter-spacing:-.02em}.profile-card,.order-card{border-color:var(--brand-border);box-shadow:var(--brand-shadow)}.order-card{border-radius:18px;background:rgba(255,255,255,.94)}.order-card:hover{border-color:#9bcfc4}
.section-heading h2,.order-card h3{letter-spacing:-.015em}.primary{border-radius:12px;background:var(--brand-teal);box-shadow:0 6px 14px rgba(15,118,110,.18)}.primary:hover{background:#0b625b;transform:translateY(-1px)}.text-button{color:var(--brand-teal);font-weight:800}.support-link{color:var(--brand-teal);font-weight:800}
.saved-profile-card{border:1px solid var(--brand-border);border-radius:14px;background:#fff;box-shadow:var(--brand-shadow)}.saved-profile-card.selected{border-color:var(--brand-teal);background:var(--brand-mint);box-shadow:0 0 0 3px rgba(15,118,110,.08)}
@media(max-width:600px){.auth-card{padding:22px;border-radius:20px}.auth-card h1{font-size:25px}.portal-logo{width:42px;height:42px}.hero-card{border-radius:18px}.topbar-actions .text-button{min-width:96px}}
@media(prefers-reduced-motion:reduce){.primary:hover,.order-card:hover{transform:none}}


@media (prefers-color-scheme: dark){
  :root{--brand-paper:#101918;--brand-ink:#f4f7f6;--brand-mint:#183b35;--brand-border:#30413d;--brand-muted:#a5b6b2;--brand-shadow:0 8px 24px rgba(0,0,0,.22)}
  body{background:radial-gradient(circle at 12% 0%,rgba(15,118,110,.18),transparent 36%),var(--brand-paper);color:var(--brand-ink)}
  .auth-card,.profile-card,.order-card,.saved-profile-card{background:#172522;color:var(--brand-ink);border-color:var(--brand-border);box-shadow:var(--brand-shadow)}
  .auth-card h1,.hero-card h2,.section-heading h2,.order-card h3{color:var(--brand-ink)}
  .auth-card input,.auth-card textarea,.profile-card input,.profile-card textarea,.order-dialog{background:#12201e;color:var(--brand-ink);border-color:#45605a}
  input::placeholder,textarea::placeholder{color:#82938f}
  .hero-card{background:linear-gradient(135deg,#0c5c55 0%,#144b43 72%,#713e36 180%);border-color:#3d7168}
  .saved-profile-panel,.sticky-order-summary{background:rgba(24,59,53,.92);border-color:#3d7168;color:#c9d8d4}
  .saved-profile-chip{background:#172522;color:var(--brand-ink);border-color:#45605a}.saved-profile-chip span{color:#a5b6b2}
  .saved-profile-card.selected{background:#1b5148;border-color:#48b7a8;box-shadow:0 0 0 3px rgba(72,183,168,.14)}
  .support-link{background:#183b35;color:#8ed9ca;border-color:#3d7168}.support-link:hover{background:#205349}
  .form-message{color:#b8cbc6}.muted,.small{color:#a5b6b2}.topbar{border-color:#30413d}.order-dialog{color:var(--brand-ink)}
}


.auth-brand-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.theme-toggle{min-width:64px;min-height:44px;padding:8px 10px;border:1px solid var(--brand-border,#dce9e5);border-radius:12px;background:var(--brand-mint,#e6f4f1);color:var(--brand-teal,#0f766e);font-size:12px;font-weight:800;cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease}.theme-toggle:hover,.theme-toggle:focus-visible{border-color:var(--brand-teal,#0f766e);outline:3px solid rgba(15,118,110,.14)}.theme-toggle:active{transform:scale(.97)}.topbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}@media(max-width:520px){.auth-brand-row{gap:8px}.theme-toggle{min-width:60px}.topbar-actions{gap:5px}.topbar-actions .theme-toggle{order:-1}}

html[data-theme="light"] body{background:radial-gradient(circle at 12% 0%,rgba(230,244,241,.85),transparent 34%),#faf9f6;color:#17324d}html[data-theme="light"] .auth-card,html[data-theme="light"] .profile-card,html[data-theme="light"] .order-card,html[data-theme="light"] .saved-profile-card{background:#fff;color:#17324d;border-color:#dce9e5}html[data-theme="light"] .hero-card{background:linear-gradient(145deg,#fff 0%,#f1faf7 100%)}
html[data-theme="dark"] body{background:radial-gradient(circle at 12% 0%,rgba(15,118,110,.18),transparent 36%),#101918;color:#f4f7f6}html[data-theme="dark"] .auth-card,html[data-theme="dark"] .profile-card,html[data-theme="dark"] .order-card,html[data-theme="dark"] .saved-profile-card{background:#172522;color:#f4f7f6;border-color:#30413d;box-shadow:0 8px 24px rgba(0,0,0,.22)}html[data-theme="dark"] .auth-card h1,html[data-theme="dark"] .hero-card h2,html[data-theme="dark"] .section-heading h2,html[data-theme="dark"] .order-card h3{color:#f4f7f6}html[data-theme="dark"] .hero-card{background:linear-gradient(135deg,#0c5c55 0%,#144b43 72%,#713e36 180%);border-color:#3d7168}html[data-theme="dark"] .theme-toggle{background:#183b35;color:#8ed9ca;border-color:#3d7168}html[data-theme="dark"] .theme-toggle:hover,html[data-theme="dark"] .theme-toggle:focus-visible{border-color:#48b7a8}html[data-theme="dark"] .topbar{border-color:#30413d}
@media(prefers-reduced-motion:reduce){.theme-toggle{transition:none}}

/* Contrast-safe website theme layer: keep brand teal, separate primary fills from readable text colors. */
:root{
  --portal-bg:#f7faf9;
  --portal-surface:#ffffff;
  --portal-surface-raised:#f0f7f5;
  --portal-surface-accent:#e1f3ee;
  --portal-text:#15323a;
  --portal-muted:#536b70;
  --portal-primary:#0b766e;
  --portal-primary-text:#0b766e;
  --portal-on-primary:#ffffff;
  --portal-border:#c6d9d5;
  --portal-border-strong:#7ab8ab;
  --portal-warning:#854d0e;
  --portal-warning-surface:#fff7e7;
  --portal-danger:#a32318;
  --portal-danger-surface:#fff0ed;
  color-scheme:light;
}
html[data-theme="light"]{
  --portal-bg:#f7faf9;
  --portal-surface:#ffffff;
  --portal-surface-raised:#f0f7f5;
  --portal-surface-accent:#e1f3ee;
  --portal-text:#15323a;
  --portal-muted:#536b70;
  --portal-primary:#0b766e;
  --portal-primary-text:#0b766e;
  --portal-on-primary:#ffffff;
  --portal-border:#c6d9d5;
  --portal-border-strong:#7ab8ab;
  --portal-warning:#854d0e;
  --portal-warning-surface:#fff7e7;
  --portal-danger:#a32318;
  --portal-danger-surface:#fff0ed;
  color-scheme:light;
}
html[data-theme="dark"]{
  --portal-bg:#0d1716;
  --portal-surface:#142421;
  --portal-surface-raised:#1a302b;
  --portal-surface-accent:#1d433b;
  --portal-text:#f2fbf8;
  --portal-muted:#b4c9c4;
  --portal-primary:#0e7067;
  --portal-primary-text:#6ed7c7;
  --portal-on-primary:#ffffff;
  --portal-border:#35514b;
  --portal-border-strong:#4a8578;
  --portal-warning:#f4c36a;
  --portal-warning-surface:#3a2b18;
  --portal-danger:#ffb4a7;
  --portal-danger-surface:#3b221e;
  color-scheme:dark;
}
html[data-theme="light"] body,html[data-theme="dark"] body{background:var(--portal-bg);color:var(--portal-text)}
html[data-theme="light"] .auth-card,html[data-theme="dark"] .auth-card,html[data-theme="light"] .profile-card,html[data-theme="dark"] .profile-card,html[data-theme="light"] .order-card,html[data-theme="dark"] .order-card,html[data-theme="light"] .saved-profile-card,html[data-theme="dark"] .saved-profile-card,html[data-theme="light"] .order-feature-card,html[data-theme="dark"] .order-feature-card{background:var(--portal-surface);color:var(--portal-text);border-color:var(--portal-border);box-shadow:0 12px 30px rgba(5,35,31,.12)}
html[data-theme="light"] .auth-card h1,html[data-theme="dark"] .auth-card h1,html[data-theme="light"] .topbar h1,html[data-theme="dark"] .topbar h1,html[data-theme="light"] .section-heading h2,html[data-theme="dark"] .section-heading h2,html[data-theme="light"] .order-card h3,html[data-theme="dark"] .order-card h3,html[data-theme="light"] .feature-heading h3,html[data-theme="dark"] .feature-heading h3,html[data-theme="light"] .dialog-head h2,html[data-theme="dark"] .dialog-head h2{color:var(--portal-text)}
html[data-theme="light"] .muted,html[data-theme="dark"] .muted,html[data-theme="light"] .order-date,html[data-theme="dark"] .order-date,html[data-theme="light"] .submission-meta,html[data-theme="dark"] .submission-meta,html[data-theme="light"] .order-item-copy span,html[data-theme="dark"] .order-item-copy span,html[data-theme="light"] .order-item-copy small,html[data-theme="dark"] .order-item-copy small{color:var(--portal-muted)}
html[data-theme="light"] .eyebrow,html[data-theme="dark"] .eyebrow,html[data-theme="light"] .text-button,html[data-theme="dark"] .text-button,html[data-theme="light"] .icon-button,html[data-theme="dark"] .icon-button,html[data-theme="light"] .status,html[data-theme="dark"] .status,html[data-theme="light"] .mini-proof,html[data-theme="dark"] .mini-proof,html[data-theme="light"] .success-note,html[data-theme="dark"] .success-note{color:var(--portal-primary-text)}
html[data-theme="light"] .auth-card input,html[data-theme="dark"] .auth-card input,html[data-theme="light"] textarea,html[data-theme="dark"] textarea,html[data-theme="light"] .secondary,html[data-theme="dark"] .secondary{background:var(--portal-surface-raised);color:var(--portal-text);border-color:var(--portal-border)}
html[data-theme="light"] .auth-card input::placeholder,html[data-theme="dark"] .auth-card input::placeholder,html[data-theme="light"] textarea::placeholder,html[data-theme="dark"] textarea::placeholder{color:var(--portal-muted);opacity:1}
html[data-theme="light"] .auth-card input:focus,html[data-theme="dark"] .auth-card input:focus{border-color:var(--portal-border-strong);box-shadow:0 0 0 3px color-mix(in srgb,var(--portal-primary-text) 18%,transparent)}
html[data-theme="light"] .primary,html[data-theme="dark"] .primary,html[data-theme="light"] .hero-card{background:var(--portal-primary);color:var(--portal-on-primary)}
html[data-theme="dark"] .hero-card{background:linear-gradient(135deg,#0e7067 0%,#145a51 72%,#6a3b35 180%);color:var(--portal-on-primary)}
html[data-theme="light"] .hero-card .eyebrow,html[data-theme="dark"] .hero-card .eyebrow,html[data-theme="light"] .hero-card .muted,html[data-theme="dark"] .hero-card .muted{color:#d9f4ee}
html[data-theme="light"] .secondary:hover,html[data-theme="dark"] .secondary:hover,html[data-theme="light"] .theme-toggle:hover,html[data-theme="dark"] .theme-toggle:hover{border-color:var(--portal-border-strong);background:var(--portal-surface-accent)}
html[data-theme="light"] .secondary,html[data-theme="dark"] .secondary{font-weight:800}
html[data-theme="light"] .badge,html[data-theme="dark"] .badge{background:var(--portal-warning-surface);color:var(--portal-warning)}
html[data-theme="light"] .order-card .status,html[data-theme="dark"] .order-card .status,html[data-theme="light"] .delivery-option.selected,html[data-theme="dark"] .delivery-option.selected{background:var(--portal-surface-accent);color:var(--portal-primary-text);border-color:var(--portal-border-strong)}
html[data-theme="light"] .order-dialog,html[data-theme="dark"] .order-dialog,html[data-theme="light"] .dialog-head,html[data-theme="dark"] .dialog-head,html[data-theme="light"] .dialog-footer,html[data-theme="dark"] .dialog-footer{background:var(--portal-surface);color:var(--portal-text);border-color:var(--portal-border)}
html[data-theme="light"] .timeline,html[data-theme="dark"] .timeline,html[data-theme="light"] .tracking-line,html[data-theme="dark"] .tracking-line,html[data-theme="light"] .delivery-option,html[data-theme="dark"] .delivery-option{background:var(--portal-surface-raised);border-color:var(--portal-border)}
html[data-theme="light"] .milestone-copy strong,html[data-theme="dark"] .milestone-copy strong,html[data-theme="light"] .order-item-copy strong,html[data-theme="dark"] .order-item-copy strong,html[data-theme="light"] .delivery-option strong,html[data-theme="dark"] .delivery-option strong{color:var(--portal-text)}
html[data-theme="light"] .milestone-copy p,html[data-theme="dark"] .milestone-copy p,html[data-theme="light"] .milestone-copy small,html[data-theme="dark"] .milestone-copy small{color:var(--portal-muted)}
html[data-theme="light"] .milestone-rail,html[data-theme="dark"] .milestone-rail{background:var(--portal-border)}
html[data-theme="light"] .milestone-dot,html[data-theme="dark"] .milestone-dot{background:var(--portal-surface);border-color:var(--portal-border-strong);color:var(--portal-muted)}
html[data-theme="light"] .milestone.completed .milestone-dot,html[data-theme="dark"] .milestone.completed .milestone-dot{background:var(--portal-primary);border-color:var(--portal-primary);color:var(--portal-on-primary)}
html[data-theme="light"] .milestone.current .milestone-dot,html[data-theme="dark"] .milestone.current .milestone-dot{background:var(--portal-surface);border-color:var(--portal-primary-text);color:var(--portal-primary-text)}
html[data-theme="light"] .submission-pill.pending,html[data-theme="dark"] .submission-pill.pending,html[data-theme="light"] .file-picker,html[data-theme="dark"] .file-picker{background:var(--portal-warning-surface);color:var(--portal-warning);border-color:var(--portal-border-strong)}
html[data-theme="light"] .submission-pill.approved,html[data-theme="dark"] .submission-pill.approved,html[data-theme="light"] .submission-pill.selected,html[data-theme="dark"] .submission-pill.selected{background:var(--portal-surface-accent);color:var(--portal-primary-text)}
html[data-theme="light"] .submission-pill.rejected,html[data-theme="dark"] .submission-pill.rejected,html[data-theme="light"] .form-message,html[data-theme="dark"] .form-message{background:var(--portal-danger-surface);color:var(--portal-danger)}
html[data-theme="light"] .theme-toggle,html[data-theme="dark"] .theme-toggle{background:var(--portal-surface-accent);color:var(--portal-primary-text);border-color:var(--portal-border-strong)}
html[data-theme="light"] .topbar,html[data-theme="dark"] .topbar{background:color-mix(in srgb,var(--portal-bg) 92%,transparent);border-color:var(--portal-border)}
html[data-theme="light"] .status-history,html[data-theme="dark"] .status-history{border-color:var(--portal-border)}
html[data-theme="light"] .status-history-row,html[data-theme="dark"] .status-history-row{color:var(--portal-muted)}
html[data-theme="light"] .status-history-row strong,html[data-theme="dark"] .status-history-row strong{color:var(--portal-text)}
html[data-theme="light"] .status-history-row time,html[data-theme="dark"] .status-history-row time{color:var(--portal-muted)}
@media(prefers-reduced-motion:reduce){html[data-theme="light"] *,html[data-theme="dark"] *{scroll-behavior:auto}}

/* Full Redesign production layer: Order Hub, SF-first delivery, and tabbed order detail. */
:root{--hub-paper:#faf9f6;--hub-ink:#17324d;--hub-teal:#0f766e;--hub-mint:#e6f4f1;--hub-border:#dce9e5;--hub-muted:#667085;--hub-shadow:0 12px 30px rgba(23,50,77,.07)}
body{background:radial-gradient(circle at 12% 0%,rgba(230,244,241,.86),transparent 34%),var(--hub-paper);color:var(--hub-ink)}
.auth-screen{min-height:100dvh;display:grid;place-items:center;padding:24px 16px}.auth-card{width:min(100%,460px);padding:28px;border:1px solid var(--hub-border);border-radius:24px;background:rgba(255,255,255,.96);box-shadow:0 16px 44px rgba(23,50,77,.1)}.auth-brand-row,.brand-lockup{display:flex;align-items:center;gap:12px}.auth-brand-row{justify-content:space-between;margin-bottom:22px}.brand-lockup{min-width:0}.brand-logo,.portal-logo{width:50px;height:50px;object-fit:contain;border-radius:15px;background:#fff;border:1px solid var(--hub-border);box-shadow:var(--hub-shadow)}.brand-subtitle{margin:3px 0 0;color:var(--hub-muted);font-size:12px}.auth-copy{margin:18px 0 20px}.auth-copy h1{margin:4px 0 8px;color:var(--hub-ink);font-size:30px;line-height:1.2;letter-spacing:-.025em}.auth-form{margin-top:0}.primary-button{display:flex;align-items:center;justify-content:center;gap:10px;border-radius:13px;background:var(--hub-teal);box-shadow:0 8px 18px rgba(15,118,110,.2)}.primary-button:hover{background:#0b625b;transform:translateY(-1px)}.support-link{display:block;margin-top:16px;padding:11px 12px;border:1px solid var(--hub-border);border-radius:12px;background:var(--hub-mint);color:var(--hub-teal);font-weight:800;text-align:center;text-decoration:none}.theme-toggle{min-height:40px;padding:8px 11px;border:1px solid var(--hub-border);border-radius:999px;background:#fff;color:var(--hub-teal);font:inherit;font-size:12px;font-weight:800;cursor:pointer}.order-hub{animation:portalFadeUp .32s ease-out both}.order-hub .topbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 18px;padding:12px 0 14px;background:rgba(250,249,246,.9);border-bottom:1px solid rgba(220,233,229,.82)}.portal-brand h1{margin:2px 0 0;color:var(--hub-ink);font-size:21px;letter-spacing:-.02em}.topbar-actions{align-items:center}.hero-card{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;min-height:126px;padding:22px;border:1px solid var(--hub-border);border-radius:22px;background:linear-gradient(145deg,#fff 0%,#f1faf7 100%);box-shadow:var(--hub-shadow)}.hero-card h2{margin:4px 0 8px;color:var(--hub-ink);font-size:24px;line-height:1.2;letter-spacing:-.025em}.hero-card p{margin:0}.status-badge{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:5px 10px;border-radius:999px;font-size:11px;font-weight:900;white-space:nowrap}.status-badge.current{background:var(--hub-mint);color:var(--hub-teal)}.quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.quick-actions button{display:grid;grid-template-columns:30px 1fr;column-gap:8px;align-items:center;min-width:0;padding:14px;border:1px solid var(--hub-border);border-radius:17px;background:#fff;color:var(--hub-ink);text-align:left;cursor:pointer;box-shadow:var(--hub-shadow);transition:transform .18s ease,border-color .18s ease}.quick-actions button:hover{border-color:#9bcfc4;transform:translateY(-2px)}.quick-actions button>span{grid-row:span 2;display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:var(--hub-mint);color:var(--hub-teal);font-size:18px;font-weight:900}.quick-actions strong{font-size:13px;line-height:1.3}.quick-actions small{margin-top:2px;color:var(--hub-muted);font-size:11px;line-height:1.35}.profile-card,.content-section{margin-top:16px}.profile-card{padding:18px;border:1px solid var(--hub-border);border-radius:20px;background:#fff;box-shadow:var(--hub-shadow)}.section-heading{gap:12px}.section-heading h2{color:var(--hub-ink);letter-spacing:-.018em}.count-badge{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border-radius:999px;background:var(--hub-mint);color:var(--hub-teal);font-weight:800}.order-list{gap:10px}.order-card{padding:16px;border:1px solid var(--hub-border);border-radius:18px;background:rgba(255,255,255,.95);box-shadow:var(--hub-shadow)}.order-card:hover{border-color:#9bcfc4}.order-row{align-items:flex-start}.order-number{font-weight:900;letter-spacing:.01em}.order-total{color:var(--hub-teal);font-weight:900}.status{display:inline-flex;margin-top:9px;padding:5px 9px;border-radius:999px;background:var(--hub-mint);color:var(--hub-teal);font-size:11px;font-weight:900}.history-hint{margin:6px 0 12px}.detail-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 14px;padding:5px;border:1px solid var(--hub-border);border-radius:14px;background:#f4faf8}.detail-tab{min-height:40px;border:0;border-radius:10px;background:transparent;color:var(--hub-muted);font:inherit;font-size:12px;font-weight:900;cursor:pointer}.detail-tab.active{background:#fff;color:var(--hub-teal);box-shadow:0 3px 10px rgba(23,50,77,.08)}.detail-panel.hidden{display:none}.detail-panel>h3:first-child{margin-top:0}.order-feature-card{border-color:var(--hub-border);box-shadow:var(--hub-shadow)}
@media(max-width:600px){.auth-card{padding:22px;border-radius:20px}.auth-copy h1{font-size:26px}.brand-logo,.portal-logo{width:44px;height:44px}.order-hub .topbar{align-items:flex-start;flex-wrap:wrap}.topbar-actions{width:100%;justify-content:flex-start}.topbar-actions .text-button{flex:1 1 90px}.hero-card{display:block;padding:18px;border-radius:19px}.hero-card .status-badge{margin-top:14px}.hero-card h2{font-size:21px}.quick-actions{gap:8px}.quick-actions button{padding:12px;grid-template-columns:26px 1fr}.quick-actions button>span{width:26px;height:26px;font-size:16px}.profile-card{padding:15px}}
@media(max-width:380px){.quick-actions{grid-template-columns:1fr}.auth-card{padding:18px}.auth-copy h1{font-size:24px}}
@media(prefers-reduced-motion:reduce){.primary-button:hover,.quick-actions button:hover{transform:none}.order-hub{animation:none}}
@media(prefers-color-scheme:dark){:root{--hub-paper:#101918;--hub-ink:#f4f7f6;--hub-mint:#183b35;--hub-border:#30413d;--hub-muted:#a5b6b2;--hub-shadow:0 12px 30px rgba(0,0,0,.22)}body{background:radial-gradient(circle at 12% 0%,rgba(15,118,110,.18),transparent 36%),var(--hub-paper);color:var(--hub-ink)}.auth-card,.profile-card,.order-card,.quick-actions button{background:#172522;color:var(--hub-ink);border-color:var(--hub-border)}.auth-copy h1,.portal-brand h1,.hero-card h2,.section-heading h2{color:var(--hub-ink)}.theme-toggle{background:#172522;color:#8ed9ca;border-color:#3d7168}.order-hub .topbar{background:rgba(16,25,24,.9);border-color:var(--hub-border)}.hero-card{background:linear-gradient(135deg,#0c5c55 0%,#144b43 72%,#713e36 180%);border-color:#3d7168}.quick-actions button>span{background:#1b5148;color:#8ed9ca}.quick-actions small,.muted,.small{color:var(--hub-muted)}.count-badge,.status-badge.current,.status{background:#1b5148;color:#8ed9ca}.detail-tabs{background:#183b35;border-color:#3d7168}.detail-tab{color:#a5b6b2}.detail-tab.active{background:#172522;color:#8ed9ca}.support-link{background:#183b35;color:#8ed9ca;border-color:#3d7168}.dialog-head,.dialog-footer,.order-dialog{background:#172522;color:var(--hub-ink);border-color:var(--hub-border)}}

/* Audit remediation: standalone SF profile workspace and clearer empty state. */
.sf-profile-workspace{scroll-margin-top:16px}.sf-profile-form{margin-top:14px}.saved-profile-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.standalone-saved-profile{align-items:flex-start}.empty-order-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px}.compact-support{display:inline-flex;align-items:center;min-height:40px;padding:9px 12px;border-radius:12px}.sf-profile-workspace .section-heading{align-items:flex-start}.sf-profile-workspace input,.sf-profile-workspace textarea{width:100%;box-sizing:border-box}.sf-profile-workspace button:disabled{opacity:.55;cursor:not-allowed}@media(max-width:600px){.saved-profile-actions{width:100%}.saved-profile-actions .text-button{flex:1 1 auto}.empty-order-actions>*{flex:1 1 150px;text-align:center}}

.item-remark {
  display: block;
  margin-top: 4px;
  color: var(--muted, #7c8b87);
  font-size: 0.78rem;
  line-height: 1.35;
}

/* Customer Netlify: Google Form replaces inline Delivery and Payment submissions. */
.customer-form-banner,
.customer-form-card { border-color: rgba(15, 118, 110, 0.24); background: linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.98)); }
.quick-action-link { display: flex; flex-direction: column; gap: 0.2rem; text-decoration: none; color: inherit; }
.quick-action-link.disabled-link { opacity: 0.62; cursor: not-allowed; }
.customer-form-card { margin-top: 1.25rem; padding: 1rem; border-radius: 1rem; }
.customer-form-card .button-link { margin-top: 0.75rem; text-align: center; }
.order-item-image[hidden] { display: none; }
@media (prefers-color-scheme: dark) {
  .customer-form-banner,
  .customer-form-card { background: linear-gradient(135deg, rgba(15, 61, 58, 0.92), rgba(24, 34, 39, 0.98)); border-color: rgba(94, 234, 212, 0.28); }
}

.payment-card-grid{display:grid;grid-template-columns:minmax(0,180px) minmax(0,1fr);gap:18px;align-items:center}.payment-qr-wrap{display:grid;gap:10px}.payment-qr-image{display:block;width:100%;max-width:180px;aspect-ratio:1/1;object-fit:cover;border-radius:14px;border:1px solid #cbded9;background:#e9ffff}.payment-details{display:grid;gap:12px}.payment-detail-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 14px;border-radius:12px;background:#f4faf8;border:1px solid #d6e6e1}.payment-detail-row strong{font-size:1.05rem;letter-spacing:.02em;color:#17324d;overflow-wrap:anywhere}.payment-card .form-message{min-height:1.2em;margin:0}.payment-card .button-link,.payment-card button{min-height:44px}@media(max-width:600px){.payment-card-grid{grid-template-columns:1fr}.payment-qr-wrap{justify-items:center}.payment-qr-image{max-width:240px}.payment-qr-wrap .button-link{width:100%}.payment-details{width:100%}}

/* Explicit theme overrides for the user-controlled dark mode. */
:root[data-theme="dark"] .order-item,
:root[data-theme="dark"] .order-feature-card,
:root[data-theme="dark"] .dialog-body,
:root[data-theme="dark"] .order-dialog { background:#172522; color:#f4f7f6; border-color:#30413d; }
:root[data-theme="dark"] .order-item-copy strong,
:root[data-theme="dark"] .detail-panel>h3,
:root[data-theme="dark"] .order-total-line,
:root[data-theme="dark"] .dialog-head h2 { color:#f4f7f6; }
:root[data-theme="dark"] .order-item-copy span,
:root[data-theme="dark"] .order-item-copy small,
:root[data-theme="dark"] .dialog-body .muted { color:#a5b6b2; }
:root[data-theme="dark"] .order-item-total { color:#8ed9ca; }
:root[data-theme="dark"] .order-item-image-frame,
:root[data-theme="dark"] .order-item-image,
:root[data-theme="dark"] .order-item-placeholder { background:#183b35; }
:root[data-theme="dark"] .order-item-placeholder { color:#8ed9ca; }
@media (max-width:600px) {
  .order-item { grid-template-columns:52px minmax(0,1fr); align-items:start; }
  .order-item-total { grid-column:2; justify-self:start; margin-top:-3px; }
  .order-item-copy { min-width:0; }
  .order-item-copy strong { font-size:14px; }
  .order-item-copy span,.order-item-copy small { overflow-wrap:anywhere; }
}
