/* ==== inline-block-1 (extracted from current-orders.php inline <style>) ==== */
body{background:linear-gradient(180deg,#f8fbff 0%,#eef4ff 100%)}
.orders-shell{padding:16px 0 110px}
.orders-head{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.orders-brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:inherit}
.brand-logo2,.brand-fallback2{width:62px;height:62px;border-radius:18px;object-fit:cover;background:#fff;border:1px solid #e5e7eb;display:flex;align-items:center;justify-content:center;font-weight:1000}
.orders-brand h1{margin:0;font-size:28px}.orders-brand p{margin:4px 0 0;color:#64748b;font-weight:750}
.orders-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.auto-control-stack{display:grid;gap:6px;min-width:248px}
.auto-control-stack .auto-complete-box{width:100%;min-width:248px}
.auto-control-stack .auto-complete-title{flex:1}
.auto-print-box{background:linear-gradient(180deg,#fff,#f8fbff)}
.auto-complete-box{
    display:flex;align-items:center;gap:9px;padding:7px 13px;border-radius:999px;
    background:#fff;border:1px solid #e5e7eb;box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.auto-complete-title{font-weight:1000;color:#0f172a;font-size:14px;white-space:nowrap}
.auto-complete-info{
    width:22px;height:22px;flex:0 0 22px;border:0;border-radius:50%;cursor:pointer;
    background:#2563eb;color:#fff;font-weight:1000;font-size:13px;line-height:1;padding:0;
}
.auto-complete-info:hover{background:#1d4ed8}
.auto-lever{
    position:relative;width:56px;height:30px;flex:0 0 56px;border:0;border-radius:999px;
    background:#cbd5e1;cursor:pointer;padding:0;transition:background .18s ease;
}
.auto-lever.on{background:linear-gradient(135deg,#16a34a,#22c55e)}
.auto-lever.busy{opacity:.6;cursor:wait}
.auto-lever-knob{
    position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;
    background:#fff;box-shadow:0 3px 8px rgba(15,23,42,.3);transition:left .18s ease;
}
.auto-lever.on .auto-lever-knob{left:29px}
.auto-complete-state{
    font-weight:1000;font-size:12px;text-transform:uppercase;letter-spacing:.04em;
    color:#991b1b;min-width:26px;
}
.auto-complete-state.on{color:#166534}
.auto-info-backdrop{
    position:fixed;inset:0;z-index:70050;display:none;align-items:center;justify-content:center;
    padding:16px;background:rgba(15,23,42,.64);backdrop-filter:blur(8px);
}
.auto-info-backdrop.open{display:flex}
.auto-info-card{
    width:min(560px,100%);max-height:92vh;overflow:auto;border-radius:26px;background:#fff;
    border:1px solid #e5e7eb;box-shadow:0 32px 90px rgba(15,23,42,.4);
}
.auto-info-head{
    display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;
    color:#fff;background:linear-gradient(135deg,#0f172a,#2563eb,#7c3aed);
}
.auto-info-head h3{margin:0;font-size:21px}
.auto-info-close{
    width:36px;height:36px;border:0;border-radius:50%;background:rgba(255,255,255,.18);
    color:#fff;font-size:21px;font-weight:1000;cursor:pointer;line-height:1;
}
.auto-info-body{padding:17px;background:linear-gradient(180deg,#fff,#f8fbff);color:#0f172a}
.auto-info-body h4{margin:0 0 7px;font-size:15px;color:#0f172a}
.auto-info-body p{margin:0 0 13px;line-height:1.55;font-weight:800;color:#334155}
.auto-info-body ul{margin:0 0 13px;padding-left:19px;line-height:1.6;font-weight:800;color:#334155}
.auto-info-body li{margin-bottom:5px}
.auto-info-warn{
    border-radius:14px;padding:11px 13px;background:#fff7ed;border:1px solid #fed7aa;
    color:#9a3412;font-weight:900;line-height:1.5;font-size:13px;
}
@media(max-width:640px){
    .auto-control-stack{width:100%;min-width:0}
    .auto-control-stack .auto-complete-box{min-width:0}
    .auto-complete-box{width:100%;justify-content:space-between}
    .auto-info-card{border-radius:20px}
    .auto-info-head h3{font-size:18px}
}
.live-badge{border-radius:999px;background:#fee2e2;color:#991b1b;font-weight:900;padding:10px 14px;display:inline-flex;gap:8px;align-items:center}
.live-dot{width:10px;height:10px;background:#ef4444;border-radius:50%;animation:pulse 1s infinite}
@keyframes pulse{50%{opacity:.25;transform:scale(1.3)}}
button,.mini-action,.ghost-btn,.solid-btn{transition:transform .12s ease,filter .12s ease}
button:active,.mini-action:active,.ghost-btn:active,.solid-btn:active{transform:scale(.96);filter:brightness(.95)}
.alarm-note{display:none;margin-bottom:12px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:18px;padding:12px;font-weight:850}
.alarm-note.show{display:block}
.auto-flow-note{margin-bottom:12px;background:#eff6ff;border:1px solid #bfdbfe;color:#1d4ed8;border-radius:18px;padding:10px 12px;font-weight:850;font-size:13px}
.section-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.order-section{background:#fff;border:1px solid #e5e7eb;border-radius:26px;box-shadow:0 14px 35px rgba(15,23,42,.08);overflow:hidden}
.order-section-head{padding:15px 17px;color:#fff;display:flex;justify-content:space-between;align-items:center;gap:10px}
.order-section-head h2{margin:0;font-size:17px}.order-section-head span{background:rgba(255,255,255,.22);padding:6px 10px;border-radius:999px;font-weight:900}
.s-new{background:linear-gradient(135deg,#dc2626,#f97316)}.s-proc{background:linear-gradient(135deg,#2563eb,#7c3aed)}.s-ready{background:linear-gradient(135deg,#16a34a,#84cc16)}.s-del{background:linear-gradient(135deg,#0891b2,#2563eb)}
.section-body{padding:12px;display:grid;gap:9px;min-height:120px}
.compact-card{border:1px solid #e5e7eb;border-radius:18px;background:#fbfdff;overflow:hidden}
.compact-summary{width:100%;border:0;background:transparent;padding:12px;text-align:left;display:flex;justify-content:space-between;gap:10px;align-items:center;cursor:pointer}
.sum-left strong{display:block;font-size:16px;color:#0f172a}.sum-left small{display:block;color:#64748b;margin-top:3px;font-weight:750}
.sum-right{text-align:right}.type-pill,.status-pill{display:inline-flex;border-radius:999px;padding:6px 9px;font-size:11px;font-weight:900;background:#eef2ff;color:#3730a3;margin-bottom:5px}
.money{font-weight:1000;color:#0f172a}
.details{display:none;border-top:1px solid #e5e7eb;padding:12px;background:#fff}
.compact-card.open .details{display:block}
.age-pill{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:3px 9px;font-weight:900;font-size:11px;background:#e0f2fe;color:#075985;border:1px solid #bae6fd;margin-top:4px}
.age-pill.warn{background:#fef3c7;color:#92400e;border-color:#fde68a}
.age-pill.late{background:#fee2e2;color:#991b1b;border-color:#fecaca;animation:pulse 1.4s infinite}
.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px}
.info-box{border:1px dashed #dbe4f0;border-radius:14px;background:#f8fafc;padding:9px;font-size:12px;line-height:1.4}
.items{margin-top:10px;display:grid;gap:7px}
.item-line{display:flex;justify-content:space-between;gap:8px;background:#fff;border:1px solid #eef2f7;border-radius:12px;padding:8px;font-size:13px}
.totals{margin-top:10px;display:grid;gap:5px}.total-row{display:flex;justify-content:space-between}.total-row.final{font-weight:1000;font-size:16px}
.card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.mini-action{border:0;border-radius:12px;padding:10px 12px;font-weight:900;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.ok{background:#16a34a;color:#fff}.blue{background:#2563eb;color:#fff}.dark{background:#111827;color:#fff}.danger{background:#dc2626;color:#fff}.light{background:#f1f5f9;color:#0f172a}.orange{background:#f97316;color:#fff}
.empty{border:1px dashed #cbd5e1;border-radius:18px;padding:16px;text-align:center;color:#64748b;background:#f8fafc}
.assign-rider-box{width:100%;display:flex;gap:8px;flex-wrap:wrap;align-items:center;background:#f8fafc;border:1px solid #dbeafe;border-radius:14px;padding:10px}
.assign-rider-box select,.modal select,.modal input{flex:1;min-width:180px;border:1px solid #cbd5e1;border-radius:12px;padding:10px;font-weight:800;background:#fff}

.new-popups,.active-popups{position:static;pointer-events:auto;z-index:auto;padding:0;display:grid;gap:10px;align-items:start;justify-content:stretch;max-height:none;overflow:visible;scrollbar-width:auto}
.active-popups{grid-template-columns:repeat(3,minmax(260px,1fr))}
.new-popups{grid-template-columns:repeat(2,minmax(260px,1fr))}
.popup-card{pointer-events:auto;width:100%;min-width:0;border-radius:18px;overflow:hidden;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.12);border:1px solid #fed7aa;animation:pop .2s ease-out;align-self:start}
.popup-head{background:linear-gradient(135deg,#dc2626,#f97316);color:#fff;padding:14px 16px;font-weight:1000;display:flex;justify-content:space-between;gap:10px}
.popup-body{padding:14px;display:grid;gap:8px}.popup-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px}.popup-actions .mini-action{width:100%;min-height:42px}
.x{border:0;background:rgba(255,255,255,.2);color:#fff;border-radius:10px;font-weight:1000}
@keyframes pop{from{opacity:0;transform:translateY(-12px) scale(.98)}}
.float-new{position:fixed;right:18px;bottom:18px;z-index:900;border:0;border-radius:999px;background:linear-gradient(135deg,#0f172a,#2563eb);color:#fff;font-weight:1000;padding:14px 18px;box-shadow:0 18px 40px rgba(37,99,235,.28);cursor:pointer}

/* Main edit/modify modal */
.modal-wrap{display:none;position:fixed;inset:0;z-index:50000;background:rgba(15,23,42,.55);padding:16px;overflow:auto}
.modal-wrap.show{display:flex;align-items:center;justify-content:center}

/* v231 fix: All Orders modal uses z-index 1120, so the Modify Order modal must sit above it. */
#editModal{z-index:70020!important;}
#editModal.show{display:flex!important;align-items:center!important;justify-content:center!important;}
#editModal .modal{position:relative;z-index:70021;}
#editModal.past-edit-active{background:rgba(15,23,42,.68)!important;}
.modal{background:#fff;border-radius:24px;width:min(820px,100%);max-height:92vh;overflow:auto;padding:16px;box-shadow:0 24px 70px rgba(15,23,42,.28)}
.modal-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:12px}.modal-head h3{margin:0}
.search-results{display:grid;gap:8px;max-height:300px;overflow:auto;margin-top:10px}
.manual-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}

.edit-big-card{display:grid;gap:14px}
.edit-panel{border:1px solid #e5e7eb;border-radius:20px;background:#f8fafc;padding:13px}
.edit-panel h4{margin:0 0 10px;color:#0f172a;font-size:16px}
.edit-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:10px;margin-bottom:8px}
.edit-title{font-weight:1000;color:#0f172a;line-height:1.2}
.edit-sub{font-size:12px;color:#64748b;margin-top:3px;font-weight:800}
.edit-controls{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.edit-controls button{border:0;border-radius:10px;min-width:35px;min-height:35px;font-weight:1000;cursor:pointer}
.edit-minus,.edit-plus{background:#0f172a;color:#fff}
.edit-add{background:#16a34a;color:#fff;padding:0 12px}
.edit-remove{background:#fee2e2;color:#991b1b;padding:0 10px}
.edit-search-input{width:100%;min-height:46px;border:1px solid #cbd5e1;border-radius:14px;padding:0 12px;font-weight:900}
.edit-total{display:flex;justify-content:space-between;border-top:1px dashed #cbd5e1;padding-top:10px;margin-top:10px;font-size:16px;font-weight:1000}
.edit-error{background:#fee2e2;color:#991b1b;border-radius:12px;padding:10px;font-weight:900;margin-top:8px}
.map-address-link{color:#2563eb;font-weight:1000;text-decoration:underline;text-underline-offset:3px}
.source-pill{
    display:inline-flex;align-items:center;margin:4px 6px 0 0;padding:4px 10px;border-radius:999px;
    font-size:11px;font-weight:1000;text-transform:uppercase;letter-spacing:.03em;
    background:#e2e8f0;color:#334155;border:1px solid #cbd5e1;
}
.source-pill.source-customer_page{background:#dbeafe;color:#1e40af;border-color:#bfdbfe}
.source-pill.source-pos_bill{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.source-pill.source-dine_in{background:#ffedd5;color:#9a3412;border-color:#fed7aa}
.source-pill.source-staff_order{background:#ede9fe;color:#5b21b6;border-color:#ddd6fe}
.source-pill.source-self_service{background:#fef9c3;color:#854d0e;border-color:#fde68a}
@media print{.source-pill{border:0!important;background:none!important;color:#000!important;padding:0!important;margin:0!important;font-size:12px!important;text-transform:none!important}}
.customer-detail-sep{border-top:1px dashed #cbd5e1;margin:7px 0}
.gps-manual-btn{border:0;border-radius:999px;padding:7px 10px;background:#fee2e2;color:#991b1b;font-weight:1000;cursor:pointer}.gps-modal-backdrop{position:fixed;inset:0;z-index:70010;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.62);backdrop-filter:blur(8px)}.gps-modal-backdrop.open{display:flex}.gps-modal-card{width:100%;max-width:420px;border-radius:24px;background:#fff;box-shadow:0 30px 90px rgba(15,23,42,.34);overflow:hidden}.gps-modal-head{display:flex;justify-content:space-between;gap:10px;padding:15px;color:#fff;background:linear-gradient(135deg,#991b1b,#dc2626,#f97316)}.gps-modal-head h3{margin:0;font-size:20px}.gps-modal-head button{border:0;border-radius:13px;background:rgba(255,255,255,.18);color:#fff;font-weight:1000;padding:7px 10px;cursor:pointer}.gps-modal-body{padding:15px;display:grid;gap:10px}.gps-modal-body label{display:grid;gap:5px;font-size:12px;text-transform:uppercase;font-weight:1000;color:#64748b}.gps-modal-body input{min-height:44px;border:1px solid #cbd5e1;border-radius:14px;padding:0 11px;font-weight:850}.gps-save-btn{border:0;border-radius:15px;min-height:46px;color:#fff;background:linear-gradient(135deg,#16a34a,#22c55e);font-weight:1000;cursor:pointer}.print-area{display:none}

@page{size:80mm 297mm;margin:0}
@media print{
    html,
    body{
        width:80mm!important;
        min-width:80mm!important;
        max-width:80mm!important;
        margin:0!important;
        padding:0!important;
        background:#fff!important;
        overflow:visible!important;
    }

    body>*{display:none!important}

    .print-area{
        display:block!important;
        position:static!important;
        left:auto!important;
        top:auto!important;
        width:80mm!important;
        max-width:80mm!important;
        min-height:0!important;
        margin:0!important;
        padding:0!important;
        background:#fff!important;
        font-family:Arial,Helvetica,sans-serif;
        color:#000;
        overflow:visible!important;
        page-break-before:avoid!important;
        page-break-after:avoid!important;
        break-before:avoid!important;
        break-after:avoid!important;
    }

    .print-area:empty{display:none!important}

    .receipt80{
        width:72mm!important;
        max-width:72mm!important;
        margin:0 auto!important;
        padding:1.5mm 2mm 0!important;
        box-sizing:border-box!important;
        font-size:12px;
        line-height:1.28;
        background:#fff!important;
        overflow:visible!important;
        page-break-before:avoid!important;
        page-break-after:avoid!important;
        page-break-inside:avoid!important;
        break-before:avoid!important;
        break-after:avoid!important;
        break-inside:avoid!important;
    }

    .receipt80 h2{margin:0;text-align:center;font-size:18px;line-height:1.15}
    .receipt80 .center{text-align:center}.receipt80 .line{border-top:1px dashed #000;margin:7px 0}
    .receipt80 table{width:100%;border-collapse:collapse}
    .receipt80 th,.receipt80 td{padding:3px 0;border-bottom:1px dotted #ddd;text-align:left;vertical-align:top}
    .receipt80 th{border-bottom:1px solid #000;font-size:11px}
    .receipt80 .right{text-align:right;white-space:nowrap}
    .receipt80 .total{font-size:15px;font-weight:900}
    .receipt80 *{page-break-inside:avoid!important;break-inside:avoid!important}
}
@media(max-width:900px){.section-grid{grid-template-columns:1fr}.orders-brand h1{font-size:24px}.popup-card{width:100%}.info-grid,.manual-grid{grid-template-columns:1fr}}
@media(max-width:640px){.edit-row{grid-template-columns:1fr}.edit-controls{justify-content:flex-start}}

.inline-edit-help{
    margin-top:10px;
    padding:9px 10px;
    border-radius:12px;
    background:#eef2ff;
    color:#3730a3;
    font-size:12px;
    font-weight:900;
}
.item-line.editable{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
}
.item-main strong{display:block;color:#0f172a}
.item-main small{color:#64748b;font-weight:800}
.inline-controls{
    display:flex;
    gap:6px;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
}
.inline-controls button,
.inline-add-controls button{
    border:0;
    border-radius:10px;
    min-width:34px;
    min-height:34px;
    font-weight:1000;
    cursor:pointer;
}
.inline-minus,.inline-plus{background:#0f172a;color:#fff}
.inline-remove{background:#fee2e2;color:#991b1b;padding:0 10px}
.inline-saving{
    opacity:.65;
    pointer-events:none;
}
.inline-add-box{
    margin-top:12px;
    border:1px solid #dbeafe;
    background:#f8fbff;
    border-radius:18px;
    padding:12px;
}
.inline-add-title{
    font-weight:1000;
    color:#0f172a;
    margin-bottom:8px;
}
.inline-add-row{
    display:grid;
    grid-template-columns:110px minmax(0,1fr);
    gap:8px;
    align-items:center;
}
.inline-add-row label{
    font-size:13px;
    font-weight:1000;
    color:#334155;
}
.inline-add-search{
    width:100%;
    min-height:42px;
    border:1px solid #cbd5e1;
    border-radius:13px;
    padding:0 11px;
    font-weight:900;
}
.inline-results{
    display:grid;
    gap:8px;
    margin-top:10px;
    max-height:260px;
    overflow:auto;
}
.inline-result{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    align-items:center;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:14px;
    padding:9px;
}
.inline-result-name{font-weight:1000;color:#0f172a}
.inline-result-meta{font-size:12px;color:#64748b;font-weight:800;margin-top:2px}
.inline-add-controls{
    display:flex;
    gap:6px;
    align-items:center;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.inline-ok{background:#16a34a;color:#fff;padding:0 12px}
.inline-error{
    background:#fee2e2;
    color:#991b1b;
    border-radius:12px;
    padding:10px;
    font-weight:900;
}
@media(max-width:640px){
    .item-line.editable,
    .inline-result,
    .inline-add-row{
        grid-template-columns:1fr;
    }
    .inline-controls,
    .inline-add-controls{
        justify-content:flex-start;
    }
}


.refresh-status{
    display:none;
    margin:0 0 12px;
    padding:10px 12px;
    border-radius:14px;
    background:#eef2ff;
    color:#3730a3;
    font-size:12px;
    font-weight:900;
}
.refresh-status.show{display:block}


/* Current Orders - All Orders floating history */
.co-past-fab{
    position:fixed;
    right:18px;
    bottom:18px;
    z-index:920;
    border:0;
    border-radius:999px;
    min-height:56px;
    padding:0 18px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    color:#fff;
    background:linear-gradient(135deg,#0f172a 0%,#6366f1 52%,#8b5cf6 100%);
    box-shadow:0 20px 44px rgba(99,102,241,.32);
    font-weight:1000;
    cursor:pointer;
    border:2px solid rgba(255,255,255,.82);
}
.co-past-fab:hover{transform:translateY(-2px)}
.co-past-icon{font-size:21px;line-height:1}
.co-past-modal{
    position:fixed;
    inset:0;
    z-index:1120;
    background:rgba(15,23,42,.58);
    display:none;
    align-items:center;
    justify-content:center;
    padding:16px;
}
.co-past-modal.open{display:flex}
.co-past-card{
    width:min(980px,100%);
    max-height:92vh;
    overflow:auto;
    background:#fff;
    border-radius:26px;
    box-shadow:0 26px 80px rgba(15,23,42,.32);
    border:1px solid #e5e7eb;
    padding:16px;
}
.co-past-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
    margin-bottom:12px;
}
.co-past-head h3{margin:0;font-size:22px;color:#0f172a}
.co-past-head p{margin:4px 0 0;color:#64748b;font-weight:800}
.co-past-filter-grid{
    display:grid;
    grid-template-columns:1fr 1fr 1fr 1fr auto;
    gap:8px;
    margin-bottom:12px;
}
.co-past-filter-grid input,
.co-past-filter-grid select{
    min-height:42px;
    border:1px solid #cbd5e1;
    border-radius:13px;
    padding:0 10px;
    font-weight:850;
    background:#fff;
}
.co-past-stats-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
    margin-bottom:12px;
}
.co-past-stat{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:10px;
}
.co-past-stat small{display:block;color:#64748b;font-weight:900;text-transform:uppercase;font-size:10px;letter-spacing:.3px}
.co-past-stat strong{display:block;margin-top:4px;font-size:18px;color:#0f172a}
.co-past-list{display:grid;gap:9px}
.co-past-order-card{
    border:1px solid #e5e7eb;
    border-radius:18px;
    background:#fff;
    overflow:hidden;
}
.co-past-card-head{
    width:100%;
    border:0;
    padding:12px;
    background:linear-gradient(135deg,#f8fafc,#eef2ff);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    text-align:left;
    cursor:pointer;
}
.co-past-card-head strong{display:block;color:#0f172a}
.co-past-card-head small{display:block;margin-top:3px;color:#64748b;font-weight:800}
.co-past-pill{
    display:inline-flex;
    border-radius:999px;
    padding:7px 10px;
    background:#111827;
    color:#fff;
    font-size:12px;
    font-weight:900;
    white-space:nowrap;
}
.co-past-card-body{display:none;border-top:1px solid #e5e7eb;padding:12px}
.co-past-order-card.open .co-past-card-body{display:block}
.co-past-info-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin-bottom:10px;
}
.co-past-info-box{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:14px;
    padding:10px;
    font-size:12px;
    font-weight:800;
    line-height:1.45;
}
.co-past-line{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:8px;
    border:1px solid #eef2f7;
    background:#fff;
    border-radius:12px;
    margin-bottom:7px;
    font-size:13px;
}
.co-past-total{
    display:flex;
    justify-content:space-between;
    margin-top:9px;
    padding-top:9px;
    border-top:1px dashed #cbd5e1;
    font-weight:1000;
}
.co-past-pager{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    margin-top:14px;
}
.co-past-empty{
    border:1px dashed #cbd5e1;
    border-radius:16px;
    background:#f8fafc;
    color:#64748b;
    padding:16px;
    text-align:center;
    font-weight:850;
}
.co-past-print-row{
    display:flex;
    justify-content:flex-end;
    margin:10px 0;
}
.co-past-print-btn{
    border:0;
    border-radius:13px;
    min-height:40px;
    padding:0 13px;
    background:#f97316;
    color:#fff;
    font-weight:1000;
    cursor:pointer;
}
@media(max-width:760px){
    .co-past-filter-grid{grid-template-columns:1fr}
    .co-past-stats-grid{grid-template-columns:1fr 1fr}
    .co-past-info-grid{grid-template-columns:1fr}
    .co-past-fab{
        right:12px;
        bottom:12px;
        min-height:52px;
        padding:0 14px;
        font-size:13px;
    }
}


/* v202: Current Orders All Orders button on right-bottom */
.co-past-fab{
    right:18px !important;
    left:auto !important;
    bottom:18px !important;
}
@media(max-width:760px){
    .co-past-fab{
        right:12px !important;
        left:auto !important;
        bottom:12px !important;
    }
}


/* v163 kitchen delivery charge editor */
.delivery-edit-box{
    margin:12px 0;
    border:1px solid #fed7aa;
    background:linear-gradient(135deg,#fff7ed,#ffffff);
    border-radius:18px;
    padding:12px;
    box-shadow:0 10px 24px rgba(249,115,22,.08);
}
.delivery-edit-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:10px;
    color:#7c2d12;
    font-weight:1000;
}
.delivery-edit-title small{
    color:#9a3412;
    font-weight:850;
}
.delivery-edit-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    align-items:center;
}
.delivery-edit-row input{
    width:100%;
    min-height:42px;
    border:1px solid #fdba74;
    border-radius:14px;
    padding:0 12px;
    font:inherit;
    font-weight:1000;
    background:#fff;
}
.delivery-save-btn{
    border:0;
    min-height:42px;
    border-radius:14px;
    padding:0 14px;
    background:linear-gradient(135deg,#111827,#f97316);
    color:#fff;
    font-weight:1000;
    cursor:pointer;
    white-space:nowrap;
}
.delivery-save-btn:disabled{
    opacity:.6;
    cursor:not-allowed;
}
@media(max-width:680px){
    .delivery-edit-row{grid-template-columns:1fr}
    .delivery-save-btn{width:100%}
}


/* v164 floating order details modal */
.order-details-backdrop{
    position:fixed;
    inset:0;
    z-index:30000;
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
    background:rgba(15,23,42,.62);
    backdrop-filter:blur(8px);
}
.order-details-backdrop.open{display:flex}
.order-details-modal{
    width:100%;
    max-width:980px;
    max-height:92vh;
    background:#fff;
    border-radius:28px;
    box-shadow:0 30px 90px rgba(15,23,42,.34);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    animation:orderModalPop .16s ease-out;
}
@keyframes orderModalPop{
    from{opacity:.35;transform:translateY(10px) scale(.985)}
    to{opacity:1;transform:translateY(0) scale(1)}
}
.order-modal-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:16px 18px;
    color:#fff;
    background:linear-gradient(135deg,#0f172a,#2563eb,#7c3aed);
}
.order-modal-head h3{
    margin:0;
    font-size:20px;
    letter-spacing:-.02em;
}
.order-modal-head small{
    display:block;
    margin-top:3px;
    color:rgba(255,255,255,.82);
    font-weight:850;
}
.order-modal-close{
    border:0;
    min-height:40px;
    border-radius:14px;
    padding:0 14px;
    color:#fff;
    background:rgba(255,255,255,.16);
    font-weight:1000;
    cursor:pointer;
}
.order-modal-body{
    padding:16px;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    background:linear-gradient(180deg,#ffffff,#f8fbff);
}
.order-modal-body .details{
    display:block!important;
    border:0!important;
    padding:0!important;
    background:transparent!important;
}
.order-modal-body .card-actions{
    position:sticky;
    bottom:-16px;
    background:linear-gradient(180deg,rgba(248,251,255,.86),#fff);
    padding-top:12px;
    padding-bottom:4px;
}
.compact-card .compact-summary{
    cursor:pointer;
}
.compact-card .compact-summary::after{
    content:"View";
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:28px;
    border-radius:999px;
    padding:0 10px;
    margin-left:8px;
    background:#eff6ff;
    color:#1d4ed8;
    font-size:11px;
    font-weight:1000;
}
@media(max-width:680px){
    .order-details-backdrop{
        align-items:flex-start;
        padding:10px;
    }
    .order-details-modal{
        max-height:94vh;
        border-radius:22px;
    }
    .order-modal-head{
        padding:13px;
    }
    .order-modal-head h3{
        font-size:17px;
    }
    .order-modal-close{
        min-height:36px;
        padding:0 11px;
    }
    .order-modal-body{
        padding:12px;
    }
}

/* v266: Floating-card stacking fix. Child popups opened from order details must always appear above the details card. */
#orderDetailsBackdrop{z-index:30000!important;}
#orderPrintChoiceModal.order-print-choice-backdrop{z-index:70000!important;}
#gpsLocationModal.gps-modal-backdrop{z-index:70010!important;}
#editModal{z-index:70020!important;}
.order-details-backdrop.child-modal-open .order-details-modal{filter:saturate(.96);}


/* Food current-orders status tabs */
.co-status-tabs{display:flex;gap:8px;overflow:auto;padding:4px 0 14px;margin-bottom:4px}.co-status-tab{border:1px solid #dbe3ef;background:#fff;color:#334155;border-radius:999px;padding:11px 16px;font-weight:1000;white-space:nowrap;cursor:pointer;box-shadow:0 8px 18px rgba(15,23,42,.05)}.co-status-tab.active{background:#111827;color:#fff;border-color:#111827}.co-status-view{display:none}.co-status-view.active{display:block}.co-filtered-grid{display:grid;grid-template-columns:1fr;gap:16px}
@media(max-width:640px){
    .co-status-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;overflow:visible!important;background:#fff;border:1px solid #e5e7eb;border-radius:22px;padding:8px!important;margin:10px 0 14px;box-shadow:0 12px 28px rgba(15,23,42,.08)}
    .co-status-tab{width:100%;min-height:48px;white-space:normal!important;text-align:center;padding:10px 8px!important;font-size:12px;line-height:1.15;border-radius:16px!important;display:flex;align-items:center;justify-content:center;box-shadow:none}
}


/* v240 food status tabs pagination - non-active tabs show newest 10 per page */
.po-view-pager,
.ap-view-pager,
.co-status-pager{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:12px;
    border-top:1px solid #e5e7eb;
    background:#fff;
    flex-wrap:wrap;
}
.po-view-pager button,
.ap-view-pager button,
.co-status-pager button{
    border:0;
    border-radius:13px;
    min-height:40px;
    padding:0 14px;
    background:#111827;
    color:#fff;
    font-weight:1000;
    cursor:pointer;
}
.po-view-pager button:first-child,
.ap-view-pager button:first-child,
.co-status-pager button:first-child{background:#f1f5f9;color:#0f172a}
.po-view-pager button:disabled,
.ap-view-pager button:disabled,
.co-status-pager button:disabled{opacity:.45;cursor:not-allowed}
.po-view-pager strong,
.ap-view-pager strong,
.co-status-pager strong{color:#334155;font-size:13px;font-weight:1000}
@media(max-width:640px){
    .po-view-pager,.ap-view-pager,.co-status-pager{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;padding:10px}
    .po-view-pager button,.ap-view-pager button,.co-status-pager button{min-height:44px;padding:0 10px;font-size:12px;border-radius:14px}
    .po-view-pager strong,.ap-view-pager strong,.co-status-pager strong{text-align:center;font-size:12px;white-space:nowrap}
}



/* v312: Current Orders Bill-style Modify Order floating card near Print */
.co311-backdrop{
    position:fixed!important;
    inset:0!important;
    z-index:70030!important;
    display:none!important;
    align-items:center!important;
    justify-content:center!important;
    padding:14px!important;
    background:rgba(15,23,42,.68)!important;
    backdrop-filter:blur(8px)!important;
    box-sizing:border-box!important;
}
.co311-backdrop.open{display:flex!important;}
.co311-card{
    width:min(980px,100%)!important;
    max-height:94vh!important;
    overflow:hidden!important;
    background:#fff!important;
    color:#0f172a!important;
    border-radius:26px!important;
    box-shadow:0 34px 110px rgba(15,23,42,.45)!important;
    display:flex!important;
    flex-direction:column!important;
    border:1px solid rgba(255,255,255,.70)!important;
}
.co311-head{
    padding:16px 18px!important;
    color:#fff!important;
    background:linear-gradient(135deg,#0f172a,#2563eb,#7c3aed)!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    gap:12px!important;
}
.co311-head h3{margin:0!important;font-size:21px!important;line-height:1.15!important;}
.co311-head p{margin:5px 0 0!important;color:rgba(255,255,255,.84)!important;font-size:12px!important;font-weight:850!important;}
.co311-close{width:42px!important;height:42px!important;min-width:42px!important;border:0!important;border-radius:999px!important;background:rgba(255,255,255,.18)!important;color:#fff!important;font-size:22px!important;font-weight:1000!important;cursor:pointer!important;display:grid!important;place-items:center!important;}
.co311-body{padding:14px!important;overflow:auto!important;background:linear-gradient(180deg,#fff,#f8fbff)!important;}
.co311-layout{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(300px,.82fr)!important;gap:14px!important;align-items:start!important;}
.co311-panel{border:1px solid #e5e7eb!important;border-radius:20px!important;background:#fff!important;box-shadow:0 10px 26px rgba(15,23,42,.06)!important;overflow:hidden!important;}
.co311-panel-head{padding:12px 14px!important;background:#f8fafc!important;border-bottom:1px solid #e5e7eb!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;}
.co311-panel-head h4{margin:0!important;font-size:15px!important;color:#0f172a!important;}
.co311-panel-body{padding:12px!important;display:grid!important;gap:10px!important;max-height:52vh!important;overflow:auto!important;}
.co311-cart-row,.co311-search-row{border:1px solid #dbe4f0!important;border-radius:16px!important;background:#fff!important;padding:11px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important;}
.co311-cart-row strong,.co311-search-row strong{display:block!important;color:#0f172a!important;font-size:14px!important;line-height:1.25!important;white-space:normal!important;overflow-wrap:anywhere!important;}
.co311-cart-row small,.co311-search-row small{display:block!important;margin-top:3px!important;color:#64748b!important;font-size:12px!important;font-weight:850!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:anywhere!important;}
.co311-qty{display:flex!important;align-items:center!important;gap:5px!important;border:1px solid #dbe4f0!important;border-radius:999px!important;background:#f8fafc!important;padding:3px!important;white-space:nowrap!important;}
.co311-qty button{width:32px!important;height:32px!important;border:0!important;border-radius:999px!important;background:#111827!important;color:#fff!important;font-size:18px!important;font-weight:1000!important;cursor:pointer!important;}
.co311-qty span{min-width:28px!important;text-align:center!important;font-weight:1000!important;color:#0f172a!important;}
.co311-total{padding:12px 14px!important;border-top:1px solid #e5e7eb!important;display:flex!important;justify-content:space-between!important;gap:10px!important;background:#f8fafc!important;font-weight:1000!important;}
.co311-search{width:100%!important;border:1px solid #cbd5e1!important;border-radius:15px!important;padding:12px 13px!important;font:inherit!important;font-weight:850!important;outline:none!important;}
.co311-add{border:0!important;border-radius:12px!important;background:linear-gradient(135deg,#16a34a,#22c55e)!important;color:#fff!important;font-weight:1000!important;min-height:38px!important;padding:0 12px!important;cursor:pointer!important;white-space:nowrap!important;}
.co311-remove{background:#fee2e2!important;color:#991b1b!important;border:0!important;border-radius:999px!important;width:32px!important;height:32px!important;font-weight:1000!important;cursor:pointer!important;}
.co311-custom{border-top:1px dashed #cbd5e1!important;margin-top:10px!important;padding-top:10px!important;display:grid!important;gap:8px!important;}
.co311-custom input{width:100%!important;border:1px solid #cbd5e1!important;border-radius:14px!important;padding:10px 12px!important;font:inherit!important;font-weight:850!important;box-sizing:border-box!important;}
.co311-actions{padding:13px 14px!important;border-top:1px solid #e5e7eb!important;background:#fff!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;}
.co311-actions button{min-height:48px!important;border:0!important;border-radius:16px!important;font-weight:1000!important;cursor:pointer!important;}
.co311-cancel{background:#f1f5f9!important;color:#0f172a!important;}
.co311-save{background:linear-gradient(135deg,#16a34a,#22c55e)!important;color:#fff!important;}
.co311-note{padding:14px!important;border:1px dashed #cbd5e1!important;border-radius:16px!important;background:#f8fafc!important;color:#64748b!important;font-weight:900!important;text-align:center!important;}
@media(max-width:760px){
    .co311-backdrop{align-items:flex-start!important;padding:8px!important;}
    .co311-card{max-height:96vh!important;border-radius:22px!important;}
    .co311-head{padding:13px 14px!important;}
    .co311-head h3{font-size:18px!important;}
    .co311-layout{grid-template-columns:1fr!important;}
    .co311-panel-body{max-height:34vh!important;padding:10px!important;}
    .co311-cart-row,.co311-search-row{grid-template-columns:1fr!important;}
    .co311-qty{justify-content:center!important;width:max-content!important;max-width:100%!important;}
    .co311-add{width:100%!important;}
    .co311-actions{grid-template-columns:1fr!important;padding:10px!important;}
}
@media print{.co311-backdrop{display:none!important;}}

/* ==== kds-navhead-v1 (extracted from current-orders.php inline <style>) ==== */
/* ===== NAVHEAD: burger drawer with index.php page list (all screen sizes) ===== */
.navhead-hidden-status{display:none !important;}
.bill-navhead{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:10px !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    padding:0 !important;
    margin:0 0 12px !important;
    min-height:0 !important;
}
.navhead-burger{
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:5px;
    width:46px;height:46px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
    cursor:pointer;
    padding:0 12px;
    flex-shrink:0;
    box-shadow:0 8px 20px rgba(0,0,0,.05);
    transition:box-shadow .15s ease, transform .15s ease;
}
.navhead-burger:hover{box-shadow:0 10px 26px rgba(0,0,0,.10);transform:translateY(-1px);}
.navhead-burger span{display:block;height:2.5px;width:100%;border-radius:3px;background:#0f172a;}
.navhead-page-title{
    font-size:16px;
    font-weight:1000;
    color:#0f172a;
    letter-spacing:-.02em;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    min-width:0;
}
.navhead-lead{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}
@media(max-width:640px){
    .navhead-page-title{font-size:14px;}
    .navhead-lead{gap:9px;}
}
/* create-posts.php puts the burger on a dark gradient hero, so the dark
   default would be unreadable there. */
.cp-hero .navhead-page-title{color:#fff;}
@media print{.navhead-page-title,.navhead-lead{display:none !important;}}

/* Drawer: identical behaviour on desktop and mobile */
.navhead-links{
    position:fixed;
    top:0;left:0;bottom:0;
    width:min(300px,86vw);
    background:#fff;
    border-right:1px solid var(--line);
    box-shadow:0 0 60px rgba(0,0,0,.22);
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    flex-wrap:nowrap;
    gap:4px;
    padding:18px 12px;
    overflow-y:auto;
    z-index:99998;
    transform:translateX(-102%);
    transition:transform .22s ease;
}
.navhead-links.open{transform:translateX(0);}
.navhead-link{
    display:flex;
    align-items:center;
    gap:10px;
    padding:11px 12px;
    border-radius:12px;
    text-decoration:none;
    color:#334155;
    font-size:14px;
    font-weight:800;
    white-space:nowrap;
    transition:background .15s ease,color .15s ease;
}
.navhead-link:hover{background:#f1f5f9;color:#0f172a;}
.navhead-link.active{background:linear-gradient(135deg,#1e3a8a,#2563eb);color:#fff;}
.navhead-ico{font-size:17px;line-height:1;}
.navhead-backdrop{
    position:fixed;inset:0;
    background:rgba(15,23,42,.5);
    z-index:99997;
    opacity:0;pointer-events:none;
    transition:opacity .22s ease;
}
.navhead-backdrop.open{opacity:1;pointer-events:auto;}


/* Burger takes the place of the old brand block on the left */
.orders-head{
    align-items:center !important;
}
.navhead-burger{flex-shrink:0 !important;}
.orders-head .orders-actions{
    margin-left:auto !important;
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
    flex-shrink:0 !important;
}

/* CUSTOMER_PROFILE_KDS_V1 */
.customer-profile-trigger{cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}
.customer-profile-trigger:hover,.customer-profile-trigger:focus{border-color:#93c5fd!important;box-shadow:0 10px 24px rgba(37,99,235,.12);outline:none;transform:translateY(-1px)}
.customer-profile-hint{display:block;margin-top:8px;padding-top:7px;border-top:1px dashed #cbd5e1;color:#2563eb!important;font-weight:1000!important;text-transform:uppercase;letter-spacing:.25px;font-size:10px!important}
.cp-modal-backdrop{position:fixed;inset:0;z-index:70040;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.62);backdrop-filter:blur(8px)}
.cp-modal-backdrop.open{display:flex}
.cp-modal-card{width:100%;max-width:640px;max-height:92vh;overflow:hidden;background:#fff;border-radius:26px;box-shadow:0 30px 90px rgba(15,23,42,.34);display:flex;flex-direction:column}
.cp-modal-head{padding:16px 18px;color:#fff;background:linear-gradient(135deg,#0f172a,#2563eb,#7c3aed);display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.cp-modal-head h3{margin:0;font-size:20px}.cp-modal-head p{margin:4px 0 0;font-size:12px;font-weight:850;color:rgba(255,255,255,.85)}
.cp-modal-head button{border:0;border-radius:13px;background:rgba(255,255,255,.18);color:#fff;font-weight:1000;padding:8px 12px;cursor:pointer;flex-shrink:0}
.cp-modal-body{padding:16px;overflow:auto;background:linear-gradient(180deg,#fff,#f8fbff)}
.cp-stat-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:9px;margin-bottom:14px}
.cp-stat{border:1px solid #e5e7eb;border-radius:16px;padding:11px;background:#f8fafc;text-align:center}.cp-stat small{display:block;text-transform:uppercase;letter-spacing:.35px;font-size:10px;font-weight:1000;color:#64748b}.cp-stat strong{display:block;margin-top:6px;font-size:17px;color:#0f172a}.cp-stat.due strong{color:#991b1b}.cp-stat.paid strong{color:#166534}
.cp-profile-edit{border:1px solid #dbeafe;background:#f8fbff;border-radius:17px;padding:12px;margin:0 0 14px}.cp-profile-edit-head{display:flex;flex-direction:column;gap:2px;margin-bottom:10px}.cp-profile-edit-head strong{font-size:13px;color:#0f172a;text-transform:uppercase;letter-spacing:.25px}.cp-profile-edit-head small{font-size:11px;color:#64748b;font-weight:800}.cp-profile-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.cp-profile-edit-grid label{display:grid;gap:5px;font-size:10px;text-transform:uppercase;letter-spacing:.3px;font-weight:1000;color:#64748b}.cp-profile-edit-grid label.wide{grid-column:1/-1}.cp-profile-edit-grid input{width:100%;min-height:40px;border:1px solid #cbd5e1;border-radius:12px;padding:0 10px;font:inherit;font-weight:800;background:#fff;box-sizing:border-box}.cp-profile-edit-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:10px}.cp-profile-edit-actions button{border:0;border-radius:12px;min-height:40px;padding:0 14px;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-weight:1000;cursor:pointer}.cp-profile-edit-actions button:disabled{opacity:.55;cursor:not-allowed}.cp-profile-edit-msg{font-size:11px;font-weight:850;color:#64748b}.cp-profile-edit-msg.ok{color:#166534}.cp-profile-edit-msg.err{color:#991b1b}
.cp-ledger-grid{display:grid;grid-template-columns:1fr;gap:9px;margin-bottom:14px}.cp-ledger-box{border:1px solid #e5e7eb;border-radius:16px;padding:11px;background:#f8fafc}.cp-ledger-box.received{background:#f0fdf4;border-color:#bbf7d0}.cp-ledger-box.debt{background:#fef2f2;border-color:#fecaca}.cp-ledger-box label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.3px;font-weight:1000;color:#475569;margin-bottom:6px}.cp-ledger-row{display:flex;gap:7px}.cp-ledger-row input{flex:1;min-width:0;border:1px solid #cbd5e1;border-radius:12px;padding:0 10px;min-height:40px;font:inherit;font-weight:800;background:#fff}.cp-ledger-row button{border:0;border-radius:12px;padding:0 13px;min-height:40px;font-weight:1000;color:#fff;cursor:pointer;white-space:nowrap}.cp-ledger-box.received button{background:linear-gradient(135deg,#16a34a,#22c55e)}.cp-ledger-box.debt button{background:linear-gradient(135deg,#dc2626,#f97316)}.cp-ledger-msg{font-size:11px;font-weight:850;margin-top:6px;min-height:14px}.cp-ledger-msg.ok{color:#166534}.cp-ledger-msg.err{color:#991b1b}
.cp-orders-title{font-size:13px;font-weight:1000;color:#0f172a;margin:4px 0 8px;text-transform:uppercase;letter-spacing:.3px}.cp-order-list{display:grid;gap:8px}.cp-order-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;border:1px solid #e5e7eb;border-radius:14px;padding:10px 12px;background:#fff}.cp-order-row strong{display:block;color:#0f172a;font-size:14px}.cp-order-row small{display:block;color:#64748b;font-weight:800;margin-top:2px}.cp-order-tags{display:flex;flex-wrap:wrap;align-items:center;gap:0}.cp-order-pill,.cp-pay-pill{border-radius:999px;padding:5px 10px;font-size:11px;font-weight:1000;white-space:nowrap}.cp-order-pill{background:#eff6ff;color:#1d4ed8}.cp-order-pill.cancelled{background:#fee2e2;color:#991b1b}.cp-order-pill.delivered,.cp-order-pill.served,.cp-order-pill.completed{background:#dcfce7;color:#166534}.cp-pay-pill{margin-left:6px}.cp-pay-pill.received{background:#dcfce7;color:#166534}.cp-pay-pill.pending{background:#fee2e2;color:#991b1b}.cp-pay-pill.partial{background:#fef3c7;color:#92400e}.cp-pay-pill.unrecorded{background:#f1f5f9;color:#64748b}
.cp-pager{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px}.cp-pager button{border:0;min-height:40px;border-radius:13px;padding:0 14px;font-weight:1000;cursor:pointer;background:#f1f5f9;color:#0f172a}.cp-pager button:disabled{opacity:.45;cursor:not-allowed}.cp-pager strong{font-size:12px;color:#64748b}
@media(max-width:640px){.cp-stat-grid{grid-template-columns:1fr 1fr}.cp-profile-edit-grid{grid-template-columns:1fr}.cp-profile-edit-grid label.wide{grid-column:auto}.cp-ledger-row{flex-wrap:wrap}.cp-order-row{grid-template-columns:1fr}}


/* ==== KDS_ORDER_EDIT_TOOLS_CLEAN_V1: compact Add More Item + Delivery Charges boxes ==== */
.kds-edit-tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px;margin:12px 0}.kds-tool-card{margin:0!important;border-radius:16px!important;padding:11px!important;box-shadow:none!important;min-width:0}.kds-add-item-tool{border:1px solid #bfdbfe!important;background:linear-gradient(135deg,#eff6ff,#fff)!important}.kds-delivery-tool{border:1px solid #fed7aa!important;background:linear-gradient(135deg,#fff7ed,#fff)!important}.kds-tool-card .inline-add-title,.kds-tool-card .delivery-edit-title{margin:0 0 8px!important;display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:8px!important}.kds-tool-card .inline-add-title span,.kds-tool-card .delivery-edit-title span{font-size:13px!important;font-weight:1000!important;color:#0f172a!important}.kds-tool-card .inline-add-title small,.kds-tool-card .delivery-edit-title small{font-size:10px!important;line-height:1.3!important;color:#64748b!important;font-weight:850!important;text-align:right!important}.kds-tool-card .inline-add-row{display:block!important}.kds-tool-card .inline-add-search{min-height:40px!important;border-radius:12px!important;background:#fff!important}.kds-tool-card .inline-results{max-height:180px!important;margin-top:8px!important;gap:6px!important}.kds-tool-card .inline-result{border-radius:12px!important;padding:8px!important}.kds-tool-empty{padding:10px!important;border-radius:12px!important;font-size:11px!important}.delivery-input-shell{display:flex;align-items:center;border:1px solid #fdba74;border-radius:12px;background:#fff;overflow:hidden;min-height:40px}.delivery-input-shell>span{padding:0 9px;color:#9a3412;font-size:11px;font-weight:1000;border-right:1px solid #fed7aa}.delivery-input-shell input{border:0!important;border-radius:0!important;min-height:38px!important;padding:0 10px!important;outline:none!important}.kds-tool-card .delivery-edit-row{grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important}.kds-tool-card .delivery-save-btn{min-height:40px!important;border-radius:12px!important;padding:0 12px!important;background:linear-gradient(135deg,#f97316,#ea580c)!important}.order-modal-body .items{margin-top:10px}.order-modal-body .totals{margin-top:12px;padding:10px 12px;border:1px solid #e5e7eb;border-radius:16px;background:#fff}.order-modal-body .total-row{padding:5px 0;border-bottom:1px dashed #eef2f7}.order-modal-body .total-row:last-child{border-bottom:0}
@media(max-width:680px){.kds-edit-tools{grid-template-columns:1fr}.kds-tool-card .delivery-edit-row{grid-template-columns:1fr!important}.kds-tool-card .delivery-save-btn{width:100%!important}}


/* v330: Alerts are a real first KDS section instead of fixed overlays over Active orders. */
.co-alerts-layout{display:grid;grid-template-columns:minmax(0,3fr) minmax(340px,2fr);gap:14px;align-items:start}
.co-alert-lane{min-width:0;background:#f8fafc;border:1px solid #e5e7eb;border-radius:22px;padding:10px;box-shadow:0 10px 26px rgba(15,23,42,.06)}
.co-alert-lane-head{display:flex;align-items:center;justify-content:center;gap:10px;position:relative;padding:2px 6px 10px;margin-bottom:2px;border-bottom:2px dashed #0f172a}
.co-alert-lane-head h2{margin:0;color:#050b16;font-size:clamp(22px,2.2vw,38px);line-height:1;font-weight:1000;text-align:center}
.co-alert-lane-head span{position:absolute;right:8px;top:50%;transform:translateY(-58%);display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;padding:0 8px;border-radius:999px;background:#0f172a;color:#fff;font-size:12px;font-weight:1000}
.co-alert-empty{grid-column:1/-1;border:1px dashed #cbd5e1;border-radius:16px;background:#fff;color:#64748b;padding:24px 12px;text-align:center;font-weight:900}
.co-alerts-view .popup-head{padding:10px 12px}
.co-alerts-view .popup-body{padding:10px 12px;gap:6px}
.co-alerts-view .popup-actions{gap:7px}
.co-alerts-view .popup-actions .mini-action{min-height:38px;padding:8px 10px}
@media(max-width:1250px){.active-popups{grid-template-columns:repeat(2,minmax(240px,1fr))}.new-popups{grid-template-columns:1fr}.co-alerts-layout{grid-template-columns:minmax(0,2fr) minmax(300px,1fr)}}
@media(max-width:900px){.co-alerts-layout{grid-template-columns:1fr}.active-popups,.new-popups{grid-template-columns:repeat(2,minmax(220px,1fr))}}
@media(max-width:640px){.co-status-tabs{grid-template-columns:repeat(4,minmax(0,1fr))!important}.co-alert-lane{padding:8px;border-radius:18px}.co-alert-lane-head h2{font-size:22px}.active-popups,.new-popups{grid-template-columns:1fr}.popup-card{border-radius:16px}}

/* v332: true full-width Alerts workspace + smaller cleaner alert cards.
   The shell expands only while Alerts is selected. Header/tabs remain centered. */
.orders-shell.alerts-expanded{
    width:calc(100vw - 8px) !important;
    max-width:none !important;
    margin-left:8px !important;
    margin-right:0 !important;
}
.orders-shell.alerts-expanded > .orders-head,
.orders-shell.alerts-expanded > .co-status-tabs,
.orders-shell.alerts-expanded > .alarm-note,
.orders-shell.alerts-expanded > .refresh-status{
    width:min(1180px,calc(100% - 8px));
    margin-left:auto;
    margin-right:auto;
    box-sizing:border-box;
}
.orders-shell.alerts-expanded > .co-status-tabs{margin-bottom:4px}

.co-alerts-view{
    position:relative;
    left:auto;
    width:100%;
    max-width:none;
    transform:none;
    box-sizing:border-box;
}
.co-alerts-view .co-alerts-layout{
    width:100%;
    grid-template-columns:minmax(0,2.15fr) minmax(360px,1fr);
    gap:10px;
}
.co-alerts-view .co-alert-lane{
    padding:8px;
    border-radius:18px;
    box-shadow:0 8px 20px rgba(15,23,42,.05);
}
.co-alerts-view .co-alert-lane-head{
    padding:0 4px 8px;
    margin-bottom:0;
}
.co-alerts-view .co-alert-lane-head h2{
    font-size:clamp(21px,1.65vw,30px);
}
.co-alerts-view .co-alert-lane-head span{
    right:5px;
    min-width:27px;
    height:27px;
    font-size:11px;
}

/* Compact cards: use more columns instead of making each alert oversized. */
.co-alerts-view .active-popups,
.co-alerts-view .new-popups{
    gap:8px;
    padding-top:4px;
    justify-content:start;
}
.co-alerts-view .active-popups{
    grid-template-columns:repeat(auto-fill,minmax(220px,285px));
}
.co-alerts-view .new-popups{
    grid-template-columns:repeat(auto-fill,minmax(220px,275px));
}
.co-alerts-view .popup-card{
    max-width:285px;
    border-radius:14px;
    box-shadow:0 6px 16px rgba(15,23,42,.09);
}
.co-alerts-view .new-popups .popup-card{max-width:275px}
.co-alerts-view .popup-head{
    padding:8px 10px;
    gap:7px;
    font-size:12.5px;
    line-height:1.25;
}
.co-alerts-view .popup-head .x{
    min-width:25px;
    height:25px;
    padding:0 6px;
    border-radius:8px;
    font-size:12px;
}
.co-alerts-view .popup-body{
    padding:8px 10px;
    gap:4px;
    font-size:12px;
    line-height:1.32;
}
.co-alerts-view .popup-body strong{font-size:12.5px}
.co-alerts-view .popup-actions{
    gap:6px;
    margin-top:3px;
}
.co-alerts-view .popup-actions .mini-action{
    min-height:33px;
    padding:6px 7px;
    border-radius:10px;
    font-size:11.5px;
    line-height:1.15;
}
.co-alerts-view .co-alert-empty{
    padding:18px 10px;
    border-radius:13px;
    font-size:12px;
}

@media(max-width:1250px){
    .co-alerts-view .co-alerts-layout{grid-template-columns:minmax(0,2fr) minmax(320px,1fr)}
    .co-alerts-view .active-popups{grid-template-columns:repeat(auto-fill,minmax(210px,270px))}
    .co-alerts-view .new-popups{grid-template-columns:repeat(auto-fill,minmax(210px,260px))}
    .co-alerts-view .popup-card{max-width:270px}
    .co-alerts-view .new-popups .popup-card{max-width:260px}
}
@media(max-width:900px){
    .orders-shell.alerts-expanded{width:calc(100vw - 6px)!important;margin-left:6px!important;margin-right:0!important}
    .co-alerts-view .co-alerts-layout{grid-template-columns:1fr}
    .co-alerts-view .active-popups,
    .co-alerts-view .new-popups{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
    .co-alerts-view .popup-card,
    .co-alerts-view .new-popups .popup-card{max-width:none}
}
@media(max-width:640px){
    .orders-shell.alerts-expanded{width:calc(100vw - 4px)!important;margin-left:4px!important;margin-right:0!important}
    .orders-shell.alerts-expanded > .orders-head,
    .orders-shell.alerts-expanded > .co-status-tabs,
    .orders-shell.alerts-expanded > .alarm-note,
    .orders-shell.alerts-expanded > .refresh-status{width:100%}
    .co-alerts-view .co-alert-lane{padding:6px;border-radius:15px}
    .co-alerts-view .co-alert-lane-head h2{font-size:20px}
    .co-alerts-view .active-popups,
    .co-alerts-view .new-popups{grid-template-columns:1fr}
    .co-alerts-view .popup-card,
    .co-alerts-view .new-popups .popup-card{max-width:none}
}


/* v336: fixed desktop alert density requested by operator.
   Processing Orders = 3 alerts per row; New Orders = 2 alerts per row. */
@media(min-width:901px){
    .co-alerts-view .active-popups{
        grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    }
    .co-alerts-view .new-popups{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
    .co-alerts-view .popup-card,
    .co-alerts-view .new-popups .popup-card{
        width:100% !important;
        max-width:none !important;
    }
}

/* v337: Alerts mode uses the full browser width, including the KDS header.
   Keep the normal 1180px shell for Active/Delivered/Cancelled, but while
   Alerts is selected break the visible header + alert workspace out to the
   viewport so no large unused right-side area remains. */
@media (min-width:901px){
    /* Keep a stable centered reference box; children below do the viewport breakout. */
    .orders-shell.alerts-expanded{
        width:min(1180px,calc(100% - 24px)) !important;
        max-width:1180px !important;
        margin-left:auto !important;
        margin-right:auto !important;
    }

    .orders-shell.alerts-expanded > .orders-head,
    .orders-shell.alerts-expanded > .alarm-note,
    .orders-shell.alerts-expanded > .refresh-status,
    .orders-shell.alerts-expanded > .co-status-tabs,
    .orders-shell.alerts-expanded > .co-alerts-view{
        width:calc(100vw - 24px) !important;
        max-width:none !important;
        box-sizing:border-box !important;
        margin-left:calc(50% - 50vw + 12px) !important;
        margin-right:calc(50% - 50vw + 12px) !important;
    }

    /* Header now genuinely spans the screen: title left, controls far right. */
    .orders-shell.alerts-expanded > .orders-head{
        padding-left:0 !important;
        padding-right:0 !important;
        justify-content:space-between !important;
    }
    .orders-shell.alerts-expanded > .orders-head .orders-actions{
        margin-left:auto !important;
    }

    /* Keep the tabs aligned to the same full-width left edge. */
    .orders-shell.alerts-expanded > .co-status-tabs{
        justify-content:start !important;
    }

    /* The two alert lanes consume all remaining width: New Orders left, Processing Orders right. */
    .orders-shell.alerts-expanded > .co-alerts-view .co-alerts-layout{
        width:100% !important;
        max-width:none !important;
        grid-template-columns:minmax(360px,2fr) minmax(0,3fr) !important;
        gap:10px !important;
    }

    /* Requested fixed desktop density. */
    .orders-shell.alerts-expanded > .co-alerts-view .active-popups{
        grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    }
    .orders-shell.alerts-expanded > .co-alerts-view .new-popups{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
    .orders-shell.alerts-expanded > .co-alerts-view .popup-card,
    .orders-shell.alerts-expanded > .co-alerts-view .new-popups .popup-card{
        width:100% !important;
        max-width:none !important;
    }
}


/* DINEIN_MODIFIED_ALERT_V1 --------------------------------------------- */
.modified-tag{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-left:6px;
    padding:3px 7px;
    border-radius:999px;
    background:#7c3aed;
    color:#fff;
    font-size:9px;
    line-height:1;
    letter-spacing:.06em;
    font-weight:1000;
    vertical-align:middle;
}
.modified-order-card{
    border-color:#c4b5fd!important;
    box-shadow:0 8px 18px rgba(124,58,237,.08)!important;
}
.modified-summary{
    background:linear-gradient(135deg,#faf5ff,#f5f3ff)!important;
}
.modified-pill{
    background:#7c3aed!important;
    color:#fff!important;
}
.modified-item-preview{
    margin-top:7px;
    padding:7px 9px;
    border-radius:10px;
    background:#fff;
    border:1px dashed #c4b5fd;
    color:#4c1d95;
    font-size:11px;
    line-height:1.45;
    font-weight:800;
}
.modified-card-actions{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    justify-content:flex-end;
    margin-top:7px;
}
.modified-card-actions .mini-action{min-height:30px;padding:5px 8px;font-size:10px}
.modified-popup-card{
    border-color:#c4b5fd!important;
    box-shadow:0 10px 22px rgba(124,58,237,.13)!important;
}
.modified-popup-card .popup-head{
    background:linear-gradient(135deg,#6d28d9,#8b5cf6)!important;
}
.modified-new-items-label{
    display:inline-block;
    margin:7px 0 5px;
    padding:3px 7px;
    border-radius:7px;
    background:#ede9fe;
    color:#5b21b6;
    font-size:9px;
    font-weight:1000;
    letter-spacing:.06em;
}
@media(max-width:700px){
    .modified-summary{align-items:flex-start!important}
    .modified-card-actions{justify-content:flex-start}
}
@media print{
    .modified-order-card,.modified-popup-card{display:none!important}
}

/* KDS_KITCHEN_NOTE_V1 */
.kitchen-note-circle{
    width:46px;
    height:46px;
    min-width:46px;
    border:2px solid #f59e0b;
    border-radius:50%;
    background:linear-gradient(145deg,#fff7ed,#ffedd5);
    color:#9a3412;
    font:inherit;
    font-size:10px;
    line-height:1;
    font-weight:1000;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 8px 18px rgba(245,158,11,.22);
}
.kitchen-note-circle:hover{transform:translateY(-1px);filter:brightness(.98)}
.kitchen-note-card-row{
    display:flex;
    justify-content:flex-end;
    padding:0 12px 10px;
}
.kitchen-note-popup-row,
.kitchen-note-detail-row{
    display:flex;
    justify-content:flex-end;
}
.kitchen-note-detail-row{margin-bottom:10px}
.kitchen-note-backdrop{
    display:none;
    position:fixed;
    inset:0;
    z-index:80050;
    padding:16px;
    background:rgba(15,23,42,.68);
    backdrop-filter:blur(7px);
    align-items:center;
    justify-content:center;
}
.kitchen-note-backdrop.open{display:flex}
.kitchen-note-modal{
    width:min(460px,100%);
    border:1px solid #fed7aa;
    border-radius:24px;
    background:#fff;
    box-shadow:0 28px 80px rgba(15,23,42,.34);
    overflow:hidden;
}
.kitchen-note-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:15px 17px;
    background:linear-gradient(135deg,#f97316,#f59e0b);
    color:#fff;
}
.kitchen-note-head h3{margin:0;font-size:18px}
.kitchen-note-head button{
    border:0;
    border-radius:999px;
    padding:8px 12px;
    background:rgba(255,255,255,.2);
    color:#fff;
    font-weight:1000;
    cursor:pointer;
}
.kitchen-note-text{
    padding:22px;
    color:#0f172a;
    font-size:20px;
    line-height:1.55;
    font-weight:900;
    overflow-wrap:anywhere;
}
@media(max-width:520px){
    .kitchen-note-circle{width:42px;height:42px;min-width:42px;font-size:9px}
    .kitchen-note-backdrop{align-items:flex-end;padding:10px}
    .kitchen-note-modal{border-radius:22px 22px 14px 14px}
    .kitchen-note-text{padding:18px;font-size:18px}
}
@media print{.kitchen-note-circle,.kitchen-note-backdrop{display:none!important}}

/* CUSTOMER_CANCEL_ALERTS_V2: red cancellation cards live inside New Orders. */
.co-cancel-alert-card{
    min-width:0;
    overflow:hidden;
    border:1px solid #ef4444;
    border-radius:16px;
    background:#fff;
    box-shadow:0 9px 22px rgba(153,27,27,.13);
    animation:pop .2s ease-out;
}
.co-cancel-alert-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    background:linear-gradient(135deg,#7f1d1d,#dc2626,#ef4444);
    color:#fff;
    font-weight:1000;
}
.co-cancel-alert-head span{
    text-transform:uppercase;
    letter-spacing:.06em;
    font-size:12px;
}
.co-cancel-alert-body{
    display:grid;
    gap:8px;
    padding:11px 12px 12px;
    color:#0f172a;
    font-size:12.5px;
    line-height:1.4;
}
.co-cancel-alert-meta{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    align-items:start;
}
.co-cancel-alert-meta>div:last-child{text-align:right}
.co-cancel-alert-meta small{color:#64748b;font-weight:800}
.co-cancel-alert-reason{
    display:grid;
    gap:3px;
    padding:9px 10px;
    border:1px solid #fecaca;
    border-radius:12px;
    background:#fee2e2;
    color:#7f1d1d;
}
.co-cancel-alert-reason strong{text-transform:uppercase;font-size:10px;letter-spacing:.05em}
.co-cancel-alert-reason span{font-weight:900;overflow-wrap:anywhere}
.co-cancel-alert-items{display:grid;gap:5px}
.co-cancel-alert-item{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:8px;
    padding:6px 8px;
    border:1px solid #fee2e2;
    border-radius:10px;
    background:#fffafa;
    font-weight:850;
}
.co-cancel-alert-item span{min-width:0;overflow-wrap:anywhere}
.co-cancel-alert-item small{display:block;color:#64748b;font-weight:750}
.co-cancel-alert-item strong{white-space:nowrap;color:#991b1b}
.co-cancel-alert-empty-items{color:#64748b;font-weight:800}
.co-cancel-alert-total{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding-top:7px;
    border-top:1px dashed #fca5a5;
    font-size:14px;
    font-weight:1000;
}
.co-cancel-ack-btn{
    width:100%;
    min-height:42px;
    border:0;
    border-radius:12px;
    background:linear-gradient(135deg,#991b1b,#dc2626);
    color:#fff;
    font:inherit;
    font-weight:1000;
    cursor:pointer;
    box-shadow:0 8px 18px rgba(185,28,28,.2);
}
.co-cancel-ack-btn:disabled{opacity:.65;cursor:wait}
@media(max-width:640px){
    .co-cancel-alert-meta{grid-template-columns:1fr}
    .co-cancel-alert-meta>div:last-child{text-align:left}
}
@media print{.co-cancel-alert-card{display:none!important}}
