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

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

.jacms-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(--jacms-green);
}

.jacms-track-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.jacms-track-form input {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
}
.jacms-track-form input:focus {
    border-color: var(--jacms-green);
    outline: none;
}
.jacms-track-form button,
.jacms-btn-calc {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--jacms-green), var(--jacms-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;
}
.jacms-track-form button:hover,
.jacms-btn-calc:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,155,58,0.4);
}

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

/* Customer Dashboard */
.jacms-customer-wrap {
    display: flex;
    min-height: 70vh;
    background: #f5f7f0;
    border-radius: 16px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
}
.jacms-cust-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--jacms-sidebar, #0a1f0a), #000000);
    color: #fff;
    padding: 24px 16px;
    border-right: none;
    position: relative;
    transition: transform 0.25s ease, visibility 0.25s;
    contain: layout style;
}
/* Customer sidebar live-status pulse: gold head + green trail on dark menu */
.jacms-cust-sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 22%;
    border-radius: 3px;
    background: linear-gradient(
        180deg,
        #FFE566 0%,
        #FFD100 18%,
        #009B3A 45%,
        rgba(0, 155, 58, 0.55) 72%,
        transparent 100%
    );
    box-shadow:
        0 0 6px 1px rgba(255, 209, 0, 0.7),
        0 0 12px 2px rgba(0, 155, 58, 0.45),
        0 0 18px 3px rgba(0, 155, 58, 0.25);
    animation: jacms-lifeline-crawl var(--jacms-glow-speed, 3.5s) ease-in-out infinite alternate;
    will-change: transform, opacity;
    z-index: 10;
    pointer-events: none;
}
@keyframes jacms-lifeline-crawl {
    0%   { transform: translateY(0); opacity: 0.85; }
    50%  { transform: translateY(280%); opacity: 1; }
    100% { transform: translateY(360%); opacity: 0.9; }
}
}
}
}
@media (prefers-reduced-motion: reduce) {
    .jacms-sidebar::after,
    .jacms-cust-sidebar::after {
        animation: none !important;
        height: 100% !important;
        transform: none !important;
        background: linear-gradient(180deg, #009B3A, #FFD100) !important;
        will-change: auto;
        box-shadow: 0 0 10px 2px rgba(255, 209, 0, 0.5);
    }
}
.jacms-cust-logo {
    text-align: center;
    width: 100%;
    padding: 4px 0 8px;
}
.jacms-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(--jacms-gold);
    display: block;
}
.jacms-cust-user {
    text-align: center;
    margin-bottom: 24px;
}
.jacms-cust-user img {
    border-radius: 50%;
    margin-bottom: 8px;
    border: 2px solid var(--jacms-gold);
}
.jacms-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;
}
.jacms-cust-sidebar nav a:hover,
.jacms-cust-sidebar nav a.active {
    background: linear-gradient(90deg, var(--jacms-green), #00c853);
    color: #fff;
}
.jacms-cust-main {
    flex: 1;
    padding: 32px;
    min-width: 0;
}
.jacms-cust-main h1 {
    margin: 0 0 8px;
    font-size: 1.6rem;
    border-left: 4px solid var(--jacms-gold);
    padding-left: 12px;
}
.jacms-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; }
.stat-card strong { font-size: 1.6rem; }
.stat-card.blue { background: linear-gradient(135deg, #009B3A, #007A2E); }
.stat-card.green { background: linear-gradient(135deg, #FFD100, #E6BC00); color: #000; }
.stat-card.orange { background: linear-gradient(135deg, #2e7d32, #1b5e20); }
.stat-card.pink { background: linear-gradient(135deg, #1a1a1a, #000); }

.jacms-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(--jacms-green);
}
.jacms-cust-panel h2 {
    margin: 0 0 12px;
    font-size: 1.15rem;
}
.jacms-cust-panel .empty {
    color: #64748b;
}

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

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

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

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

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


/* Full-screen customer portal removed */


.jacms-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;
}
.jacms-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;
}
.jacms-notif-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
}
.jacms-notif-item.unread { background: #f0fdf4; }
.jacms-notif-item strong { display: block; font-size: 0.9rem; }
.jacms-notif-item span { display: block; font-size: 0.82rem; color: #475569; margin-top: 2px; }
.jacms-notif-item small { display: block; font-size: 0.72rem; color: #94a3b8; margin-top: 4px; }
.jacms-notif-empty { padding: 16px; text-align: center; color: #64748b; }


/* Faded top-right dashboard image */
.jacms-customer-wrap {
    position: relative;
}
.jacms-dash-bg-fade {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 48%);
    height: 160px;
    background-size: cover;
    background-position: center top;
    opacity: 0.14;
    pointer-events: none;
    z-index: 0;
    border-radius: 0 0 0 36px;
    border-bottom: 3px solid rgba(0, 155, 58, 0.35);
    box-shadow: 0 8px 0 0 transparent;
    mask-image: linear-gradient(to left, rgba(0,0,0,0.85), transparent 92%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.85), transparent 92%);
}
/* Clear space below flag so dashboard content is fully readable */
.jacms-cust-main > *:first-child,
.jacms-main > .jacms-topbar {
    position: relative;
    z-index: 2;
}
.jacms-customer-wrap .jacms-cust-main {
    padding-top: 56px !important;
}
.jacms-dash-bg-fade::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #009B3A 20%, #FFD100 55%, transparent);
    opacity: 0.85;
}
.jacms-cust-main,
.jacms-cust-sidebar {
    position: relative;
    z-index: 1;
}




/* Stable customer dashboard layout — fits in theme page, no overlay */
.jacms-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;
    background: #f5f7f0;
    border-radius: 12px;
}
.jacms-customer-wrap .jacms-cust-sidebar {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 240px;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
}
.jacms-customer-wrap .jacms-cust-main {
    flex: 1;
    height: auto !important;
    overflow: visible !important;
    padding: 52px 20px 28px 20px;
}
body.jacms-portal-open #wpadminbar,
body.jacms-portal-open .site-header,
body.jacms-portal-open header,
body.jacms-portal-open footer,
body.jacms-portal-open .site-footer {
    display: block !important;
    visibility: visible !important;
}


/* ===== Faded top-right dashboard background ===== */
.jacms-dash-bg-fade {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 48%);
    height: 160px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0.14;
    pointer-events: none;
    z-index: 0;
    border-radius: 0 0 0 36px;
    border-bottom: 3px solid rgba(0, 155, 58, 0.35);
    mask-image: linear-gradient(to left, rgba(0,0,0,0.9), transparent 92%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.9), transparent 92%);
}
.jacms-dash-bg-fade::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 0;
    bottom: -2px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #009B3A 15%, #FFD100 50%, transparent);
    pointer-events: none;
}
.jacms-main,
.jacms-cust-main,
.jacms-topbar,
.jacms-status-cards,
.jacms-panel,
.jacms-cust-panel {
    position: relative;
    z-index: 1;
}

/* ===== Mobile responsive layout (admin + customer) ===== */
@media (max-width: 960px) {
    .jacms-wrap,
    .jacms-customer-wrap {
        flex-direction: column !important;
        border-radius: 12px;
    }
    .jacms-sidebar,
    .jacms-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;
    }
    .jacms-sidebar::after,
    .jacms-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: jacms-lifeline-crawl-h !important;
    }
    @keyframes jacms-lifeline-crawl-h {
        0%   { transform: translateX(0); }
        100% { transform: translateX(350%); }
    }
    .jacms-sidebar nav,
    .jacms-cust-sidebar nav,
    .jacms-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;
    }
    .jacms-sidebar nav a,
    .jacms-nav-item,
    .jacms-cust-sidebar nav a,
    .jacms-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;
    }
    .jacms-main,
    .jacms-cust-main {
        width: 100% !important;
        padding: 14px 12px 24px !important;
    }
    .jacms-topbar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .jacms-status-cards,
    .jacms-cust-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .jacms-dash-bg-fade {
        width: min(320px, 70%);
        height: 160px;
        opacity: 0.14;
    }
    .jacms-map,
    #jacms-admin-live-map,
    #jacms-cust-live-map {
        height: 260px !important;
        min-height: 260px !important;
    }
}
@media (max-width: 480px) {
    .jacms-status-cards,
    .jacms-cust-stats {
        grid-template-columns: 1fr !important;
    }
    .jacms-topbar h1 {
        font-size: 1.2rem !important;
    }
}


/* ===== Accessibility (customer) ===== */
.jacms-customer-wrap .jacms-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;
}
.jacms-customer-wrap .jacms-skip-link:focus {
    left: 0;
    outline: 3px solid #FFD100;
    outline-offset: 2px;
}
.jacms-tab:focus-visible,
.jacms-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 */
.jacms-cust-main {
    flex: 1;
    min-width: 0;
    padding: 12px 12px 20px !important;
    max-width: none !important;
}
.jacms-customer-wrap {
    max-width: none !important;
}
.jacms-cust-panel, .jacms-customer-wrap .jacms-panel {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ===== Live map + GPS activity feed (customer) ===== */
.jacms-live-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.75fr);
    gap: 14px;
    align-items: stretch;
}
.jacms-activity-panel {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    max-height: 360px;
    overflow: hidden;
}
.jacms-activity-head {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.jacms-activity-head span {
    font-size: 0.75rem;
    color: #64748b;
}
.jacms-activity-feed {
    overflow-y: auto;
    flex: 1;
    padding: 8px 10px;
    -webkit-overflow-scrolling: touch;
}
.jacms-activity-empty {
    color: #64748b;
    text-align: center;
    padding: 24px 8px;
    margin: 0;
}
.jacms-activity-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.jacms-activity-item.jacms-activity-gps {
    border-left: 4px solid #009B3A;
}
.jacms-activity-item.jacms-activity-evt {
    border-left: 4px solid #FFD100;
}
.jacms-activity-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}
.jacms-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #009B3A;
    display: inline-block;
    flex-shrink: 0;
}
.jacms-activity-evt .jacms-activity-dot {
    background: #E6BC00;
}
.jacms-activity-body {
    font-size: 0.82rem;
    color: #334155;
    margin-top: 4px;
    line-height: 1.35;
}
.jacms-activity-time {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 4px;
}

.jacms-orders-list,
.jacms-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.jacms-btn-calc,
button.jacms-btn-calc {
    min-height: 44px;
}

@media (max-width: 900px) {
    .jacms-live-grid {
        grid-template-columns: 1fr !important;
    }
    .jacms-activity-panel {
        max-height: 260px;
        min-height: 180px;
    }
    .jacms-calc-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 960px) {
    .jacms-side-nav {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scrollbar-width: thin;
        padding-bottom: 6px !important;
    }
    .jacms-order-card {
        padding: 12px !important;
    }
    .jacms-detail-table th,
    .jacms-detail-table td {
        display: block;
        width: 100%;
        text-align: left;
        padding: 4px 0;
    }
    .jacms-detail-table th {
        font-weight: 700;
        color: #64748b;
        margin-top: 8px;
    }
    .jacms-cust-stats .stat-card {
        min-height: 72px;
    }
}

@media (max-width: 480px) {
    .jacms-map,
    #jacms-cust-live-map {
        height: 220px !important;
        min-height: 220px !important;
    }
    .jacms-cust-sidebar .jacms-dash-footer {
        display: none;
    }
    .jacms-cust-user {
        display: none;
    }
}

/* Customer notification bell pulse */
.jacms-notif-btn.has-unread,
.jacms-notif-btn.jacms-bell-pulse {
    animation: jacms-bell-heartbeat 1.1s ease-in-out infinite;
}
@keyframes jacms-bell-heartbeat {
    0%   { transform: scale(1) rotate(0deg); }
    12%  { transform: scale(1.12) rotate(-12deg); }
    24%  { transform: scale(1.05) rotate(10deg); }
    36%  { transform: scale(1.14) rotate(-8deg); }
    50%  { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.jacms-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #c62828;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    border: 2px solid #fff;
}


/* Customer notification modal — exclusive layer above maps/GPS */
.jacms-notif-overlay {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483000 !important;
    background: rgba(8, 20, 40, 0.72) !important;
    backdrop-filter: blur(10px) saturate(0.85) !important;
    -webkit-backdrop-filter: blur(10px) saturate(0.85) !important;
    isolation: isolate;
}
.jacms-notif-overlay.is-open {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
body.jacms-notif-open .jacms-map,
body.jacms-notif-open .leaflet-container,
body.jacms-notif-open #jacms-cust-live-map,
body.jacms-notif-open #jacms-audio-bar {
    visibility: hidden !important;
    pointer-events: none !important;
}
.jacms-notif-modal {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: min(440px, 92vw);
    max-height: min(72vh, 560px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 2px solid #009B3A;
    border-radius: 16px;
    box-shadow: 0 28px 80px rgba(0,0,0,.45);
    z-index: 2147483001 !important;
}
.jacms-notif-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #0d1f0d, #009B3A);
    color: #fff;
    border-bottom: 2px solid #FFD100;
}
.jacms-notif-modal-header h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.jacms-notif-modal-close {
    border: 0; background: rgba(255,209,0,.2); color: #FFD100;
    width: 36px; height: 36px; border-radius: 10px; font-size: 1.25rem;
    cursor: pointer; font-weight: 800;
}
.jacms-notif-modal-body {
    overflow-y: auto;
    padding: 10px 12px 16px;
    max-height: min(55vh, 420px);
}

.jacms-dark-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 2px solid #FFD100;
    background: #0d1f0d;
    color: #FFD100;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    line-height: 1;
}
.jacms-dark-toggle.is-dark {
    background: #FFD100;
    color: #0d1f0d;
    border-color: #009B3A;
}
.jacms-dark-toggle-floating {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: 99990;
}


/* Clickable shipment activity items */
.jacms-activity-item {
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.jacms-activity-item:hover {
    background: #f0fdf4 !important;
    border-color: #009B3A !important;
    transform: translateX(2px);
}
.jacms-activity-item:focus {
    outline: 2px solid #FFD100;
    outline-offset: 2px;
}

/* Shipment detail popup (blur backdrop, isolated content) */
.jacms-ship-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.jacms-ship-overlay[hidden] { display: none !important; }
.jacms-ship-modal {
    background: #fff;
    border-radius: 16px;
    border: 3px solid #009B3A;
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
    max-width: 560px;
    width: 100%;
    max-height: min(88vh, 720px);
    overflow: auto;
    position: relative;
    z-index: 100001;
    padding: 0;
}
.jacms-ship-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #0d1f0d, #009B3A);
    color: #fff;
    border-radius: 13px 13px 0 0;
}
.jacms-ship-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}
.jacms-ship-modal-close {
    background: transparent;
    border: 2px solid #FFD100;
    color: #FFD100;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.jacms-ship-modal-body {
    padding: 18px 20px 22px;
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.5;
}
.jacms-ship-modal-body .jacms-ship-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin-bottom: 14px;
}
.jacms-ship-modal-body .jacms-ship-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    display: block;
}
.jacms-ship-modal-body .jacms-ship-value {
    font-weight: 600;
    color: #0f172a;
}
.jacms-ship-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #009B3A;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}
.jacms-ship-events {
    margin-top: 12px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}
.jacms-ship-events li {
    margin: 0 0 8px;
    padding-left: 10px;
    border-left: 3px solid #FFD100;
    list-style: none;
    font-size: 0.85rem;
}

/* PDF download toolbar button */
.jacms-pdf-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 2px solid #009B3A;
    background: #0d1f0d;
    color: #FFD100;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
}
.jacms-pdf-download-btn:hover {
    background: #009B3A;
    color: #fff;
}
@media print {
    .jacms-cust-sidebar, .jacms-sidebar, .jacms-pdf-download-btn,
    .jacms-notif-wrap, .jacms-wa-float, .jacms-ship-overlay,
    .jacms-dash-bg-fade, .jacms-audio-bar, #jacms-spotify-bar {
        display: none !important;
    }
    .jacms-cust-main, .jacms-main {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
    }
    body * { visibility: hidden; }
    .jacms-print-target, .jacms-print-target * { visibility: visible; }
    .jacms-print-target {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}


/* Extra clearance below flag border so page content never sits under it */
.jacms-customer-wrap .jacms-cust-main > .jacms-dash-bg-fade + *,
.jacms-cust-main > div:first-of-type {
    margin-top: 8px;
}
.jacms-section {
    position: relative;
    z-index: 2;
}
.jacms-cust-stats,
.jacms-cust-panel {
    position: relative;
    z-index: 2;
}
