/* HMZ Pathology — Collection Boy PWA & Offline Queue V3 */

.collection-pwa-tools {
    display:flex;
    align-items:center;
    gap:8px;
}

.collection-connection-badge {
    padding:6px 9px;
    border-radius:999px;
    font-size:10px;
    font-weight:800;
}

.collection-connection-badge.online {
    background:#dcfce7;
    color:#166534;
}

.collection-connection-badge.offline {
    background:#fee2e2;
    color:#b91c1c;
}

.collection-pwa-update-banner {
    position:fixed;
    right:18px;
    bottom:82px;
    z-index:80;
    display:none;
    align-items:center;
    gap:14px;
    max-width:420px;
    padding:14px;
    border-radius:14px;
    background:#172033;
    color:#fff;
    box-shadow:0 18px 45px rgba(15,23,42,.25);
}

.collection-pwa-update-banner.show {
    display:flex;
}

.collection-pwa-update-banner p {
    margin:0;
    font-size:12px;
}

.offline-queue-summary {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    padding:18px;
    border-bottom:1px solid #dbe4ef;
}

.offline-queue-summary article {
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px;
    border-radius:14px;
    background:#f8fafc;
}

.offline-queue-summary article>span {
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:#eaf1ff;
    color:#2563eb;
}

.offline-queue-summary article>div {
    display:flex;
    flex-direction:column;
}

.offline-queue-summary small {
    color:#64748b;
}

.offline-queue-summary strong {
    margin-top:4px;
}

.offline-queue-list {
    display:grid;
}

.offline-queue-item {
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    padding:15px 18px;
    border-bottom:1px solid #e2e8f0;
}

.offline-queue-item>span {
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:#fff7ed;
    color:#b45309;
}

.offline-queue-item p {
    overflow:hidden;
    margin:4px 0;
    color:#475569;
    font-size:12px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.offline-queue-item small {
    color:#64748b;
    font-size:10px;
}

.offline-queue-item em {
    padding:5px 8px;
    border-radius:999px;
    background:#fef3c7;
    color:#92400e;
    font-size:10px;
    font-style:normal;
    font-weight:800;
}

.cb-offline-body {
    min-height:100vh;
    display:grid;
    place-items:center;
    margin:0;
    padding:20px;
    background:linear-gradient(135deg,#eaf1ff,#f8fbff);
    color:#172033;
}

.cb-offline-card {
    width:min(500px,100%);
    padding:34px;
    border:1px solid #dbe4ef;
    border-radius:24px;
    background:#fff;
    text-align:center;
    box-shadow:0 22px 65px rgba(15,23,42,.12);
}

.cb-offline-icon {
    width:82px;
    height:82px;
    display:grid;
    place-items:center;
    margin:0 auto 18px;
    border-radius:25px;
    background:#fee2e2;
    color:#b91c1c;
    font-size:33px;
}

.cb-offline-card h1 {
    margin:0;
    font-size:29px;
    font-weight:900;
}

.cb-offline-card p {
    margin:12px 0 22px;
    color:#64748b;
    line-height:1.6;
}

.cb-offline-card .btn {
    display:block;
    width:100%;
    margin-top:10px;
}

body.is-offline::before {
    position:fixed;
    inset:68px 0 auto 0;
    z-index:60;
    padding:7px;
    background:#b91c1c;
    color:#fff;
    content:"Offline mode: new actions will be saved on this device.";
    text-align:center;
    font-size:11px;
    font-weight:800;
}

@media(max-width:700px) {
    .offline-queue-summary {
        grid-template-columns:1fr;
    }

    .offline-queue-item {
        grid-template-columns:auto 1fr;
    }

    .offline-queue-item em {
        grid-column:2;
        justify-self:start;
    }

    .collection-pwa-update-banner {
        right:12px;
        left:12px;
        bottom:76px;
    }
}

/* Collection Boy PWA Header responsive alignment fix — V4 */
.cb-topbar {
    display:grid;
    grid-template-columns:42px minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    min-height:68px;
    height:auto;
}

.cb-topbar .cb-menu-btn {
    flex:0 0 42px;
}

.cb-topbar .cb-brand {
    min-width:0;
    justify-self:center;
}

.cb-topbar .cb-brand strong {
    display:block;
    overflow:hidden;
    max-width:220px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.cb-topbar .collection-pwa-tools {
    position:static;
    display:flex;
    flex:0 0 auto;
    align-items:center;
    justify-content:flex-end;
    gap:7px;
    min-width:0;
    padding:0;
}

.cb-topbar .collection-connection-badge {
    position:static;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    min-height:26px;
    margin:0;
    padding:5px 9px;
    border:1px solid transparent;
    border-radius:999px;
    font-size:10px;
    font-weight:800;
    line-height:1;
    white-space:nowrap;
}

.cb-topbar .collection-connection-badge::before {
    width:7px;
    height:7px;
    flex:0 0 7px;
    border-radius:50%;
    content:"";
}

.cb-topbar .collection-connection-badge.online {
    border-color:#bbf7d0;
    background:#ecfdf5;
    color:#166534;
}

.cb-topbar .collection-connection-badge.online::before {
    background:#22c55e;
    box-shadow:0 0 0 3px rgba(34,197,94,.12);
}

.cb-topbar .collection-connection-badge.offline {
    border-color:#fecaca;
    background:#fef2f2;
    color:#b91c1c;
}

.cb-topbar .collection-connection-badge.offline::before {
    background:#ef4444;
    box-shadow:0 0 0 3px rgba(239,68,68,.12);
}

.cb-topbar .collection-connection-badge:not(.online):not(.offline)::before {
    background:#f59e0b;
}

.cb-topbar .cb-bell {
    flex:0 0 42px;
}

@media (max-width:560px) {
    .cb-topbar {
        grid-template-columns:42px minmax(0,1fr) auto;
        gap:9px;
        padding:0 15px;
    }

    .cb-topbar .cb-brand {
        justify-self:start;
        gap:8px;
    }

    .cb-topbar .cb-brand i {
        width:40px;
        height:40px;
        flex:0 0 40px;
    }

    .cb-topbar .cb-brand strong {
        max-width:170px;
        font-size:16px;
    }

    .cb-topbar .collection-pwa-tools {
        gap:6px;
    }

    .cb-topbar .collection-connection-badge {
        min-height:24px;
        padding:4px 7px;
        font-size:9px;
    }
}

@media (max-width:430px) {
    .cb-topbar {
        gap:7px;
        padding:0 12px;
    }

    .cb-topbar .cb-brand strong {
        max-width:125px;
        font-size:14px;
    }

    .cb-topbar .collection-connection-badge {
        width:9px;
        min-width:9px;
        height:9px;
        min-height:9px;
        overflow:hidden;
        padding:0;
        border:0;
        color:transparent;
        font-size:0;
    }

    .cb-topbar .collection-connection-badge::before {
        width:9px;
        height:9px;
        flex-basis:9px;
    }
}

/* Collection Boy Notifications V2 */
.cb-notifications-page{max-width:1180px}.cb-eyebrow{display:block;margin-bottom:5px;color:#2563eb;font-size:10px;font-weight:900;letter-spacing:.12em}.cb-notification-page-head{align-items:flex-end}.cb-notification-alert{border-radius:14px}.cb-notification-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:18px}.cb-notification-stats article{display:flex;align-items:center;gap:13px;padding:16px 18px;border:1px solid #dbe4ef;border-radius:16px;background:#fff}.cb-notification-stats article>i{width:46px;height:46px;display:grid;place-items:center;border-radius:14px}.cb-notification-stats article div{display:flex;flex-direction:column}.cb-notification-stats small{color:#64748b}.cb-notification-stats strong{font-size:22px}.cb-notification-panel{overflow:visible}.cb-notification-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px;border-bottom:1px solid #e2e8f0}.cb-notification-filters{display:flex;align-items:center;flex:1;gap:9px}.cb-notification-search{position:relative;flex:1;min-width:220px}.cb-notification-search i{position:absolute;top:50%;left:13px;transform:translateY(-50%);color:#94a3b8}.cb-notification-search input,.cb-notification-filters select{width:100%;height:40px;border:1px solid #dbe4ef;border-radius:11px;background:#fff;color:#172033}.cb-notification-search input{padding:0 13px 0 38px}.cb-notification-filters select{max-width:150px;padding:0 11px}.cb-notification-list{display:grid;gap:0}.cb-notification-item{display:grid;grid-template-columns:auto 1fr;gap:14px;padding:18px 20px;border-bottom:1px solid #e8eef5;background:#fff;transition:.18s}.cb-notification-item:last-child{border-bottom:0}.cb-notification-item.is-unread{background:linear-gradient(90deg,#eff6ff 0,#fff 45%)}.cb-notification-item:hover{background:#f8fbff}.cb-notification-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;font-size:18px}.cb-notification-icon.booking{background:#dbeafe;color:#1d4ed8}.cb-notification-icon.tracking{background:#cffafe;color:#0e7490}.cb-notification-icon.payment{background:#dcfce7;color:#15803d}.cb-notification-icon.alert{background:#fee2e2;color:#b91c1c}.cb-notification-icon.system{background:#ede9fe;color:#6d28d9}.cb-notification-title-row{display:flex;align-items:center;justify-content:space-between;gap:15px}.cb-notification-title-row>div{display:flex;align-items:center;gap:7px}.cb-notification-type{color:#2563eb;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.cb-unread-dot{width:8px;height:8px;border-radius:50%;background:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.11)}.cb-notification-title-row time{color:#94a3b8;font-size:11px;white-space:nowrap}.cb-notification-content h2{margin:6px 0 5px;font-size:16px;font-weight:900}.cb-notification-content p{margin:0;color:#475569;line-height:1.55}.cb-notification-item.is-read h2{color:#475569;font-weight:800}.cb-notification-item.is-read .cb-notification-content p{color:#64748b}.cb-notification-actions{display:flex;align-items:center;gap:8px;margin-top:12px}.cb-notification-actions form{margin:0}.cb-notification-empty{min-height:300px;padding:35px}.cb-notification-empty i{width:68px;height:68px;display:grid;place-items:center;margin-bottom:14px;border-radius:22px;background:#eef4ff;color:#2563eb;font-size:28px}.cb-notification-empty strong{color:#172033;font-size:17px}.cb-notification-empty span{margin-top:6px}.cb-notification-pagination{display:flex;align-items:center;justify-content:center;gap:14px;padding:16px;border-top:1px solid #e2e8f0;color:#64748b;font-size:12px}.cb-notification-pagination .disabled{pointer-events:none;opacity:.45}
@media(max-width:800px){.cb-notification-toolbar,.cb-notification-filters{align-items:stretch;flex-direction:column}.cb-notification-toolbar>form{width:100%}.cb-notification-search{min-width:0}.cb-notification-filters select{max-width:none}.cb-notification-filters .btn{width:100%}.cb-notification-stats{grid-template-columns:repeat(3,1fr)}}
@media(max-width:560px){.cb-notification-stats{grid-template-columns:1fr}.cb-notification-item{grid-template-columns:auto 1fr;padding:15px 13px}.cb-notification-icon{width:42px;height:42px;border-radius:13px}.cb-notification-title-row{align-items:flex-start;flex-direction:column;gap:5px}.cb-notification-title-row time{white-space:normal}.cb-notification-actions{flex-wrap:wrap}.cb-notification-page-head form,.cb-notification-page-head .btn{width:100%}}

/* Collection History responsive card layout — V3 */
.cb-history-page{max-width:1180px;padding-bottom:96px}
.cb-history-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.cb-history-title h1{margin:0 0 4px;color:#0f172a;font-size:28px;font-weight:900;line-height:1.15}
.cb-history-title p{margin:0;color:#64748b;font-size:13px}
.cb-history-title>a{flex:0 0 auto}
.cb-history-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}
.cb-history-stats article{display:flex;align-items:center;gap:12px;min-width:0;padding:15px;border:1px solid #dbe4ef;border-radius:17px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.045)}
.cb-history-stats article>div{min-width:0}
.cb-history-stats small{display:block;margin:0 0 3px;color:#64748b;font-size:11px;font-weight:700;line-height:1.2}
.cb-history-stats strong{display:block;overflow-wrap:anywhere;color:#0f172a;font-size:19px;font-weight:900;line-height:1.15}
.cb-history-stat-icon{width:43px;height:43px;display:grid;place-items:center;flex:0 0 43px;border-radius:13px;font-size:16px}
.cb-history-stat-icon.blue{background:#dbeafe;color:#2563eb}.cb-history-stat-icon.green{background:#dcfce7;color:#15803d}.cb-history-stat-icon.red{background:#fee2e2;color:#dc2626}.cb-history-stat-icon.amber{background:#fef3c7;color:#b45309}
.cb-history-filter-card,.cb-history-results-card{overflow:hidden;margin-bottom:16px;border:1px solid #dbe4ef;border-radius:18px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.04)}
.cb-history-filter-card{padding:15px}
.cb-history-filters{display:grid;grid-template-columns:minmax(230px,1.5fr) repeat(3,minmax(130px,.75fr)) auto;gap:11px;align-items:end}
.cb-history-filters>div{min-width:0}.cb-history-filters label{display:block;margin:0 0 6px;color:#475569;font-size:11px;font-weight:800}
.cb-history-filters .form-control,.cb-history-filters .form-select{width:100%;height:42px;border:1px solid #dbe4ef;border-radius:11px;background:#fff;font-size:13px;box-shadow:none}
.cb-history-input-icon{position:relative}.cb-history-input-icon>i{position:absolute;top:50%;left:13px;z-index:2;transform:translateY(-50%);color:#94a3b8;pointer-events:none}.cb-history-input-icon .form-control{padding-left:38px}
.cb-history-filter-actions{display:flex;gap:8px}.cb-history-filter-actions .btn{height:42px;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;font-weight:800}
.cb-history-results-card{padding:0 15px 12px}.cb-history-results-head{display:flex;align-items:center;justify-content:space-between;padding:15px 0 11px;border-bottom:1px solid #edf2f7}.cb-history-results-head h2{margin:0 0 2px;font-size:17px;font-weight:900}.cb-history-results-head p{margin:0;color:#64748b;font-size:11px}
.cb-history-list{display:grid;gap:12px;padding-top:12px}
.cb-history-item{overflow:hidden;padding:15px;border:1px solid #dbe4ef;border-radius:16px;background:#fff;box-shadow:0 5px 14px rgba(15,23,42,.035)}
.cb-history-item-top,.cb-history-item-bottom{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.cb-history-item-top>div{min-width:0}
.cb-history-booking-id{display:block;overflow:hidden;margin-bottom:3px;color:#2563eb;font-size:10px;font-weight:900;letter-spacing:.025em;text-overflow:ellipsis;white-space:nowrap}
.cb-history-item h3{margin:0;color:#0f172a;font-size:18px;font-weight:900;line-height:1.2}
.cb-history-status{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:6px 10px;border-radius:999px;font-size:10px;font-weight:900;white-space:nowrap}.cb-history-status.is-collected{background:#dcfce7;color:#15803d}.cb-history-status.is-cancelled{background:#fee2e2;color:#b91c1c}.cb-history-status.is-assigned{background:#dbeafe;color:#1d4ed8}.cb-history-status.is-pending{background:#f1f5f9;color:#475569}
.cb-history-info-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:13px 0}.cb-history-info-grid>div{min-width:0;padding:10px;border:1px solid #eef2f7;border-radius:11px;background:#f8fafc}.cb-history-info-grid small,.cb-history-info-grid span{display:block;color:#64748b;font-size:10px;line-height:1.35}.cb-history-info-grid strong{display:block;overflow-wrap:anywhere;margin:2px 0;color:#0f172a;font-size:12px;font-weight:900;line-height:1.3}
.cb-history-item-bottom{align-items:center;padding-top:11px;border-top:1px solid #edf2f7}.cb-history-item-bottom p{display:flex;align-items:flex-start;gap:7px;min-width:0;margin:0;color:#64748b;font-size:11px;line-height:1.45}.cb-history-item-bottom p i{flex:0 0 auto;margin-top:2px;color:#2563eb}.cb-history-item-bottom p span{overflow-wrap:anywhere}.cb-history-actions{display:flex;flex:0 0 auto;gap:7px}.cb-history-actions .btn{display:inline-flex;align-items:center;justify-content:center;min-height:36px;border-radius:10px;font-size:11px;font-weight:800}
.cb-history-empty{min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:28px;text-align:center}.cb-history-empty i{color:#94a3b8;font-size:34px}.cb-history-empty span{color:#64748b;font-size:12px}.cb-history-pagination{display:flex;align-items:center;justify-content:center;gap:12px;padding:15px 0 4px}.cb-history-pagination span{color:#64748b;font-size:11px;font-weight:800}.cb-history-pagination .disabled{pointer-events:none;opacity:.45}
@media(max-width:900px){.cb-history-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cb-history-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.cb-history-search,.cb-history-filter-actions{grid-column:1/-1}.cb-history-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:575.98px){.cb-history-page{padding-left:11px;padding-right:11px}.cb-history-title{display:block;margin-bottom:13px}.cb-history-title h1{font-size:23px}.cb-history-title>a{display:flex;width:100%;margin-top:12px}.cb-history-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cb-history-stats article{gap:8px;padding:11px;border-radius:14px}.cb-history-stat-icon{width:36px;height:36px;flex-basis:36px;border-radius:11px;font-size:14px}.cb-history-stats small{font-size:9px}.cb-history-stats strong{font-size:15px}.cb-history-filter-card{padding:12px}.cb-history-filters{grid-template-columns:1fr;gap:9px}.cb-history-search,.cb-history-filter-actions{grid-column:auto}.cb-history-filter-actions .btn{flex:1}.cb-history-results-card{padding:0 10px 10px}.cb-history-item{padding:12px}.cb-history-item h3{font-size:17px}.cb-history-info-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.cb-history-info-grid>div{padding:8px}.cb-history-item-bottom{align-items:flex-end}.cb-history-item-bottom p{max-width:60%}.cb-history-actions .btn-primary{padding-left:10px;padding-right:10px}}
@media(max-width:360px){.cb-history-stats{grid-template-columns:1fr}.cb-history-info-grid{grid-template-columns:1fr}.cb-history-item-bottom{display:block}.cb-history-item-bottom p{max-width:none;margin-bottom:10px}.cb-history-actions{justify-content:flex-end}}



/* Collection Boy PWA dynamic website/software branding */
.cb-brand-logo{display:block;width:auto;max-width:150px;height:40px;object-fit:contain;object-position:left center;flex:0 0 auto}
.cb-brand strong{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cb-login-logo-wrap{width:min(220px,70vw)!important;height:92px!important;padding:10px 16px;border-radius:22px!important;background:rgba(255,255,255,.14)!important;display:flex!important;align-items:center;justify-content:center}
.cb-login-logo{display:block;max-width:100%;max-height:72px;width:auto;height:auto;object-fit:contain}
@media(max-width:650px){.cb-brand-logo{max-width:112px;height:34px}.cb-brand strong{display:none}.cb-login-logo-wrap{width:min(190px,72vw)!important;height:78px!important}.cb-login-logo{max-height:60px}.cb-login-brand h1{max-width:92vw;overflow-wrap:anywhere}}

/* Collection Boy PWA website-logo containment fix — V4.2 */
.cb-topbar {
    min-height:68px !important;
    max-height:68px !important;
    overflow:hidden;
}

.cb-topbar .cb-brand {
    width:auto;
    max-width:min(52vw,360px);
    height:52px;
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:9px;
    overflow:hidden;
}

.cb-topbar .cb-brand-logo {
    display:block !important;
    width:auto !important;
    max-width:150px !important;
    height:42px !important;
    max-height:42px !important;
    min-width:0 !important;
    flex:0 1 auto;
    object-fit:contain !important;
    object-position:left center;
    border:0;
    border-radius:0;
    background:transparent;
}

.cb-topbar .cb-brand strong {
    min-width:0;
    overflow:hidden;
    color:#172033;
    font-size:15px;
    font-weight:800;
    line-height:1.15;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.cb-topbar .cb-menu-btn,
.cb-topbar .cb-bell {
    width:42px !important;
    min-width:42px !important;
    height:42px !important;
    min-height:42px !important;
    flex:0 0 42px;
}

@media (max-width:560px) {
    .cb-topbar {
        grid-template-columns:42px minmax(0,1fr) auto !important;
        height:68px !important;
        min-height:68px !important;
        max-height:68px !important;
        padding:0 12px !important;
    }

    .cb-topbar .cb-brand {
        max-width:calc(100vw - 150px);
        height:48px;
        gap:7px;
    }

    .cb-topbar .cb-brand-logo {
        max-width:112px !important;
        height:38px !important;
        max-height:38px !important;
    }

    .cb-topbar .cb-brand strong {
        max-width:105px;
        font-size:13px;
    }
}

@media (max-width:390px) {
    .cb-topbar .cb-brand-logo {
        max-width:92px !important;
        height:34px !important;
        max-height:34px !important;
    }

    .cb-topbar .cb-brand strong {
        display:none;
    }
}
