/* JA Courier - Public Styles - Jamaican Flag Theme */

:root {
    --ccms-green: #009B3A;
    --ccms-green-dark: #007A2F;
    --ccms-gold: #FFD100;
    --ccms-gold-dark: #E6BC00;
    --ccms-black: #000000;
}

.ccms-public-box {
    max-width: 640px;
    margin: 40px auto;
    padding: 32px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-top: 4px solid var(--ccms-green);
}

.ccms-track-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.ccms-track-form input {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
}
.ccms-track-form input:focus {
    border-color: var(--ccms-green);
    outline: none;
}
.ccms-track-form button,
.ccms-btn-calc {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--ccms-green), var(--ccms-green-dark));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.ccms-track-form button:hover,
.ccms-btn-calc:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11,58,122,0.4);
}

.ccms-calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.ccms-calc-grid .field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.ccms-calc-grid .field input,
.ccms-calc-grid .field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
}

/* Customer Dashboard */
.ccms-customer-wrap {
    display: flex;
    min-height: 70vh;
    background: #F4F6FA;
    border-radius: 16px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
}
.ccms-cust-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--ccms-sidebar, #000000), #000000);
    color: #fff;
    padding: 24px 16px;
    border-right: none;
    position: relative;
    z-index: 20;
    transition: transform 0.25s ease, visibility 0.25s;
}
.ccms-cust-logo {
    text-align: center;
    width: 100%;
    padding: 4px 0 8px;
}
.ccms-cust-logo img {
    max-height: 110px;
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    background: #fff;
    padding: 6px;
    border-radius: 10px;
    margin: 0 auto 12px;
    border: 2px solid var(--ccms-gold);
    display: block;
}
.ccms-cust-user {
    text-align: center;
    margin-bottom: 24px;
}
.ccms-cust-user img {
    border-radius: 50%;
    margin-bottom: 8px;
    border: 2px solid var(--ccms-gold);
}
.ccms-cust-sidebar nav a {
    display: block;
    padding: 12px 16px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    font-weight: 500;
}
.ccms-cust-sidebar nav a:hover,
.ccms-cust-sidebar nav a.active {
    background: linear-gradient(90deg, var(--ccms-green), #00B34A);
    color: #fff;
}
.ccms-cust-main {
    flex: 1;
    padding: 32px;
    min-width: 0;
}
.ccms-cust-main h1 {
    margin: 0 0 8px;
    font-size: 1.6rem;
    border-left: 4px solid var(--ccms-gold);
    padding-left: 12px;
}
.ccms-cust-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 24px 0;
}
.stat-card {
    padding: 18px;
    border-radius: 14px;
    color: #fff;
}
.stat-card span { display: block; font-size: 0.85rem; opacity: 0.9; color: #fff; }
.stat-card strong { font-size: 1.6rem; color: #fff; }
.stat-card.blue { background: linear-gradient(135deg, #009B3A, #007A2F); color: #fff; }
.stat-card.green { background: linear-gradient(135deg, #FFD100, #E6BC00); color: #fff; }
.stat-card.orange { background: linear-gradient(135deg, #2e7d32, #1b5e20); color: #fff; }
.stat-card.pink { background: linear-gradient(135deg, #1a1a1a, #000); color: #fff; }

.ccms-cust-panel {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-top: 3px solid var(--ccms-green);
}
.ccms-cust-panel h2 {
    margin: 0 0 12px;
    font-size: 1.15rem;
}
.ccms-cust-panel .empty {
    color: #64748b;
}

.ccms-map {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    border: 2px solid var(--ccms-green);
    margin-top: 16px;
}

/* Mobile menu toggle */
.ccms-cust-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--ccms-green), var(--ccms-green-dark, #007A2F));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 12px;
}
.ccms-cust-menu-btn svg { width: 20px; height: 20px; }
.ccms-cust-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 90;
}
.ccms-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.ccms-table-scroll table {
    min-width: 520px;
    width: 100%;
}

@media (max-width: 992px) {
    .ccms-cust-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .ccms-customer-wrap {
        flex-direction: column !important;
        border-radius: 0;
        min-height: 100vh;
    }
    .ccms-cust-menu-btn,
    .ccms-cust-backdrop { display: none !important; }
    .ccms-cust-sidebar {
        position: relative;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0;
        transform: none;
        visibility: visible;
        overflow: visible;
        box-shadow: none;
        border-right: none;
        border-bottom: 3px solid var(--ccms-gold);
        padding: 12px 10px 8px;
    }
    .ccms-cust-sidebar .ccms-cust-logo,
    .ccms-cust-sidebar .ccms-cust-user,
    .ccms-cust-sidebar .ccms-dash-footer { display: block; }
    .ccms-cust-sidebar nav.ccms-side-nav,
    .ccms-cust-sidebar nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .ccms-cust-sidebar nav a {
        flex: 0 0 auto;
        white-space: nowrap;
        margin-bottom: 0;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    .ccms-cust-main {
        padding: 16px 14px 32px;
        width: 100%;
    }
    .ccms-cust-main h1 { font-size: 1.25rem; }
    .ccms-cust-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 16px 0;
    }
    .stat-card { padding: 14px; }
    .stat-card strong { font-size: 1.3rem; }
    .ccms-cust-panel {
        padding: 16px;
        border-radius: 12px;
    }
    .ccms-calc-grid { grid-template-columns: 1fr; }
    .ccms-map { height: 280px; min-height: 280px; }
    .ccms-track-form { flex-direction: column; }
    .ccms-track-form input { min-width: 0; width: 100%; }
    .ccms-track-form button,
    .ccms-btn-calc { width: 100%; }
}

@media (max-width: 420px) {
    .ccms-cust-stats { grid-template-columns: 1fr; }
}


/* Full-screen customer portal removed */


.ccms-notif-badge {
    position: absolute !important;
    top: -4px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e11d48 !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 18px !important;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.ccms-notif-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(340px, 92vw);
    max-height: 380px;
    overflow-y: auto;
    background: #fff;
    color: #0f172a;
    border-radius: 12px;
    border: 2px solid #009B3A;
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
    z-index: 500;
    padding: 8px;
}
/* Full-screen notification overlay with blur */
.ccms-notif-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147482500;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(14px);
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
    pointer-events: auto;
    cursor: pointer;
}
.ccms-notif-overlay.is-open { display: flex !important; }
.ccms-notif-overlay:not(.is-open) { display: none !important; pointer-events: none !important; }
.ccms-notif-panel-modal {
    cursor: default;
    pointer-events: auto;
    width: 100%;
    max-width: 420px;
    max-height: min(80vh, 560px);
    margin: auto;
    background: #fff;
    color: #0f172a;
    border-radius: 16px;
    border: 2px solid #009B3A;
    box-shadow: 0 24px 60px rgba(0,0,0,.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 100101;
}
.ccms-notif-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #000000;
    color: #FFD100;
    border-bottom: 2px solid #FFD100;
}
.ccms-notif-close {
    border: 0;
    background: transparent;
    color: #FFD100;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
}
.ccms-notif-list {
    overflow-y: auto;
    padding: 8px;
    flex: 1;
}
.ccms-notif-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background .15s;
}
.ccms-notif-item:hover { background: #f8fafc; }
.ccms-notif-item.unread { background: #f0fdf4; }
.ccms-notif-item strong { display: block; font-size: 0.9rem; }
.ccms-notif-item span { display: block; font-size: 0.82rem; color: #475569; margin-top: 2px; }
.ccms-notif-item small { display: block; font-size: 0.72rem; color: #94a3b8; margin-top: 4px; }
.ccms-notif-empty { padding: 16px; text-align: center; color: #64748b; }

/* Gold coins + glitter burst from bottom */
.ccms-reward-burst {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
    display: none;
}
.ccms-reward-burst.is-active { display: block; }
.ccms-coin {
    position: absolute;
    bottom: -40px;
    font-size: 1.6rem;
    animation: ccms-coin-rise 2.4s ease-out forwards;
    opacity: 0;
}
.ccms-coin.glitter {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 6px gold);
}
@keyframes ccms-coin-rise {
    0% { transform: translateY(0) rotate(0deg) scale(0.6); opacity: 0; }
}
.ccms-country-flag {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.2));
}


/* Faded top-right dashboard image */
.ccms-customer-wrap {
    position: relative;
}
.ccms-dash-bg-fade {
    position: absolute;
    top: 0;
    right: 0;
    width: min(480px, 55%);
    height: 260px;
    background-size: cover;
    background-position: center top;
    opacity: 0.16;
    pointer-events: none;
    z-index: 0;
    border-radius: 0 0 0 48px;
    mask-image: linear-gradient(to left, rgba(0,0,0,0.9), transparent 95%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.9), transparent 95%);
}
.ccms-cust-main,
.ccms-cust-sidebar {
    position: relative;
    z-index: 1;
}




/* Stable customer dashboard layout — left menu + content side by side */
.ccms-customer-wrap {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 1200px !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 20px auto !important;
    z-index: 1 !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    background: #F4F6FA;
    border-radius: 12px;
}
.ccms-customer-wrap .ccms-cust-sidebar {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 240px !important;
    min-width: 200px !important;
    flex-shrink: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
}
.ccms-customer-wrap .ccms-cust-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: auto !important;
    overflow: visible !important;
    padding: 16px 20px 28px;
    position: relative !important;
}
/* Tab panels stay inside main (beside menu) — never stack below the dashboard */
.ccms-cust-main .ccms-section {
    width: 100%;
    max-width: 100%;
    display: none !important;
}
.ccms-cust-main .ccms-section.ccms-section-active,
.ccms-cust-main #section-overview.ccms-section-active {
    display: block !important;
}
body.ccms-portal-open #wpadminbar,
body.ccms-portal-open .site-header,
body.ccms-portal-open header,
body.ccms-portal-open footer,
body.ccms-portal-open .site-footer {
    display: block !important;
    visibility: visible !important;
}


/* ===== Faded top-right dashboard background ===== */
.ccms-dash-bg-fade {
    position: absolute;
    top: 0;
    right: 0;
    width: min(480px, 55%);
    height: 260px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
    border-radius: 0 0 0 48px;
    mask-image: linear-gradient(to left, rgba(0,0,0,0.95), transparent 92%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.95), transparent 92%);
}
.ccms-main,
.ccms-cust-main,
.ccms-topbar,
.ccms-status-cards,
.ccms-panel,
.ccms-cust-panel {
    position: relative;
    z-index: 1;
}

/* ===== Mobile responsive — stack only under 640px so content stays beside menu ===== */
@media (max-width: 640px) {
    .ccms-wrap,
    .ccms-customer-wrap {
        flex-direction: column !important;
        border-radius: 12px;
    }
    .ccms-sidebar,
    .ccms-cust-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 3px solid #FFD100 !important;
    }
    .ccms-sidebar::after,
    .ccms-cust-sidebar::after {
        display: block !important;
        top: auto !important;
        bottom: 0 !important;
        right: auto !important;
        left: 0 !important;
        width: 22% !important;
        height: 5px !important;
        animation-name: ccms-lifeline-crawl-h !important;
    }
    @keyframes ccms-lifeline-crawl-h {
        0%   { transform: translateX(0); }
    }
    .ccms-sidebar nav,
    .ccms-cust-sidebar nav,
    .ccms-side-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        padding: 8px 10px !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .ccms-sidebar nav a,
    .ccms-nav-item,
    .ccms-cust-sidebar nav a,
    .ccms-side-nav a {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        padding: 10px 12px !important;
        font-size: 0.85rem !important;
        border-radius: 8px !important;
    }
    .ccms-main,
    .ccms-cust-main {
        width: 100% !important;
        padding: 14px 12px 24px !important;
    }
    .ccms-topbar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .ccms-status-cards,
    .ccms-cust-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .ccms-dash-bg-fade {
        width: min(320px, 70%);
        height: 160px;
        opacity: 0.14;
    }
    .ccms-map,
    #ccms-admin-live-map,
    #ccms-cust-live-map {
        height: 260px !important;
        min-height: 260px !important;
    }
}
@media (max-width: 480px) {
    .ccms-status-cards,
    .ccms-cust-stats {
        grid-template-columns: 1fr !important;
    }
    .ccms-topbar h1 {
        font-size: 1.2rem !important;
    }
}


/* ===== Accessibility (customer) ===== */
.ccms-customer-wrap .ccms-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100000;
    padding: 12px 18px;
    background: #009B3A;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}
.ccms-customer-wrap .ccms-skip-link:focus {
    left: 0;
    outline: 3px solid #FFD100;
    outline-offset: 2px;
}
.ccms-tab:focus-visible,
.ccms-btn-calc:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 3px solid #FFD100 !important;
    outline-offset: 2px !important;
}


/* Wider customer dashboard body – less empty space */
.ccms-cust-main {
    flex: 1;
    min-width: 0;
    padding: 12px 12px 20px !important;
    max-width: none !important;
}
.ccms-customer-wrap {
    max-width: none !important;
}
.ccms-cust-panel, .ccms-customer-wrap .ccms-panel {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Generic modal overlays (orders, loyalty, etc.) */
.ccms-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100050;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}
.ccms-modal-overlay.is-open { display: flex; }
.ccms-modal-panel {
    width: 100%;
    max-width: 480px;
    max-height: min(85vh, 640px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid #009B3A;
}
.ccms-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 8px;
}
.ccms-modal-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
}
.ccms-modal-body {
    padding: 16px 18px 20px;
    overflow-y: auto;
    flex: 1;
    color: #0f172a;
}
.ccms-order-modal-panel { max-width: 520px; }
.ccms-invoice-overlay {
    background: rgba(13, 71, 161, 0.55) !important;
}
.ccms-invoice-modal-panel {
    max-width: 720px;
    border-color: #1565c0 !important;
}
.ccms-detail-table th {
    width: 32%;
    color: #64748b;
    font-weight: 600;
    text-align: left;
    padding: 8px 6px;
    vertical-align: top;
}
.ccms-detail-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #f1f5f9;
}

/* Reward congratulations popup */
.ccms-reward-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100060;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.ccms-reward-popup.is-open { display: flex; }
.ccms-reward-popup-inner {
    background: linear-gradient(160deg, #fffbeb 0%, #fff 40%, #fef3c7 100%);
    border: 3px solid #FFD100;
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(255, 230, 0, 0.95), 0 8px 24px rgba(0,0,0,.2);
    animation: ccms-reward-pop 0.5s cubic-bezier(.2,1.2,.4,1);
}
@keyframes ccms-reward-pop {
    0% { transform: scale(0.6); opacity: 0; }
}
.ccms-reward-popup-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}
.ccms-reward-popup-lead {
    color: #64748b;
    margin: 0 0 14px;
    font-size: 1rem;
}
.ccms-reward-popup-list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    text-align: left;
}
.ccms-reward-popup-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #fde68a;
    font-size: 1.05rem;
}
.ccms-reward-ico { font-size: 1.4rem; }
.ccms-glitter-dot {
    filter: drop-shadow(0 0 4px gold);
}


/* Ensure customer side menu tabs are always clickable */
.ccms-cust-sidebar,
.ccms-cust-sidebar nav,
.ccms-side-nav {
    pointer-events: auto !important;
    position: relative;
    z-index: 30;
}
.ccms-cust-sidebar nav a.ccms-tab,
.ccms-side-nav .ccms-tab {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 31;
    display: block;
    opacity: 1 !important;
}
.ccms-side-nav .ccms-tab:hover {
    background: rgba(241, 90, 34, 0.35) !important;
    color: #fff !important;
}
.ccms-side-nav .ccms-tab.active {
    background: linear-gradient(90deg, #009B3A, #007A2F) !important;
    color: #fff !important;
    border: 2px solid #FFD100 !important;
    box-shadow: 0 0 14px rgba(241, 90, 34, 0.45) !important;
}


/* Notification detail view */
.ccms-notif-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    background: #000000;
    color: #FFD100;
    border-bottom: 2px solid #FFD100;
}
.ccms-notif-back {
    border: 0;
    background: transparent;
    color: #FFD100;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 8px;
    line-height: 1;
}
.ccms-notif-close {
    border: 0;
    background: transparent;
    color: #FFD100;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 2px 8px;
    line-height: 1;
    margin-left: auto;
}
.ccms-notif-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    background: #fff;
    color: inherit;
    cursor: pointer;
    font: inherit;
}
.ccms-notif-item:hover { background: #f8fafc; }
.ccms-notif-item.unread { background: #fff7ed; }
.ccms-notif-item strong { display: block; font-size: 0.95rem; color: #0f172a; }
.ccms-notif-item span { display: block; font-size: 0.84rem; color: #475569; margin-top: 3px; }
.ccms-notif-item small { display: block; font-size: 0.72rem; color: #94a3b8; margin-top: 4px; }
.ccms-notif-mark-read {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: #009B3A;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.ccms-notif-detail {
    overflow-y: auto;
    padding: 16px 18px 20px;
    flex: 1;
    background: #fff;
}
.ccms-notif-detail-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: #009B3A;
    line-height: 1.3;
}
.ccms-notif-detail-time {
    margin: 0 0 14px;
    font-size: 0.8rem;
    color: #94a3b8;
}
.ccms-notif-detail-body {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.55;
    white-space: pre-wrap;
}
.ccms-notif-list {
    overflow-y: auto;
    padding: 0;
    flex: 1;
    background: #fff;
}


/* ===== Title pop — middle of screen, gray @ 70% opacity ===== */
.ccms-section-title-pop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2147483000;
}
.ccms-section-title-pop .ccms-title-rocket { display: none; }
.ccms-section-title-pop .ccms-title-text {
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 800;
    color: #6b7280;
    opacity: 0;
    transform: scale(0.35);
    white-space: nowrap;
}
.ccms-section-title-pop .ccms-title-smoke {
    position: absolute;
    left: 50%;
    top: 58%;
    width: 140px;
    height: 40px;
    margin-left: -70px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(107,114,128,0.4), transparent 70%);
    opacity: 0;
    filter: blur(8px);
}
.ccms-section-title-pop.is-animating .ccms-title-text {
    animation: ccms-title-zoom-smoke 1.2s ease-out forwards;
}
.ccms-section-title-pop.is-animating .ccms-title-smoke {
    animation: ccms-smoke-fade 1.4s 0.2s ease-out forwards;
}
@keyframes ccms-title-zoom-smoke {
    0%   { transform: scale(0.25); opacity: 0; }
    25%  { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(2.6); opacity: 0; }
}
@keyframes ccms-smoke-fade {
    0%   { opacity: 0; transform: scale(0.5); }
    30%  { opacity: 0.65; transform: scale(1.4); }
    100% { opacity: 0; transform: scale(2.8); }
}

/* Duck — hidden unless walking after wrong answer */
#ccms-sad-duck {
    position: fixed !important;
    bottom: 8% !important;
    left: -320px !important;
    z-index: 2147482800 !important;
    width: 180px !important;
    height: 150px !important;
    pointer-events: none !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
#ccms-sad-duck.ccms-duck-walk {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: ccms-duck-walk-x 5s linear forwards !important;
}
#ccms-sad-duck .duck-body { animation: ccms-duck-bob 0.4s ease-in-out infinite alternate; }
#ccms-sad-duck .duck-svg { width: 180px; height: 150px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.25)); }
@keyframes ccms-duck-walk-x {
    0%   { left: -320px; opacity: 1; }
    90%  { opacity: 1; }
    100% { left: calc(100vw + 60px); opacity: 0; }
}
@keyframes ccms-duck-bob {
    from { transform: translateY(0) rotate(-4deg); }
    to   { transform: translateY(-10px) rotate(4deg); }
}

/* Customer menu tabs must be clickable */
.ccms-cust-sidebar,
.ccms-customer-wrap .ccms-cust-sidebar {
    position: relative !important;
    z-index: 20 !important;
}
.ccms-cust-sidebar nav.ccms-side-nav,
.ccms-cust-sidebar .ccms-side-nav {
    display: block !important;
    position: relative !important;
    z-index: 30 !important;
    pointer-events: auto !important;
}
.ccms-cust-sidebar a.ccms-tab,
.ccms-side-nav a.ccms-tab {
    display: block !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 31 !important;
}

/* GPS / live map stays in its section */
#ccms-cust-live-map,
.ccms-cust-live-map {
    min-height: 280px !important;
    height: 320px !important;
    width: 100% !important;
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    border-radius: 12px !important;
}

/* Subtle bouncing glow on menu edge — yellow top (solid), green bottom (faded) */
.ccms-sidebar::after,
.ccms-cust-sidebar::after {
    content: "" !important;
    position: absolute !important;
    top: 8% !important;
    right: 0 !important;
    width: 3px !important;
    height: 48px !important;
    background: linear-gradient(to bottom, #FFD100 0%, #FFD100 18%, rgba(0,155,58,0.55) 55%, rgba(0,155,58,0.08) 100%) !important;
    box-shadow: 0 0 6px 1px rgba(255,209,0,0.28), 0 4px 8px -2px rgba(0,155,58,0.18) !important;
    border-radius: 2px !important;
    pointer-events: none !important;
    z-index: 5 !important;
    animation: ccms-ecg-bounce 2.8s ease-in-out infinite alternate !important;
}
@keyframes ccms-ecg-bounce {
    0% { top: 6%; opacity: 0.45; }
    50% { top: 45%; opacity: 0.7; }
    100% { top: 82%; opacity: 0.4; }
}

/* ===== FORCE tab content inside main (beside left menu), never below dashboard ===== */
.ccms-customer-wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 1200px !important;
    box-sizing: border-box !important;
}
.ccms-customer-wrap > .ccms-cust-sidebar {
    flex: 0 0 240px !important;
    width: 240px !important;
    max-width: 240px !important;
}
.ccms-customer-wrap > .ccms-cust-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    position: relative !important;
    float: none !important;
    clear: none !important;
    overflow: auto !important;
    box-sizing: border-box !important;
}
.ccms-cust-main .ccms-section {
    display: none !important;
    position: relative !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 0 16px 0 !important;
    transform: none !important;
}
.ccms-cust-main .ccms-section.ccms-section-active {
    display: block !important;
}
@media (max-width: 640px) {
    .ccms-customer-wrap {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
    }
    .ccms-customer-wrap > .ccms-cust-sidebar {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: none !important;
    }
}

/* ===== Hard layout lock: menu left, tab content in main slot ===== */
.ccms-customer-wrap {
    display: grid !important;
    grid-template-columns: 240px minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    align-items: start !important;
    overflow: hidden !important;
}
.ccms-customer-wrap > .ccms-cust-sidebar {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 240px !important;
    max-width: 240px !important;
}
.ccms-customer-wrap > .ccms-cust-main {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    overflow: auto !important;
}
.ccms-tab-slot {
    display: block !important;
    width: 100% !important;
    min-height: 120px !important;
    position: relative !important;
}
.ccms-tab-slot > .ccms-section {
    display: block !important;
    width: 100% !important;
    position: relative !important;
    float: none !important;
}
/* Hide panels that are still outside the slot (not yet mounted) */
.ccms-cust-main > .ccms-section {
    display: none !important;
}
@media (max-width: 640px) {
    .ccms-customer-wrap {
        grid-template-columns: 1fr !important;
    }
    .ccms-customer-wrap > .ccms-cust-sidebar,
    .ccms-customer-wrap > .ccms-cust-main {
        grid-column: 1 !important;
        width: 100% !important;
        max-width: none !important;
    }
}

/* Header / flag area — light grey line at end of background image */
.ccms-cust-dash-header {
    margin-bottom: 2.5rem !important;
    padding-bottom: 1.5rem !important;
    border-bottom: 1px solid #d1d5db !important;
}
.ccms-cust-home-chrome {
    margin-bottom: 3.5rem !important;
}
.ccms-tab-slot {
    padding-top: 0.75rem !important;
    margin-top: 0.5rem !important;
}

/* Extra space above the orange border + below it for non-Overview tabs */
.ccms-cust-dash-header.ccms-header-tab-space {
    padding-bottom: 3.25rem !important;
    margin-bottom: 2.75rem !important;
}
.ccms-tab-slot.ccms-slot-tab-space {
    padding-top: 1.75rem !important;
    margin-top: 1rem !important;
}

/* ========== RESPONSIVE: Customer dashboard ========== */
@media (max-width: 992px) {
    .ccms-customer-wrap {
        max-width: 100% !important;
        margin: 12px auto !important;
        border-radius: 10px !important;
    }
    .ccms-customer-wrap {
        grid-template-columns: 200px minmax(0, 1fr) !important;
    }
    .ccms-customer-wrap > .ccms-cust-sidebar {
        width: 200px !important;
        max-width: 200px !important;
    }
    .ccms-cust-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .ccms-cust-main {
        padding: 14px 14px 24px !important;
    }
}

@media (max-width: 768px) {
    .ccms-customer-wrap {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        overflow: visible !important;
        margin: 8px !important;
        border-radius: 10px !important;
    }
    .ccms-customer-wrap > .ccms-cust-sidebar,
    .ccms-customer-wrap > .ccms-cust-main {
        grid-column: auto !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    .ccms-customer-wrap > .ccms-cust-sidebar {
        border-right: none !important;
        border-bottom: 3px solid #FFD100 !important;
        padding: 12px 10px 10px !important;
    }
    .ccms-cust-sidebar nav.ccms-side-nav,
    .ccms-cust-sidebar .ccms-side-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 6px !important;
    }
    .ccms-cust-sidebar nav a,
    .ccms-side-nav .ccms-tab {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        padding: 10px 14px !important;
        font-size: 0.85rem !important;
    }
    .ccms-cust-sidebar .ccms-dash-footer {
        display: none !important;
    }
    .ccms-cust-main {
        padding: 14px 12px 28px !important;
    }
    .ccms-cust-dash-header {
        margin-bottom: 1.5rem !important;
        padding-bottom: 1rem !important;
    }
    .ccms-cust-dash-header .ccms-biz-name-header {
        font-size: 1.25rem !important;
    }
    .ccms-usa-ship-card {
        max-width: 100% !important;
    }
    .ccms-cust-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .ccms-track-form {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .ccms-track-form input,
    .ccms-track-form button {
        width: 100% !important;
    }
    .ccms-cust-panel {
        padding: 14px !important;
    }
}

@media (max-width: 480px) {
    .ccms-customer-wrap {
        margin: 0 !important;
        border-radius: 0 !important;
    }
    .ccms-cust-stats {
        grid-template-columns: 1fr !important;
    }
    .ccms-cust-dash-header .ccms-biz-name-header {
        font-size: 1.1rem !important;
    }
    .stat-card {
        padding: 14px !important;
    }
    .ccms-tab-slot .ccms-cust-panel h2 {
        font-size: 1.1rem !important;
    }
}


/* Light grey borderline exactly at end of header background image */
.ccms-dash-bg-fade {
    border-bottom: 1px solid #d1d5db !important;
    box-sizing: border-box !important;
}
.ccms-cust-dash-header {
    border-bottom-color: #d1d5db !important;
    border-bottom-width: 1px !important;
    border-bottom-style: solid !important;
}
.ccms-cust-dash-header.ccms-header-tab-space {
    border-bottom: 1px solid #d1d5db !important;
}

/* Borderline at exact bottom edge of header background image — light grey */
.ccms-customer-wrap {
    position: relative !important;
}
.ccms-dash-bg-fade {
    border-bottom: 1px solid #d1d5db !important;
}
/* Header content divider matches image end color */
.ccms-cust-dash-header,
.ccms-cust-dash-header.ccms-header-tab-space {
    border-bottom: 1px solid #d1d5db !important;
}
