:root{
    --info:#2D6CDF;
}

/* ---------- PAGE INTRO ---------- */
.orders-intro{
    text-align:center;
    max-width:760px;
    margin:0 auto;
    padding:54px 40px 10px;
}
.orders-intro p.eyebrow{
    font-weight:800;
    letter-spacing:3px;
    text-transform:uppercase;
    font-size:12px;
    color:var(--primary);
    margin-bottom:14px;
}
.orders-intro h1{
    font-weight:900;
    font-size:36px;
    line-height:1.25;
    margin-bottom:14px;
}
.orders-intro .sub{
    font-size:15px;
    color:#6b6b6b;
    line-height:1.6;
}

/* ---------- CONTROLS ---------- */
.orders-wrap{
    max-width:920px;
    margin:0 auto;
    padding:36px 40px 80px;
}

.controls{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    align-items:center;
    justify-content:space-between;
    margin-bottom:26px;
}

.search-box{
    position:relative;
    flex:1;
    min-width:220px;
}
.search-box input{
    width:100%;
    padding:12px 16px 12px 42px;
    border-radius:50px;
    border:1px solid #ecdfd2;
    background:#fff;
    font-family:'Nunito',sans-serif;
    font-size:14px;
    font-weight:600;
    color:var(--text);
    box-shadow:0 4px 14px rgba(0,0,0,.05);
}
.search-box input:focus{outline:2px solid var(--secondary);border-color:transparent;}
.search-box svg{
    position:absolute;
    left:16px;
    top:50%;
    transform:translateY(-50%);
    width:16px;height:16px;
    stroke:#a3a3a3;
    fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;
}

.filter-tabs{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}
.filter-tab{
    padding:10px 18px;
    border-radius:50px;
    border:1px solid #ecdfd2;
    background:#fff;
    font-weight:800;
    font-size:12.5px;
    color:#6b6b6b;
    cursor:pointer;
    white-space:nowrap;
    transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.filter-tab:hover{border-color:var(--secondary);}
.filter-tab.active{
    background:var(--primary);
    border-color:var(--primary);
    color:#fff;
}

.results-count{
    font-size:12.5px;
    font-weight:700;
    color:#a3a3a3;
    margin-bottom:18px;
}

/* ---------- ORDER CARD ---------- */
.order-list{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.order-card{
    background:#fff;
    border-radius:20px;
    box-shadow:0 6px 20px rgba(0,0,0,.06);
    overflow:hidden;
    transition:box-shadow .25s ease;
}
.order-card:hover{box-shadow:0 12px 30px rgba(0,0,0,.1);}

.order-summary{
    display:flex;
    align-items:center;
    gap:18px;
    padding:20px 22px;
    cursor:pointer;
}

.order-thumbs{
    display:flex;
    flex-shrink:0;
}
.order-thumbs img{
    width:56px;height:56px;
    border-radius:14px;
    object-fit:cover;
    border:3px solid #fff;
    box-shadow:0 2px 8px rgba(0,0,0,.12);
    margin-left:-16px;
}
.order-thumbs img:first-child{margin-left:0;}
.thumbs-more{
    width:56px;height:56px;
    border-radius:14px;
    background:#fff2e4;
    color:var(--primary);
    font-weight:900;
    font-size:12.5px;
    display:flex;align-items:center;justify-content:center;
    margin-left:-16px;
    border:3px solid #fff;
}

.order-main{flex:1;min-width:0;}
.order-top-row{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:4px;
}
.order-id{font-weight:900;font-size:15.5px;}
.order-date{font-size:12.5px;color:#a3a3a3;font-weight:700;}
.order-items-summary{
    font-size:13.5px;
    color:#767676;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.order-side{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:8px;
    flex-shrink:0;
}
.order-total{font-weight:900;font-size:16px;}

.status-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:5px 13px;
    border-radius:50px;
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.4px;
    white-space:nowrap;
}
.status-pill .dot{width:6px;height:6px;border-radius:50%;background:currentColor;}
.status-preparing{background:#fff2de;color:#a3660a;}
.status-onway{background:#e6edfd;color:var(--info);}
.status-delivered{background:#e6f7e6;color:#158818;}
.status-cancelled{background:#fdeaea;color:var(--primary);}

.expand-icon{
    width:34px;height:34px;
    border-radius:50%;
    background:#f5efe8;
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;
    transition:transform .25s ease, background .25s ease;
}
.expand-icon svg{width:14px;height:14px;stroke:#767676;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;}
.order-card.open .expand-icon{transform:rotate(180deg);background:var(--primary);}
.order-card.open .expand-icon svg{stroke:#fff;}

/* ---------- ORDER DETAILS (expanded) ---------- */
.order-details{
    max-height:0;
    overflow:hidden;
    transition:max-height .35s ease;
    border-top:1px solid #f2e9de;
}
.order-card.open .order-details{max-height:900px;}

.order-details-inner{
    padding:22px;
    display:grid;
    grid-template-columns:1.3fr 1fr;
    gap:28px;
}

.detail-block h5{
    font-size:11.5px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:1px;
    color:#a3a3a3;
    margin-bottom:12px;
}

.item-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    padding:9px 0;
    font-size:13.5px;
    border-bottom:1px dashed #f0e6da;
}
.item-row:last-child{border-bottom:none;}
.item-name{font-weight:700;color:var(--text);}
.item-qty{color:#a3a3a3;font-weight:700;font-size:12px;margin-left:6px;}
.item-price{font-weight:800;color:var(--text);white-space:nowrap;}

.bill-row{
    display:flex;
    justify-content:space-between;
    font-size:13px;
    color:#767676;
    padding:5px 0;
}
.bill-row.total-row{
    font-weight:900;
    color:var(--text);
    font-size:14.5px;
    border-top:1px solid #f0e6da;
    margin-top:6px;
    padding-top:10px;
}

.info-line{
    font-size:13.5px;
    color:#555;
    line-height:1.6;
    margin-bottom:14px;
}
.info-line strong{display:block;color:var(--text);font-size:13px;margin-bottom:2px;}

/* Timeline */
.timeline{list-style:none;}
.timeline li{
    position:relative;
    padding-left:26px;
    padding-bottom:18px;
    font-size:13px;
}
.timeline li:last-child{padding-bottom:0;}
.timeline li::before{
    content:'';
    position:absolute;
    left:4px;top:2px;
    width:10px;height:10px;
    border-radius:50%;
    background:#e4dccf;
    border:2px solid #fff;
    box-shadow:0 0 0 2px #e4dccf;
}
.timeline li::after{
    content:'';
    position:absolute;
    left:8px;top:14px;
    width:2px;
    height:calc(100% - 10px);
    background:#e4dccf;
}
.timeline li:last-child::after{display:none;}
.timeline li.done::before{background:var(--accent);box-shadow:0 0 0 2px var(--accent);}
.timeline li.done::after{background:var(--accent);}
.timeline li.current::before{background:var(--secondary);box-shadow:0 0 0 3px rgba(240,153,12,.25);}
.timeline li .t-label{font-weight:800;color:var(--text);}
.timeline li .t-time{display:block;color:#a3a3a3;font-size:11.5px;font-weight:700;margin-top:1px;}
.timeline li.cancelled-step::before{background:var(--primary);box-shadow:0 0 0 2px var(--primary);}

.order-actions{
    display:flex;
    gap:10px;
    margin-top:16px;
    flex-wrap:wrap;
}
.order-actions button{
    padding:10px 16px;
    border-radius:50px;
    border:none;
    font-weight:800;
    font-size:12.5px;
    cursor:pointer;
    transition:background .2s ease, transform .2s ease;
}
.btn-reorder{background:var(--primary);color:#fff;}
.btn-reorder:hover{background:var(--primary-dark);}
.btn-track{background:#fff2de;color:#a3660a;}
.btn-track:hover{background:#fbe6c2;}
.btn-receipt{background:#f2f2f2;color:#555;}
.btn-receipt:hover{background:#e8e8e8;}

/* ---------- EMPTY STATE ---------- */
.empty-state{
    text-align:center;
    padding:70px 20px;
    color:#a3a3a3;
}
.empty-state .emoji{font-size:44px;margin-bottom:14px;}
.empty-state h3{font-size:18px;color:var(--text);font-weight:900;margin-bottom:8px;}
.empty-state p{font-size:13.5px;margin-bottom:20px;}
.empty-state a{
    display:inline-block;
    background:var(--primary);
    color:#fff;
    font-weight:800;
    font-size:13px;
    padding:12px 26px;
    border-radius:50px;
}
.empty-state a:hover{background:var(--primary-dark);}

/* ---------- RESPONSIVE ---------- */
@media (max-width:780px){
    .orders-intro{padding:40px 24px 6px;}
    .orders-intro h1{font-size:26px;}
    .orders-wrap{padding:30px 20px 80px;}
    .order-details-inner{grid-template-columns:1fr;}
    .order-summary{flex-wrap:wrap;}
    .order-side{align-items:flex-start;flex-direction:row-reverse;justify-content:flex-end;gap:12px;}
}

@media (max-width:520px){
    .order-items-summary{display:none;}
    .controls{flex-direction:column;align-items:stretch;}
}
.inline-review{display:flex;gap:7px;align-items:center;margin:9px 0}.inline-review input,.inline-review select{min-width:0;border:1px solid #e4d8d1;border-radius:7px;padding:7px;font:inherit}.inline-review input{flex:1}.inline-review button{border:0;border-radius:7px;background:#b40000;color:#fff;padding:8px 11px;font-weight:800}.order-thread{max-height:155px;overflow:auto;border:1px solid #eee4df;background:#fffaf8;border-radius:8px;padding:8px;margin:8px 0}.order-thread p{padding:7px 9px;border-radius:8px;margin:4px 0;max-width:82%}.chat-out{background:#b40000;color:#fff;margin-left:auto!important}.chat-in{background:#f0e8e4;color:#332}.order-thread small{color:#7c706b}@media(max-width:600px){.inline-review{flex-wrap:wrap}.inline-review input{min-width:100%}}

/* Customer order workspace */
.orders-intro{width:min(1060px,calc(100% - 48px));max-width:none;text-align:left;padding:42px 0 12px}.orders-intro h1{font-size:32px}.orders-wrap{width:min(1060px,calc(100% - 48px));max-width:none;padding:26px 0 70px;display:grid;gap:16px}.orders-wrap .order-card{border:1px solid #f0e8e0;box-shadow:0 7px 22px rgba(58,35,18,.06)}.orders-wrap .order-summary{padding:20px 24px;cursor:default}.orders-wrap .order-main strong{font-size:16px}.orders-wrap .order-main p{margin:4px 0 0;color:#8b817a;font-size:12px;font-weight:700}.orders-wrap .order-side strong{color:var(--primary);font-size:17px}.orders-wrap .status-pill{background:#fff2de;color:#9a6000}.orders-wrap .order-details{max-height:none}.orders-wrap .order-details-inner{padding:23px 24px}.orders-wrap .detail-block{min-width:0}.orders-wrap .detail-block>p{font-size:13px;color:#655d57;line-height:1.55}.orders-wrap .btn-reorder{margin-top:5px}@media(max-width:780px){.orders-intro,.orders-wrap{width:calc(100% - 32px)}.orders-wrap .order-summary{padding:17px}.orders-wrap .order-details-inner{padding:18px}.orders-wrap .order-side{align-items:flex-end}}
.orders-wrap .order-thread{height:260px;max-height:260px;padding:12px;margin:10px 0;border-radius:12px;background:#fffdfa}.orders-wrap .order-thread p{padding:10px 12px;margin:6px 0;font-size:13px;line-height:1.45}.orders-wrap .inline-review:has(input[name="message"]){gap:9px}.orders-wrap .inline-review:has(input[name="message"]) input{padding:10px 12px}.orders-wrap .inline-review:has(input[name="message"]) button{padding:10px 15px}@media(max-width:600px){.orders-wrap .order-thread{height:220px;max-height:220px}}
.order-thread .chat-role{display:block;margin-bottom:3px;font-size:9.5px;font-weight:900;letter-spacing:.05em;text-transform:uppercase;opacity:.72}
.order-chat-input{gap:9px!important;padding:10px!important;border:1px solid #eee2db;border-radius:13px;background:#fff!important}.order-chat-input input{height:42px!important;border:1px solid #dfd6cf!important;border-radius:10px!important;padding:0 13px!important;background:#fffaf7!important;transition:border-color .2s,box-shadow .2s}.order-chat-input input:focus{outline:0!important;border-color:#b40000!important;box-shadow:0 0 0 3px rgba(180,0,0,.11)}.order-chat-input button{height:42px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:10px!important;padding:0 14px!important;box-shadow:0 5px 12px rgba(180,0,0,.2);transition:transform .2s,background .2s}.order-chat-input button:hover{transform:translateY(-1px);background:#8d0000!important}.order-chat-input button i{font-size:13px}@media(max-width:460px){.order-chat-input button span{display:none}.order-chat-input button{width:44px;padding:0!important}}

/* Prevent customer order-card styles from breaking the legacy checkout summary while an app restart is pending. */
.checkout-wrap>.order-summary{display:block!important;align-self:start;min-width:0;width:auto;padding:25px 24px!important;cursor:default!important;background:#fff;border-radius:20px;box-shadow:0 8px 26px rgba(78,42,19,.09)}.checkout-wrap>.order-summary h3{margin:0 0 18px;font-size:18px}.checkout-wrap>.order-summary .summary-items{margin-bottom:12px}.checkout-wrap>.order-summary .summary-item,.checkout-wrap>.order-summary .summary-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start;padding:9px 0;margin:0;font-size:13px}.checkout-wrap>.order-summary .summary-item span,.checkout-wrap>.order-summary .summary-row span{min-width:0}.checkout-wrap>.order-summary .summary-item .item-name{display:inline-block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.checkout-wrap>.order-summary .summary-row.total{margin-top:7px;padding-top:16px;border-top:1px solid #eadfd0;font-size:17px}.checkout-wrap>.order-summary .summary-row.total span:last-child{color:var(--primary)}@media(max-width:1100px){.checkout-wrap>.order-summary{position:static!important}}

.customer-order-chat .chat-limit-note{margin:-7px 0 10px;color:#756d66;font-size:11px;font-weight:800}.customer-order-chat .chat-handoff{display:flex;flex-direction:column;gap:5px;padding:13px;border:1px solid #bfe8c8;border-radius:12px;background:#f1fbf3;color:#286537;font-size:12.5px;line-height:1.45}.customer-order-chat .chat-handoff a{display:inline-flex;align-items:center;justify-content:center;gap:7px;align-self:flex-start;margin-top:3px;padding:10px 13px;border-radius:9px;background:#1cad23;color:#fff;text-decoration:none;font-size:12px;font-weight:900}.customer-order-chat .chat-handoff p{margin:0;color:#76695f;font-size:11.5px}

/* Professional customer order receipt layout. */
.customer-order-card{overflow:hidden;border:1px solid #eee4dc;border-radius:22px;background:#fff;box-shadow:0 9px 26px rgba(67,39,18,.07)}.customer-order-header{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:23px 26px;border-bottom:1px solid #f2e8df;background:linear-gradient(105deg,#fff 0%,#fffaf6 100%)}.customer-order-label,.panel-kicker{margin:0 0 5px;color:#9c8071;font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.customer-order-header h2{margin:0;color:#212121;font-size:17px;font-weight:900;letter-spacing:.01em}.customer-order-date{margin:7px 0 0;color:#837b74;font-size:12px;font-weight:700}.customer-order-date i{margin-right:4px;color:#1cad23}.customer-order-status{display:flex;flex-direction:column;align-items:flex-end;gap:8px;white-space:nowrap}.customer-order-status>strong{color:#1cad23;font-size:18px;font-weight:900}.customer-status{padding:6px 12px;border-radius:50px;background:#fff2dc;color:#9a5d00;font-size:10px;font-weight:900;letter-spacing:.06em;text-transform:uppercase}.customer-status.delivered{background:#e7f8e9;color:#158d1c}.customer-status.cancelled{background:#fdeaea;color:#bc1a1a}.customer-status.out-for-delivery,.customer-status.ready-for-pickup{background:#e8f2ff;color:#2468b9}.customer-order-workspace{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(250px,.8fr);gap:22px;padding:24px 26px}.customer-order-items,.customer-order-details,.customer-order-chat{border:1px solid #f0e6de;border-radius:16px;background:#fff}.customer-order-items{padding:19px}.customer-order-details{padding:19px;background:#fffdfa}.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:15px}.panel-heading h3,.customer-order-details h3{margin:0;color:#28211d;font-size:16px;font-weight:900}.item-count,.chat-help{padding:5px 9px;border-radius:50px;background:#eff8f0;color:#168d21;font-size:11px;font-weight:800;white-space:nowrap}.receipt-list{border-top:1px solid #f4ece6}.receipt-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;padding:13px 0;border-bottom:1px dashed #ebdfd5}.receipt-quantity{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#eaf8ec;color:#168d21;font-size:11px;font-weight:900}.receipt-item-name{min-width:0}.receipt-item-name strong,.receipt-item-name small{display:block}.receipt-item-name strong{overflow:hidden;color:#2b2622;font-size:13.5px;font-weight:850;text-overflow:ellipsis;white-space:nowrap}.receipt-item-name small{margin-top:3px;color:#8a817a;font-size:11px;font-weight:700}.receipt-item-total{color:#1cad23;font-size:13px;white-space:nowrap}.receipt-totals{padding-top:10px}.receipt-totals>div{display:flex;justify-content:space-between;gap:15px;padding:6px 0;color:#6d665f;font-size:12.5px}.receipt-totals b{color:#34302c}.receipt-totals .receipt-grand-total{margin-top:7px;padding-top:13px;border-top:1px solid #e9ddd2;color:#29231e;font-size:15px;font-weight:900}.receipt-grand-total b{color:#1cad23;font-size:16px}.receipt-empty{margin:0;padding:17px;border-radius:12px;background:#fff8ee;color:#856543;font-size:13px;line-height:1.5}.receipt-review-form{display:flex;gap:8px;align-items:center;margin:-2px 0 10px 46px}.receipt-review-form select,.receipt-review-form input{min-width:0;border:1px solid #e5dad0;border-radius:8px;padding:8px;font:inherit;font-size:12px}.receipt-review-form input{flex:1}.receipt-review-form button{border:0;border-radius:8px;background:#1cad23;color:#fff;padding:9px 11px;font-size:12px;font-weight:800;white-space:nowrap}.delivery-detail{display:flex;gap:10px;padding:12px 0;border-bottom:1px dashed #ebdfd5}.delivery-detail:last-of-type{border-bottom:0}.delivery-detail i{display:grid;place-items:center;width:29px;height:29px;border-radius:9px;background:#eff8f0;color:#168d21;font-size:13px;flex-shrink:0}.delivery-detail small{display:block;margin-bottom:3px;color:#92877f;font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}.delivery-detail p{margin:0;color:#423a34;font-size:12.5px;font-weight:700;line-height:1.45}.delivery-detail p span{color:#b5aaa1;padding:0 3px}.cancel-order-form{margin-top:16px}.cancel-order-form button{width:100%;border:1px solid #eab9b9;border-radius:9px;background:#fff7f7;color:#b72121;padding:10px 12px;font-size:12px;font-weight:900;cursor:pointer}.customer-order-chat{margin:0 26px 26px;padding:19px;background:#fffdfa}.customer-order-chat .order-thread{height:235px;max-height:235px;margin:0 0 11px;border:1px solid #eee3da;border-radius:12px;background:#fff;padding:12px;overflow:auto}.customer-order-chat .order-thread p{max-width:78%;margin:7px 0;padding:9px 11px;border-radius:11px;font-size:13px;line-height:1.45}.customer-order-chat .chat-out{margin-left:auto!important;background:#b40000;color:#fff}.customer-order-chat .chat-in{background:#f4ede8;color:#392f29}.customer-order-chat .chat-role{display:block;margin-bottom:3px;font-size:9px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;opacity:.72}.customer-order-chat .order-thread small{color:#82776f;font-size:12.5px}.customer-order-chat .order-chat-input{display:flex;gap:9px;margin:0;padding:0!important;border:0;background:transparent!important}.customer-order-chat .order-chat-input input{flex:1;min-width:0;height:43px;border:1px solid #ded4cc;border-radius:10px;padding:0 13px;background:#fff;font:inherit;font-size:13px}.customer-order-chat .order-chat-input input:focus{outline:0;border-color:#1cad23;box-shadow:0 0 0 3px rgba(28,173,35,.12)}.customer-order-chat .order-chat-input button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:100px;border:0;border-radius:10px;background:#1cad23;color:#fff;padding:0 15px;font-size:12px;font-weight:900;cursor:pointer;box-shadow:0 5px 12px rgba(28,173,35,.2)}.customer-order-chat .order-chat-input button:hover{background:#158d1c}@media(max-width:760px){.customer-order-header{padding:19px;align-items:flex-start}.customer-order-workspace{grid-template-columns:1fr;padding:18px}.customer-order-chat{margin:0 18px 18px}.receipt-review-form{margin-left:0;flex-wrap:wrap}.receipt-review-form input{min-width:180px}.customer-order-chat .order-thread{height:210px;max-height:210px}}@media(max-width:500px){.orders-intro,.orders-wrap{width:calc(100% - 28px)}.customer-order-header{flex-direction:column;gap:13px}.customer-order-status{align-items:flex-start}.customer-order-workspace{padding:14px}.customer-order-chat{margin:0 14px 14px;padding:14px}.receipt-item{grid-template-columns:36px minmax(0,1fr)}.receipt-item-total{grid-column:2}.customer-order-chat .order-chat-input button{min-width:45px;width:45px;padding:0}.customer-order-chat .order-chat-input button span{display:none}.chat-help{display:none}}
