.dn-orders-page{--order-line:var(--cp-line,#dce4ef);--order-surface:var(--cp-surface,#fff);--order-soft:var(--cp-soft,#f2f5fa);--order-muted:var(--cp-muted,#64748b)}
.dn-orders-page .dn-order-tools{margin:0 0 22px}.dn-orders-page .dn-order-intro{color:var(--order-muted);font-size:13px;line-height:1.9;margin:8px 0 20px}
.dn-orders-page .dn-order-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:24px}.dn-orders-page .dn-order-summary>div{padding:17px 18px;border:1px solid var(--order-line);background:var(--order-soft);border-radius:15px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dn-orders-page .dn-order-summary span{color:var(--order-muted);font-size:12px}.dn-orders-page .dn-order-summary b{color:#3284fa;font-size:25px;font-variant-numeric:tabular-nums}
.dn-orders-page .dn-order-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap}.dn-orders-page .dn-order-filters{display:flex;gap:6px;flex-wrap:wrap}.dn-orders-page .dn-order-filters button{min-height:42px;padding:8px 13px;border-radius:10px;font-size:12px;color:var(--order-muted);border:1px solid transparent}.dn-orders-page .dn-order-filters button[aria-pressed=true]{color:#3284fa;background:#3284fa15;border-color:#3284fa40}.dn-orders-page .dn-order-search{display:grid;gap:7px;font-size:11px;color:var(--order-muted);min-width:210px}.dn-orders-page .dn-order-search input{width:100%;background:var(--order-surface);border:1px solid var(--order-line);padding:10px 12px;color:var(--cp-text);font:inherit;font-size:13px;min-height:44px}.dn-orders-page .dn-order-results{font-size:12px;color:var(--order-muted);margin-top:16px}
.customer-panel .dn-order-list-wrap{overflow:visible;border:0;background:transparent}.customer-panel table.dn-order-list{display:block;width:100%;min-width:0!important}.customer-panel .dn-order-list thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.customer-panel .dn-order-list tbody{display:grid;gap:16px}.customer-panel .dn-order-list tr{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px;border:1px solid var(--order-line);border-radius:18px;background:var(--order-surface);padding:20px!important;box-shadow:0 5px 18px #071a3507;margin:0;overflow:hidden}.customer-panel .dn-order-list tr[hidden]{display:none!important}.customer-panel .dn-order-list tr:hover{background:var(--order-surface);border-color:#3284fa60}.customer-panel .dn-order-list td{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;border:0!important;padding:0!important;min-width:0;font-size:14px;overflow-wrap:anywhere}.customer-panel .dn-order-list td:before{content:attr(data-label);display:block;font-size:11px;font-weight:400;color:var(--order-muted);margin-bottom:6px}.customer-panel .dn-order-list td:nth-child(1){grid-column:1;grid-row:1;font-weight:700;direction:ltr;align-items:flex-end;text-align:right}.customer-panel .dn-order-list td:nth-child(1):before{content:'شماره سفارش';direction:rtl}.customer-panel .dn-order-list td:nth-child(4){grid-column:2;grid-row:1;align-items:flex-end}.customer-panel .dn-order-list td:nth-child(4):before{display:none}.customer-panel .dn-order-list td:nth-child(2){grid-column:1;grid-row:2;color:var(--order-muted);font-size:13px}.customer-panel .dn-order-list td:nth-child(3){grid-column:2;grid-row:2;align-items:flex-end;font-weight:700}.customer-panel .dn-order-list td:nth-child(5){grid-column:1/-1;grid-row:3;border-top:1px solid var(--order-line)!important;padding-top:15px!important;align-items:flex-end}.customer-panel .dn-order-list td:nth-child(5):before{display:none}.customer-panel .dn-order-list td:nth-child(5)>div{display:flex;flex-wrap:wrap;gap:10px;white-space:normal}.customer-panel .dn-order-list button{min-height:44px;border-radius:11px;padding:10px 16px;font-size:13px;line-height:1.6}.customer-panel .dn-order-list [data-customer-order]{background:#3284fa;color:white;box-shadow:0 4px 10px #3284fa22}.customer-panel .dn-order-list [data-reorder]{border:1px solid #3284fa40;background:#3284fa10;color:#3284fa}.customer-panel .dn-order-list .cp-status{font-size:12px;padding:6px 11px;border-radius:9px}.customer-panel .dn-order-list tr[data-order-state=closed] .cp-status{background:#ef444415;color:#d34a55}
@media(max-width:640px){.dn-orders-page .dn-order-summary{gap:7px}.dn-orders-page .dn-order-summary>div{padding:12px 8px;flex-direction:column;align-items:flex-start;gap:8px;border-radius:12px}.dn-orders-page .dn-order-summary span{font-size:10px;line-height:1.7}.dn-orders-page .dn-order-summary b{font-size:22px}.dn-orders-page .dn-order-toolbar{gap:16px}.dn-orders-page .dn-order-search{width:100%;min-width:0}.dn-orders-page .dn-order-filters{gap:4px}.dn-orders-page .dn-order-filters button{font-size:11px;padding:8px 9px}.customer-panel .dn-order-list tr{padding:16px!important;gap:17px 10px;border-radius:15px}.customer-panel .dn-order-list td{font-size:13px}.customer-panel .dn-order-list td:nth-child(2){font-size:11px}.customer-panel .dn-order-list td:nth-child(5)>div{width:100%;display:grid;grid-template-columns:1fr 1fr}.customer-panel .dn-order-list button{padding:10px 8px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.dn-orders-page *{scroll-behavior:auto;transition:none!important}}
/* Keep the existing invoice and tracking actions, with a readable mobile detail sheet. */
section:has(>[data-order-progress-live]):has([data-invoice]){font-family:inherit;overscroll-behavior:contain;scrollbar-width:thin}
html:not(.dark) [data-customer-order-timeline]{background:#f2f5fa!important;border:1px solid #dce4ef!important;color:#17263c!important}
html:not(.dark) [data-customer-order-timeline] li{background:#fff!important;border-color:#dce4ef!important;color:#17263c!important}
html:not(.dark) [data-customer-order-timeline] li time{color:#64748b!important}
@media(max-width:640px){section:has(>[data-order-progress-live]):has([data-invoice]){padding:18px!important;max-height:calc(100dvh - 32px)!important;border-radius:20px!important}section:has(>[data-order-progress-live]):has([data-invoice]) h2{font-size:16px;line-height:1.8;overflow-wrap:anywhere}section:has(>[data-order-progress-live]):has([data-invoice]) [data-close]{min-width:44px;min-height:44px;flex:none}section:has(>[data-order-progress-live]):has([data-invoice]) table{display:block;min-width:0!important;width:100%!important}section:has(>[data-order-progress-live]):has([data-invoice]) thead{display:none}section:has(>[data-order-progress-live]):has([data-invoice]) tbody{display:grid;gap:10px}section:has(>[data-order-progress-live]):has([data-invoice]) tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 8px;padding:14px;border:1px solid #94a3b840;border-radius:13px}section:has(>[data-order-progress-live]):has([data-invoice]) td{padding:0!important;border:0;font-size:11px;overflow-wrap:anywhere}section:has(>[data-order-progress-live]):has([data-invoice]) td:before{display:block;color:#8290a5;font-size:10px;margin-bottom:5px}section:has(>[data-order-progress-live]):has([data-invoice]) td:first-child{grid-column:1/-1;font-size:13px;font-weight:700}section:has(>[data-order-progress-live]):has([data-invoice]) td:nth-child(2):before{content:'تعداد'}section:has(>[data-order-progress-live]):has([data-invoice]) td:nth-child(3):before{content:'قیمت واحد'}section:has(>[data-order-progress-live]):has([data-invoice]) td:nth-child(4):before{content:'جمع'}section:has(>[data-order-progress-live]):has([data-invoice]) button{min-height:44px}}
html:not(.dark) [data-order-progress-live]{background:#f2f5fa;color:#17263c;border-color:#dce4ef}html:not(.dark) [data-order-progress-live] p{color:#64748b}html:not(.dark) [data-order-progress-live] .op-step{background:#fff;border-color:#dce4ef;color:#5e7086}html:not(.dark) [data-order-progress-live] .op-step.done{color:#23805b;border-color:#b6dfcc}html:not(.dark) [data-order-progress-live] .op-step.active{background:#e8f1ff;border-color:#3284fa;color:#1d65c6}html:not(.dark) [data-order-progress-live] summary{color:#2968b4}html:not(.dark) [data-order-progress-live] button{border-color:#b8cbe5;color:#2968b4}/* Override the older order-progress table layout without changing its behavior. */
main.customer-panel .cp-content table.dn-order-list tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))!important}
main.customer-panel .cp-content table.dn-order-list tbody td:nth-child(1){grid-area:1 / 1 / 2 / 2!important}
main.customer-panel .cp-content table.dn-order-list tbody td:nth-child(2){grid-area:2 / 1 / 3 / 2!important}
main.customer-panel .cp-content table.dn-order-list tbody td:nth-child(3){grid-area:2 / 2 / 3 / 3!important}
main.customer-panel .cp-content table.dn-order-list tbody td:nth-child(4){grid-area:1 / 2 / 2 / 3!important}
main.customer-panel .cp-content table.dn-order-list tbody td:nth-child(5){grid-area:3 / 1 / 4 / 3!important}
/* Danilo brand palette: blue accents on white / navy surfaces. */
.dn-orders-page{--order-surface:#ffffff;--order-soft:#edf4ff;--order-line:#d4e3fa;--order-muted:#536e91}
.dark .dn-orders-page{--order-surface:#142238;--order-soft:#10203a;--order-line:#2b4568;--order-muted:#a9c4e8}
.customer-panel .dn-orders-page>div:last-child{background:var(--order-surface);border-color:var(--order-line)}
.dn-orders-page .dn-order-summary>div{background:linear-gradient(135deg,#f5f9ff,#e6efff);border-color:#ccddf9;box-shadow:0 4px 14px #1d70e809}
.dark .dn-orders-page .dn-order-summary>div{background:linear-gradient(135deg,#1c3556,#142944);border-color:#315581;box-shadow:inset 0 1px #ffffff06,0 5px 16px #050d1b26}
.dn-orders-page .dn-order-summary b{color:#287cf2}.dark .dn-orders-page .dn-order-summary b{color:#6eb0ff}
.customer-panel .dn-orders-page .dn-order-list tr{background:var(--order-surface);border-color:var(--order-line);box-shadow:0 5px 18px #1765d30a}
.dn-orders-page .dn-order-filters button[aria-pressed=true]{background:#287cf2;color:#fff;border-color:#287cf2;box-shadow:0 3px 9px #287cf225}
.customer-panel .dn-orders-page .dn-order-search input{background:var(--order-soft);border-color:var(--order-line)}
.dark .dn-orders-page .dn-order-list td{color:#e6f0ff}.dark .dn-orders-page .dn-order-list td:before{color:#a9c4e8}
html:not(.dark) [data-order-progress-live]{background:#edf4ff;border-color:#d4e3fa}
html body main.customer-panel .dn-orders-page table.dn-order-list tbody tr.customer-order-row-progress{background:var(--order-surface)!important;border-color:var(--order-line)!important;color:var(--cp-text)!important}
/* Compact mobile order view; leave room for the storefront bottom navigation. */
@media(max-width:767px){
 main.customer-panel .dn-orders-page>div:last-child{padding:18px 14px!important;border-radius:18px}
 .dn-orders-page h2{font-size:19px!important;margin-bottom:8px!important}
 .dn-orders-page .dn-order-intro{font-size:11px;line-height:1.8;margin:4px 0 12px}
 .dn-orders-page .dn-order-summary{gap:6px;margin-bottom:14px}
 .dn-orders-page .dn-order-summary>div{min-height:65px;padding:9px 8px;gap:5px;justify-content:space-between}
 .dn-orders-page .dn-order-summary span{font-size:10px;line-height:1.6}
 .dn-orders-page .dn-order-summary b{font-size:20px;line-height:1.2}
 .dn-orders-page .dn-order-toolbar{display:flex;gap:11px;align-items:stretch}
 .dn-orders-page .dn-order-filters{width:100%;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none;gap:4px;padding:2px 0}
 .dn-orders-page .dn-order-filters button{white-space:nowrap;flex:0 0 auto;min-height:40px;font-size:11px;padding:7px 9px}
 .dn-orders-page .dn-order-search{gap:5px}
 .dn-orders-page .dn-order-search input{min-height:42px;padding:9px 11px;font-size:12px}
 .dn-orders-page .dn-order-results{font-size:11px;margin-top:10px}
 .dn-orders-page .dn-order-tools{margin-bottom:14px}
 main.customer-panel .dn-orders-page table.dn-order-list tbody tr{padding:14px!important;gap:14px 10px!important;box-shadow:0 4px 14px #1765d309}
 main.customer-panel .dn-orders-page table.dn-order-list td:nth-child(1){font-size:12px}
 main.customer-panel .dn-orders-page table.dn-order-list td:nth-child(2){font-size:11px;line-height:1.8}
 main.customer-panel .dn-orders-page table.dn-order-list td:nth-child(3){font-size:13px;line-height:1.8}
 main.customer-panel .dn-orders-page table.dn-order-list td:nth-child(5){padding-top:12px!important}
 main.customer-panel .dn-orders-page table.dn-order-list td:nth-child(5)>div{gap:8px}
 main.customer-panel .dn-orders-page table.dn-order-list button{min-height:44px;font-size:12px}
 main.customer-panel:has(.dn-orders-page){padding-bottom:calc(110px + env(safe-area-inset-bottom))}
}
@media(max-width:359px){.dn-orders-page .dn-order-summary span{font-size:9px}.dn-orders-page .dn-order-filters button{font-size:10px;padding-inline:8px}main.customer-panel .dn-orders-page table.dn-order-list td:nth-child(1){font-size:11px}}
