﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Use `clip`, not `hidden`: `overflow-x: hidden` forces overflow-y to compute
       to `auto`, turning html/body into a scroll container and breaking
       `position: sticky` (e.g. the calendar's sticky header). `clip` clips the
       same horizontal overflow without creating a scroll container. */
    overflow-x: clip;
    overscroll-behavior-x: contain;
}

.preview-action-pill,
.preview-action-pill-lg {
    display: inline-flex;
    align-items: center;
    background: #ededed;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
    text-decoration: none;
}

.preview-action-pill:hover,
.preview-action-pill-lg:hover,
.preview-action-pill:focus,
.preview-action-pill-lg:focus {
    text-decoration: none;
}

.preview-action-pill {
    min-height: 36px;
    padding: 0 0.75rem;
    font-size: 0.8rem;
}

.preview-action-pill-lg {
    min-height: 30px;
    padding: 0 0.9rem;
    font-size: 0.75rem;
    
}

/* Calendar order/client preview: the row icons are buttons that open the matching
   editor (date icon -> Edit order, name icon -> Edit customer, ...). */
.preview-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 6px;
    line-height: 0;
    cursor: pointer;
}

.preview-icon-btn:not(:disabled):hover,
.preview-icon-btn:not(:disabled):focus-visible {
    background: #eef2ff;
    box-shadow: 0 0 0 3px #eef2ff;
    outline: none;
}

.preview-icon-btn:disabled {
    cursor: default;
}

/* Edit Order "Date, time & rules" block: Due date and Start time side by side when the
   modal is wide enough, under each other on a phone. */
.order-schedule-editor {
    container-type: inline-size;
}

.order-schedule-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

@container (min-width: 560px) {
    .order-schedule-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* While the date calendar is open it takes the whole width, so it stays inside the box (PR #1232). */
.order-schedule-grid:has(.wdp-open) {
    grid-template-columns: minmax(0, 1fr);
}

/* Start date / start time pills in Create Lead and Create Subscription (ASAP, Select date,
   Time, Time span): always one row (PR #1232); on a phone the pills shrink. */
.cp-pill-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}

.cp-pill-row > button {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* "Time" / "Time span" ("Tid" / "Tidsrum"): the two buttons next to ASAP are always the same
   size, with their short label centred on one line (PR #1232). The label is centred with flexbox
   and small side padding, so a label nearly as wide as the button ("Tidsrum") stays in the middle
   like "ASAP" and "Tid" instead of starting at the left and spilling to the right. */
.cp-pill-row > button.cp-pill-equal {
    flex: 0 0 7rem;
    width: 7rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    padding-right: 6px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

@media (max-width: 480px) {
    .cp-pill-row {
        gap: 6px;
    }

    /* The label must stay readable on a phone (PR #1232): smaller text, and a
       long label ("Available between") may wrap at a space instead of being cut off with "...". */
    .cp-pill-row > button {
        flex: 1 1 auto;
        align-self: stretch;
        padding: 6px 8px;
        font-size: 0.8rem;
        line-height: 1.15;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: normal;
    }

    /* ASAP is short: it never shrinks or breaks onto two lines. */
    .cp-pill-row > button.cp-pill-fixed {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* On a phone they share the space next to ASAP equally, still on one line. */
    .cp-pill-row > button.cp-pill-equal {
        flex: 1 1 0;
        width: auto;
        padding-left: 4px;
        padding-right: 4px;
        white-space: nowrap;
        overflow: hidden;
    }
}

/* Clickable rules box in the order preview: opens Edit order. */
.order-rules-clickable {
    cursor: pointer;
}

.order-rules-clickable:hover,
.order-rules-clickable:focus-visible {
    box-shadow: 0 0 0 2px #fcd34d;
    outline: none;
}

/* Kanban card preview buttons: compact on all screens so they fit inside the column */
.kanban-card-inner .kanban-preview-actions {
    gap: 0.25rem;
    width: 100%;
    max-width: 100%;
}

.kanban-card-inner .kanban-preview-actions .preview-action-pill,
.kanban-card-inner .kanban-preview-actions .preview-action-pill-lg,
.kanban-card-inner .kanban-preview-actions .kanban-preview-btn {
    min-height: 28px;
    padding: 0 0.4rem;
    font-size: 0.7rem;
    line-height: 1.1;
    flex-shrink: 1;
    min-width: 0;
}

.kanban-card-inner .kanban-order-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.kanban-card-inner .kanban-order-actions button {
    font-size: 0.625rem;
    line-height: 1.1;
    white-space: nowrap;
    padding: 0;
}

@media (min-width: 1024px) {
    .preview-action-pill {
        min-height: 44px;
        padding: 0 1rem;
        font-size: 0.95rem;
    }

    .preview-action-pill-lg {
        min-height: 30px;
        padding: 0 1.15rem;
        font-size: 0.75rem;
    }

    .kanban-card-inner .kanban-preview-actions .preview-action-pill,
    .kanban-card-inner .kanban-preview-actions .preview-action-pill-lg,
    .kanban-card-inner .kanban-preview-actions .kanban-preview-btn {
        min-height: 30px;
        padding: 0 0.45rem;
        font-size: 0.7rem;
    }
}


/* Enhanced Calendar Swipe Transitions */
.calendar-swipe-transition {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease-in-out;
    will-change: transform, opacity;
}

.calendar-swipe-feedback {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Smooth scheduler transitions */
.rz-scheduler {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rz-scheduler-content {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Enhanced touch interactions */
/*.calendar-swipe-transition:active {
    transform: scale(0.98);
    transition: transform 0.1s ease-out;
}*/

/* Prevent text selection during swipe */
.calendar-swipe-transition * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Smooth view transitions */
.rz-scheduler-view {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Enhanced appointment animations */
.rz-scheduler-appointment {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Loading state transitions */
.calendar-loading {
    opacity: 0.7;
    transition: opacity 0.3s ease-in-out;
}

/* Swipe direction indicators */
.calendar-swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

.calendar-swipe-indicator.left {
    left: 20px;
}

.calendar-swipe-indicator.right {
    right: 20px;
}

.calendar-swipe-indicator.show {
    opacity: 1;
}

/* Swipe preview effect */
.calendar-swipe-preview {
    position: relative;
    overflow: hidden;
}

.calendar-swipe-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.3s ease-out;
    z-index: 1;
}

.calendar-swipe-preview.swipe-left::before {
    left: 100%;
}

.calendar-swipe-preview.swipe-right::before {
    left: -100%;
}

/* Enhanced calendar container transitions */
#calendar-scheduler-host {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

/* Smooth fade transitions for calendar content */
.rz-scheduler-timeline,
.rz-scheduler-timeline-header,
.rz-scheduler-timeline-body {
    transition: opacity 0.3s ease-in-out, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Swipe gesture feedback */
.calendar-swipe-gesture {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.1);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
    z-index: 999;
}

.calendar-swipe-gesture.active {
    opacity: 1;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.scrollbar-hide {
    -ms-overflow-style: none;  
    scrollbar-width: none;     
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;             
}

@media (max-width: 640px) {
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    
    body {
        -webkit-text-size-adjust: 100%;
    }
    
    
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    
    input, select, textarea {
        font-size: 16px;
    }
}

/* Prevent the calendar from horizontally panning the page on mobile */
#calendar-scheduler-host {
    overscroll-behavior-x: contain;
    overflow-x: hidden;
}

#calendar-scheduler-host .rz-scheduler,
#calendar-scheduler-host .rz-scheduler-content,
#calendar-scheduler-host .rz-scheduler-view,
#calendar-scheduler-host .rz-scheduler-scrollable {
    touch-action: pan-y !important;
    overflow-x: hidden;
}

/* Toolbar: hide Radzen duplicate title.
   Desktop order: (1) prev/next/today → (2) date + revenue → (3) view icons (one row).
   Phone order: (1) prev/next/today → (2) view icons → (3) date + revenue (row1 nav|views, row2 date+revenue). */
#calendar-scheduler-host .rz-scheduler-nav > .rz-scheduler-nav-title {
    display: none !important;
}

#calendar-scheduler-host .rz-scheduler-nav > .rz-scheduler-nav-views {
    display: contents !important;
}

#calendar-scheduler-host .rz-scheduler-nav {
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.4rem 0.6rem;
    row-gap: 0.45rem;
}

#calendar-scheduler-host .rz-scheduler-nav-prev-next {
    order: 1 !important;
    flex: 0 0 auto;
}

#calendar-scheduler-host .calendar-date-revenue-row {
    order: 2 !important;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.45rem;
    min-width: 0;
}

#calendar-scheduler-host .calendar-scheduler-view-toggle-row {
    order: 3 !important;
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
}

#calendar-scheduler-host .calendar-scheduler-title-mirror {
    flex: 0 1 auto;
    min-width: 0;
    font-size: clamp(0.65rem, 2.5vw, 1rem);
    font-weight: var(--rz-scheduler-toolbar-title-font-weight, 700);
    color: var(--rz-scheduler-toolbar-title-color, inherit);
    line-height: 1.25;
    text-align: start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#calendar-scheduler-host .calendar-period-revenue-panel--toolbar {
    flex: 0 0 auto;
    min-width: 0;
}

#calendar-scheduler-host .calendar-period-revenue-panel--toolbar .mt-1 {
    text-align: end;
}

/* Desktop / wide scheduler: single toolbar row (arrows + today + date + revenue + views) */
@container scheduler (min-width: 640px) {
    #calendar-scheduler-host .rz-scheduler-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        gap: 0.45rem 0.65rem;
        row-gap: 0;
    }

    #calendar-scheduler-host .calendar-date-revenue-row {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
        max-width: min(44rem, 52%);
    }

    #calendar-scheduler-host .calendar-scheduler-title-mirror {
        max-width: min(20rem, 22vw);
    }

    #calendar-scheduler-host .calendar-period-revenue-panel--toolbar {
        max-width: min(16rem, 36%);
    }
}

@media (min-width: 640px) {
    #calendar-scheduler-host .rz-scheduler-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        gap: 0.45rem 0.65rem;
        row-gap: 0;
    }

    #calendar-scheduler-host .calendar-date-revenue-row {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
        max-width: min(44rem, 52%);
    }

    #calendar-scheduler-host .calendar-scheduler-title-mirror {
        max-width: min(20rem, 22vw);
    }

    #calendar-scheduler-host .calendar-period-revenue-panel--toolbar {
        max-width: min(16rem, 36%);
    }
}

/* Phone: two rows — line1 space-between (nav | views), line2 full width date+revenue centered cluster */
@container scheduler (width < 640px) {
    #calendar-scheduler-host .rz-scheduler-nav {
        justify-content: space-between;
    }

    /* Put view toggles on row 1 with prev/next (order 2); date+revenue row last (order 3) so it wraps to row 2 */
    #calendar-scheduler-host .calendar-scheduler-view-toggle-row {
        order: 2 !important;
    }

    #calendar-scheduler-host .calendar-date-revenue-row {
        order: 3 !important;
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
    }

    #calendar-scheduler-host .calendar-scheduler-title-mirror {
        font-size: clamp(0.62rem, 3.2vw, 0.92rem);
        max-width: min(16rem, calc(100% - 9.25rem));
    }

    #calendar-scheduler-host .calendar-period-revenue-panel--toolbar {
        max-width: min(11.25rem, 48%);
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    #calendar-scheduler-host .calendar-period-revenue-heading {
        font-size: 0.5rem !important;
        letter-spacing: 0.02em;
    }

    #calendar-scheduler-host .calendar-period-revenue-panel--toolbar .mt-1 {
        font-size: 0.65rem !important;
        line-height: 1.15 !important;
    }
}

@media (max-width: 639.98px) {
    #calendar-scheduler-host .rz-scheduler-nav {
        justify-content: space-between;
    }

    #calendar-scheduler-host .calendar-scheduler-view-toggle-row {
        order: 2 !important;
    }

    #calendar-scheduler-host .calendar-date-revenue-row {
        order: 3 !important;
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
    }

    #calendar-scheduler-host .calendar-scheduler-title-mirror {
        font-size: clamp(0.62rem, 3vw, 0.92rem);
        max-width: min(16rem, calc(100% - 9.25rem));
    }

    #calendar-scheduler-host .calendar-period-revenue-panel--toolbar {
        max-width: min(11.25rem, 48%);
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    #calendar-scheduler-host .calendar-period-revenue-heading {
        font-size: 0.5rem !important;
    }

    #calendar-scheduler-host .calendar-period-revenue-panel--toolbar .mt-1 {
        font-size: 0.65rem !important;
        line-height: 1.15 !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

.header-with-bg-opacity {
    position: relative;
}

.header-with-bg-opacity::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/g10.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.55;
    z-index: 1;
}

.header-with-bg-opacity-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-image: url('/g10.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 1;
}

.header-with-bg-opacity > * {
    position: relative;
    z-index: 2;
}
/* To remove white space before header */
.header{
    margin-top: -5% !important;
}


/* Calendar today highlight styles */
.rz-scheduler-today {
    background-color: rgba(59, 130, 246, 0.1) !important;
    border: 2px solid #3b82f6 !important;
    border-radius: 4px;
}


.form-switch .form-check-input {
    width: 3rem;
    height: 1.6rem;
    cursor: pointer;
}

    .form-switch .form-check-input:checked {
        background-color: #0F0F0F !important;
        border-color: #0F0F0F !important;
    }

    .form-switch .form-check-input:focus {
        border-color: #0F0F0F !important;
        box-shadow: 0 0 0 0.25rem rgba(15, 15, 15, 0.25) !important;
    }

.form-check.form-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}



/*Intercom CSS*/
.mobile-intercom-btn {
    /*    margin-bottom: 30px;*/
    position: fixed;
    bottom: 90px; /* adjust if needed */
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background-color: #000000;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 2147483000; /* higher than 9999 to avoid overlap issues */
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .mobile-intercom-btn:hover {
        transform: scale(1.05);
    }

    .mobile-intercom-btn:active {
        transform: scale(0.95);
    }

@media (min-width: 1024px) {
    .mobile-intercom-btn {
        bottom: 20px;
        right: 30px;
    }
}

/* In-progress badge (Components/Shared/InProgressBadge.razor): bottom-right corner, above the mobile nav bar.
   On pages with their own bottom-right buttons it stacks above them instead of covering them. */
.in-progress-badge {
    position: fixed;
    right: 12px;
    bottom: 88px;
    z-index: 1040;
    max-width: min(260px, calc(100vw - 24px));
    /* #1233: a simple dark pill that can be dragged (js/inProgressBadge.js) and folded in. */
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 4px 4px 12px;
    border-radius: 999px;
    background: #171717;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.in-progress-badge.is-dragging {
    cursor: grabbing;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
    transition: none;
}

.in-progress-badge .ipb-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 36px;
    color: inherit;
    text-decoration: none;
    -webkit-user-drag: none;
}

.in-progress-badge .ipb-link:hover {
    color: inherit;
}

.in-progress-badge .ipb-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: ipb-pulse 1.8s ease-out infinite;
}

.in-progress-badge.is-paused .ipb-dot {
    background: #F59E0B;
    animation: none;
}

@keyframes ipb-pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
    70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.in-progress-badge .ipb-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.in-progress-badge .ipb-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.in-progress-badge .ipb-name {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.in-progress-badge .ipb-pause {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.in-progress-badge .ipb-time {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.in-progress-badge.is-paused .ipb-time {
    color: rgba(255, 255, 255, 0.6);
}

.in-progress-badge .ipb-more {
    flex: 0 0 auto;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 11px;
}

.in-progress-badge .ipb-fold {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.in-progress-badge .ipb-fold:hover {
    background: rgba(255, 255, 255, 0.22);
}

.in-progress-badge .ipb-fold svg {
    width: 14px;
    height: 14px;
}

.in-progress-badge.is-collapsed {
    padding-left: 10px;
}

.in-progress-badge.is-collapsed .ipb-link {
    gap: 6px;
}

@media (min-width: 640px) {
    .in-progress-badge {
        right: 24px;
        bottom: 20px;
    }
}

/* Dashboard: above the chat button (.mobile-intercom-btn, 56px tall). */
body:has(.mobile-intercom-btn) .in-progress-badge {
    right: 16px;
    bottom: 158px;
}

@media (min-width: 1024px) {
    body:has(.mobile-intercom-btn) .in-progress-badge {
        right: 30px;
        bottom: 88px;
    }
}

/* CRM (Leads): above the "create lead" button. */
body:has(.leads-create-fab) .in-progress-badge {
    right: 24px;
    bottom: 172px;
}

@media (min-width: 768px) {
    body:has(.leads-create-fab) .in-progress-badge {
        bottom: 124px;
    }
}

/* CRM (Leads): round globe button to the Cold Canvas map, above the "create lead" button. */
.leads-map-fab {
    position: fixed;
    z-index: 50;
    right: 44px;
    bottom: 96px;
}

.leads-map-fab--above {
    bottom: 168px;
}

.leads-map-fab__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: #fff;
    color: #222;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.leads-map-fab__btn svg {
    width: 26px;
    height: 26px;
}

body:has(.leads-map-fab--above) .in-progress-badge {
    bottom: 228px;
}

@media (min-width: 768px) {
    .leads-map-fab {
        right: 48px;
        bottom: 40px;
    }

    .leads-map-fab--above {
        bottom: 120px;
    }

    body:has(.leads-map-fab--above) .in-progress-badge {
        bottom: 180px;
    }
}

/* ====== CRM (Customers / Leads) page header and board ======
   The header reuses the Calendar's .cp-cal-header grid and .cp-cal-nav-toggle pill (see the shared
   toggle section), so the Customers / Leads switch sits in the same centred place and has the same
   size as the Calendar / Navigator switch. */
.cp-crm-header {
    position: relative;
}

/* Logo + name on desktop; on phones only the logo, left of the switch (like the Navigator's). */
.cp-crm-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 0;
}

/* Same logo file and box as the Navigator's (css/cp-design-navigator.css .navigator-header-left > .icon),
   so on phones it sits in exactly the same place when going between Navigator and CRM. */
.cp-crm-brand > img {
    flex-shrink: 0;
    width: 32px;
    height: 38px;
    object-fit: contain;
}

@media (max-width: 640px) {
    .cp-crm-brand-name {
        display: none;
    }
}

/* "Display on ..." title shown in place of the logo + switch while the settings are open. */
.cp-crm-settings-title {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    max-width: calc(100% - 96px);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.cp-crm-gear {
    position: relative;
}

.cp-crm-gear.active {
    background: #F3F4F6;
}

/* Number of enabled display settings, in the gear's top right corner. */
.cp-crm-gear-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

/* Status tab with its "~ xx MRR" line underneath (like the counts under the Navigator's days). */
.cp-crm-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.cp-crm-tab-mrr {
    font-size: 0.75rem;
    line-height: 1.1;
    color: #6B7280;
    white-space: nowrap;
}

/* Kanban columns. The card keeps its width (min(85vw, 340px) minus the old 16px padding and 2px
   border on each side), but the grey column around it is slimmer: 6px side padding instead of
   bootstrap's p-3 (16px, !important), so on phones more of the next column shows on the right. */
.cp-crm-column-width {
    width: calc(min(85vw, 340px) - 20px);
}

.kanban-column.cp-crm-column-width {
    padding-left: 6px !important;
    padding-right: 6px !important;
    /* Less grey above the list name (about Trello's height), so more cards fit (#1165). */
    padding-top: 2px !important;
}

/* The list's scrollbar sits at the column's right edge instead of on top of the cards' outline:
   the list reaches 5px into the column's side padding and gets 5px more padding, so the cards
   keep their place and width (#1165). */
.kanban-column.cp-crm-column-width .kanban-cards {
    margin-right: -5px;
    padding-right: 9px !important;
}

/* Phones: every grey column runs down to the bottom of the screen, behind the bottom tab bar,
   however few cards it has (kanban-drag-drop.js, window.crmMobileBoard, sets --crm-cards-max).
   The list's bottom padding (--crm-cards-bottom-room) is as tall as the tab bar, so the last card
   can be scrolled up above it. The board then fits the screen, so the page drops its extra bottom
   room (body.cp-crm-board-fitted) and can't be pushed up to show white space under the columns;
   only the lists scroll (#1165). */
@media (max-width: 767px) {
    .kanban-column.cp-crm-column-width .kanban-cards {
        height: var(--crm-cards-max);
        max-height: var(--crm-cards-max, calc(100vh - 242px));
    }

    body.cp-crm-board-fitted .kanban-column.cp-crm-column-width .kanban-cards {
        padding-bottom: var(--crm-cards-bottom-room, 0px);
    }

    body.cp-crm-board-fitted .kanban-scroll.cp-crm-board-bleed {
        padding-bottom: 0 !important;
    }
}

@media (max-width: 640px) {
    body.cp-crm-board-fitted .main-authorized {
        min-height: 0;
        padding-bottom: 0 !important;
    }

    html:has(body.cp-crm-board-fitted),
    body.cp-crm-board-fitted {
        overscroll-behavior-y: none;
    }
}

/* Desktop: drag the board background with the mouse to scroll sideways (kanban-drag-drop.js). */
@media (hover: hover) and (pointer: fine) {
    .kanban-scroll.cp-crm-board-bleed {
        cursor: grab;
    }
}

.kanban-scroll.kanban-scroll--panning,
.kanban-scroll.kanban-scroll--panning * {
    cursor: grabbing !important;
    user-select: none;
}

/* Phones/tablets: the status tab scroller and the kanban board scroll all the way to the screen
   edges instead of stopping at the page padding. That padding is bootstrap's px-3 (1rem,
   !important; it wins over Tailwind's layered px-3), so the bleed is 1rem too. The first tab and
   the first column still start 16px in, in line with the logo above. */
@media (max-width: 767px) {
    .cp-crm-tabs {
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .cp-crm-tabs > ul {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        scroll-padding-left: 1rem;
    }

    .cp-crm-board-bleed {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 12px; /* + the board's px-1 (4px) = 16px */
        padding-right: 12px;
    }

    /* 12px between the columns instead of bootstrap's gap-4 (24px), again so the next one peeks in. */
    .cp-crm-board-bleed > .kanban-board {
        gap: 12px !important;
    }
}

/* #1189: the CRM on a computer.
   - No "Companyplanner" logo and name in the header: the side menu already shows them (phones,
     which have no side menu, keep the logo).
   - Every grey column runs down to the bottom of the window, however few cards it has
     (kanban-drag-drop.js sets --crm-cards-desktop); only the lists scroll.
   - The board uses the full width, without the white margins at both ends.
   - The "... order preview" buttons fit on one line in smaller text. */
@media (min-width: 641px) {
    .cp-crm-brand {
        display: none;
    }
}

@media (min-width: 768px) {
    .kanban-column.cp-crm-column-width {
        max-height: none !important;
    }

    .kanban-column.cp-crm-column-width .kanban-cards {
        height: var(--crm-cards-desktop, auto);
        max-height: var(--crm-cards-desktop, calc(100vh - 220px));
    }

    .cp-crm-board-outer {
        max-width: none !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .cp-crm-add-status-row {
        margin-top: 4px !important;
    }

    .crm-preview-toggle span.italic {
        font-size: 12px;
        line-height: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Create-lead button: two soft bounces shortly after the page opens. */
.cp-crm-create-bounce {
    animation: cp-crm-soft-bounce 1.1s ease-in-out 0.6s 2;
}

@keyframes cp-crm-soft-bounce {
    0%, 100% { translate: 0 0; }
    30% { translate: 0 -8px; }
    50% { translate: 0 0; }
    65% { translate: 0 -3px; }
    80% { translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .cp-crm-create-bounce {
        animation: none;
    }
}

/* Calendar: above the right end of the action bar (the AI button). Mirrors .cp-cal-actionbar in Calendar.razor. */
body:has(.cp-cal-actionbar) .in-progress-badge {
    --cp-bar-right: 8px;  /* gap between the action bar and the right edge of the screen */
    --cp-bar-top: 172px;  /* top of the action bar: 84px + 88px (incl. the Nightly Routeplanner line, #1208) */
    --cp-fab-top: 222px;  /* top of the day view's "+" button */
    right: calc(var(--cp-bar-right) + 8px);
    bottom: calc(var(--cp-bar-top) + 10px);
}

/* Day view: the "+" button floats near the right edge. When the AI button is under it (always on mobile,
   on narrow desktops), go above the "+" button too: (96px - bar gap) * 1000 is huge then, and negative
   (so the clamp minimum wins) once the action bar ends left of the "+" button. */
body:has(.cp-cal-actionbar):has(.cp-fab-bottom) .in-progress-badge {
    bottom: clamp(calc(var(--cp-bar-top) + 10px), calc((96px - var(--cp-bar-right)) * 1000), calc(var(--cp-fab-top) + 10px));
}

@media (min-width: 640px) {
    body:has(.cp-cal-actionbar) .in-progress-badge {
        --cp-bar-top: 104px;
    }
}

@media (min-width: 641px) {
    body:has(.cp-cal-actionbar) .in-progress-badge {
        --cp-bar-right: calc((100vw - var(--main-margin-left, 0px)) / 2 - min(100vw - var(--main-margin-left, 0px) - 24px, 580px) / 2);
    }
}

@media (min-width: 768px) {
    body:has(.cp-cal-actionbar) .in-progress-badge {
        --cp-fab-top: 168px;
    }
}

/* Lock page scroll while a modal is open. Driven by app.js#setModalScrollLock,
   which also stores and restores the previous scroll position. */
html.modal-scroll-lock,
html.modal-scroll-lock body {
    overflow: hidden !important;
    height: 100%;
    touch-action: none;
}
.modal{
    border-radius:0px !important;
}

/* ====== Shared Calendar / Navigator segmented toggle ======
   Used by Calendar.razor (Day/3-Day/Week/Month + Navigator) and Nextsup.razor
   (Calendar + Navigator). Defined here so both pages produce an identical pill
   in the same screen position — the user perceives it as a single component
   that just changes which segment is highlighted between pages. */

/* Header row that the toggle lives in. Same layout on Calendar and Nextsup so
   the pill ends up at the same x position. A 3-column grid (1fr auto 1fr) keeps the
   toggle dead-centered on both pages — on Nextsup the third column is simply empty. */
.cp-cal-header {
    display: grid;
    /* minmax(0, 1fr): the side columns never grow past half the free space, so whatever sits
       left/right (month label, logo, icons) can't push the toggle off-centre. */
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 4px 0 2px;
    min-height: 40px;
}
.cp-cal-header-left {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1;
    min-width: 0;
    overflow: hidden;
}

.cp-cal-nav-toggle {
    display: inline-flex;
    background: #F3F4F6;
    border-radius: 9999px;
    padding: 3px;
    gap: 2px;
    justify-self: center;
}
.cp-cal-nav-toggle-btn {
    appearance: none;
    background: transparent;
    border: 0;
    color: #4B5563;
    font-size: 0.85rem;
    /* Keep one constant weight for active AND inactive. Bumping the active segment to a
       heavier weight reflowed the label text, which made the whole pill change width and
       visibly "drag" when toggling between Calendar and Navigator. */
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 9999px;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.cp-cal-nav-toggle-btn:hover { color: #111827; }
.cp-cal-nav-toggle-btn.active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
}
.cp-cal-nav-toggle-btn img { width: 16px; height: 16px; }

/* Mobile: identical padding on both Calendar and Navigator so the toggle is the exact
   same width on each page (Calendar previously had this override inline, Navigator did
   not — the mismatch shifted the pill on navigation). */
@media (max-width: 640px) {
    .cp-cal-nav-toggle-btn { padding: 5px 10px; font-size: 0.78rem; gap: 4px; }
    .cp-cal-nav-toggle-btn img { width: 14px; height: 14px; }
}

/* One switch, one size. The grey pill has a fixed width and height (the Calendar's size), and each
   white segment is exactly half of it, on Calendar, Navigator and the CRM pages (Clients / Leads),
   whichever segment is selected and whatever its label ("Month", "3 Day", "Navigator"). Two classes
   so it wins over Calendar.razor's inline copy; the Navigator page mirrors the font rules in
   css/cp-design-navigator.css. Sizes:
     desktop    2 x 120px segments, 32px tall -> pill 248 x 38
     <= 640px   2 x 90px segments,  44px tall -> pill 188 x 50 (44px touch height)
     <= 380px   2 x 84px segments,  44px tall -> pill 176 x 50
   The selected label is semibold and the other one medium; the widths are fixed, so the weight
   change can't move anything. Text that is still too long ends in an ellipsis instead of growing. */
.cp-cal-nav-toggle {
    --cp-switch-seg-w: 120px;
    --cp-switch-seg-h: 32px;
    box-sizing: border-box;
    flex: none;
    align-items: stretch;
    width: calc(2 * var(--cp-switch-seg-w) + 8px); /* 2 segments + 2px gap + 2 x 3px padding */
    height: calc(var(--cp-switch-seg-h) + 6px);
    min-height: 0;
    padding: 3px;
    gap: 2px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
/* Pinned to the top of the header row instead of centred in it, so a taller left column (the
   Calendar's month label + stats) can't push the pill a few pixels lower than on the other pages. */
.cp-cal-header > .cp-cal-nav-toggle { align-self: start; }
/* Each segment is exactly --cp-switch-seg-w wide. Not flex: 1 1 0, because flex spreads the space
   after the padding: the Navigator's segment is an unpadded <span> wrapper, so it came out 8px
   narrower than the padded Calendar button next to it (94 / 86px instead of 90 / 90). */
.cp-cal-nav-toggle .cp-cal-nav-toggle-btn,
.cp-cal-nav-toggle .navigator-date-segment {
    box-sizing: border-box;
    flex: 0 0 var(--cp-switch-seg-w);
    width: var(--cp-switch-seg-w);
    min-width: 0;
    min-height: 0;
    margin: 0;
}
.cp-cal-nav-toggle .cp-cal-nav-toggle-btn {
    justify-content: center;
    padding: 0 8px;
    line-height: 1.2;
    font-size: 0.85rem;
    font-weight: 500;
    overflow: hidden;
}
.cp-cal-nav-toggle .cp-cal-nav-toggle-btn.active { font-weight: 600; }
/* Navigator: its selected segment is a <span> inside the date-picker wrapper; it fills the wrapper. */
.cp-cal-nav-toggle .navigator-date-segment > .cp-cal-nav-toggle-btn { flex: 1 1 auto; width: 100%; }
.cp-cal-nav-toggle .cp-cal-nav-toggle-btn img { flex-shrink: 0; }
.cp-cal-nav-toggle .cp-cal-nav-toggle-btn > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 640px) {
    .cp-cal-nav-toggle { --cp-switch-seg-w: 90px; --cp-switch-seg-h: 44px; }
    .cp-cal-nav-toggle .cp-cal-nav-toggle-btn { padding: 0 4px; font-size: 0.74rem; gap: 3px; }
    .cp-cal-nav-toggle .cp-cal-nav-toggle-btn img { width: 13px; height: 13px; }
}
@media (max-width: 380px) {
    div.cp-cal-header { gap: 4px; }
    .cp-cal-nav-toggle { --cp-switch-seg-w: 84px; }
    .cp-cal-nav-toggle .cp-cal-nav-toggle-btn { padding: 0 3px; font-size: 0.7rem; }
}
/* Desktop: Calendar and the CRM pages scroll the page, the Navigator doesn't. Without a reserved
   scrollbar gutter the centred switch moved ~8px sideways when going between them. */
html:has(.cp-cal-nav-toggle) { scrollbar-gutter: stable; }

/* Search + settings icons on the right of the header (Calendar keeps its own inline copy).
   Phones: 40px each instead of the global 44px button minimum, so both icons fit beside the
   centred toggle down to 360px. */
.cp-cal-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 2px;
}
.cp-cal-header-icon {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 6px;
    border-radius: 8px;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}
.cp-cal-header-icon:hover { background: #F3F4F6; }
.cp-cal-header-icon svg { width: 21px; height: 21px; }
@media (max-width: 640px) {
    .cp-cal-header .cp-cal-header-actions { gap: 0; }
    .cp-cal-header-actions .cp-cal-header-icon,
    .cp-cal-header-actions .cp-cal-gear { min-width: 40px; width: 40px; padding: 6px 0; }
}
@media (max-width: 380px) {
    .cp-cal-header-actions .cp-cal-header-icon,
    .cp-cal-header-actions .cp-cal-gear { min-width: 36px; width: 36px; }
}

/* Month label + prev/next arrows + settings gear. Defined here (in addition to
   Calendar.razor's inline copy) so the Navigator page — which doesn't render the
   Calendar component — can show the same header bar, with these controls disabled. */
.cp-cal-month-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cp-cal-month-nav {
    appearance: none;
    background: transparent;
    border: none;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    color: #222222;
    transition: background-color 0.15s ease;
}
.cp-cal-month-nav:hover { background: #F3F4F6; }
.cp-cal-month-nav:active { background: #E5E7EB; }
.cp-cal-month-nav:disabled { opacity: 0.4; cursor: not-allowed; }
.cp-cal-month-nav:disabled:hover { background: transparent; }

.cp-cal-month-label {
    font-size: 1.5rem;
    font-weight: 300;
    color: #111827;
    margin-right: 4px;
    letter-spacing: -0.01em;
    cursor: pointer;
    user-select: none;
}

.cp-cal-gear {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    transition: background-color 0.15s;
}
.cp-cal-gear:hover { background: #F3F4F6; }
.cp-cal-gear:disabled { opacity: 0.4; cursor: not-allowed; }
.cp-cal-gear:disabled:hover { background: transparent; }
.cp-cal-gear img { width: 22px; height: 22px; }

.cp-cal-range-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 24px;
    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

/* Job-type card rows (Starting job / Next job on Create Lead and Create Subscription).
   The cards always stay on one line: each shrinks evenly from 100px down to 48px to fit the
   width, so the three built-in cards plus a couple of extra tasks fit a phone. Card contents
   are sized in cqw (1cqw = 1% of the card's width) so a shrunken card is a scaled copy of the
   100px design rather than a cramped one. Only when even 48px cards do not fit (many extra
   tasks) does the row scroll sideways; "safe center" keeps the first card reachable then. */
.job-card-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    justify-content: safe center;
    gap: 16px;
    overflow-x: auto;
}

.job-card {
    flex: 1 1 0;
    min-width: 48px;
    max-width: 100px;
    container-type: inline-size;
}

@media (max-width: 640px) {
    .job-card-row {
        gap: 6px;
    }
}

/* Count badge on the Calendar header's Navigator segment: unfinished visits from earlier days (#1186).
   Same size as the menu's count badge on Calendar (.learning-count-badge in css/learning.css), sticking out
   over the segment's top-right corner. The segment normally clips its overflow, so a segment with a badge
   (.has-badge) lets it show; its label still ends in an ellipsis on its own. */
.cp-cal-nav-toggle .cp-cal-nav-toggle-btn.has-badge { overflow: visible; }
.cp-cal-nav-toggle .cp-cal-nav-toggle-btn > .cp-cal-nav-toggle-badge {
    position: absolute;
    top: -7px;
    right: -9px;
    z-index: 2;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-sizing: content-box;
    background: #d6336c;
    color: #fff;
    font: 700 11px/19px -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: center;
    overflow: visible;
    text-overflow: clip;
    pointer-events: none;
}
