*{box-sizing:border-box}:root{--bg:#f4f8fc;--surface:#fff;--text:#102a43;--muted:#60758a;--border:#d9e2ec;--accent:#0867d7;--navy:#052e6f;--danger:#b42318;--ok:#166534}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif}a{color:var(--accent)}.site-header{min-height:78px;padding:12px clamp(14px,4vw,56px);display:flex;align-items:center;justify-content:flex-start;gap:20px;background:#fff;border-bottom:1px solid var(--border)}.brand img{width:185px;display:block}.public-nav{display:flex;gap:16px;align-items:center}.public-nav a,.nav-button{font-weight:700;text-decoration:none;color:var(--text)}.inline{display:inline}.nav-button{background:none;border:0}.container{width:min(1120px,calc(100% - 28px));margin:auto;padding:34px 0 65px}.wide{width:min(1360px,calc(100% - 28px))}.shipping-banner-container{width:min(1360px,calc(100% - 28px));margin:0 auto;overflow:hidden;background:transparent;border-radius:20px}.shipping-banner-container img{display:block;width:100%;height:auto;object-fit:contain;border-radius:inherit}.track-section{width:min(1120px,calc(100% - 28px));margin:28px auto 24px;background:#fff;border:1px solid var(--border);border-radius:20px;box-shadow:0 16px 45px #052e6f12}.track-section-inner{padding:clamp(28px,5vw,52px)}.eyebrow{margin:0 0 8px;color:var(--accent);font-size:12px;font-weight:800;letter-spacing:.15em}.lead{font-size:19px;color:var(--muted);max-width:600px;margin:0 0 25px}h1{font-size:clamp(34px,5vw,56px);line-height:1.08;margin:0 0 16px}h2{line-height:1.15}.h-md{font-size:34px}.track-form{display:flex;gap:10px;max-width:660px}.track-form input,input,select,textarea{width:100%;min-height:48px;border:1px solid #b9c7d6;border-radius:10px;background:#fff;padding:11px 13px;font:inherit}textarea{min-height:120px}.btn{min-height:46px;border:0;border-radius:10px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;text-align:center;font-weight:800;text-decoration:none;white-space:nowrap}.btn-primary{background:var(--accent);color:#fff}.btn-secondary{background:#edf2f7;color:var(--text)}.btn-quiet{background:transparent;color:var(--accent)}.btn-danger{background:var(--danger);color:#fff}.btn-small{min-height:36px;padding:0 12px;font-size:14px}.btn-block{width:100%}.card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:clamp(20px,4vw,32px);box-shadow:0 7px 26px #052e6f0c}.notice{padding:14px 18px;border-radius:10px;margin:0 0 20px}.notice-error{background:#fff1f0;color:var(--danger);border:1px solid #f3c9c6}.notice-ok{background:#eaf8ee;color:var(--ok);border:1px solid #c8e6d1}.details{margin:0}.details>div{display:grid;grid-template-columns:210px 1fr;gap:15px;padding:14px 0;border-bottom:1px solid #e8eef4}.details dt{color:var(--muted)}.details dd{margin:0;font-weight:600;overflow-wrap:anywhere}.mono{font-family:ui-monospace,monospace}.prewrap{white-space:pre-line}.pill{display:inline-flex;align-items:center;justify-content:center;text-align:center;padding:4px 12px;border-radius:999px;font-size:14px;font-weight:400 !important;line-height:1.25;background:#eef3f8}.pill-pay-paid,.pill-ship-delivered{background:#e3f4e8;color:#1b5e33}.pill-pay-pending-payment,.pill-pay-pending-refundable-deposit,.pill-ship-pending,.pill-ship-on-hold{background:#fff1d6;color:#7a4b00}.pill-pay-partially-paid,.pill-ship-picked-up{background:#e6f0fb;color:#124a8a}.pill-ship-in-transit{background:#ece7fa;color:#4a2f99}.shipment-result{display:grid;gap:22px;margin:0 auto 30px;width:min(1120px,calc(100% - 28px))}.shipment-details-card,.shipment-progress-card{min-width:0}.shipment-progress-card{padding-top:26px}.progress-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding-bottom:4px}.progress-heading h2{margin:0}.progress-caption{margin:0;color:var(--muted);font-size:14px}.progress{list-style:none;margin:25px 0 0;padding:30px 0 0;border-top:1px solid #e8eef4;display:grid;grid-template-columns:repeat(var(--step-count,5),minmax(0,1fr));gap:0}.stage{text-align:center;position:relative;min-width:0}.stage-visual{position:relative;min-height:30px}.marker{display:block;width:30px;height:30px;margin:auto;border-radius:50%;border:2px solid var(--border);background:#fff;position:relative;z-index:1}.stage:not(:last-child) .stage-visual:after{content:"";position:absolute;top:14px;left:calc(50% + 18px);width:calc(100% - 36px);height:2px;background:var(--border)}.stage-done .marker{background:var(--navy);border-color:var(--navy)}.stage-done .marker:before{content:"✓";color:#fff;display:grid;place-items:center;height:100%}.stage-done:not(:last-child) .stage-visual:after{background:var(--navy)}.stage-current .marker{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 5px #0867d72a}.stage-current .stage-label{font-weight:800}.stage-label{display:block;margin:12px auto 0;max-width:150px;line-height:1.25;overflow-wrap:anywhere}.stats{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:24px}.stat{min-height:125px;padding:20px;border-radius:16px;text-decoration:none;color:var(--text);display:flex;flex-direction:column;justify-content:space-between}.stat-total{background:#e8f1fb}.stat-pending{background:#fff4dc}.stat-paid{background:#e6f5ea}.stat-transit{background:#efeafb}.stat-completed{background:#e1f4f2}.stat-value{font-size:40px;font-weight:800}.stat-label{font-weight:800}.filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.filters .field{margin:0}.grow{flex:1;min-width:220px}.field{margin-bottom:20px}.field label{display:block;font-weight:700;margin-bottom:6px}.optional,.hint{color:var(--muted)}.hint{font-size:14px}.field-error{color:var(--danger);font-size:14px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-actions,.created-row,.page-head,.result-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.table-wrap{overflow:auto;margin-top:18px}table{width:100%;border-collapse:collapse}th,td{padding:12px;border-bottom:1px solid #e8eef4;text-align:left;white-space:nowrap}.empty{text-align:center;color:var(--muted);padding:35px}.narrow{max-width:480px;margin:25px auto}.login-logo{width:150px}.tn-big{font:800 28px ui-monospace,monospace;background:#fff;padding:10px 16px;border:1px solid #c8e6d1;border-radius:10px}.danger-zone{margin-top:20px;border-color:#f3c9c6}.site-footer{border-top:1px solid var(--border);background:#fff;color:var(--muted);padding:24px}.site-footer>div{width:min(1120px,100%);margin:auto;display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}.crumb{margin-bottom:12px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:absolute;left:8px;top:-50px;background:#fff;padding:8px;z-index:10}.skip-link:focus{top:8px}@media(max-width:900px){.stats{grid-template-columns:repeat(3,1fr)}}@media(max-width:680px){.site-header{align-items:flex-start}.public-nav{flex-wrap:wrap;justify-content:flex-end}.brand img{width:145px}.track-section{width:calc(100% - 20px);margin-top:18px}.track-form{flex-direction:column}.stats{grid-template-columns:1fr 1fr}.field-row{grid-template-columns:1fr}.details>div{grid-template-columns:1fr;gap:2px}.page-head,.result-head{align-items:stretch;flex-direction:column}.progress-heading{align-items:flex-start;flex-direction:column;gap:5px}.progress{grid-template-columns:1fr;padding-top:24px}.stage{display:flex;gap:14px;align-items:flex-start;text-align:left;padding-bottom:22px}.stage-visual{min-width:30px}.stage:not(:last-child) .stage-visual:after{top:30px;left:14px;width:2px;height:calc(100% - 8px)}.stage-label{margin:5px 0 0;max-width:none}.shipment-result{width:calc(100% - 20px)}}@media(max-width:460px){.stats{grid-template-columns:1fr}.container{width:calc(100% - 20px)}}


/* V14 status workflow and administrator controls */
.admin-nav{margin-left:auto;display:flex;align-items:center;gap:18px;flex-wrap:wrap}.admin-nav a,.admin-nav .nav-button{font-weight:750;text-decoration:none;color:var(--text)}.admin-nav .nav-button{cursor:pointer;font:inherit;font-weight:750}.lead-sm{color:var(--muted);margin:0 0 20px}.status-panel{padding:20px 0;border-top:1px solid #e8eef4}.status-panel h2{font-size:18px;margin:0 0 12px}.status-button-group{display:flex;flex-wrap:wrap;gap:10px}.status-choice{position:relative;display:inline-flex}.status-choice input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.status-choice-label{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 15px;border:1px solid var(--border);border-radius:11px;background:#f8fafc;color:var(--text);font-size:14px;font-weight:750;line-height:1.25;cursor:pointer;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.status-choice-label:hover{border-color:#9bb7d4;background:#f0f6fc}.status-choice input:checked+.status-choice-label{background:#e7f0fc;border-color:#0867d7;color:#064c9e;box-shadow:inset 0 0 0 1px #0867d7}.status-choice input:focus-visible+.status-choice-label{outline:3px solid #0867d744;outline-offset:2px}.payment-status-buttons .status-canceled{color:#a61b1b;border-color:#f0c5c5;background:#fff5f5}.payment-status-buttons input:checked+.status-canceled{color:#fff;background:#b42318;border-color:#b42318;box-shadow:inset 0 0 0 1px #b42318}.status-choice-label.status-paid,.status-choice-label.status-refundable-deposit-paid{background:#f0f9f2}.status-choice input:checked+.status-choice-label.status-paid,.status-choice input:checked+.status-choice-label.status-refundable-deposit-paid{background:#e3f4e8;border-color:#3f9460;color:#1b5e33;box-shadow:inset 0 0 0 1px #3f9460}.status-choice-label.status-on-hold,.status-choice-label.status-pending-payment,.status-choice-label.status-pending-refundable-deposit{background:#fff8e9}.status-choice input:checked+.status-choice-label.status-on-hold,.status-choice input:checked+.status-choice-label.status-pending-payment,.status-choice input:checked+.status-choice-label.status-pending-refundable-deposit{background:#fff1d6;border-color:#c58b23;color:#7a4b00;box-shadow:inset 0 0 0 1px #c58b23}.status-choice-label.status-in-transit{background:#f3efff}.status-choice input:checked+.status-choice-label.status-in-transit{background:#ece7fa;border-color:#8067c6;color:#4a2f99;box-shadow:inset 0 0 0 1px #8067c6}.pill-pay-canceled,.pill-ship-canceled{background:#fff0f0;color:#a61b1b;border:1px solid #f0c5c5}.pill-pay-refundable-deposit-paid{background:#e3f4e8;color:#1b5e33}.pill-pay-pending-refundable-deposit{background:#fff1d6;color:#7a4b00}.pill-pay-paid,.pill-ship-delivered{background:#e3f4e8;color:#1b5e33}.pill-ship-preparing-for-shipment{background:#e6f0fb;color:#124a8a}.pill-ship-on-hold{background:#fff1d6;color:#7a4b00}.stage-canceled.stage-current .marker{background:#b42318;border-color:#b42318;box-shadow:0 0 0 5px #b423182a}.stage-canceled.stage-done .marker{background:#b42318;border-color:#b42318}.tracking-copy-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.tracking-error{width:min(1120px,calc(100% - 28px));margin:0 auto 24px}.table-note{margin-bottom:0}.login-card .login-logo{display:block;max-width:165px;height:auto;margin:0 0 18px}.btn:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:680px){.admin-nav{gap:10px;justify-content:flex-start;flex-wrap:wrap}.site-header{align-items:center;flex-wrap:wrap}.admin-nav{width:100%;margin-left:0}.status-button-group{gap:8px}.status-choice-label{min-height:40px;padding:8px 11px}.tracking-copy-row{align-items:flex-start}}

.status-choice input:disabled+.status-choice-label{opacity:.52;cursor:not-allowed}

.status-preview{display:inline-flex;align-items:center;min-height:44px;padding:9px 16px;margin:0 0 4px;border:1px solid var(--border);border-radius:11px;background:#f4f8fc;color:var(--text);font-weight:800}

.dashboard-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
@media(max-width:680px){.dashboard-actions{width:100%}.dashboard-actions .btn{flex:1}}

/* Admin tables: action buttons side by side (Open + Delete, Archive + Delete) */
.row-actions{display:inline-flex;align-items:center;gap:8px;flex-wrap:nowrap}

/* templates.php: Choose File control only */
.template-file-input{cursor:pointer}
.template-file-input::file-selector-button{min-height:36px;margin:0 14px 0 0;padding:0 18px;border:1px solid #0867d7;border-radius:10px;background:#e7f0fc;color:#064c9e;font:inherit;font-size:14px;font-weight:800;cursor:pointer;transition:background .15s ease,color .15s ease}
.template-file-input:hover::file-selector-button{background:#0867d7;color:#fff}
.template-file-input:focus-visible{outline:3px solid #0867d744;outline-offset:2px;border-color:var(--accent)}
.template-file-input:disabled{cursor:not-allowed}
.template-file-input:disabled::file-selector-button{opacity:.55;cursor:not-allowed}
@media(max-width:680px){.template-file-input::file-selector-button{min-height:40px}}

.btn-light{background:#e8f1fb;color:var(--accent);border:1px solid #c5dbf4}.btn-light:hover{background:#d8e8f9}
.notice-info{background:#eef5fd;color:#124a8a;border:1px solid #c5dbf4}.email-panel{margin-top:22px;padding-top:18px;border-top:1px solid #e8eef4}.email-panel h3{margin:0 0 10px;font-size:18px}.email-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:10px}.pill-email-scheduled,.pill-email-sending{background:#e6f0fb;color:#124a8a}.pill-email-sent{background:#e3f4e8;color:#1b5e33}.pill-email-failed{background:#fff0f0;color:#a61b1b;border:1px solid #f0c5c5}.pill-email-cancelled{background:#eef3f8;color:#52606d}
