﻿:root {
    --primary-color: #4f46e5;
    --primary-blue: #0066ff;
    --primary-soft: #eef2ff;
    --sidebar-width: 260px;
    --bg-body: #f8fafc;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: #0f172a;
    margin: 0;
    overflow-x: hidden;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 10px;
}

    *::-webkit-scrollbar-thumb:hover {
        background: #6c757d;
    }

*::-webkit-scrollbar-button {
    display: none !important;
}

#projectMap {
    z-index: 9;
}

/* Sidebar & Overlay */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: white;
    border-right: 1px solid #e2e8f0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1500;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }

#content {
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
    transition: margin-left 0.3s ease;
}

.tab-content .summary-info {
}

    .tab-content .summary-info > .col-md-4 > .card {
        height: 100%;
    }

    .tab-content .summary-info .project-summary {
        margin-top: 10px;
    }

        .tab-content .summary-info .project-summary p {
            font-size: 12px;
            margin-bottom: 4px;
        }

.nav-link {
    color: #64748b;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    margin: 0.2rem 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

    .nav-link.active {
        background-color: var(--primary-soft);
        color: var(--primary-color);
    }

.logo-box {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
}

/* Cards & Components */
.stat-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.search-input {
    border-radius: 0.75rem;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.875rem;
    width: 250px;
}

/* Tabs UI */
.accordion-tabs-list {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow: auto;
}

    .accordion-tabs-list .nav-tabs .nav-link {
        border: none;
        background: transparent;
        color: #64748b;
        font-weight: 600;
        padding: 1rem;
        margin-right: 2rem;
        position: relative;
        font-size: 16px;
        white-space: nowrap;
    }

        .accordion-tabs-list .nav-tabs .nav-link.active {
            color: var(--primary-blue) !important;
            background: #f3f6fb;
        }

        .accordion-tabs-list .nav-tabs .nav-link i.bi {
            width: 28px;
            height: 28px;
            background: transparent;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 0;
            border-radius: 6px;
            transition: all .2s;
        }

        .accordion-tabs-list .nav-tabs .nav-link.active i.bi {
            transform: scale(1.15);
            background: #f3f6fb;
            color: var(--primary-blue) !important;
        }

        .accordion-tabs-list .nav-tabs .nav-link.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background: var(--primary-blue);
            border-radius: 3px 3px 0 0;
        }

.checklist-media {
}

    .checklist-media img {
        widows;
        height: 34px;
    }

/* Timeline/Milestone Slider */
#p1-slider {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

    #p1-slider.dragging {
        cursor: grabbing !important;
        cursor: -webkit-grabbing !important;
    }

.milestone-slider::-webkit-scrollbar, {
    display: none;
}

.milestone-slider {
    scroll-behavior: smooth;
}

    .milestone-slider > * {
        width: 320px;
        user-select: none;
    }

body .milestone-block > .card.editing {
}

body .milestone-block > .card.new-stage {
}

.btn-new-stage {
}

body .milestone-block > .card.new-stage .milestone-top {
    background-color: rgb(252 248 250);
    height: 100%;
    border: 0;
}

body .milestone-block .milestone-top {
    height: 180px;
    background-color: rgb(248, 250, 252);
    border-bottom: 1px solid #d4d4d473;
}

body .milestone-block .deliverable-list {
    max-height: 170px;
}

body .milestone-block > .card.editing .milestone-top {
    height: 200px;
    background-color: rgb(252 248 250);
}

body .milestone-block > .card .add-deliverable {
    display: none;
}

body .milestone-block > .card.editing .add-deliverable {
    display: block;
}

.milestone-list .milestone-list-item {
    display: flex;
    align-items: center;
    background-color: #fbfbfb;
    border-radius: 6px;
    border: 0;
    transition: all 0.2s ease;
    margin-bottom: 7px;
    position: relative;
    padding: 7px 15px;
}

    .milestone-list .milestone-list-item .form-check-input[type=checkbox] {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
    }

    .milestone-list .milestone-list-item .milestone-list-label {
        font-size: 13px;
        padding-top: 4px;
        margin-left: -0.5em;
        color: rgba(33, 37, 41, 0.75);
    }

    .milestone-list .milestone-list-item.completed {
        background-color: #e6f0ff;
    }

        .milestone-list .milestone-list-item.completed .milestone-list-label {
            color: #0d6efd;
            text-decoration: line-through;
        }

.add-milestone {
    background-color: #f8f9fa;
}

    .add-milestone:hover {
    }

.milestone-block .add-milestone > .milestone-top {
    height: auto;
    border-bottom: 0;
}

.milestone-payment {
}

.milestone-slider .milestone-image {
    position: relative
}

.milestone-slider .img-thumbnail {
    height: 140px;
    object-fit: cover;
    cursor: pointer;
    padding: 0;
}

body .milestone-block > .card.editing .milestone-image-edit {
    display: flex;
}

.milestone-image-edit {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99;
    color: var(--edit-color);
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.milestone-slider .img-container {
    overflow: hidden;
    border-radius: 0.75rem;
    transition: transform 0.3s ease;
    position: relative;
}

.img-placeholder {
    height: 140px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    color: #94a3b8;
    transition: all 0.2s ease;
    background-color: #f8fafc;
    cursor: pointer;
    padding: 1rem;
}

    .img-placeholder:hover {
        /* border-color: var(--edit-color); */
        color: #fff;
        /* background-color: white; */
    }

    .img-placeholder .icon-circle {
        background-color: white;
        border: 1px solid #e2e8f0;
        border-radius: 50%;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        transition: all 0.2s ease;
    }

    .img-placeholder:hover .icon-circle {
        transform: scale(1.1);
        background-color: #2196f37a;
        color: #e6f0ff;
    }

.img-container:hover img {
    transform: scale(1.05);
}

.img-container img {
    transition: transform 0.4s ease;
    display: block;
}

.milestone-slider .img-container:hover img {
    transform: scale(1.05);
}

.milestone-slider .img-container img {
    transition: transform 0.4s ease;
}

/* Modal for Attachments */
.attachment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

    .attachment-modal.show {
        display: flex;
    }

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilities */
.rounded-4 {
    border-radius: 1rem !important;
}

.shadow-xs {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.uppercase {
    text-transform: uppercase;
}

.x-small {
    font-size: 0.6rem !important;
}

.btn-white {
    background: #fff;
    color: #1e293b;
}

.hover-bg-light:hover {
    background-color: #f8fafc !important;
}

/* ׳©׳›׳‘׳× ׳”׳¨׳§׳¢ ׳©׳ ׳”׳×׳¦׳•׳’׳” ׳”׳׳§׳“׳™׳׳” (Modal) */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

/* ׳׳™׳›׳ ׳”׳×׳׳•׳ ׳” ׳‘׳×׳¦׳•׳’׳” ׳”׳׳§׳“׳™׳׳” */
.preview-container {
    position: relative;
    max-width: 95%;
    max-height: 90%;
}

/* ׳›׳₪׳×׳•׳¨ ׳¡׳’׳™׳¨׳” */
.close-preview {
    position: absolute;
    top: -30px;
    right: -10px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

    .close-preview:hover {
        transform: scale(1.1);
    }

/* ׳¢׳™׳¦׳•׳‘ ׳”-Thumbnails (׳”׳×׳׳•׳ ׳•׳× ׳”׳׳•׳§׳˜׳ ׳•׳×) */
.thumbnail-box {
    transition: all 0.2s;
    flex-shrink: 0;
}

    .thumbnail-box img {
        transition: all 0.2s ease-in-out;
    }

    .thumbnail-box:hover {
        border-color: #9e9e9e !important;
        cursor: pointer;
    }

.hover-scale:hover {
    transform: scale(1.1);
}

@media (max-width: 576px) {
    .thumbnail-box {
        width: 38px !important;
        height: 38px !important;
    }

    .form-check-input {
        width: 38px !important;
        height: 20px !important;
    }

    .nav-tabs .nav-link {
        margin-right: 1rem;
    }

    .list-group-item {
        padding: 0.75rem !important;
    }
}

[data-tooltip] {
    position: relative;
}

    [data-tooltip]:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 125%;
        left: 50%;
        transform: translateX(-50%);
        background: #1e293b;
        color: white;
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
        z-index: 10001;
        pointer-events: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
        animation: tooltipFadeIn 0.15s ease-out;
    }

    [data-tooltip]:hover::before {
        content: '';
        position: absolute;
        bottom: 115%;
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: #1e293b;
        z-index: 10001;
        pointer-events: none;
        animation: tooltipFadeIn 0.15s ease-out;
    }

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 5px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.shadow-subtle {
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.1), 0 2px 10px -5px rgba(0, 0, 0, 0.04);
}

.milestone-block .thumbnail-box, .milestone-block .thumbnail-box-btn {
    width: 48px;
    height: 48px;
    transition: all 0.2s;
}

.custom-leaflet-popup .leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}

.payment-status {
    border-radius: 5px;
    --bs-text-opacity: 1;
    color: #198754 !important;
}

    .payment-status.paid {
        border-radius: 5px;
        --bs-text-opacity: 1;
        color: #198754 !important;
    }

.btn-ghost {
    background: transparent;
    color: inherit;
    transition: all 0.2s ease;
}

    .btn-ghost:hover {
        background: rgba(0,0,0,0.04);
    }

/* Gallery Overlay (The Backdrop) */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .gallery-overlay.show {
        display: flex;
        opacity: 1;
    }

/* Main Image Container */
.gallery-container {
    position: relative;
    max-width: 90vw;
    max-height: 75vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .gallery-container img {
        max-width: 100%;
        max-height: 75vh;
        border-radius: 1.25rem;
        object-fit: contain;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

/* Info & Counter Badge */
.gallery-info {
    margin-top: 1.5rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navigation Buttons (Next/Prev) */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

    .gallery-nav:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-50%) scale(1.1);
    }

    .gallery-nav.prev {
        left: 2.5rem;
    }

    .gallery-nav.next {
        right: 2.5rem;
    }

/* Close Button */
.gallery-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.25rem;
}

    .gallery-close:hover {
        background: rgba(239, 68, 68, 0.3);
        color: #f87171;
        transform: rotate(90deg);
    }

/* Bottom Thumbnails Strip */
.gallery-thumbnails {
    position: absolute;
    bottom: 2.5rem;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem;
    max-width: 80vw;
    scrollbar-width: none;
    /* Firefox */
}

    .gallery-thumbnails::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .gallery-thumbnails img {
        width: 70px;
        height: 70px;
        object-fit: cover;
        border-radius: 0.75rem;
        cursor: pointer;
        opacity: 0.4;
        border: 2px solid transparent;
        transition: all 0.2s ease;
    }

        .gallery-thumbnails img:hover {
            opacity: 0.7;
        }

        .gallery-thumbnails img.active {
            opacity: 1;
            border-color: var(--primary-blue);
            transform: translateY(-5px) scale(1.05);
        }

body .expens-type {
    padding: 8px;
    background-color: #f8f9fa;
    gap: 10px;
    border-radius: 9px;
    display: flex;
    width: fit-content;
    align-items: center;
}

    body .expens-type.popup {
        width: 100%;
        border-radius: 5px 5px 0px 0px;
        border-bottom: 1px solid #dee2e67d;
    }

        body .expens-type.popup > label.btn {
            justify-content: center;
        }

    body .expens-type > label.btn {
        border-radius: 5px;
        border: 0;
        padding: 6px 20px;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 15px;
    }

    body .expens-type > .btn-check:checked + .btn {
        background-color: #ffffff;
        border: 0;
        border-radius: 5px;
        color: var(--primary-color);
        box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
        font-weight: 500;
    }

.upload-zone-big {
    border: 2px dashed #e2e8f0;
    transition: all 0.2s ease;
}

    .upload-zone-big:hover {
        background-color: rgba(79, 70, 229, 0.02) !important;
        border-color: var(--primary-color) !important;
        cursor: pointer !important;
    }

ul.projects {
    -ms-overflow-style: none;
    /* Internet Explorer + Edge ׳™׳©׳ ׳™׳ */
    scrollbar-width: none;
    /* Firefox */
    scroll-behavior: smooth;
}

.ul.projects::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge ׳”׳—׳“׳©, Opera */
}

.table-items {
}

    .table-items > * {
    }

        .table-items > * small.date {
        }

ul.dropdown-menu {
    transition: all 0.3s ease;
}

.worker-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.workers-list-assain {
}

    .workers-list-assain > * {
        min-width: 200px;
    }

        .workers-list-assain > * > * {
            background-color: #fff;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            border: 1px solid #dbdde06e;
            border-radius: 7px;
            cursor: pointer;
            gap: 16px;
            align-items: center;
            padding: 7px 15px 7px 25px;
            transition: all 0.2s ease-in-out;
        }

            .workers-list-assain > * > *.active, .workers-list-assain > * > *.d-flex:hover {
                background-color: #e6f0ff73;
                box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
                border: 1px solid #cbdaf2;
            }

.worker-checkbox:checked + .worker-card {
    background-color: #e6f0ff;
}

.workers-list-assain > * > * > .form-check {
    display: none;
}

.worker-checkbox:checked + .worker-card > .bi-person::before {
    content: "\f4da";
}

.popup-tabs-sd {
}

.workers-h-list {
}

    .workers-h-list > * {
        background-color: #fbfcfc4d;
    }

        .workers-h-list > *:nth-child(even) {
            background-color: #eef2ff42;
            border-bottom: 1px solid #00000008;
            border-top: 1px solid #00000008;
        }

.table-items > * .workers-h-list .progress-box {
    max-width: fit-content;
    min-width: 180px;
}

/* Responsive Mobile */
@media (max-width: 1200px) {
    #sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

        #sidebar.show {
            transform: translateX(0);
        }

    #content {
        margin-left: 0 !important;
        padding: 1.25rem 0.8rem !important;
    }

    .sidebar-brand-text {
        display: block !important;
    }

    .tab-panea {
    }

    body .mobile-padding {
        padding: 0 !important;
    }

    body .mobile-radius {
        border-radius: 0 !important;
    }

    .table-items > * {
        overflow-y: hidden !important;
        overflow-x: auto !important;
        gap: 20px;
    }

        .table-items > * .dropdown-menu.show {
            transform: translate3d(-32px, -12px, 0px) !important;
        }
}

@media (max-width: 768px) {
    .gallery-nav {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

        .gallery-nav.prev {
            left: 1rem;
        }

        .gallery-nav.next {
            right: 1rem;
        }

    .gallery-close {
        top: 1.5rem;
        right: 1.5rem;
    }

    .gallery-thumbnails img {
        width: 55px;
        height: 55px;
    }

    .projects-top {
        flex-direction: column;
        gap: 15px;
    }

    .mobile-hide {
        display: none;
    }

    .mobile-div-p {
        padding: 0 !important;
        margin-bottom: 20px;
        position: relative;
        border: 0;
    }

    .mobile-column {
        flex-direction: column;
        gap: 10px;
    }

    .tab-content > .tab-pane {
        padding: 1.5rem 0.7rem !important;
    }

    h2.accordion-header .projects-icon {
        display: none;
    }

    h2.accordion-header span.badge {
        font-size: 0.50rem !important;
    }

    body .workers-h-list .mob-center {
        justify-content: center !important;
        background-color: #e2edff6b;
        border-radius: 5px;
        margin-top: 1.5rem !important;
    }

    .table-items > * .workers-h-list .dropdown-menu.show {
        transform: translate3d(58px, -12px, 0px) !important;
    }

    .table-items > * .workers-h-list .progress-box {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 1200px) {
    body .d-lg-none {
        display: block !important;
    }
}

/* ג”€ג”€ Overlay ג”€ג”€ */
.tpl-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 11111;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    animation: tplFadeIn .18s ease;
}

    .tpl-overlay.tpl-active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

@keyframes tplFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes tplSlideUp {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ג”€ג”€ Modal shell ג”€ג”€ */
.tpl-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
    width: min(1280px, 96vw);
    height: min(1000px, 92vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: tplSlideUp .22s ease;
    position: relative;
    position: relative;
}

/* ג”€ג”€ Form variant: same shell, sized for a vertical form ג”€ג”€ */
@media (min-width: 601px) {
    .tpl-modal.tpl-modal-form {
        width: min(640px, 96vw);
        height: auto;
        max-height: 92vh;
    }
}

/* ג”€ג”€ Header ג”€ג”€ */
.tpl-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px 16px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.tpl-header-icon {
    width: 36px;
    height: 36px;
    background: #0d6efd14;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #0d6efd;
    flex-shrink: 0;
}

    .tpl-header-icon svg {
        width: 18px;
        height: 18px;
        fill: #0d6efd;
    }

.tpl-header h5 {
    font-size: 15px;
    font-weight: 700;
    color: #212529;
    margin: 0;
    letter-spacing: -.2px;
}

.tpl-header p {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.tpl-btn-close-modal {
    margin-left: auto;
    background: none;
    border: none;
    color: #6c757d;
    line-height: 1;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    transition: background .15s, color .15s;
}

    .tpl-btn-close-modal svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
    }

    .tpl-btn-close-modal:hover {
        background: #f1f3f5;
        color: #343a40;
    }

/* ג”€ג”€ Body: sidebar + content ג”€ג”€ */
.tpl-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ג”€ג”€ Left sidebar (desktop) ג”€ג”€ */
.tpl-sidebar {
    width: 210px;
    flex-shrink: 0;
    border-right: 1px solid #e9ecef;
    background: #f8f9fa;
    padding: 12px 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tpl-sidebar-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #adb5bd;
    padding: 6px 10px 4px;
}

.tpl-cat-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background .15s, color .15s;
}

    .tpl-cat-btn .tpl-cat-icon {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
        display: grid;
        place-items: center;
    }

        .tpl-cat-btn .tpl-cat-icon svg {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }

    .tpl-cat-btn .tpl-cat-badge {
        margin-left: auto;
        font-size: 10px;
        background: #e9ecef;
        color: #6c757d;
        border-radius: 10px;
        padding: 1px 7px;
        font-weight: 600;
        white-space: nowrap;
        transition: background .15s, color .15s;
    }

    .tpl-cat-btn:hover {
        background: #e9ecef;
        color: #212529;
    }

    .tpl-cat-btn.tpl-active {
        background: #0d6efd;
        color: #fff;
    }

        .tpl-cat-btn.tpl-active .tpl-cat-badge {
            background: rgba(255,255,255,.25);
            color: #fff;
        }

/* ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•
   MOBILE  <= 600px
   Sidebar turns into top tab strip
ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג• */
@media (max-width: 600px) {
    .tpl-model-open {
        overflow: hidden;
        height: 100dvh;
        /* ׳׳‘׳˜׳™׳— ׳©׳–׳” ׳™׳™׳ ׳¢׳ ׳’׳ ׳‘׳“׳₪׳“׳₪׳ ׳™׳ ׳©׳ ׳׳•׳‘׳™׳™׳ */
    }

    #projectMap {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        will-change: transform;
    }

    .tpl-modal {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
        max-height: none;
        z-index: 11112;
    }

    .tpl-overlay.tpl-active {
        width: 100vw;
        height: 100dvh;
    }

    .tpl-header {
        padding: 12px 16px 10px;
    }

        .tpl-header h5 {
            font-size: 14px;
        }

        .tpl-header p {
            display: none;
        }

    .tpl-header-icon {
        width: 30px;
        height: 30px;
    }

    .tpl-body {
        flex-direction: column;
        overflow: visible;
    }

    .tpl-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: nowrap;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 8px 10px;
        overflow-x: scroll;
        /* scroll ׳‘׳׳§׳•׳ auto ג€” ׳׳‘׳˜׳™׳— ׳’׳׳™׳׳” ׳×׳׳™׳“ */
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        flex-shrink: 0;
        scrollbar-width: none;
        box-sizing: border-box;
    }

        .tpl-sidebar::-webkit-scrollbar {
            display: none;
        }

    .tpl-sidebar-label {
        display: none;
    }

    #tpl-project-type-list {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: scroll;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
    }

        #tpl-project-type-list::-webkit-scrollbar {
            display: none;
        }

    .tpl-cat-btn {
        flex-direction: row;
        width: auto;
        min-width: max-content;
        /* ג† ׳׳•׳ ׳¢ ׳›׳™׳•׳•׳¥ ׳©׳ ׳”׳›׳₪׳×׳•׳¨ */
        flex-shrink: 0;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 12.5px;
        gap: 6px;
        border: 1.5px solid #e9ecef;
        background: #fff;
    }

        .tpl-cat-btn:hover {
            background: #f1f3f5;
            border-color: #ced4da;
        }

        .tpl-cat-btn.tpl-active {
            background: #0d6efd;
            border-color: #0d6efd;
            color: #fff;
        }

        .tpl-cat-btn .tpl-cat-badge {
            display: none;
        }

        .tpl-cat-btn .tpl-cat-icon {
            width: 18px;
            height: 18px;
        }

            .tpl-cat-btn .tpl-cat-icon svg {
                width: 14px;
                height: 14px;
            }

    .tpl-content {
        padding: 14px 12px;
    }

    .tpl-content-header h6 {
        font-size: 14px;
    }

    .tpl-phases-grid {
        grid-template-columns: 1fr;
        position: relative;
        max-height: 250px;
    }

    .tpl-footer {
        padding: 10px 14px;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 11999;
    }

    .tpl-selection-summary {
        font-size: 12px;
    }

    .tpl-btn-cancel {
        padding: 7px 14px;
        font-size: 12px;
    }

    .tpl-btn-add {
        padding: 7px 16px;
        font-size: 12px;
    }
}

/* ג”€ג”€ Main content area ג”€ג”€ */
.tpl-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    background: #f8fafc;
}

.tpl-content-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8ecf4;
}

    .tpl-content-header h6 {
        font-size: 15px;
        font-weight: 800;
        color: #0f172a;
        margin: 0;
        flex: 1;
    }

    .tpl-content-header span {
        font-size: 11.5px;
        color: #64748b;
        font-weight: 600;
        background: #e8ecf4;
        padding: 4px 12px;
        border-radius: 20px;
        white-space: nowrap;
    }

.tpl-phases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    counter-reset: phase-counter;
}

/* ג”€ג”€ Phase card ג”€ג”€ */
.tpl-phase-card {
    background: #fff;
    border: 1px solid #e4eaf3;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    box-shadow: 0 1px 3px rgba(15,23,42,.05);
    counter-increment: phase-counter;
}

    .tpl-phase-card:hover {
        border-color: #c7d2fe;
        box-shadow: 0 4px 14px rgba(99,102,241,.1);
    }

.tpl-phase-card--selected {
    border-color: #6366f1;
    box-shadow: 0 4px 14px rgba(99,102,241,.2);
}

.tpl-phase-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(90deg, #f8fafc 0%, #fff 100%);
    position: relative;
}

    .tpl-phase-header::before {
        content: counter(phase-counter, decimal-leading-zero);
        font-size: 10px;
        font-weight: 800;
        color: #6366f1;
        background: rgba(99,102,241,.1);
        border-radius: 6px;
        padding: 2px 6px;
        flex-shrink: 0;
        letter-spacing: .3px;
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    }

.tpl-phase-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    flex: 1;
    line-height: 1.3;
}

.tpl-cb {
    width: 15px;
    height: 15px;
    accent-color: #6366f1;
    cursor: pointer;
    flex-shrink: 0;
}

/* ג”€ג”€ Task list ג”€ג”€ */
.tpl-task-list {
    padding: 3px 0;
    max-height: 280px;
    overflow-y: auto;
}

.tpl-task-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 7px 13px;
    border-bottom: 1px solid #f8fafc;
    cursor: pointer;
    transition: background .1s;
}

    .tpl-task-item:last-child {
        border-bottom: none;
    }

    .tpl-task-item:hover {
        background: #eef2ff;
    }

    .tpl-task-item input[type="checkbox"] {
        margin-top: 2px;
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        accent-color: #6366f1;
        cursor: pointer;
    }

    .tpl-task-item label {
        font-size: 12px;
        color: #475569;
        line-height: 1.5;
        cursor: pointer;
        user-select: none;
    }

    .tpl-task-item:has(input:checked) {
        background: #f5f6ff;
    }

        .tpl-task-item:has(input:checked) label {
            color: #4b5563;
        }

/* ג”€ג”€ Footer ג”€ג”€ */
.tpl-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    background: #fff;
}

.tpl-selection-summary {
    font-size: 13px;
    color: #6c757d;
}

    .tpl-selection-summary strong {
        color: #0d6efd;
        font-weight: 700;
    }

.tpl-footer-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.tpl-btn-cancel {
    padding: 8px 18px;
    border: 1.5px solid #dee2e6;
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .tpl-btn-cancel:hover {
        background: #f8f9fa;
        border-color: #ced4da;
    }

.tpl-btn-add {
    padding: 8px 22px;
    border: none;
    background: #0d6efd;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background .15s, transform .1s, box-shadow .15s;
}

    .tpl-btn-add svg {
        width: 15px;
        height: 15px;
        fill: #fff;
    }

    .tpl-btn-add:hover {
        background: #0b5ed7;
        box-shadow: 0 4px 14px rgba(13,110,253,.35);
    }

    .tpl-btn-add:active {
        transform: scale(.97);
    }

    .tpl-btn-add:disabled {
        background: #a8c4fd;
        cursor: not-allowed;
        box-shadow: none;
    }

/* ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•
   Add-Project form body (modern dashboard)
ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג• */
.tpl-form {
    padding: 22px 24px;
}

.tpl-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
}

.tpl-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tpl-field-full {
    grid-column: 1 / -1;
}

.tpl-form .form-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 7px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

    .tpl-form .form-label .text-danger {
        font-weight: 700;
    }

.tpl-form .form-control,
.tpl-form .form-select {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 14px;
    color: #1f2937;
    background-color: #f8fafc;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

    .tpl-form .form-control::placeholder {
        color: #9ca3af;
    }

    .tpl-form .form-control:focus,
    .tpl-form .form-select:focus {
        border-color: #0d6efd;
        background-color: #fff;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
        outline: none;
    }

.tpl-form textarea.form-control {
    resize: vertical;
    min-height: 76px;
    line-height: 1.5;
}

/* input with leading symbol (e.g. $) */
.tpl-input-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

    .tpl-input-prefix > span {
        position: absolute;
        left: 13px;
        font-size: 14px;
        font-weight: 600;
        color: #94a3b8;
        pointer-events: none;
    }

    .tpl-input-prefix .form-control {
        width: 100%;
        padding-left: 26px;
    }

/* customer info card */
.tpl-customer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(13, 110, 253, .05);
    border: 1.5px solid rgba(13, 110, 253, .14);
    border-radius: 12px;
}

.tpl-customer-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8dff, #0d6efd);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(13, 110, 253, .28);
}

.tpl-customer-meta {
    flex: 1;
    min-width: 0;
}

.tpl-customer-change {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1.5px solid #cfe0ff;
    color: #0d6efd;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .tpl-customer-change:hover {
        background: #eef4ff;
        border-color: #0d6efd;
    }

.tpl-customer-name {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    text-transform: capitalize;
}

.tpl-customer-addr {
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}

@media (max-width: 600px) {
    .tpl-field-grid {
        grid-template-columns: 1fr;
    }

    .tpl-form {
        padding: 16px;
    }

    /* keep the form/picker footer in normal flow so its buttons (e.g. Add
       New Customer) aren't hidden behind the fixed template footer */
    .tpl-modal-form .tpl-footer {
        position: static;
        width: auto;
    }
}

/* ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•
   Step 1 ג€” Customer picker
ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג• */
.tpl-customer-picker {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tpl-search {
    position: relative;
    margin-bottom: 14px;
    flex-shrink: 0;
}

    .tpl-search > i {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 15px;
        pointer-events: none;
    }

    .tpl-search input {
        width: 100%;
        border: 1.5px solid #e5e7eb;
        border-radius: 10px;
        padding: 11px 14px 11px 40px;
        font-size: 14px;
        color: #1f2937;
        background-color: #f8fafc;
        transition: border-color .15s, box-shadow .15s, background-color .15s;
    }

        .tpl-search input::placeholder {
            color: #9ca3af;
        }

        .tpl-search input:focus {
            outline: none;
            border-color: #0d6efd;
            background-color: #fff;
            box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
        }

.tpl-customer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    margin-right: -4px;
}

    .tpl-customer-list::-webkit-scrollbar {
        width: 6px;
    }

    .tpl-customer-list::-webkit-scrollbar-thumb {
        background: #dee2e6;
        border-radius: 4px;
    }

.tpl-cust-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 11px 14px;
    border: 1.5px solid #eef1f5;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background-color .15s, transform .1s, box-shadow .15s;
}

    .tpl-cust-row:hover {
        border-color: #bcd4ff;
        background: #f5f9ff;
        box-shadow: 0 2px 8px rgba(13, 110, 253, .08);
    }

    .tpl-cust-row:active {
        transform: scale(.995);
    }

.tpl-cust-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8dff, #0d6efd);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    display: grid;
    place-items: center;
}

.tpl-cust-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.tpl-cust-name {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.25;
    text-transform: capitalize;
}

.tpl-cust-addr {
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .tpl-cust-addr i {
        flex-shrink: 0;
    }

.tpl-cust-chevron {
    margin-left: auto;
    flex-shrink: 0;
    color: #cbd5e1;
    font-size: 14px;
    transition: color .15s, transform .15s;
}

.tpl-cust-row:hover .tpl-cust-chevron {
    color: #0d6efd;
    transform: translateX(2px);
}

.tpl-cust-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    padding: 28px 0;
}

/* add-new-customer button */
.tpl-add-cust-btn {
    margin-top: 10px;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border: 1.5px dashed #c7d2e0;
    border-radius: 12px;
    background: #fff;
    color: #0d6efd;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .tpl-add-cust-btn:hover {
        background: #f5f9ff;
        border-color: #0d6efd;
    }

/* highlight a freshly added customer */
.tpl-cust-new {
    animation: tplCustNew 1.6s ease;
}

@keyframes tplCustNew {
    0% {
        background: #e7f1ff;
        border-color: #0d6efd;
    }

    100% {
        background: #fff;
        border-color: #eef1f5;
    }
}

/* invalid field (new customer form) */
.tpl-form .form-control.tpl-invalid {
    border-color: #ef4444;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

/* back button (step 2 header) */
.tpl-btn-back {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 6px;
    margin-right: 2px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 16px;
    line-height: 1;
    transition: background .15s, color .15s;
}

    .tpl-btn-back:hover {
        background: #f1f3f5;
        color: #343a40;
    }

/* ג”€ג”€ Premium polish (scoped to the Add-Project modal only) ג”€ג”€ */
.tpl-modal-form .tpl-header {
    padding: 20px 24px 18px;
}

.tpl-modal-form .tpl-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f8dff, #0d6efd);
    box-shadow: 0 4px 12px rgba(13, 110, 253, .28);
}

    .tpl-modal-form .tpl-header-icon i {
        font-size: 18px;
        color: #fff;
    }

.tpl-modal-form .tpl-header h5 {
    font-size: 16px;
}

/* input hover */
.tpl-form .form-control:hover:not(:focus),
.tpl-form .form-select:hover:not(:focus) {
    border-color: #cbd5e1;
    background-color: #fff;
}

/* footer + buttons */
.tpl-modal-form .tpl-footer {
    padding: 16px 24px;
    background: #fafbfc;
}

.tpl-modal-form .tpl-btn-cancel {
    padding: 9px 20px;
    font-weight: 600;
}

.tpl-modal-form .tpl-btn-add {
    padding: 9px 24px;
    background: linear-gradient(135deg, #3b82f6, #0d6efd);
    box-shadow: none;
}

    .tpl-modal-form .tpl-btn-add:hover {
        box-shadow: none;
        filter: brightness(1.04);
    }

/* delete button (edit popup footer) */
.tpl-btn-delete {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1.5px solid #fecaca;
    background: #fff;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}

    .tpl-btn-delete:hover {
        background: #fef2f2;
        border-color: #ef4444;
    }

    .tpl-btn-delete.confirming {
        background: #dc2626;
        border-color: #dc2626;
        color: #fff;
    }

        .tpl-btn-delete.confirming:hover {
            background: #b91c1c;
        }

/* customer modal tabs ג†’ segmented control (our style) */
#customerTabs,
#customerEditTabs {
    background: #f1f5f9 !important;
    border-radius: 10px;
    padding: 3px;
    gap: 0;
    border: none;
}

    #customerTabs .nav-link,
    #customerEditTabs .nav-link {
        border: none;
        background: transparent;
        border-radius: 8px !important;
        font-size: 13px;
        font-weight: 600;
        color: #64748b;
        padding: 7px 18px !important;
        transition: background .15s, color .15s, box-shadow .15s;
    }

        #customerTabs .nav-link:hover,
        #customerEditTabs .nav-link:hover {
            color: #1f2937;
        }

        #customerTabs .nav-link.active,
        #customerEditTabs .nav-link.active {
            background: #fff !important;
            color: #0d6efd !important;
            box-shadow: 0 1px 3px rgba(15, 23, 42, .1);
        }

/* ג”€ג”€ .modal-overlay popups: give inputs the same look as our tpl-form ג”€ג”€ */
.modal-overlay .form-control,
.modal-overlay .form-select {
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    background-color: #f8fafc !important;
    padding: 10px 13px !important;
    font-size: 14px;
    color: #1f2937;
    box-shadow: none !important;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

    .modal-overlay .form-control::placeholder {
        color: #9ca3af;
    }

    .modal-overlay .form-control:hover:not(:focus),
    .modal-overlay .form-select:hover:not(:focus) {
        border-color: #cbd5e1 !important;
        background-color: #fff !important;
    }

    .modal-overlay .form-control:focus,
    .modal-overlay .form-select:focus {
        border-color: #0d6efd !important;
        background-color: #fff !important;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, .12) !important;
        outline: none;
    }

.modal-overlay textarea.form-control {
    min-height: 76px;
    line-height: 1.5;
}

.modal-overlay .form-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 7px;
}

/* unify input-groups (icon/$ + field) into a single rounded box */
.modal-overlay .input-group {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

    .modal-overlay .input-group:hover {
        border-color: #cbd5e1;
    }

    .modal-overlay .input-group:focus-within {
        border-color: #0d6efd;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
    }

    .modal-overlay .input-group .form-control,
    .modal-overlay .input-group .form-select {
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .modal-overlay .input-group .input-group-text {
        border: none !important;
        background: transparent !important;
        color: #94a3b8 !important;
        padding-right: 4px;
    }

/* header ג†’ clean tpl style (white, gradient icon) */
.modal-overlay .card-header {
    background: #fff !important;
    padding: 18px 24px !important;
    border-bottom: 1px solid #eef1f5 !important;
}

    .modal-overlay .card-header .bg-primary.bg-opacity-10 {
        background: linear-gradient(135deg, #4f8dff, #0d6efd) !important;
        box-shadow: 0 4px 12px rgba(13, 110, 253, .28);
    }

        .modal-overlay .card-header .bg-primary.bg-opacity-10 i {
            color: #fff !important;
        }

/* segmented toggle (Add Payments / Add Expense) */
.modal-overlay .expens-type {
    display: flex !important;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
    margin: 14px 16px 4px;
}

    .modal-overlay .expens-type .btn {
        flex: 1;
        border: none !important;
        border-radius: 8px !important;
        background: transparent !important;
        color: #64748b !important;
        font-weight: 600;
        font-size: 13px;
        padding: 8px 14px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        box-shadow: none !important;
        transition: background .15s, color .15s, box-shadow .15s;
    }

    .modal-overlay .expens-type .btn-check:checked + .btn {
        background: #fff !important;
        color: #0d6efd !important;
        box-shadow: 0 1px 3px rgba(15, 23, 42, .1) !important;
    }

/* inner form card: softer so it doesn't fight the modal */
.modal-overlay .card-body > .p-4 > .card {
    box-shadow: none !important;
    border-color: #eef1f5 !important;
}

/* solid danger button (confirmation popups) */
.tpl-btn-danger {
    padding: 9px 20px;
    border: none;
    border-radius: 8px;
    background: #dc2626;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

    .tpl-btn-danger:hover {
        background: #b91c1c;
    }

/* ג”€ג”€ Scrollbar ג”€ג”€ */
.tpl-sidebar::-webkit-scrollbar, .tpl-content::-webkit-scrollbar {
    width: 5px;
}

.tpl-sidebar::-webkit-scrollbar-thumb, .tpl-content::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

/* ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•
   Customers page ג€” KPI stats + card hover
ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג• */
.cust-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    transition: box-shadow .18s ease, transform .18s ease;
}

    .cust-stat-card:hover {
        box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
        transform: translateY(-2px);
    }

.cust-stat-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: var(--c, #0d6efd);
    background: var(--cbg, rgba(13, 110, 253, .1));
}

.cust-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.cust-stat-label {
    font-size: 12.5px;
    font-weight: 500;
    color: #64748b;
    margin-top: 4px;
}

/* customer cards: subtle hover lift */
#customersGrid .card {
    transition: transform .18s ease, box-shadow .18s ease;
}

    #customersGrid .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 32px rgba(15, 23, 42, .1) !important;
    }

/* avatar: stronger gradient ring */
#customersGrid .card-body .rounded-circle.text-white {
    box-shadow: 0 6px 16px rgba(13, 110, 253, .32) !important;
}

/* phone / active-projects stat boxes */
#customersGrid .p-3.bg-light.rounded-3 {
    border: 1px solid #eef1f5;
    transition: border-color .15s, background-color .15s;
}

    #customersGrid .p-3.bg-light.rounded-3:hover {
        border-color: #dbe3ee;
    }

/* recent-project rows with progress bars */
.cust-proj-row {
    padding: 2px 2px 4px;
}

.cust-proj-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.cust-proj-pct {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    flex-shrink: 0;
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
}

.cust-progress {
    height: 6px;
    border-radius: 6px;
    background: #eef1f5;
    overflow: hidden;
}

.cust-progress-bar {
    height: 100%;
    border-radius: 6px;
    transition: width .4s ease;
}

/* ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•
   Projects list page ג€” modern cards
ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג• */
#projectsGrid .card-project {
    border: 1px solid #eef1f5 !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04) !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}

    #projectsGrid .card-project:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 32px rgba(15, 23, 42, .1) !important;
        border-color: #e3e9f2 !important;
    }

#projectsGrid .card-body {
    display: flex;
    flex-direction: column;
    padding: 18px;
}

#projectsGrid .card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    text-transform: capitalize;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#projectsGrid .status-badge {
    font-size: 11px !important;
    font-weight: 700;
    padding: 4px 11px !important;
    border-radius: 20px !important;
    white-space: nowrap;
    flex-shrink: 0;
}

    #projectsGrid .status-badge.st-planned {
        background: rgba(13, 110, 253, .12) !important;
        color: #0d6efd !important;
    }

    #projectsGrid .status-badge.st-progress {
        background: rgba(245, 158, 11, .16) !important;
        color: #b45309 !important;
    }

    #projectsGrid .status-badge.st-completed {
        background: rgba(16, 185, 129, .16) !important;
        color: #047857 !important;
    }

    #projectsGrid .status-badge.st-hold {
        background: rgba(100, 116, 139, .16) !important;
        color: #475569 !important;
    }

    #projectsGrid .status-badge.st-none {
        background: #f1f5f9 !important;
        color: #94a3b8 !important;
    }

#projectsGrid .card-body small.text-muted {
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 700;
    color: #94a3b8 !important;
}

/* the "Description" label sits directly in the card body ג€” make it a tight block */
#projectsGrid .card-body > small.text-muted {
    display: block;
    margin-bottom: 5px;
}

/* drop the stray <br> after the Description label (it doubled the gap) */
#projectsGrid .card-body > br {
    display: none;
}

#projectsGrid .card-body p.text-muted {
    overflow: hidden !important;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b !important;
    margin: 0 0 16px;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

    #projectsGrid .card-body p.text-muted.proj-desc-empty {
        font-style: italic;
        color: #cbd5e1 !important;
    }

#projectsGrid .card-body a[href*="/maps/"] {
    color: #64748b;
    text-decoration: none;
}

    #projectsGrid .card-body a[href*="/maps/"]:hover {
        color: #0d6efd;
    }

/* client row + avatar (injected by JS) */
#projectsGrid .proj-client-row {
    align-items: center !important;
}

#projectsGrid .proj-client-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8dff, #0d6efd);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    display: grid;
    place-items: center;
    margin-right: 10px;
}

#projectsGrid .proj-client-row span:not(.proj-client-avatar) {
    text-transform: capitalize;
    font-weight: 600;
    color: #1f2937 !important;
}

/* footer actions */
#projectsGrid .align-bottom {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f3f5;
}

    #projectsGrid .align-bottom a[href*="editproject"] {
        font-size: 12.5px;
        font-weight: 600;
        color: #64748b;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

        #projectsGrid .align-bottom a[href*="editproject"]:hover {
            color: #0d6efd;
        }

#projectsGrid .proj-edit-btn {
    border-radius: 9px;
    font-weight: 600;
    font-size: 12.5px;
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•
   Projects ג€” alternate table view
ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג• */
.proj-listview {
    margin-top: 28px;
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    overflow: hidden;
}

.proj-listview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f3f5;
}

    .proj-listview-head h5 {
        font-size: 15px;
        font-weight: 700;
        color: #1f2937;
        margin: 0;
    }

    .proj-listview-head p {
        font-size: 12px;
        color: #94a3b8;
        margin: 2px 0 0;
    }

.proj-listview-count {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 20px;
}

.proj-thead,
.proj-trow {
    display: grid;
    grid-template-columns: 2.4fr 1.4fr 2fr 1fr 92px;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
}

.proj-thead {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 700;
    color: #94a3b8;
    background: #fafbfc;
    border-bottom: 1px solid #f1f3f5;
}

.proj-trow {
    border-bottom: 1px solid #f4f6f9;
    transition: background .15s;
}

    .proj-trow:last-child {
        border-bottom: none;
    }

    .proj-trow:hover {
        background: #f8fbff;
    }

.proj-col-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.proj-row-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 9px;
    background: rgba(13, 110, 253, .1);
    color: #0d6efd;
    display: grid;
    place-items: center;
    font-size: 15px;
}

.proj-row-main-text {
    min-width: 0;
}

.proj-row-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1f2937;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proj-row-sub {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.proj-col-client {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.proj-row-avatar {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8dff, #0d6efd);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: grid;
    place-items: center;
}

.proj-row-client-name {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proj-col-loc {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #64748b;
    min-width: 0;
}

    .proj-col-loc i {
        flex-shrink: 0;
        color: #94a3b8;
    }

    .proj-col-loc span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.proj-col-status .proj-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 20px;
    white-space: nowrap;
}

.proj-status.st-planned {
    background: rgba(13, 110, 253, .12);
    color: #0d6efd;
}

.proj-status.st-progress {
    background: rgba(245, 158, 11, .16);
    color: #b45309;
}

.proj-status.st-completed {
    background: rgba(16, 185, 129, .16);
    color: #047857;
}

.proj-status.st-hold {
    background: rgba(100, 116, 139, .16);
    color: #475569;
}

.proj-status.st-none {
    background: #f1f5f9;
    color: #94a3b8;
}

.proj-col-act {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.proj-row-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    display: grid;
    place-items: center;
    color: #64748b;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s, border-color .15s, color .15s;
}

    .proj-row-btn:hover {
        background: #f8fafc;
        color: #1f2937;
        border-color: #cbd5e1;
    }

.proj-row-btn-edit:hover {
    color: #0d6efd;
    border-color: #0d6efd;
    background: #eef4ff;
}

@media (max-width: 800px) {
    .proj-thead {
        display: none;
    }

    /* light tray behind the cards for contrast */
    .proj-table {
        background: #f4f6fa;
        padding: 12px;
    }

    /* each project becomes a distinct white card */
    .proj-trow {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "main status"
            "client client"
            "loc loc"
            "act act";
        column-gap: 12px;
        row-gap: 11px;
        padding: 16px;
        background: #fff;
        border: 1px solid #e6eaf1;
        border-radius: 14px;
        margin-bottom: 18px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    }

        .proj-trow:last-child {
            margin-bottom: 0;
            border-bottom: 1px solid #e6eaf1;
        }

        /* alternate cards get a subtle gray tint for extra separation */
        .proj-trow:nth-child(odd) {
            background: #f3f4f6;
        }

    .proj-col-main {
        grid-area: main;
    }

    .proj-col-status {
        grid-area: status;
        justify-self: end;
        align-self: start;
    }

    .proj-col-client {
        grid-area: client;
        padding-top: 13px;
        border-top: 1px solid #eef1f5;
    }

    .proj-col-loc {
        grid-area: loc;
    }

        .proj-col-loc span {
            white-space: normal;
        }

    .proj-col-act {
        grid-area: act;
        justify-content: flex-start;
        gap: 8px;
        padding-top: 2px;
    }

    /* let the title wrap to 2 lines on narrow screens */
    .proj-row-title {
        white-space: normal;
        line-height: 1.3;
    }

    /* larger, finger-friendly action buttons */
    .proj-row-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
}

/* ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•
   Calendar page
ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג•ג• */
.cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cal-today-btn {
    padding: 8px 16px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

    .cal-today-btn:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
    }

.cal-arrow {
    width: 36px;
    height: 36px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #475569;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

    .cal-arrow:hover {
        background: #f8fafc;
        color: #0d6efd;
        border-color: #cbd5e1;
    }

.cal-title {
    font-size: 20px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 0 6px;
    letter-spacing: -.3px;
}

.cal-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cal-views {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
}

.cal-view-btn {
    padding: 7px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}

    .cal-view-btn.active {
        background: #fff;
        color: #0d6efd;
        box-shadow: 0 1px 3px rgba(15, 23, 42, .1);
    }

.cal-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #0d6efd);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s;
}

    .cal-add-btn:hover {
        filter: brightness(1.05);
    }

.cal-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.cal-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: opacity .15s, border-color .15s, color .15s;
}

    .cal-legend-item.active {
        color: #1f2937;
        border-color: #cbd5e1;
    }

    .cal-legend-item:not(.active) {
        opacity: .45;
    }

.cal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.cal-card {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    overflow: hidden;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fafbfc;
    border-bottom: 1px solid #eef1f5;
}

.cal-weekday {
    padding: 12px 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #94a3b8;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-cell {
    min-width:13%;
    min-height: 118px;
    border-right: 1px solid #f1f3f5;
    border-bottom: 1px solid #f1f3f5;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: background .12s;
}

    .cal-cell:nth-child(7n) {
        border-right: none;
    }

    .cal-cell:hover {
        background: #fafcff;
    }

.cal-other {
    background: #fafbfc;
}

    .cal-other .cal-date-num {
        color: #cbd5e1;
    }

.cal-date {
    display: flex;
}

.cal-date-num {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.cal-today .cal-date-num {
    background: #0d6efd;
    color: #fff;
}

.cal-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.cal-event {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    background: #eef2ff;
    border-left: 3px solid #0d6efd;
    transition: filter .12s;
}

    .cal-event:hover {
        filter: brightness(.96);
    }

.cal-ev-time {
    font-weight: 700;
    opacity: .8;
    font-size: 10.5px;
    flex-shrink: 0;
}

.cal-ev-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-ev-project {
    background: #eaf1ff;
    border-left-color: #0d6efd;
    color: #1e40af;
}

.cal-ev-task {
    background: #fff4e3;
    border-left-color: #f59e0b;
    color: #92400e;
}

.cal-ev-lead {
    background: #e7f8f0;
    border-left-color: #10b981;
    color: #065f46;
}

.cal-more {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    padding: 1px 7px;
}

    .cal-more:hover {
        color: #0d6efd;
    }

/* ג”€ג”€ List / agenda view ג”€ג”€ */
.cal-list {
    padding-bottom: 6px;
}

.cal-list-date {
    padding: 14px 20px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.cal-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    cursor: pointer;
    border-top: 1px solid #f4f6f9;
    transition: background .12s;
}

    .cal-list-item:hover {
        background: #f8fbff;
    }

.cal-list-time {
    font-size: 12.5px;
    font-weight: 700;
    color: #475569;
    width: 64px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.cal-list-bar {
    width: 4px;
    height: 38px;
    border-radius: 4px;
    flex-shrink: 0;
}

.cal-list-main {
    min-width: 0;
    flex: 1;
}

.cal-list-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-list-sub {
    font-size: 12.5px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.cal-list-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 20px;
}

    .cal-list-badge.t-project {
        background: rgba(13, 110, 253, .12);
        color: #0d6efd;
    }

    .cal-list-badge.t-task {
        background: rgba(245, 158, 11, .16);
        color: #b45309;
    }

    .cal-list-badge.t-lead {
        background: rgba(16, 185, 129, .16);
        color: #047857;
    }

.cal-list-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 13.5px;
    padding: 48px 20px;
}

    .cal-list-empty i {
        font-size: 30px;
        color: #cbd5e1;
        display: block;
        margin-bottom: 10px;
    }

/* ג”€ג”€ Event detail modal rows ג”€ג”€ */
.cal-ev-detail {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f5;
}

    .cal-ev-detail:last-child {
        border-bottom: none;
    }

    .cal-ev-detail > i {
        font-size: 16px;
        color: #94a3b8;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
        margin-top: 2px;
    }

.cal-ev-detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 700;
    color: #94a3b8;
}

.cal-ev-detail-val {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
    margin-top: 2px;
}

.cal-ev-workers-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.cal-ev-worker-chip {
    display: flex;
    align-items: center;
    gap: 9px;
}

.cal-ev-worker-av {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.cal-ev-worker-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}

.cal-ev-worker-role {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ג”€ג”€ Day modal list ג”€ג”€ */
.cal-day-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cal-day-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid #eef1f5;
    border-radius: 11px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}

    .cal-day-item:hover {
        border-color: #cfe0ff;
        background: #f8fbff;
    }

.cal-day-bar {
    width: 4px;
    height: 34px;
    border-radius: 4px;
    flex-shrink: 0;
}

@media (max-width: 800px) {
    .cal-cell {
        min-height: 86px;
        padding: 5px;
        gap: 4px;
    }

    .cal-date-num {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .cal-event {
        padding: 2px 5px;
        font-size: 10.5px;
    }

    .cal-ev-time {
        display: none;
    }

    .cal-title {
        font-size: 17px;
    }

    .cal-weekday {
        font-size: 10px;
        padding: 9px 4px;
    }

    .cal-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* ג”€ג”€ New-event: workers field (chips + multi-select) ג”€ג”€ */
.evc-workers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    padding: 8px;
    min-height: 48px;
}

.evc-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid #e5e9f0;
    border-radius: 20px;
    padding: 4px 6px 4px 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.evc-chip-av {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8dff, #0d6efd);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.evc-chip button {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    transition: background .15s, color .15s;
}

    .evc-chip button:hover {
        background: #fef2f2;
        color: #ef4444;
    }

.evc-add-workers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1.5px dashed #c7d2e0;
    background: #fff;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: #0d6efd;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .evc-add-workers:hover {
        background: #f5f9ff;
        border-color: #0d6efd;
    }

/* worker rows reuse .tpl-cust-row; checkbox indicator on the right */
.evc-check {
    margin-left: auto;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 12px;
    transition: background .15s, border-color .15s;
}

    .evc-check i {
        opacity: 0;
        transition: opacity .12s;
    }

.evc-worker-row.selected {
    border-color: #bcd4ff;
    background: #f5f9ff;
}

    .evc-worker-row.selected .evc-check {
        background: #0d6efd;
        border-color: #0d6efd;
    }

        .evc-worker-row.selected .evc-check i {
            opacity: 1;
        }
