/* ===== System-wide Custom Tooltip (data-tooltip) ===== */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::before,
[data-tooltip]::after {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: 50%;
    z-index: 100000;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
/* Tooltip bubble */
[data-tooltip]::before {
    content: attr(data-tooltip);
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(8px);
    padding: .5rem 1rem;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background-color: var(--primary);
    color: var(--white);
}
/* Tooltip arrow – flush with bubble bottom (1px overlap to avoid gap) */
[data-tooltip]::after {
    content: "";
    bottom: calc(100% + 5px);
    width: 14px;
    height: 8px;
    margin-left: -7px;
    background-color: var(--primary);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    transform: translateY(8px);
}

/* Optional light tooltip variant */
[data-tooltip][data-tooltip-variant="light"]::before {
    background-color: var(--white);
    color: var(--primary);
    border: 1px solid var(--border-soft);
    font-weight: 700;
}

[data-tooltip][data-tooltip-variant="light"]::after {
    background-color: var(--white);
    filter: drop-shadow(0px 1px 0px var(--border-soft));
}
/* Show on hover */
[data-tooltip]:hover::before {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
[data-tooltip]:hover::after {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Header top-left icons are at the viewport edge: show tooltip below them */
.app-header .left-nav.mobile-hidden .top-btn[data-tooltip]::before {
    top: calc(100% + 17px);
    bottom: auto;
    transform: translateX(-50%) translateY(-8px);
    border: 1px solid #43506e;
}

.app-header .left-nav.mobile-hidden .top-btn[data-tooltip]::after {
    top: calc(100% + 10px);
    bottom: auto;
    width: 16px;
    height: 10px;
    margin-left: -8px;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M8 0L16 10H0Z' fill='%231E4E84'/%3E%3Cpath d='M8 0L12.6 5.8M8 0L3.4 5.8' stroke='%23FFFFFF' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    clip-path: none;
    transform: translateY(-8px);
    filter: none;
}

/* Top bar icons: push tooltip 10px lower (from original) */
.app-header .top-btn[data-tooltip]::before {
    top: calc(100% + 22px);
}

.app-header .top-btn[data-tooltip]::after {
    top: calc(100% + 15px);
}
/* Hide when tooltip text is empty */
[data-tooltip=""]::before,
[data-tooltip=""]::after {
    display: none;
}

#screen-leads .table-row > div[data-label="צפייה"] .btn.icon-only.inline-edit-icon[data-tooltip="צפייה בליד"]::before,
#screen-leads .table-row > div[data-label="צפייה"] .btn.icon-only.inline-edit-icon[data-tooltip="צפייה בליד"]::after {
    left: calc(50% - 1rem);
}

:root {
    /* Shared desktop table styling tokens (no hard-coded colors) */
    --table-radius: 1.25rem;
    --table-card-pad: 1rem;
    --table-row-min-height: 78px;
    --table-border-outline: var(--border-soft);
    --table-border-header: var(--lighter);
    --table-border-row: var(--lightblue2);
    --table-hover-bg: var(--lightblue2);
    --table-head-text: var(--text1);
    --table-row-text: var(--text1);
    --table-sort-icon-color: var(--text-muted);
    --table-head-pad-y: 14px;
    --table-row-pad-y: 16px;
    --table-cell-pad-x: 20px;
    --table-head-font-size: clamp(14px, 2.3vw, 15px);
}

.input,
.control,
textarea.input,
select.input,
.form-control,
.tw-dp-trigger {
    width: 100%;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background-color: #fdfdfd;
    box-sizing: border-box;
}

.tw-dp-native {
    display: none;
}

input.input,
input.control,
input.form-control,
.tw-dp-trigger {
    height: 42px;
    padding: 0 12px;
}

select.input,
select.form-control {
    height: 42px;
    padding-right: 12px;
    padding-left: 2rem;
}

textarea.input,
textarea.form-control {
    padding: 10px 12px;
}

.input:focus,
textarea.input:focus,
select.input:focus,
.form-control:focus,
.tw-dp-trigger:focus {
    background-color: var(--white);
}

/* tw date picker: optional popover scaling (applied per-screen via JS) */
.tw-dp-popover.tw-dp-popover--scale-130 {
    transform: scale(1.3);
    transform-origin: top right;
}

.tw-dp-popover.tw-dp-popover--meetings-mobile-centered {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) scale(1.12);
    transform-origin: top center;
}

body.meeting-add-date-mode .tw-dp-popover.tw-dp-popover--meetings-mobile-centered .tw-dp-foot {
    display: none !important;
}

.tw-dp-day.tw-dp-day-empty {
    color: transparent !important;
    background: transparent !important;
    border-color: transparent !important;
    pointer-events: none !important;
}

@media (min-width: 901px) {
    .table {
        background: var(--white);
        border: none;
        border-radius: 1rem;
        overflow: hidden;
        box-shadow: 0 4px 20px var(--primary-4);
    }

    .table-head {
        color: #94a3b8;
        font-weight: 700;
        letter-spacing: 0.05em;
        font-size: 0.75rem;
        line-height: 1rem;
        background: #fafbfb;
        border-bottom: 1px solid #f1f5f9;
    }

    .table-row {
        color: var(--table-row-text);
        font-size: 15px;
        border-bottom: 1px solid var(--table-border-row);
        transition: background-color 0.16s ease;
        min-height: var(--table-row-min-height);
    }

    .table-row:last-child {
        border-bottom: none;
    }


/* ===== Minimal Rich Text (used by documents editor) ===== */
.richtext-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--white);
    /* overflow: visible so toolbar tooltips are not clipped */
    overflow: visible;
}

.richtext-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    direction: ltr;
    background: var(--bg-app);
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 10px 10px 0 0;
    position: relative;
    z-index: 1;
}

/* Toolbar icon buttons */
.rte-btn {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text1);
    height: 34px;
    min-width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: 0.2s;
    padding: 0;
}

.rte-btn:hover {
    background: var(--lighter);
    color: var(--primary);
    border-color: var(--primary);
}

.rte-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.invite-public-page {
    background-color: var(--lighter);
    color: var(--black);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.invite-public-page .invitation-card {
    width: 100%;
    max-width: 480px;
    background-color: var(--white);
    min-height: 100vh;
    box-shadow: 0 0 40px rgb(17 24 39 / 8%);
    display: flex;
    flex-direction: column;
    margin-top: 0;
    padding-top: 0;
}

.invite-public-page .hero-image {
    width: 100%;
    min-height: 300px;
    background-image: url('https://images.unsplash.com/photo-1519741497674-611481863552?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center 20%;
    position: relative;
    margin-top: 0;
    padding-top: 0;
}

.invite-public-page .hero-image::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgb(255 255 255 / 0%) 0%, rgb(255 255 255 / 100%) 100%);
}

.invite-public-page .content-section {
    padding: 35px 25px 10px 25px;
    margin-top: 5px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.invite-public-page .subtitle {
    font-size: 16px;
    color: var(--text1);
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.4;
}

.invite-public-page #event-hebrew-date {
    font-size: 17px;
    color: var(--primary);
}

.invite-public-page #event-subtitle > div {
    margin-top: 10px;
}

.invite-public-page .names {
    font-size: 46px;
    font-weight: 900;
    color: var(--black);
    margin-top: 14px;
    margin-bottom: 15px;
    letter-spacing: -1px;
    line-height: 1;
}

.invite-public-page .date-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgb(17 24 39 / 4%);
}

.invite-public-page #event-date-text,
.invite-public-page #event-date {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    text-align: left;
}

.invite-public-page .calendar-icon {
    color: var(--primary);
}

.invite-public-page .location-title {
    font-size: 14px;
    color: var(--text1);
    font-weight: 600;
    margin-bottom: 5px;
}

.invite-public-page .location-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 20px;
}

.invite-public-page .location-address {
    font-size: 15px;
    color: var(--black);
    font-weight: 500;
    margin-top: -14px;
    margin-bottom: 14px;
    display: none;
    white-space: pre-line;
}

.invite-public-page .btn-waze {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: var(--white);
    border: 2px solid var(--primary-1);
    border-radius: 50px;
    color: var(--black);
    font-family: 'Heebo', "Noto Sans Hebrew", Arial, sans-serif;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: 0.2s;
    cursor: pointer;
}

.invite-public-page .waze-icon {
    color: var(--indicator);
    font-size: 20px;
}

.invite-public-page .btn-waze:active {
    transform: scale(0.95);
    background: var(--bg-app);
}

.invite-public-page #btn-whatsapp-share {
    background: linear-gradient(135deg, var(--lbl14), var(--lbl1));
    border-color: transparent;
    color: var(--white);
    margin-top: 12px;
}

.invite-public-page #btn-whatsapp-share i {
    color: var(--white);
}

.invite-public-page #btn-whatsapp-share:active {
    transform: scale(0.95);
    background: var(--lbl14);
}

.invite-public-page .btn-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    margin-top: 30px;
    background: linear-gradient(135deg, var(--btn-primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-family: 'Heebo', "Noto Sans Hebrew", Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 10px 20px var(--primary-2);
}

.invite-public-page .btn-primary:active {
    transform: scale(0.97);
}

.invite-public-page .divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-soft), transparent);
    margin: 30px 0;
}

.invite-public-page .rsvp-section {
    display: none;
    padding: 0 25px 40px 25px;
    text-align: right;
    animation: invite-slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes invite-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.invite-public-page .form-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--primary);
}

.invite-public-page .input-group {
    margin-bottom: 20px;
}

.invite-public-page .input-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text1);
    margin-bottom: 8px;
}

.invite-public-page .status-label {
    margin-bottom: 12px;
}

.invite-public-page .form-control {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--bg-app);
    font-family: 'Heebo', "Noto Sans Hebrew", Arial, sans-serif;
    font-size: 15px;
    color: var(--black);
    transition: 0.2s;
    outline: none;
    min-height: 54px;
}

.invite-public-page .form-control:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-1);
}

.invite-public-page .form-control[aria-invalid="true"] {
    border-color: var(--red);
    box-shadow: 0 0 0 4px var(--primary-1);
}

.invite-public-page .field-error-message {
    min-height: 20px;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--red);
}

.invite-public-page .field-error-message:empty {
    display: none;
}

.invite-public-page textarea.form-control {
    resize: none;
    min-height: 110px;
}

.invite-public-page .status-options {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.invite-public-page .status-btn {
    flex: 1;
    padding: 15px 5px;
    border: 2px solid var(--border-soft);
    border-radius: 16px;
    background: var(--white);
    color: var(--text1);
    font-family: 'Heebo', "Noto Sans Hebrew", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.invite-public-page .status-btn i {
    font-size: 22px;
}

.invite-public-page .status-btn.active[data-val="yes"] {
    border-color: var(--lbl1);
    color: var(--lbl14);
    background: var(--lbl13);
    box-shadow: 0 4px 15px rgb(22 163 74 / 15%);
}

.invite-public-page .status-btn.active[data-val="maybe"] {
    border-color: var(--lbl4);
    color: var(--lbl4);
    background: var(--yellow);
    box-shadow: 0 4px 15px rgb(247 189 106 / 15%);
}

.invite-public-page .status-btn.active[data-val="no"] {
    border-color: var(--lbl8);
    color: var(--lbl8);
    background: var(--lbl9);
    box-shadow: 0 4px 15px rgb(239 68 68 / 15%);
}

.invite-public-page #dynamic-fields {
    display: none;
    animation: invite-fade-down 0.4s ease forwards;
}

@keyframes invite-fade-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.invite-public-page .counter-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-soft);
    padding: 12px 20px;
    border-radius: 16px;
    margin-bottom: 25px;
}

.invite-public-page .counter-icon {
    color: var(--primary);
    font-size: 20px;
}

.invite-public-page .counter-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.invite-public-page .btn-count {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary-1);
    color: var(--primary);
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.1s;
}

.invite-public-page .btn-count:active {
    transform: scale(0.9);
    background: var(--primary);
    color: var(--white);
}

.invite-public-page .count-val {
    font-size: 20px;
    font-weight: 900;
    width: 20px;
    text-align: center;
}

.invite-public-page .question-box {
    margin-bottom: 25px;
}

.invite-public-page .pills-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.invite-public-page .pill {
    padding: 10px 20px;
    border: 1px solid var(--border-soft);
    border-radius: 50px;
    background: var(--white);
    color: var(--text1);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.invite-public-page .pill.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 10px var(--primary-2);
}

.invite-public-page .btn-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--btn-primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-family: 'Heebo', "Noto Sans Hebrew", Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 10px 20px var(--primary-2);
}

.invite-public-page .btn-submit:active {
    transform: scale(0.97);
}

.invite-public-page #success-screen {
    display: none;
    text-align: center;
    padding: 60px 20px;
    animation: invite-fade-down 0.5s forwards;
    background: var(--white);
    height: 100%;
}

.invite-public-page .success-icon {
    width: 80px;
    height: 80px;
    background: var(--lbl11);
    color: var(--lbl14);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    margin: 0 auto 20px auto;
}

.invite-public-page .success-icon.is-neutral {
    background: var(--lightgray);
    color: var(--text1);
}

.invite-public-page .success-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--black);
    margin-bottom: 15px;
}

.invite-public-page .success-message {
    color: var(--text1);
    font-size: 16px;
    line-height: 1.5;
}

.invite-manage-page .manage-panel {
    display: block;
}

.invite-manage-page .manage-status-filter,
.invite-manage-page .manage-status-picker {
    margin-bottom: 20px;
}

.invite-manage-page .manage-status-filter .status-btn,
.invite-manage-page .manage-status-picker .status-btn {
    padding: 12px 8px;
}

.invite-manage-page .manage-table-wrap {
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
    background: var(--white);
}

.invite-manage-page .manage-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.invite-manage-page .manage-table th,
.invite-manage-page .manage-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-soft);
    text-align: right;
    font-size: 14px;
    color: var(--text1);
    word-wrap: break-word;
}

.invite-manage-page .manage-table th {
    background: var(--bg-app);
    color: var(--black);
    font-weight: 800;
}

.invite-manage-page .manage-table tbody tr:last-child td {
    border-bottom: none;
}

.invite-system-note-host {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 80px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.invite-system-note {
    font-family: 'Assistant', 'Rubik', 'Segoe UI', Tahoma, sans-serif;
    width: 340px;
    min-height: 0;
    padding: 18px 20px;
    border-radius: 12px;
    background: #f0e9f7;
    color: #3C4257;
    border-right: 8px solid #5A3DE8;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    direction: rtl;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-14px);
    transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1), transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    box-sizing: border-box;
}

.invite-system-note.visible {
    opacity: 1;
    transform: translateY(0);
}

.invite-system-note.hiding {
    opacity: 0;
    transform: translateY(-14px);
}

.invite-system-note-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
    padding-left: 20px;
}

.invite-system-note-title {
    margin: 0;
    color: #3C4257;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 4px;
}

.invite-system-note-desc {
    margin-top: 0;
    color: #697386;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 400;
}

.invite-system-note-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F1EDFF;
    color: #5A3DE8;
    flex: 0 0 46px;
    margin-left: 18px;
}

.invite-system-note-icon svg {
    width: 24px;
    height: 24px;
}

.invite-system-note-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #A3ACBA;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

/* JS-driven tooltip (appended to body, position:fixed) */
.rte-tooltip-fly {
    position: fixed;
    z-index: 99999;
    background: #1e293b;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    direction: rtl;
    transform: translateX(-50%);
    transition: opacity 0.1s;
}

/* Toolbar select */
.rte-select {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text1);
    height: 34px;
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    transition: 0.2s;
}

.rte-select:hover {
    border-color: var(--primary);
}

.rte-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

/* Toolbar separator */
.rte-separator {
    width: 1px;
    height: 22px;
    background: var(--border-soft);
    margin: 0 4px;
    flex-shrink: 0;
}

.richtext-editor {
    min-height: 110px;
    padding: 14px 16px;
    border: none;
    border-radius: 0 0 10px 10px;
    background: var(--white);
    color: var(--black);
    line-height: 1.7;
    outline: none;
    overflow: auto;
}

.richtext-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--placeholder);
}

.rt-fs-12 { font-size: 12px; }
.rt-fs-14 { font-size: 14px; }
.rt-fs-16 { font-size: 16px; }
.rt-fs-18 { font-size: 18px; }
.rt-fs-20 { font-size: 20px; }
    .table-row:hover {
        background: var(--table-hover-bg);
    }
}

/* Inline editable components */
.inline-editable-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

@media (min-width: 769px) {
    .inline-editable-container {
        padding-left: 22px;
    }
}

.inline-editable-display,
.inline-editable-input,
.inline-editable-picker {
    flex: 1;
    min-width: 0;
}

.inline-editable-input,
.inline-editable-picker {
    display: none;
}

.inline-editable-picker.is-active {
    display: block;
}

.inline-editable-input.is-editing {
    display: block;
}

.inline-editable-picker:not(.hidden) {
    display: block;
}

.inline-editable-input.editing {
    display: block;
}

.inline-editable-display.hidden {
    display: none;
}

.inline-editable-display.no-value {
    color: var(--text-secondary);
}

.inline-editable-picker .tw-dp-root {
    width: 100%;
}

.inline-editable-picker .tw-date-picker,
.inline-editable-picker .tw-time-picker {
    width: 100%;
}

.inline-editable-picker .tw-tp-wrapper {
    width: 100%;
}

/* Edit icon button */
.btn.icon-only.edit-icon-btn {
    transition: opacity 0.2s;
    padding: 3px;
    min-height: unset;
    height: 18px;
    width: 18px;
    position: absolute;
    left: 0;
}

.btn.icon-only.edit-icon-btn svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Desktop: hide by default, show on row hover */
.btn.icon-only.edit-icon-btn.task-edit-desktop {
    opacity: 0;
    pointer-events: none;
}

/* Mobile: always visible with opacity */
.btn.icon-only.edit-icon-btn.task-edit-mobile {
    opacity: 0.7;
    position: static;
}

.btn.icon-only.edit-icon-btn.visible,
.btn.icon-only.edit-icon-btn.task-edit-mobile.visible {
    opacity: 1;
}

/* Task inline edit components */
.task-inline-edit,
.task-inline-edit-date {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.task-inline-edit-date {
    min-height: 40px;
}

.task-edit-display {
    flex: 1;
    min-width: 0;
}

.task-edit-display.empty {
    color: var(--text-secondary);
}

.task-edit-input,
.task-edit-picker {
    flex: 0 1 auto;
    min-width: 200px;
    max-width: 400px;
}

.task-edit-picker .tw-dp-root {
    width: 100%;
}

.task-edit-icon {
    opacity: 0;
    transition: opacity 0.2s;
    padding: 3px;
    min-height: unset;
    height: 18px;
    width: 18px;
    position: absolute;
    left: 0;
    pointer-events: none;
}

.task-inline-edit:hover .task-edit-icon,
.task-inline-edit-date:hover .task-edit-icon {
    opacity: 1;
    pointer-events: auto;
}

/* Prevent hover-flicker: show edit icons when hovering the whole task row/card,
   so moving the cursor from the date text to the pencil doesn't hide it. */
#screen-tasks .table-row:hover .task-inline-edit .task-edit-icon,
#screen-tasks .table-row:hover .task-inline-edit-date .task-edit-icon,
#screen-tasks .task-list-item:hover .task-inline-edit .task-edit-icon,
#screen-tasks .task-list-item:hover .task-inline-edit-date .task-edit-icon,
.task-card:hover .task-inline-edit .task-edit-icon,
.task-card:hover .task-inline-edit-date .task-edit-icon {
    opacity: 1;
    pointer-events: auto;
}

.task-edit-icon.hidden-mobile {
    display: none;
}

.task-source {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 4px;
}

.task-master-edit {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px;
    min-height: unset;
    height: 20px;
    width: 20px;
    opacity: 0.5;
    z-index: 10;
    background: transparent;
    border: none;
}

.task-master-edit:hover {
    opacity: 1;
}

.task-master-edit svg {
    width: 100%;
    height: 100%;
    fill: var(--text1);
}

#screen-tasks .table-row {
    position: relative;
}

@media (min-width: 768px) {
    #screen-tasks .task-inline-edit-date {
        width: auto;
    }

    #screen-tasks .task-inline-edit-date .task-edit-display {
        flex: 0 1 auto;
    }

    #screen-tasks .task-inline-edit-date .task-edit-icon {
        position: static;
        flex: 0 0 auto;
    }

    .task-edit-icon.hidden-mobile {
        display: block;
    }
    
    .task-master-edit {
        display: none;
    }
}

@media (max-width: 768px) {
    .task-edit-icon {
        opacity: 0.5;
        pointer-events: auto;
    }
    
    .task-master-edit {
        display: block;
    }
}

/* Task source (related entity info) */
.task-source {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 4px;
}

@media (min-width: 769px) {
    .table-row:hover .btn.icon-only.edit-icon-btn.task-edit-desktop {
        opacity: 1;
        pointer-events: auto;
    }
    
    .task-source {
        display: none;
    }

    .table-head > div {
        padding: var(--table-head-pad-y) var(--table-cell-pad-x);
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: .5rem;
        flex-direction: row;
    }

    .table-row > div {
        padding: var(--table-row-pad-y) var(--table-cell-pad-x);
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: .5rem;
        min-width: 0;
    }

    .sort-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        color: var(--table-sort-icon-color);
        opacity: 0.6;
        order: -1; /* icon first (right side in RTL) */
    }

    .sort-icon svg {
        width: 16px;
        height: 16px;
    }

    .table-empty {
        text-align: center;
        padding: 40px 16px;
        color: var(--text1);
    }
}

/* ===== Inline edit (shared, desktop-first) ===== */
@media (min-width: 901px) {
    /* In the tables, each cell is a flex container; make the editor grow to the full cell width */
    #screen-invitations .table-row > div > .inline-editable-container {
        flex: 1 1 auto;
    }

    #screen-customers .table-head,
    #screen-customers .table-row {
        display: grid;
        grid-template-columns: 1.25fr 1fr 1.1fr .8fr .9fr .9fr .75fr 1fr 1fr;
    }

    #screen-customers .table-head,
    #screen-orders .table-head {
        color: #94a3b8;
        font-weight: 700;
        letter-spacing: 0.05em;
        font-size: 0.75rem;
        line-height: 1rem;
        padding: 0;
        background: #fafbfb;
        border-bottom: 1px solid #f1f5f9;
        border-radius: var(--table-radius) var(--table-radius) 0 0;
    }

    #screen-customers .table-head > div,
    #screen-orders .table-head > div {
        padding: var(--table-head-pad-y) var(--table-cell-pad-x);
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: .5rem;
        flex-direction: row;
    }

    #screen-customers .table-body {
        display: grid;
        grid-auto-rows: minmax(44px, auto);
    }

    #screen-orders .table-head,
    #screen-orders .table-row {
        display: grid;
        grid-template-columns: .95fr 1.2fr 1fr .8fr .8fr 1fr .85fr .9fr 1fr;
    }

    #screen-orders .table-body {
        display: grid;
        grid-auto-rows: minmax(44px, auto);
    }

    .inline-editable-container {
        position: relative;
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .inline-editable-display {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .inline-editable-input {
        flex: 1;
        min-width: 0;
        width: 100%;
    }

    /* Hide inputs/selects until editing (like Leads) */
    .inline-editable-input:not(.editing) {
        display: none;
    }

    .inline-editable-input.editing {
        display: block;
    }

    .inline-editable-display.hidden {
        display: none;
    }

    /* Pencil icon base */
    .btn.icon-only.inline-edit-icon {
        position: static;
        width: 18px;
        height: 18px;
        min-height: unset;
        padding: 0;
        opacity: 0.65;
        flex: 0 0 auto;
        background: transparent;
        border: none;
    }

    .btn.icon-only.inline-edit-icon[data-tooltip] {
        position: relative;
    }

    .btn.icon-only.inline-edit-icon svg {
        width: 12px;
        height: auto;
    }

    .inline-edit-icon.hover {
        opacity: 1;
    }

    #screen-invitations .btn.icon-only.inline-edit-icon.show-on-hover {
        opacity: 0;
        pointer-events: none;
    }

    #screen-invitations .inline-editable-container > .btn.icon-only.inline-edit-icon {
        display: none;
    }

    #screen-invitations .inv-row-col0-wrap {
        display: flex;
        align-items: center;
        gap: 6px;
        width: 100%;
        min-width: 0;
    }

    #screen-invitations .btn.icon-only.inline-edit-icon.inv-row-edit-icon:not(.show-on-hover) {
        opacity: 0.65;
        pointer-events: auto;
    }

    #screen-invitations .table-row > div[data-label="שם החוגג/ים"] .btn.icon-only.inline-edit-icon.inv-row-edit-icon {
        margin-right: calc(-1 * var(--table-cell-pad-x, 16px) + 10px);
    }

    #screen-invitations .btn.icon-only.inline-edit-icon.inv-row-edit-icon:hover {
        opacity: 1;
    }

    #screen-invitations .btn.icon-only.inline-edit-icon.inv-row-edit-icon[data-tooltip]::before,
    #screen-invitations .btn.icon-only.inline-edit-icon.inv-row-edit-icon[data-tooltip]::after {
        left: calc(50% - 1rem);
    }

    #screen-invitations .btn.icon-only.inline-edit-icon {
        width: 24px;
        height: 24px;
        min-height: unset;
        padding: 0;
        opacity: 0.65;
        flex: 0 0 auto;
    }

    #screen-invitations .btn.icon-only.inline-edit-icon svg path {
        fill: currentColor;
    }

    #screen-invitations .table-row:hover .btn.icon-only.inline-edit-icon.show-on-hover {
        opacity: 0.65;
        pointer-events: auto;
    }

    #screen-invitations .table-row:hover .btn.icon-only.inline-edit-icon.show-on-hover:hover {
        opacity: 1;
    }

    #screen-invitations input.inline-editable-input[type="tel"].editing {
        direction: ltr;
        text-align: left;
    }

    #screen-invitations input.inline-editable-input[type="date"].editing,
    #screen-invitations input.inline-editable-input[type="time"].editing {
        direction: ltr;
        text-align: left;
    }

    #screen-invitations .table-row.row-editing .inline-editable-picker input.inline-picker-input {
        width: 100%;
        border: 1px solid var(--border);
        background: var(--white);
        border-radius: 8px;
        padding: 6px 8px;
        font-size: 13px;
        height: 32px;
        box-sizing: border-box;
        color: var(--text1);
        -webkit-text-fill-color: var(--text1);
        opacity: 1;
        font-weight: 400;
    }

    #screen-invitations .table-row.row-editing .inline-editable-picker .inline-picker-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(30, 78, 132, 0.1);
        outline: none;
    }

    #screen-invitations .table-row.row-editing .inline-editable-picker .tw-dp-trigger .tw-dp-value,
    #screen-invitations .table-row.row-editing .inline-editable-picker .tw-dp-value {
        color: var(--text1);
        opacity: 1;
        font-weight: 400;
    }

    #screen-invitations .table-row.row-editing input.inline-editable-input.editing,
    #screen-invitations .table-row.row-editing select.inline-editable-input.editing {
        color: var(--text1);
    }
}

#screen-invitations .table-row.row-editing .inline-editable-picker input.inline-picker-input {
    color: var(--text1);
    -webkit-text-fill-color: var(--text1);
    opacity: 1;
    font-weight: 400;
}

#screen-invitations .table-row.row-editing .inline-editable-picker .tw-dp-trigger {
    font-weight: 400;
}

#screen-invitations .table-row.row-editing .inline-editable-picker .tw-dp-trigger .tw-dp-value,
#screen-invitations .table-row.row-editing .inline-editable-picker .tw-dp-value {
    color: var(--text1);
    opacity: 1;
    font-weight: 400;
}

#screen-invitations .table-row.row-editing input.inline-editable-input.editing,
#screen-invitations .table-row.row-editing select.inline-editable-input.editing {
    color: var(--text1);
    font-weight: 400;
}

#screen-invitations .inv-created-at-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

#screen-invitations .inv-created-at-time {
    font-size: 11px;
    color: var(--text2);
    line-height: 1;
}
.module-source-icon {
    --module-icon-color: var(--text1);
    height: 30px;
    padding: 4px 10px 4px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: color-mix(in srgb, var(--module-icon-color) 10%, var(--white));
    color: var(--module-icon-color);
    white-space: nowrap;
}

.module-source-icon > svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.module-source-text {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.module-source-icon[data-module="leads"] {
    --module-icon-color: var(--lbl1);
}

.module-source-icon[data-module="meetings"] {
    --module-icon-color: var(--primary);
}

.module-source-icon[data-module="events"] {
    --module-icon-color: var(--lbl3);
}

.module-source-icon[data-module="general"] {
    --module-icon-color: var(--text1);
}

#screen-tasks .table-head > div:first-child,
#screen-tasks .table-row > div[data-label="מקור"] {
    justify-content: center;
}

.app-header {
    background: var(--white);
    z-index: 2000;
    right: 220px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem .5rem;
    font-size: 105%;
    transition: opacity 0.3s ease, transform 120ms ease-out;
    border-radius: 0.5rem;
    color: var(--white);
    white-space: nowrap;
}

/* Business is in "digital invitations only" mode:
   keep module names visible but disable access for non-invitation routes. */
.nav-link.nav-link-disabled {
    opacity: 0.45;
    filter: grayscale(0.7);
    position: relative;
}

.nav-link.nav-link-disabled.active {
    color: var(--bar-text);
    background: transparent;
    font-weight: 400;
}

.nav-link.nav-link-disabled::after {
    content: attr(data-disabled-label);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    background: var(--lightblue2);
    border: 1px solid var(--lighter);
    margin-inline-start: auto;
}

/* Feedback module: keep icon spacing aligned with the custom SVG. */
.nav-link[data-route="feedback"] {
    gap: .25rem;
}

.nav-link[data-route="feedback"] svg {
    margin: 0;
}

/* Status chips: colored text with lighter background (system-wide) */
.status-label,
.status-badge,
.lead-crmstatus-label,
.col-crmstatus,
.col-crmstatus select.input {
    --status-color: var(--primary);
    --status-text: var(--status-color);
    --status-bg: color-mix(in srgb, var(--status-color) 10%, var(--white));
    color: var(--status-text) !important;
    background: var(--status-bg) !important;
}

#screen-leads .lead-crmstatus-label,
#screen-leads .col-crmstatus,
#screen-leads .col-crmstatus select.input {
    --status-text: #5b6581;
}

.lead-crmstatus-label svg {
    stroke: var(--status-color);
}

/* Mobile status select styling */
@media (max-width: 900px) {
    .app-header {
        width: 95%;
        margin: auto;
        margin-top: calc(3vw - 2px);
        padding-top: calc(.5rem + 4px);
        padding-bottom: calc(.5rem + 4px);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        border-radius: 4px 4px 0 0;
        background: #43506e;
    }

    .logo-main img {
        max-width: 60.3px;
    }

    .app-header .container {
        align-items: center;
    }

    .col-crmstatus select.input {
        border-radius: 999px;
        font-weight: 500;
        padding: 5px 12px;
        border: none;
        font-size: 14px;
        width: fit-content;
        min-width: 120px;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: left 8px center;
        padding-left: 28px;
    }
}

/* Table status pill sizing (match Leads list) */
@media (min-width: 901px) {
    .table .status-label,
    .table .status-badge,
    .table .lead-crmstatus-label,
    .table .col-crmstatus {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        max-width: 100%;
        padding: 5px 12px;
        border-radius: 999px;
        font-weight: 500;
        white-space: nowrap;
        font-size: 14px;
    }

    .meeting-modal-title svg,
    .event-modal-title svg {
        display: none;
    }

    /* Invitations create modal: show mail icon in the title */
    .event-modal-title.invitation-create-title svg {
        display: inline-flex;
    }
}

#events-add-card-btn {
    font-weight: 400;
}

.status-label.status-1,
.lead-crmstatus-label.status-1 {
    --status-color: var(--lbl1);
}

.status-label.status-2,
.lead-crmstatus-label.status-2 {
    --status-color: var(--lbl2);
}

.status-label.status-3,
.lead-crmstatus-label.status-3 {
    --status-color: var(--lbl5);
}

.status-label.status-4,
.lead-crmstatus-label.status-4 {
    --status-color: var(--lbl3);
}

.status-label.status-8,
.lead-crmstatus-label.status-8 {
    --status-color: var(--lbl3);
}

.status-label.status-5,
.lead-crmstatus-label.status-5 {
    --status-color: var(--lbl4);
}

.status-label.status-6,
.lead-crmstatus-label.status-6 {
    --status-color: var(--delete);
}

.status-label.status-7,
.lead-crmstatus-label.status-7 {
    --status-color: var(--dark-gray);
}

.status-label.status-9,
.lead-crmstatus-label.status-9 {
    --status-color: var(--primary);
}

.status-label.status-10,
.lead-crmstatus-label.status-10 {
    --status-color: var(--dark-gray);
}

.status-label.schedule-reserved {
    --status-color: var(--lbl5);
}

.event-contract-status {
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    color: var(--text2);
}

.event-contract-status.event-contract-status-signed {
    color: var(--lbl1);
}

.event-contract-status.event-contract-status-pending {
    color: var(--text2);
}

.nav-link.active {
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-1);
    background: #f0f4f8 ;
}

.nav-link svg {
    width: calc(20px * 1.05);
    height: calc(20px * 1.05);
}

.app-main.is-closed .nav-link svg {
    width: calc(24px * 1.05);
    height: calc(24px * 1.05);
}

.nav-link[data-route="users"] {
    position: relative;
}

.nav-link[data-route="users"]::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.nav-link[data-route="users"]::before {
    top: -.5rem;
}


@media (max-width: 1279px) {
    .nav-link[data-route="users"] {
        margin-top: 0;
    }

    .nav-link[data-route="users"]::before {
        display: none;
    }

    .nav-link.nav-separator-top {
        position: relative;
        margin-top: 60px;
    }

    .nav-link.nav-separator-top::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--border);
        top: -.5rem;
    }
}

select.input option {
    background-color: var(--white);
    color: var(--black);
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.6;
}

select.input option:checked {
    background-color: var(--primary-1);
    color: var(--primary);
    font-weight: 600;
}

select.input option:hover {
    background-color: var(--primary-1);
}

.side-toggle,
.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lighter);
    border-radius: .5rem;
    aspect-ratio: 1 / 1;
    padding: .25rem;
    background: transparent;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s ease;
    border: none;
}

.side-toggle-line {
    display: none;
}

.nav-toggle {
    border: 0;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.nav-toggle .nav-toggle-mobile-icon {
    display: none;
}

.nav-toggle .nav-toggle-desktop-icon {
    display: block;
}

.side-toggle .lucide-fold-horizontal {
    transition: transform 220ms ease;
    transform-origin: center;
}

.side-toggle[aria-expanded="false"] .lucide-fold-horizontal {
    transform: scaleX(-1);
}

.left-nav {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-right: auto;
}

/* Make the bell stand out as the first (rightmost) icon in RTL */
.app-header .left-nav.mobile-hidden > .globalRemindersBell {
    margin-left: 1.25rem;
}

/* .app-header .left-nav.mobile-hidden > .globalRemindersBell svg {
    animation: ring 2s infinite ease-in-out;
} */

.top-btn {
    padding: .25rem;
    border-radius: 100%;
    color: var(--white);
    background: #43506e;
    cursor: pointer;
    z-index: 5001;
    aspect-ratio: 1 / 1;
    display: flex;
    transition: all 0.3s ease;
    position: relative;
}

.top-btn.is-active {
    color: var(--white);
    background: #43506e;
}

/* Disabled buttons should look clearly inactive across the app */
.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.2);
}

.readonly-disabled,
[aria-disabled="true"]:not(.btn) {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.2);
}

.screen.module-locked-active {
    position: relative;
    isolation: isolate;
    overflow: visible;
}

.screen.module-locked-active > :not(.module-locked-overlay) {
    opacity: 0.72;
}

.module-locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vh, 56px) 24px 32px;
    background: rgba(245, 247, 251, 0.36);
    backdrop-filter: blur(1px);
    overflow-y: auto;
    z-index: 8;
}

.module-locked-card {
    width: min(100%, 720px);
    margin: auto 0;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(17, 24, 39, 0.16);
    padding: 42px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    box-sizing: border-box;
}

.module-locked-icon-wrap {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lightblue2);
    color: var(--primary);
}

.module-locked-module-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.module-locked-title {
    margin: 0;
    max-width: 18ch;
    font-size: 38px;
    font-weight: 800;
    color: var(--black);
    line-height: 1.25;
}

.module-locked-text {
    margin: 0;
    max-width: 28ch;
    font-size: 22px;
    line-height: 1.6;
    color: var(--text1);
}

.reminders-bell-indicator {
    position: absolute;
    top: 0px;
    left: -5px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background-color: var(--indicator);
    transition: opacity 0.15s ease;
}

.globalRemindersBell.has-reminders .reminders-bell-indicator {
    animation: reminder-pulse 1.2s ease-in-out infinite;
}

@keyframes reminder-pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        /* opacity: .5; */
        transform: scale(.8);
        background-color: var(--yellow);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ring {
    0%, 50%, 100% { transform: rotate(0); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-15deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-10deg); }
}

.globalRemindersBell.has-reminders {
    animation: ring 2s infinite ease-in-out;
}

#globalRemindersBell.has-reminders .reminders-bell-indicator {
    opacity: 1;
}

.activity-rail-fixed,
.global-reminders-dropdown {
    position: fixed;
    top: 65.83px;
    left: 0;
    width: 22.5%;
    z-index: 130;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.global-reminders-dropdown {
    padding: 1rem;
    border-radius: 0;
    background: var(--white);
    text-align: right;
    transform: translateX(-100%);
    display: flex;
    flex-direction: column;
}

.activity-rail-fixed.is-open,
.global-reminders-dropdown.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    overflow-y: auto;
    max-height: 85%;
    direction: rtl;
    z-index: 2120;
}

/* Full-page editor container (used by Documents issue popup) */
.documents-editor-container {
    position: fixed;
    top: 65.83px;
    left: 0;
    width: 88.5%;
    height: 100vh;
    z-index: 130;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
    transition: transform 0.4s ease, opacity 0.4s ease;
    background: var(--bg-app);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.documents-editor-container.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    overflow-y: auto;
    max-height: unset;
    direction: rtl;
    z-index: 2000;
    padding-bottom: 4rem;
}

/* ── Documents issue modal – mirrors event-card quote/contract modal ─────── */
#documents-issue-modal.print-preview-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(800px, calc(100vw - 40px));
    height: calc(100vh - 40px);
    max-width: calc(100vw - 40px);
    max-height: 980px;
    border-radius: 2px;
    box-shadow: 0 24px 72px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border-soft);
    z-index: 2500;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    display: flex;
    flex-direction: column;
}
#documents-issue-modal.print-preview-modal.is-open {
    opacity: 1;
    pointer-events: auto;
    overflow: hidden;
    padding-bottom: 0;
    z-index: 2600;
}
#documents-issue-modal .modal-close {
    position: absolute;
    top: 18px;
    left: 24px;
    width: 44px;
    height: 44px;
    font-size: 30px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text1);
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#documents-issue-modal .modal-close:hover { color: var(--red); }

/* Fields 2-column grid */
.doc-issue-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin-bottom: 6px;
}
.doc-issue-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.doc-issue-field .label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    margin: 0;
}
.doc-issue-field .input {
    height: 34px;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
}
.doc-issue-field select.input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* VAT checkbox row */
.doc-vat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text1);
}
.doc-vat-row input[type="checkbox"] { cursor: pointer; width: 15px; height: 15px; }
.doc-vat-row label { cursor: pointer; }

/* Preview pane: override HTML-preview iframe sizing for raw PDF display */
#documents-issue-modal .order-doc-preview {
    overflow: hidden;
    padding: 0;
    position: relative;
}
#documents-issue-modal .order-doc-preview iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
    display: block !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 1;
}
.doc-preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e9ec;
    font-size: 14px;
    color: var(--text2);
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 2;
}

/* Responsive: full-screen on small viewports, hide preview */
@media (max-width: 900px) {
    #documents-issue-modal.print-preview-modal {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }
    #documents-issue-modal.print-preview-modal.is-open { transform: none; }
    #documents-issue-modal .order-doc-preview { display: none; }
    #documents-issue-modal .order-doc-edit { flex: 1; }
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* Inline checkbox label – generic, not leads-specific */
.checkbox-inline-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: clamp(14px, 2.5vw, 15px);
    cursor: pointer;
}

.checkbox-inline-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Documents – totals summary block */
.doc-totals-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border1);
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.doc-totals-summary .totals-row {
    display: flex;
    gap: 1rem;
}

.doc-totals-summary .totals-label {
    color: var(--text2);
}

.doc-totals-summary .totals-value {
    font-variant-numeric: tabular-nums;
    min-width: 7rem;
    text-align: start;
}

.doc-totals-summary .totals-row.is-gross {
    font-weight: 600;
    font-size: 15px;
    color: var(--text1);
    padding-top: 0.35rem;
    border-top: 1px solid var(--border1);
    margin-top: 0.25rem;
}

.activity-rail-fixed.is-open::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
}

.global-reminders-dropdown.is-open {
    gap: 1rem;
    direction: rtl;
    pointer-events: auto;
}

.activity-rail-fixed .activity-log {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 0;
    transition: 0.4s all cubic-bezier(0.25, 0.46, 0.45, 0.94);
    direction: rtl;
    height: 100%;
    overflow: hidden;
}

.activity-log-header,
.switch-user-header {
    padding: 20px 25px;
    background: var(--white);
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.switch-user-header {
    justify-content: flex-start;
    gap: .5rem;
}

.activity-log-title,
.switch-user-header-title {
    color: var(--primary);
    font-weight: 800;
    font-size: 18px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-log-body,
.switch-user-cards {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: var(--lightgray);
}

.switch-user-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
}

.activity-log-list {
    position: relative;
    padding-right: 20px;
    border-right: 2px solid #e1e4e8;
}

.activity-log-list:has(> .activity-log-empty) {
    border: none;
    padding: 0;
}

.activity-log-empty {
    text-align: center;
    color: var(--dark-gray);
    padding: 2rem;
    font-size: 14px;
}

.activity-log-row {
    position: relative;
    margin-bottom: 25px;
}

.activity-log-row::before {
    content: '';
    position: absolute;
    right: -27px;
    top: 18px;
    width: 12px;
    height: 12px;
    background: var(--white);
    border: 3px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
}

.activity-log-card,
.switch-user-card {
    background: var(--white);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    border: 1px solid var(--white);
    transition: 0.2s;
}

.activity-log-card:hover,
.switch-user-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-color: #edf2f7;
}

.activity-log-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

.activity-log-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--primary);
}

.activity-log-time {
    color: var(--dark-gray);
}

.activity-log-action {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-log-icon {
    padding: 5px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.activity-log-icon.icon-edit {
    color: #f59e0b;
    background: #fffbeb;
}

.activity-log-icon.icon-add {
    color: #2563eb;
    background: #eff6ff;
}

.activity-log-icon.icon-delete {
    color: #dc2626;
    background: #fef2f2;
}

.activity-log-icon.icon-sms {
    color: #10b981;
    background: #ecfdf5;
}

.activity-log-icon.icon-system {
    color: #3b82f6;
    background: #eff6ff;
}

.activity-log-text {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.user-menu {
    position: relative;
    display: flex;
}

.user-menu-trigger {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.user-menu-avatar {
    border-radius: 50%;
    display: block;
    aspect-ratio: 1 / 1;
}

.user-menu-dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: .5rem;
    /* Fit Hebrew labels like "החלפת משתמש" on a single line */
    width: max-content;
    min-width: 140px;
    background-color: var(--white);
    border-radius: .5rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-dropdown.is-open {
    display: block;
}

.user-menu-link {
    display: block;
    padding: .5rem 1rem;
    color: var(--black);
    text-decoration: none;
    font-size: clamp(14.7px, 2.1vw, 16.8px);
    white-space: nowrap;
}

.search-box {
    position: relative;
    margin-right: 5rem;
}

.search-input {
    width: 100%;
    padding: .25rem 1rem;
    height: 34px;
    border-radius: .5rem;
    color: var(--black);
    font-size: clamp(14px, 2vw, 16px);
}

.search-input::placeholder {
    color: var(--text1);
}

.search-label {
    position: absolute;
    left: .25rem;
    top: 50%;
    transform: translateY(-50%);
    padding: .15rem .5rem;
    font-size: clamp(12px, 2vw, 13px);
    color: var(--primary-dark);
    background-color: var(--lighter);
    border-radius: .5rem;
    font-weight: 500;
}

.ui-overlay {
    position: fixed;
    inset: 0;
    height: 100%;
    background-color: rgba(30, 78, 132, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 999;
}

.ui-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}



@media (min-width: 1281px) {
    .app-header {
        background: #f1f5f9;
    }

    .app-main > aside {
        overflow: hidden;
    }

    .app-main > aside .main-nav {
        width: 100%;
        overflow: hidden;
    }

    .app-main > aside #mainNav {
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-gutter: stable;
        scrollbar-width: thin;
        scrollbar-color: #94a3b8 transparent;
        padding-inline-end: 10px;
        padding-bottom: 1rem;
    }

    .app-main > aside #mainNav::-webkit-scrollbar {
        width: 14px;
    }

    .app-main > aside #mainNav::-webkit-scrollbar-track {
        background: transparent;
    }

    .app-main > aside #mainNav::-webkit-scrollbar-thumb {
        background: #94a3b8;
        border-radius: 999px;
        border: 4px solid transparent;
        background-clip: padding-box;
    }

    .app-main > aside #mainNav::-webkit-scrollbar-button:single-button {
        display: block;
        height: 14px;
        background-color: transparent;
        background-repeat: no-repeat;
        background-position: center;
        background-size: 8px 8px;
    }

    .app-main > aside #mainNav::-webkit-scrollbar-button:single-button:vertical:decrement {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 3 10 8H2z'/%3E%3C/svg%3E");
    }

    .app-main > aside #mainNav::-webkit-scrollbar-button:single-button:vertical:increment {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M2 4h8L6 9z'/%3E%3C/svg%3E");
    }

    #mainNav .nav-link {
        font-size: 16px;
    }

    #mainNav .nav-link svg {
        width: 17px;
        height: 17px;
    }

    #mainNav .nav-link[data-route="event-card"] svg {
        width: 20.16px;
        height: 20.16px;
        margin-top: 3px;
    }

    .app-main.is-closed #mainNav .nav-link svg {
        width: 17px;
        height: 17px;
        min-width: 17px;
        min-height: 17px;
        flex-shrink: 0;
    }

    .app-main.is-closed #mainNav .nav-link[data-route="event-card"] svg {
        width: 20.16px;
        height: 20.16px;
        min-width: 20.16px;
        min-height: 20.16px;
        flex-shrink: 0;
        margin-top: 3px;
    }

    .app-main > aside {
        /* background: rgb(255 255 255 / 85%);
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.05); */
        background: #1e4e84;
    }

    .app-header .left-nav.mobile-hidden .top-btn {
        background: #1e4e84;
    }

    .side-toggle:hover {
        /* background: var(--primary-dark);
        border-color: var(--primary-dark); */
        border: none;
    }

    .nav-link:hover {
        background: #f0f4f8;
        color: var(--primary);
        font-weight: 600;
    }

    .top-btn:hover {
        color: var(--white);
        background: #1e4e84;
        opacity: 1;
    }

    .side-toggle {
        position: relative;
        margin-right: 1rem;
        color: #43506e;
    }

    .side-toggle > svg.mobile-hidden {
        opacity: 0;
    }

    .side-toggle .side-toggle-line {
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        pointer-events: none;
        transform-origin: center;
        transition: transform 220ms ease, opacity 220ms ease, width 220ms ease;
    }

    .side-toggle .side-toggle-line-top {
        width: 18.9px;
        transform: translate(-50%, -6.3px);
    }

    .side-toggle .side-toggle-line-middle {
        width: 9.45px;
        transform: translate(-100%, 0);
    }

    .side-toggle .side-toggle-line-bottom {
        width: 18.9px;
        transform: translate(-50%, 6.3px);
    }

    .side-toggle[aria-expanded="false"] .side-toggle-line-top {
        width: 18.9px;
        transform: translate(-50%, 0) rotate(45deg);
    }

    .side-toggle[aria-expanded="false"] .side-toggle-line-middle {
        width: 0;
        opacity: 0;
    }

    .side-toggle[aria-expanded="false"] .side-toggle-line-bottom {
        width: 18.9px;
        transform: translate(-50%, 0) rotate(-45deg);
    }

    .user-menu-link:hover {
        background-color: var(--bg-app);
    }
}

@media (max-width: 1280px) {
    .app-header {
        --crm-mobile-drawer-width: min(85vw, 320px);
        background: #1e4e84;
    }

    .app-header .container {
        position: relative;
    }

    .header-logos {
        display: none;
    }

    .temp {
        margin: 0;
    }

    .app-header img {
        max-width: 65px;
    }

    .app-header nav a {
        color: var(--white);
        font-size: 20px;
        text-align: center;
        padding: .25rem .5rem;
    }

    .nav .nav-link,
    .nav .nav-link svg {
        color: var(--white);
    }

    .app-header nav a.active {
        color: var(--white);
        background: rgba(255, 255, 255, 0.16);
        border-radius: 16px;
    }

    .main-nav {
        align-items: start;
        order: 1;
        width: 34px;
        margin-right: 0;
        margin-left: 0;
        position: absolute;
        top: 50%;
        left: 12px;
        margin-top: -25px;
        z-index: 1004;
    }

    .nav {
        top: 0;
        right: 0;
        bottom: 0;
        width: var(--crm-mobile-drawer-width);
        max-width: 320px;
        height: 100dvh;
        margin-top: 0;
        padding: 82px 14px 24px 21px;
        gap: 10px;
        border-radius: 30px 0 0 30px;
        background: #1e4e84;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1003;
        overflow-y: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }

    .nav.is-open {
        background: #1e4e84;
    }

    .nav::before {
        content: "ניהול אירועים";
        position: absolute;
        top: 24px;
        right: 52px;
        direction: rtl;
        color: var(--white);
        font-size: 20px;
        font-weight: 800;
        line-height: 1;
        white-space: nowrap;
        pointer-events: none;
    }

    .nav::after {
        content: "\f79f";
        position: absolute;
        top: 24px;
        right: 20px;
        color: var(--white);
        font-size: 20px;
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        line-height: 1;
        pointer-events: none;
    }

    .nav-link {
        border-radius: 16px;
    }

    .nav-backdrop.is-open {
        background-color: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1002;
    }

    .nav-toggle {
        position: relative;
        top: auto;
        left: auto;
        z-index: 1004;
        width: calc(40px * 1.12);
        height: calc(40px * 1.12);
        border-radius: 10px;
        color: var(--white);
        transition: none !important;
        animation: none !important;
    }

    .nav-toggle svg {
        stroke: currentColor;
        transition: none !important;
        animation: none !important;
    }

    .nav-toggle svg path {
        stroke-width: 2.2 !important;
        transform: translateY(3px) scaleY(1.19);
        transform-origin: center;
        transform-box: fill-box;
    }

    .nav-toggle::before,
    .nav-toggle::after {
        transition: none !important;
        animation: none !important;
    }

    .nav-toggle[aria-expanded="true"] {
        display: none !important;
        position: absolute !important;
        top: 15px;
        left: calc(100vw - var(--crm-mobile-drawer-width) - 12px);
        width: calc(36px * 0.85);
        height: calc(36px * 0.85);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.16);
        color: var(--white);
        z-index: 1004;
        opacity: 0;
        pointer-events: none;
        transform: translateX(110%);
        transition: transform 300ms ease, opacity 220ms ease;
    }

    body.mobile-nav-open.mobile-nav-ready .nav-toggle[aria-expanded="true"] {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
    }

    .nav-toggle[aria-expanded="true"]::before,
    .nav-toggle[aria-expanded="true"]::after {
        width: calc(16px * 0.85);
    }

    .nav-toggle:active {
        transform: none;
    }

    .nav-toggle[aria-expanded="true"]:active {
        transform: translateX(0);
    }

    .logo-main {
        order: 2;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        z-index: 1001;
    }

    .logo-main img {
        max-width: 58.5px;
    }

    .header-ai-mobile-slot {
        position: absolute;
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 35px;
        min-height: 35px;
        z-index: 1001;
    }

    .side-toggle {
        position: absolute;
        top: 50%;
        left: 32px;
        transform: translateY(-50%) scale(1.15);
        transform-origin: center;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        order: 3;
        color: var(--white);
        visibility: visible;
        z-index: 1005;
    }

    .side-toggle::before {
        content: "";
        position: absolute;
        inset: -10px;
    }

    .side-toggle > svg.desktop-hidden {
        display: none;
    }

    .side-toggle .side-toggle-line {
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        pointer-events: none;
        transform-origin: center;
        transition: transform 220ms ease, opacity 220ms ease, width 220ms ease;
    }

    .side-toggle .side-toggle-line-top {
        width: 18px;
        transform: translate(-50%, -7px);
    }

    .side-toggle .side-toggle-line-middle {
        width: 18px;
        transform: translate(-50%, 0);
    }

    .side-toggle .side-toggle-line-bottom {
        width: 18px;
        transform: translate(-50%, 7px);
    }

    .side-toggle[aria-expanded="true"] .side-toggle-line-top {
        width: 18px;
        transform: translate(-50%, 0) rotate(45deg);
    }

    .side-toggle[aria-expanded="true"] .side-toggle-line-middle {
        width: 0;
        opacity: 0;
    }

    .side-toggle[aria-expanded="true"] .side-toggle-line-bottom {
        width: 18px;
        transform: translate(-50%, 0) rotate(-45deg);
    }

    .activity-rail-fixed.is-open,
    .global-reminders-dropdown.is-open {
        top: 70px;
        width: 90%;
        max-height: unset;
    }

    .global-reminders-dropdown.is-open {
        top: 130px;
    }

    .left-nav {
        margin-right: 0;
        width: 100%;
    }

    .user-menu {
        margin-left: 0;
    }

    .user-menu-dropdown {
        left: unset;
        right: 0;
    }

    .search-box {
        margin-left: auto;
    }

    /* Mobile: open panels should fill the screen but keep the global header visible */
    .lead-details.is-open {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: calc(100vh - 64px);
        max-height: calc(100vh - 64px);
        border-radius: 0;
    }

    .ui-overlay.leads-overlay {
        top: 64px;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(100vh - 64px);
    }

    #screen-documents .documents-editor-container.is-open {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: calc(100vh - 64px);
        max-height: calc(100vh - 64px);
        border-radius: 0;
    }

    #screen-documents .ui-overlay {
        top: 64px;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(100vh - 64px);
    }

    .crm-mobile-back-btn {
        display: inline-flex;
    }

    body.modal-open .app-header {
        pointer-events: auto;
    }

    .lead-details-header-actions,
    .event-modal-header,
    .modal-header {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .crm-mobile-back-btn {
        order: -1;
        flex: 0 0 100%;
        width: 100%;
        justify-content: flex-start;
    }

    .crm-mobile-back-btn svg {
        transform: scaleX(-1);
    }
}

@media (max-width: 767px) {
    .nav-toggle .nav-toggle-desktop-icon {
        display: none;
    }

    .nav-toggle .nav-toggle-mobile-icon {
        display: block;
    }

    .nav-toggle .nav-toggle-mobile-icon path {
        stroke-width: 2 !important;
        transform: none !important;
    }

    .search-box {
        margin-right: 1rem;
    }

    .lead-details.is-open {
        top: 0;
        height: 100vh;
        max-height: 100vh;
    }

    .documents-editor-container {
        transform: translateY(100%);
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        scrollbar-width: none;
        background: var(--bg-mobile);
    }

    .documents-editor-container::-webkit-scrollbar {
        display: none;
    }

    #screen-documents .documents-editor-container.is-open {
        transform: translateY(0);
        top: 0;
        height: 100vh;
        max-height: 100vh;
        scrollbar-width: none;
    }

    #screen-documents .documents-editor-container.is-open::-webkit-scrollbar {
        display: none;
    }

    .ui-overlay.is-active {
        top: 0;
        z-index: 2000;
    }

    .app-header nav a {
        pointer-events: auto;
        opacity: 1;
    }

    .header-ai-mobile-slot {
        right: 16px;
    }

}



.temp {
    background: var(--primary);
    border-radius: 50%;
    aspect-ratio: 1;
    width: 20px;
    position: absolute;
    left: 1rem;
    bottom: 1rem;
}

.leads-history-row .lead-views-row-main {
    width: 100%;
    justify-content: flex-start;
    align-self: stretch;
}

.lead-main-meta-row .lead-main-meta.is-unanswered-call {
    border-color: var(--red);
}

.lead-main-meta-row .lead-main-meta.is-unanswered-call::before {
    background: var(--red);
}

/* ===== CRM CONFIG: COMPACT STATUS COLOR PALETTE =====
   Note: keep this in ui.css to avoid expanding main layout. */

#screen-crm-config .cfg-status-color-cell,
#screen-crm-config .cfg-venue-color-cell {
    position: relative;
    white-space: nowrap;
}

/* Allow the color palette popover to escape the table bounds */
#screen-crm-config .cfg-statuses-table,
#screen-crm-config #tab-venues .cfg-table {
    overflow: visible;
}

#screen-crm-config .cfg-color-palette {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 5000;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
    max-width: 280px;
}

/* Status palette: open upwards so the last row stays visible */
#screen-crm-config .cfg-status-color-cell .cfg-color-palette {
    top: auto;
    bottom: calc(100% + 6px);
}

#screen-crm-config .cfg-color-palette.open {
    display: grid;
    grid-template-columns: repeat(10, 14px);
    gap: 8px;
    align-items: center;
}

#screen-crm-config .cfg-color-palette .cfg-color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 999px;
}

#screen-crm-config .cfg-field-col-drag {
    width: 44px;
    text-align: center;
}

#screen-crm-config .cfg-field-drag-handle {
    cursor: grab;
    touch-action: none;
}

#screen-crm-config .cfg-field-drag-placeholder {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

#screen-crm-config .cfg-fields-table tr[data-field-draggable="1"] td {
    transition: background-color 0.16s ease;
}

#screen-crm-config .cfg-fields-table tr.is-field-dragging td {
    background: var(--lightblue);
}

body.cfg-field-order-dragging {
    user-select: none;
}

@media (min-width: 901px) {
    #screen-crm-config .cfg-color-palette.open[data-entity="venue"] {
        grid-template-columns: repeat(10, 28px);
        max-width: 420px;
    }

    #screen-crm-config .cfg-color-palette[data-entity="venue"] .cfg-color-swatch {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    #screen-crm-config .cfg-color-palette.open {
        grid-template-columns: repeat(8, 14px);
        max-width: 240px;
    }
}

/* ===== SWITCH USER (New modal design) ===== */

/* Override the shared rail layout so this one behaves like a centered modal */
.switch-context-rail.activity-rail-fixed {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    transform: none;
    padding: 0;
}

.switch-context-rail.activity-rail-fixed.is-open {
    transform: none;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.switch-context-rail .switch-user-modal {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.switch-context-rail .switch-user-modal-card {
    background: var(--white);
    width: min(440px, calc(100vw - 32px));
    max-height: min(700px, calc(100vh - 32px));
    border-radius: 28px;
    box-shadow: 0 40px 80px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(148, 163, 184, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.switch-context-rail .switch-user-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.12);
    border: 0;
    color: var(--text2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 10;
    transition: background 0.18s, color 0.18s;
}

.switch-context-rail .switch-user-close:hover {
    background: rgba(148, 163, 184, 0.22);
    color: var(--primary);
}

.switch-context-rail .switch-user-close[data-tooltip]::before {
    top: calc(100% + 10px);
    bottom: auto;
    transform: translateX(-50%) translateY(-8px);
}

.switch-context-rail .switch-user-close[data-tooltip]::after {
    top: calc(100% + 3px);
    bottom: auto;
    transform: translateY(-8px);
}

.switch-context-rail .switch-user-close[data-tooltip]:hover::before,
.switch-context-rail .switch-user-close[data-tooltip]:hover::after {
    transform: translateX(-50%) translateY(0);
}

.switch-context-rail .switch-user-close[data-tooltip]:hover::after {
    transform: translateY(0);
}

.switch-context-rail .switch-user-modal-header {
    padding: 30px 28px 18px;
    text-align: center;
    flex-shrink: 0;
    background: linear-gradient(160deg, rgba(20, 90, 160, 0.06) 0%, transparent 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.switch-context-rail .switch-user-halo {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: var(--primary-4);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 22px;
    box-shadow: 0 10px 28px rgba(20, 90, 160, 0.18);
}

.switch-context-rail .switch-user-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--black);
    margin: 0;
}

.switch-context-rail .switch-user-desc {
    font-size: 13px;
    color: var(--text2);
    margin-top: 5px;
    line-height: 1.5;
}

.switch-context-rail .switch-user-list {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 20px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-padding-block: 12px;
}

.switch-context-rail .switch-user-list.is-auth-view {
    justify-content: center;
    padding-block: 24px;
}

.switch-context-rail .switch-user-empty {
    padding: 18px;
    color: var(--text2);
    text-align: center;
    font-size: 14px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: var(--bg);
}

.switch-context-rail .user-card {
    background: var(--white);
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
    scroll-margin-block: 12px;
}

.switch-context-rail .switch-user-card-button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.switch-context-rail .user-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(20, 90, 160, 0.1);
    transform: translateY(-1px);
}

.switch-context-rail .user-card:active {
    transform: translateY(0);
}

.switch-context-rail .user-card.active {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(20, 90, 160, 0.1);
}

.switch-context-rail .user-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}

.switch-context-rail .user-info-row .fa-chevron-left {
    flex-shrink: 0;
    color: rgba(148, 163, 184, 0.7);
    font-size: 11px;
    transition: color 0.18s;
}

.switch-context-rail .user-card:hover .fa-chevron-left {
    color: var(--primary);
}

.switch-context-rail .user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(148, 163, 184, 0.18);
}

.switch-context-rail .user-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.switch-context-rail .user-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.switch-context-rail .user-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.switch-context-rail .user-email {
    display: block;
    font-size: 12px;
    color: var(--text2);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.switch-context-rail .switch-user-auth-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.switch-context-rail .switch-user-auth-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border);
}

.switch-context-rail .switch-user-auth-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.75);
    flex-shrink: 0;
}

.switch-context-rail .switch-user-auth-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.switch-context-rail .switch-user-auth-meta {
    min-width: 0;
    flex: 1;
}

.switch-context-rail .switch-user-auth-name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.switch-context-rail .switch-user-auth-email {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text2);
    direction: ltr;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.switch-context-rail .switch-user-auth-stage {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
}

.switch-context-rail .switch-user-auth-help {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text2);
}

.switch-context-rail .switch-user-auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.switch-context-rail .switch-user-auth-input {
    margin-bottom: 0;
}

.switch-context-rail .login-area {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    transition:
        max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.25s ease,
        margin-top 0.25s ease,
        padding-top 0.25s ease;
}

.switch-context-rail .user-card.active .login-area {
    max-height: 560px;
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
}

.switch-context-rail .switch-user-help {
    margin: 0 0 12px;
    color: var(--text2);
    font-size: 13px;
    line-height: 1.5;
}

.switch-context-rail .switch-user-otp {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.switch-context-rail .password-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg);
    box-sizing: border-box;
    outline: none;
    margin-bottom: 12px;
}

.switch-context-rail .password-input:focus {
    border-color: var(--primary);
    background: var(--white);
}

.switch-context-rail .otp-input {
    direction: ltr;
    text-align: center;
    letter-spacing: 0.35em;
    font-weight: 700;
}

.switch-context-rail .switch-user-resend {
    display: inline-flex;
    align-self: flex-start;
    margin: -2px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.switch-context-rail .switch-user-resend:disabled {
    opacity: 0.6;
    cursor: default;
}

.switch-context-rail .actions-row {
    display: flex;
    gap: 10px;
}

.switch-context-rail .switch-user-actions-row {
    margin-top: 4px;
}

.switch-context-rail .actions-row .btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.switch-context-rail .actions-row .btn-login {
    background: var(--primary);
    color: var(--white);
    border: 0;
}

.switch-context-rail .actions-row .btn-cancel {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
}

.switch-context-rail .switch-user-list.has-active .user-card:not(.active) {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.5);
}

#initialPasswordRail.activity-rail-fixed {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    transform: none;
    padding: 0;
    z-index: 2300;
    visibility: hidden;
}

#initialPasswordRail.activity-rail-fixed.is-open {
    transform: none;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    visibility: visible;
}

#initialPasswordRail .initial-password-modal {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

#initialPasswordRail .initial-password-card {
    background: var(--white);
    width: min(520px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    border-radius: 28px;
    box-shadow: 0 40px 80px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(148, 163, 184, 0.12);
    display: flex;
    flex-direction: column;
    overflow: auto;
}

#initialPasswordRail .initial-password-header {
    padding: 30px 30px 18px;
    background: linear-gradient(160deg, rgba(20, 90, 160, 0.08) 0%, rgba(255, 255, 255, 0.96) 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    text-align: right;
}

#initialPasswordRail .initial-password-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--primary-4);
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

#initialPasswordRail .initial-password-title {
    margin: 14px 0 8px;
    font-size: 24px;
    line-height: 1.2;
    color: var(--black);
    font-weight: 800;
}

#initialPasswordRail .initial-password-description {
    margin: 0;
    color: var(--text1);
    font-size: 15px;
    line-height: 1.6;
}

#initialPasswordRail .initial-password-body {
    padding: 24px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#initialPasswordRail .initial-password-account-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--bg-app);
    border: 1px solid var(--border-soft);
}

#initialPasswordRail .initial-password-account-label {
    color: var(--text1);
    font-size: 13px;
    font-weight: 700;
}

#initialPasswordRail .initial-password-account-value {
    color: var(--black);
    font-size: 18px;
    font-weight: 800;
    direction: ltr;
    text-align: left;
    word-break: break-word;
}

#initialPasswordRail .initial-password-form-grid {
    display: grid;
    gap: 14px;
}

#initialPasswordRail .initial-password-rules {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--lightblue2);
    border: 1px solid var(--lighter);
    color: var(--text1);
    font-size: 14px;
    line-height: 1.6;
}

#initialPasswordRail .initial-password-feedback {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    background: var(--lbl9);
    border: 1px solid var(--lbl12);
    color: var(--delete);
}

#initialPasswordRail .initial-password-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

#initialPasswordRail .initial-password-actions .btn,
#initialPasswordRail .initial-password-actions .btn-outline {
    flex: 1 1 180px;
    min-height: 42px;
    max-height: none;
}

#initialPasswordRail #initialPasswordSubmitBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Accordion styles */
.comments-box {
    display: flex;
    flex-direction: column;
}

.accordion-title {
    cursor: pointer;
    user-select: none;
}

.accordion-title::before {
    content: '\25BE';
    display: inline-block;
    margin-inline-end: 6px;
    font-size: 11px;
    opacity: 0.55;
    transition: transform 0.2s;
}

.comments-box.is-collapsed .accordion-title::before {
    transform: rotate(-90deg);
}

.accordion-content {
    display: flex;
    flex-direction: column;
}

.comments-box.is-collapsed .accordion-content {
    display: none;
}

/* Global mobile footer navigation */
@media (max-width: 900px) {
    .global-mobile-footer {
        position: fixed;
        bottom: -2px;
        left: 0;
        right: 0;
        z-index: 10000;
        display: flex;
        padding: 0;
        background: var(--white);
        /* border-top: 1px solid var(--border); */
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        transition: transform 0.2s ease;
        display: none;
    }

    /* CRM config: replace footer nav with a floating "Save changes" action */
    .global-mobile-footer.has-crm-save {
        padding: 0;
        overflow: hidden;
        justify-content: center;
        background: transparent;
        box-shadow: none;
        bottom: 0;
    }

    .global-mobile-footer.has-crm-save .global-mobile-nav-item {
        display: none;
    }

    .global-mobile-footer.has-crm-save #btn-config-save {
        width: 100%;
        max-width: none;
        margin: 0;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 14px 19px;
        border-radius: 0;
        background: var(--primary);
        color: var(--white);
        border: 1px solid rgba(18, 78, 180, 0.45);
        font-size: 16px;
        font-weight: 400;
        min-height: 53px;
    }

    .global-mobile-footer.has-crm-save #btn-config-save:hover {
        background: var(--primary-dark);
    }

    .global-mobile-footer.is-hidden {
        transform: translateY(100%);
    }

    .global-mobile-footer::-webkit-scrollbar {
        display: none;
    }

    .global-mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: #9CA3AF;
        cursor: pointer;
        flex: 0 0 25%;
        padding: 12px 4px;
        transition: all 0.1s ease;
        min-width: 80px;
    }

    /* .global-mobile-nav-item:nth-child(4), */
    /* .global-mobile-nav-item:nth-child(5) {
        pointer-events: none;
        opacity: 0.5;
    } */

    .global-mobile-nav-item.active {
        color: var(--primary);
        background: rgba(37, 99, 235, 0.05);
    }

    .global-mobile-nav-item.is-disabled {
        opacity: 0.45;
        filter: grayscale(0.7);
    }

    .global-mobile-nav-item.is-disabled.active {
        color: #9CA3AF;
        background: transparent;
    }

    .global-mobile-nav-item svg {
        width: calc(24px * 1.05);
        height: calc(24px * 1.05);
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
    }

    .global-mobile-nav-item span {
        font-size: calc(11px * 1.05);
        font-weight: 500;
    }

    body {
        padding-bottom: 80px;
    }
}

/* ==================== SKELETON LOADER ==================== */
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--lighter) 25%, var(--lightblue2) 50%, var(--lighter) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
}

/* Skeleton container - hidden by default */
.lead-skeleton-wrapper {
    display: none;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.lead-skeleton-wrapper.is-visible {
    display: flex;
}

/* Lead card skeleton */
.skeleton-card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skeleton-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-status {
    width: 80px;
    height: 24px;
    border-radius: 6px;
}

.skeleton-name {
    width: 120px;
    height: 28px;
}

.skeleton-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.skeleton-btn-main {
    flex: 1;
    height: 44px;
    border-radius: 10px;
}

.skeleton-btn-small {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.skeleton-player-wrapper {
    height: 48px;
    border-radius: 50px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    padding: 0 5px;
    gap: 10px;
    border: 1px solid var(--lighter);
}

.skeleton-play-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.skeleton-wave-bar {
    flex: 1;
    height: 10px;
    border-radius: 5px;
}

.skeleton-time {
    width: 40px;
    height: 10px;
}

/* Timeline skeleton */
.skeleton-timeline-title {
    width: 100px;
    height: 20px;
    margin-top: 10px;
    margin-bottom: 5px;
}

.skeleton-timeline-card {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.skeleton-meta-row {
    display: flex;
    justify-content: space-between;
}

.skeleton-date {
    width: 100px;
    height: 14px;
}

.skeleton-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.skeleton-line {
    width: 100%;
    height: 12px;
}

.skeleton-line-short {
    width: 60%;
    height: 12px;
}

.skeleton-mini-player {
    width: 70%;
    height: 36px;
    border-radius: 50px;
    margin-top: 5px;
    align-self: flex-start;
}

/* Input skeleton */
.skeleton-input {
    background: var(--white);
    border-radius: 16px;
    height: 120px;
    margin-top: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.skeleton-input-placeholder {
    width: 150px;
    height: 14px;
}

.skeleton-send-btn {
    width: 120px;
    height: 36px;
    border-radius: 8px;
    align-self: flex-end;
}

/* ===== TABLE SKELETON (for leads list) ===== */
.skeleton-table-row {
    display: grid;
    grid-template-columns: 56px 90px 2fr 1fr 1fr 105px 96px 1fr 1.8fr;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--lightblue2);
    background: var(--white);
}

.skeleton-table-row:last-child {
    border-bottom: none;
}

#screen-leads .skeleton-table-row {
    min-height: 79px;
}

@media (max-width: 767px) {
    .skeleton-table-row {
        margin-bottom: 1rem;
        border-radius: 1rem;
        padding: 20px;
        background: var(--white);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
        border: 1px solid #EAECF0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    
    .skeleton-table-row:last-child {
        border-bottom: 1px solid #EAECF0;
    }

}

.skeleton-table-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.skeleton-table-cell-1 { flex: 0 0 60px; }
.skeleton-table-cell-2 { flex: 1; }
.skeleton-table-cell-3 { flex: 0 0 140px; }
.skeleton-table-cell-4 { flex: 0 0 120px; }

.skeleton-cell-line {
    height: 14px;
    border-radius: 4px;
}

.skeleton-cell-line-short {
    height: 12px;
    width: 70%;
    border-radius: 4px;
}

@media (max-width: 900px) {
    #screen-tasks .table {
        background: transparent;
        border: none;
        padding: 0;
    }

    #screen-tasks .table-head {
        display: none;
    }

    #screen-tasks .table-body {
        padding: 5px;
        display: flex;
        margin-top: 3rem;
        flex-direction: column;
        gap: 12px;
    }

    #screen-tasks .table-row {
        background: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 12px;
        padding: 15px;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 12px;
        min-height: auto;
    }

    #screen-tasks .table-row:hover {
        background: var(--white);
    }

    #screen-tasks .table-row.task-done {
        opacity: 0.6;
        background: var(--lightblue2);
    }

    #screen-tasks .table-row.task-done .task-name {
        text-decoration: line-through;
    }

    #screen-tasks .table-row > div {
        padding: 0;
        border: none;
    }

    /* Card Header: icon + details */
    #screen-tasks .table-row > div[data-label="מקור"],
    #screen-tasks .table-row > div[data-label="תיאור המשימה"] {
        display: flex;
        gap: 12px;
        align-items: flex-start;
    }

    #screen-tasks .table-row > div[data-label="מקור"] {
        display: none;
    }

    #screen-tasks .table-row > div[data-label="תיאור המשימה"] {
        grid-column: 1 / -1;
        flex-direction: column;
        gap: 0;
    }

    #screen-tasks .table-row > div[data-label="נוצר"] {
        grid-column: 1;
    }

    #screen-tasks .table-row > div[data-label="תיאור המשימה"]::before,
    #screen-tasks .table-row > div[data-label="תאריך יעד"].late::before,
    #screen-tasks .table-row > div[data-label="תאריך יעד"]::before,
    #screen-tasks .table-row > div[data-label="פעולות"]::before,
    #screen-tasks .table-row > div[data-label="נוצר"]::before {
        display: none;
    }

    #screen-tasks .table-row > div[data-label="פעולות"] {
        grid-column: 2;
        justify-content: flex-end;
        display: none;
    }
    
    #screen-tasks .table-head > div:last-child {
        display: none;
    }

    /* Icon styling */
    #screen-tasks .tasks-source-link {
        width: 32px;
        min-width: 32px;
        height: 32px;
        background: var(--lightblue2);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        flex-shrink: 0;
    }

    #screen-tasks .tasks-source-link {
        border: none;
        padding: 0;
    }

    /* Task name styling */
    #screen-tasks .table-row .task-name {
        font-size: 14px;
        font-weight: 500;
        color: var(--text1);
        line-height: 1.3;
    }

    #screen-tasks .table-row .task-source {
        font-size: 13px;
        color: var(--text1);
        opacity: 0.7;
        margin-top: 4px;
    }
    
    .task-assignee-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        font-weight: 600;
        color: var(--primary);
        background: var(--primary-1);
        padding: 4px 10px;
        border-radius: 16px;
        margin-top: 6px;
        width: fit-content;
    }
    
    .task-assignee-badge svg {
        flex-shrink: 0;
    }

    /* Created date badge */
    #screen-tasks .table-row > div[data-label="נוצר"] {
        font-size: 12px;
        font-weight: 500;
        color: var(--text1);
        width: fit-content;
    }

    .task-edit-input,
    .task-edit-picker {
        min-width: 155px;
        max-width: 280px;
    }

    .task-edit-picker .tw-dp-trigger {
        gap: 0;
        padding: 0 5px;
    }

    /* Date badge */
    #screen-tasks .table-row > div[data-label="תאריך יעד"]:has(.task-edit-picker.hidden) {
        font-size: 12px;
        font-weight: 500;
        padding: 4px 8px;
        border-radius: 6px;
        background: var(--lightblue2);
        color: var(--text1);
        width: fit-content;
        line-height: 1.5;
        display: inline-flex;
        align-items: center;
    }

    #screen-tasks .table-row > div[data-label="תאריך יעד"].late {
        color: var(--red);
        background: var(--primary-1);
        font-weight: 600;
    }

    /* Done button */
    #screen-tasks .table-row .btn {
        background: var(--lightblue);
        color: var(--primary);
        border: none;
        padding: 8px 16px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 700;
    }

    #screen-tasks .table-row.task-done .btn {
        background: var(--lightblue);
        color: var(--primary);
        pointer-events: none;
    }

    /* Master edit icon in mobile */
    #screen-tasks .table-row .task-master-edit {
        background: transparent;
        border: none;
        cursor: pointer;
        transition: opacity 0.2s;
        padding: 0;
    }

    #screen-tasks .table-row .task-master-edit:hover {
        opacity: 1 !important;
    }

    #screen-tasks .table-row .task-master-edit svg {
        width: 16px;
        height: 16px;
        fill: var(--text1);
    }
    #switchUserRail.activity-rail-fixed.is-open {
        background-color: rgba(30, 78, 132, 0.95);
    }

    #switchUserRail .switch-user-modal-card {
        width: 95%;
        max-height: calc(100vh - 20px);
    }

    #switchUserRail .switch-user-modal {
        padding: 10px;
    }

    #switchUserRail .switch-user-list {
        padding: 18px 18px 22px;
    }

    #switchUserRail .switch-user-auth-card {
        padding: 18px;
        border-radius: 18px;
    }
}

@media (min-width: 768px) {
    .tw-time-input-wrapper input {
        max-width: unset;
    }

    .form-tab-panel input,
    .form-tab-panel select,
    .form-tab-panel textarea,
    .tw-dp-trigger {
        border: 1px solid var(--border-soft) !important;
        border-radius: 10px !important;
        font-size: 14px;
        transition: 0.2s;
    }

    .form-tab-panel input,
    .form-tab-panel select,
    .tw-dp-trigger {
        height: 42px;
        padding: 0 12px;
    }

    .form-tab-panel textarea {
        padding: 10px 12px;
    }

    .form-tab-panel input:focus,
    .form-tab-panel select:focus,
    .form-tab-panel textarea:focus,
    .tw-dp-trigger:focus {
        border-color: var(--primary);
        outline: none;
        background: var(--white);
    }

    .lead-inline-task-form {
        grid-column: 1 / -1;
    }
}

/* ===== LEADS CARDS VIEW (Desktop Only) ===== */
@media (min-width: 901px) {
    .leads-layout .table:has(.table-body.leads-cards-grid) {
        background: none;
        padding: 0;
    }

    .leads-cards-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 25px;
        padding: 0;
    }

    .lead-card {
        background: var(--white);
        border-radius: 20px;
        border: 2px solid transparent;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        transition: all 0.25s ease;
        position: relative;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        cursor: pointer;
    }

    .lead-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 25px -5px rgba(25, 84, 141, 0.1);
        border-color: var(--primary-1);
    }

    /* Card Header */
    .lead-card-header {
        padding: 20px 20px 10px 20px;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }

    .lead-card-name {
        font-size: 18px;
        font-weight: 800;
        color: var(--text1);
        margin-bottom: 4px;
        transition: color 0.2s;
    }

    .lead-card-name:hover {
        color: var(--primary);
    }

    .lead-card-source {
        font-size: 12px;
        font-weight: 600;
        color: var(--text1);
        display: flex;
        align-items: center;
        gap: 5px;
        opacity: 0.7;
    }

    /* Status Badge in Card */
    .lead-card .status-badge {
        font-size: 12px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 8px;
        white-space: nowrap;
    }

    /* Card Body */
    .lead-card-body {
        padding: 10px 20px;
        flex-grow: 1;
    }

    .lead-card-info-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        font-size: 14px;
        color: var(--text1);
        font-weight: 500;
    }

    .lead-card-icon {
        width: 28px;
        height: 28px;
        background: var(--primary-1);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary);
        font-size: 13px;
    }

    /* Note Preview in Card */
    .lead-card-note {
        background: var(--lightblue2);
        border-radius: 8px;
        padding: 10px;
        font-size: 13px;
        color: var(--text1);
        border: 1px solid var(--border-soft);
        margin-top: 10px;
        line-height: 1.4;
        display: -webkit-box;
        line-clamp: 2;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Card Footer */
    .lead-card-footer {
        padding: 15px 20px;
        border-top: 1px solid #f1f5f9;;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #fafbfc;
    }

    .lead-card-time {
        font-size: 12px;
        color: var(--text1);
        font-weight: 500;
        opacity: 0.6;
    }

    .lead-card-actions {
        display: flex;
        gap: 8px;
    }

    .lead-card-action-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        transition: 0.2s;
        cursor: pointer;
    }

    .lead-card-action-btn.btn-call {
        background: var(--primary-1);
        color: var(--primary);
    }

    .lead-card-action-btn.btn-call:hover {
        background: var(--primary);
        color: var(--white);
    }

    .lead-card-action-btn.btn-whatsapp {
        background: rgba(34, 197, 94, 0.1);
        color: #16a34a;
    }

    .lead-card-action-btn.btn-whatsapp:hover {
        background: #16a34a;
        color: var(--white);
    }

    .lead-card-action-btn.btn-edit {
        background: var(--white);
        border: 1px solid var(--border-soft);
        color: var(--text1);
    }

    .lead-card-action-btn.btn-edit:hover {
        border-color: var(--primary);
        color: var(--primary);
    }
}

@media (min-width: 769px) {
    .table:has(.tasks-cards-grid) {
        background: none;
        padding: 0;
        padding-top: .5rem;
    }

    .tasks-cards-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        padding: 0;
    }

    .task-card {
        background: var(--white);
        border-radius: 1rem;
        padding: 1rem;
        position: relative;
        overflow: hidden;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        border: 2px solid var(--border-soft);
        transition: all 0.25s ease;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .task-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 25px -5px rgba(25, 84, 141, 0.08);
        border-color: var(--primary-1);
    }

    #tasks-list.tasks-two-zone-layout .task-card,
    #tasks-list.tasks-two-zone-layout .task-card:hover,
    #tasks-list.tasks-two-zone-layout .tasks-panel {
        box-shadow: none;
    }

    .task-card.task-done {
        opacity: 0.6;
    }

    .task-card.task-done .task-card-top-strip {
        background: linear-gradient(135deg, #ff6b00 0%, #e61919 100%) !important;
    }

    .task-card-top-strip {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
    }

    .task-card-top-strip.bg-urgent {
        background: #e61919;
    }

    .task-card-top-strip.bg-today {
        background: var(--primary);
    }

    .task-card-top-strip.bg-normal {
        background: var(--primary);
    }

    .task-card-header-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding-top: 6px;
    }

    .task-card-priority-badge {
        font-size: 11px;
        font-weight: 800;
        padding: 5px 12px;
        border-radius: 8px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        line-height: 1;
    }

    .task-card-priority-badge.badge-urgent {
        background: #fff7ed;
        color: #c2410c;
    }

    .task-card-priority-badge.badge-today {
        background: var(--primary-1);
        color: var(--primary);
    }

    .task-card-priority-badge.badge-normal {
        background: var(--lightblue2);
        color: var(--text1);
    }

    .task-card-priority-badge.badge-no-date {
        background: #f1f5f9;
        color: var(--text-muted);
    }

    .task-card-checkbox-wrapper {
        height: 28px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        flex-direction: row-reverse;
    }
    
    .task-card-checkbox-label {
        font-size: 13px;
        font-weight: 600;
        color: var(--text1);
        white-space: nowrap;
    }

    .task-card-checkbox {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
        border: 2px solid #cbd5e1;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }

    .task-card-checkbox-wrapper .task-card-checkbox:hover {
        border-color: var(--primary);
        background: var(--primary-1);
    }

    .task-card.task-done .task-card-checkbox {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

    .task-card-title-wrap {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 0;
    }
    
    .task-card-edit-icon {
        background: transparent;
        border: none;
        padding: 0;
        margin: 0 0 0 -10px;
        cursor: pointer;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.2s;
    }
    
    .task-card:hover .task-card-edit-icon {
        opacity: 1;
    }
    
    .task-card-edit-icon svg {
        width: 14px;
        height: 14px;
        fill: var(--text2);
        display: block;
    }
    
    .task-card-edit-icon:hover svg {
        fill: var(--primary);
    }

    .task-card-title {
        font-size: 17px;
        font-weight: 800;
        color: var(--text1);
        line-height: 1.4;
        margin: 0 0 0 1rem;
        padding: 0;
    }
    
    .task-card-title-input {
        font-size: 17px;
        line-height: 1.4;
        margin: 0;
        padding: .25rem .75rem;
        border: 1px solid var(--border-soft);
        transition: all 0.2s ease;
        color: var(--black);
        font-size: clamp(14px, 2.5vw, 15px);
        transition: all 0.3s ease;
        border-radius: .5rem;
        min-width: 90%;
    }
    
    .task-card-title-input:focus {
        outline: none;
        border-color: var(--primary);
        margin-left: 1rem;
    }

    .task-card.task-done .task-card-title {
        text-decoration: line-through;
        color: var(--text-muted);
    }

    .task-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: .5 0 0 .5rem;
        gap: 12px;
    }
    
    .task-card-footer .module-source-icon {
        margin: 0;
    }

    .task-card-source-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        font-weight: 700;
        color: var(--primary);
        background: var(--primary-1);
        padding: 6px 12px;
        border-radius: 20px;
        text-decoration: none;
        transition: all 0.2s;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    .task-card-source-pill svg {
        flex-shrink: 0;
        width: 14px;
        height: 14px;
    }

    .task-card-source-pill:hover {
        background: var(--primary);
        color: var(--white);
    }

    .task-card-meta-wrap {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .task-card-date {
        font-size: 13px;
        font-weight: 600;
        color: var(--text1);
        opacity: 0.7;
    }

    .task-card-assignee {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: var(--primary-1);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 800;
        color: var(--primary);
        border: 2px solid var(--white);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        flex-shrink: 0;
    }

    .tasks-two-zone-layout {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .zone-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--text2);
        display: flex;
        align-items: center;
        gap: .5rem;
    }

    .zone-title i {
        color: var(--primary);
    }

    .zone-title.urgent-title i {
        color: #f59e0b;
    }

    .zone-title::after {
        content: '';
        flex: 1;
        height: 2px;
        background: #e2e8f0;
        border-radius: 2px;
    }

    .tasks-list-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .task-list-item {
        background: var(--white);
        padding: 1rem;
        border-radius: 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        border: 2px solid transparent;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        transition: all 0.2s ease;
    }

    .task-list-item:hover {
        border-color: var(--primary-1);
        box-shadow: 0 8px 20px rgba(30, 78, 132, 0.06);
    }

    .task-list-item.task-done {
        opacity: 0.6;
    }

    .task-list-checkbox-wrapper {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    .task-list-checkbox {
        width: 100%;
        height: 100%;
        border: 2px solid #cbd5e1;
        border-radius: 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.2s;
        color: white;
    }

    .task-list-checkbox:hover {
        border-color: var(--primary);
        background: var(--primary-1);
    }

    .task-list-item.task-done .task-list-checkbox {
        background-color: var(--primary);
        border-color: var(--primary);
    }

    .task-list-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .task-list-title {
        font-weight: 800;
        font-size: 15px;
        color: var(--text1);
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .task-list-item.task-done .task-list-title {
        text-decoration: line-through;
        color: var(--text-muted);
    }

    .task-list-edit-icon {
        font-size: 14px;
        color: #cbd5e1;
        cursor: pointer;
        transition: all 0.2s ease;
        opacity: 0;
        transform: translateX(5px);
    }

    .task-list-item:hover .task-list-edit-icon {
        opacity: 1;
        transform: translateX(0);
        color: #94a3b8;
    }

    .task-list-edit-icon:hover {
        color: var(--primary) !important;
        transform: scale(1.2);
    }

    .task-list-meta-info {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 13px;
        font-weight: 500;
        color: var(--text2);
    }

    .task-list-meta-info .text-primary {
        color: var(--primary) !important;
    }

    .task-list-meta-info .text-danger {
        color: #dc2626 !important;
    }

    .task-list-meta-info .fw-bold {
        font-weight: 700;
    }

    .task-list-actions {
        display: flex;
        align-items: center;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .table:has(.tasks-cards-grid) {
        background: none;
        padding: 0;
        padding-top: .5rem;
    }

    .tasks-cards-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .mobile-section-title {
        font-size: 14px;
        font-weight: 700;
        padding: 0.75rem 1rem;
        margin: 1rem 0 0.75rem 0;
        border-radius: 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        position: sticky;
        top: 0;
        z-index: 5;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .mobile-section-title i {
        font-size: 16px;
    }

    #tasks-list {
        margin-top: 1rem;
    }

    #screen-tasks #tasks-list {
        margin-top: calc(1rem - 55px);
    }

    #screen-leads .table:has(#tasks-list) {
        margin-top: -40px;
    }

    .mobile-section-title.urgent {
        color: #c2410c;
        box-shadow: none;
        padding: 0;
        position: relative;
    }

    .mobile-section-title.urgent i {
        color: #ea580c;
    }

    .mobile-section-title.active {
        color: var(--primary);
        box-shadow: none;
        padding: 0;
        position: relative;
    }

    .mobile-section-title.active i {
        color: var(--primary);
    }

    .mobile-section-title.completed {
        color: #15803d;
        box-shadow: none;
        padding: 0;
        position: relative;
    }

    .mobile-section-title.completed i {
        color: #16a34a;
    }

    .task-card {
        background: var(--white);
        border-radius: 1rem;
        padding: 0.875rem;
        position: relative;
        overflow: hidden;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        border: 2px solid var(--border-soft);
        transition: all 0.25s ease;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .task-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px -5px rgba(25, 84, 141, 0.08);
        border-color: var(--primary-1);
    }

    .task-card.task-done {
        opacity: 0.6;
    }

    .task-card.task-done .task-card-top-strip {
        background: linear-gradient(135deg, #ff6b00 0%, #e61919 100%) !important;
    }

    .task-card-top-strip {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
    }

    .task-card-top-strip.bg-urgent {
        background: #e61919;
    }

    .task-card-top-strip.bg-today {
        background: var(--primary);
    }

    .task-card-top-strip.bg-normal {
        background: var(--primary);
    }

    .task-card-header-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding-top: 6px;
    }

    .task-card-priority-badge {
        font-size: 11px;
        font-weight: 800;
        padding: 5px 12px;
        border-radius: 8px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        line-height: 1;
    }

    .task-card-priority-badge.badge-urgent {
        background: #fff7ed;
        color: #c2410c;
    }

    .task-card-priority-badge.badge-today {
        background: var(--primary-1);
        color: var(--primary);
    }

    .task-card-priority-badge.badge-normal {
        background: var(--lightblue2);
        color: var(--text1);
    }

    .task-card-priority-badge.badge-no-date {
        background: #f1f5f9;
        color: var(--text-muted);
    }

    .task-card-checkbox-wrapper {
        height: 28px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        flex-direction: row-reverse;
    }

    .task-card-checkbox-label {
        font-size: 13px;
        font-weight: 600;
        color: var(--text1);
        white-space: nowrap;
    }

    .task-card-checkbox {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
        border: 2px solid #cbd5e1;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }

    .task-card-checkbox-wrapper .task-card-checkbox:hover {
        border-color: var(--primary);
        background: var(--primary-1);
    }

    .task-card.task-done .task-card-checkbox {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

    .task-card-title-wrap {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 0;
    }

    .task-card-edit-icon {
        background: transparent;
        border: none;
        padding: 0;
        margin: 0 0 0 -10px;
        cursor: pointer;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
        transition: opacity 0.2s;
    }

    .task-card-edit-icon svg {
        width: 14px;
        height: 14px;
        fill: var(--text2);
        display: block;
    }

    .task-card-edit-icon:active svg {
        fill: var(--primary);
    }

    .task-card-title {
        font-size: 17px;
        font-weight: 800;
        color: var(--text1);
        line-height: 1.4;
        margin: 0 0 0 1rem;
        padding: 0;
    }

    .task-card-title-input {
        font-size: 17px;
        line-height: 1.4;
        margin: 0;
        padding: .25rem .75rem;
        border: 1px solid var(--border-soft);
        transition: all 0.2s ease;
        color: var(--black);
        border-radius: .5rem;
        min-width: 90%;
    }

    .task-card-title-input:focus {
        outline: none;
        border-color: var(--primary);
        margin-left: 1rem;
    }

    .task-card.task-done .task-card-title {
        text-decoration: line-through;
        color: var(--text-muted);
    }

    .task-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 0;
        gap: 12px;
    }

    #screen-tasks .tasks-source-link {
        width: auto;
        text-decoration: none;
        border-radius: 20px;
    }

    .task-card-footer .module-source-icon {
        margin: 0;
    }

    .task-card-source-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        font-weight: 700;
        color: var(--primary);
        background: var(--primary-1);
        padding: 6px 12px;
        border-radius: 20px;
        text-decoration: none;
        transition: all 0.2s;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    .task-card-source-pill svg {
        flex-shrink: 0;
        width: 14px;
        height: 14px;
    }

    .task-card-source-pill:active {
        background: var(--primary);
        color: var(--white);
    }

    .task-card-meta-wrap {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .task-card-date {
        font-size: 13px;
        font-weight: 600;
        color: var(--text1);
        opacity: 0.7;
    }

    .task-card-assignee {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: var(--primary-1);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 800;
        color: var(--primary);
        border: 2px solid var(--white);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        flex-shrink: 0;
    }
}

/* Phones editor: support name + phone inputs in the same row */
.phones-editor .phone-row {
    flex-wrap: wrap;
}

.phones-editor .phone-row input[type="text"] {
    flex: 1 1 160px;
    min-width: 140px;
}

.phones-editor .phone-row .autocomplete-wrapper {
    flex: 1 1 200px;
    margin-left: 0;
}

.phones-editor .phone-row .autocomplete-wrapper input {
    width: 100%;
}

/* Meetings: smart phone autocomplete dropdown (modal only) */
.meeting-modal .autocomplete-wrapper {
    position: relative;
}

.meeting-modal .autocomplete-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    text-align: right;
    padding: 4px 0;
}

.meeting-modal .autocomplete-list:not(.hidden) {
    animation: meetingsAcSlideDown 0.2s ease-out;
}

.meeting-modal .autocomplete-list .auto-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--lightblue2);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: background-color 0.15s ease;
}

.meeting-modal .autocomplete-list .auto-item:last-child {
    border-bottom: none;
}

.meeting-modal .autocomplete-list .auto-item:hover {
    background: var(--lightblue2);
}

.meeting-modal .autocomplete-list .ac-phone {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.meeting-modal .autocomplete-list .ac-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}

.meeting-modal .autocomplete-list .ac-source {
    font-size: 12px;
    font-weight: 600;
    color: var(--text1);
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meeting-modal .autocomplete-list .ac-source::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.6;
    flex: 0 0 auto;
}

@keyframes meetingsAcSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.invitations-top-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1rem;
    margin: 2rem 0 0;
}

.invitations-form-card,
.invitations-reviews-card,
.invitations-table-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-soft);
}

#screen-invitations .table-row.inv-duplicate-match-row {
    background: #eaf8ef !important;
    border-color: #2f9e44 !important;
    box-shadow: inset 0 0 0 1px #2f9e44;
}

.invitation-create-form .form-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.invitation-create-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.invitation-create-form .form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text1);
}

.invitation-create-form .form-input,
.invitation-create-form .form-select {
    width: 100%;
    padding: .25rem .75rem;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    font-size: 15px;
    color: var(--black);
    background: #f8fafc;
    transition: all 0.2s;
    font-family: inherit;
    box-sizing: border-box;
    min-height: 42px;
}

.invitation-create-form .form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    background-size: 20px;
    padding-left: 2rem;
}

.invitation-create-form .form-input:focus,
.invitation-create-form .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 78, 132, 0.1);
    background: var(--white);
}

.invitation-create-form .form-input::placeholder {
    color: var(--placeholder);
}

.invitation-create-form .form-full {
    width: 100%;
}

.invitation-create-form .form-full.checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    direction: rtl;
    text-align: right;
    gap: 1.2rem;
    padding: 0.5rem 0;
    margin-top: 10px;
    margin-bottom: 10px;
}

.invitation-create-form .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 15px;
    color: var(--text1);
    user-select: none;
}

.invitation-create-form .checkbox-label input[type="checkbox"] {
    display: none;
}

.invitation-create-form .checkbox-label .checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-soft);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    transition: all 0.2s;
    flex-shrink: 0;
}

.invitation-create-form .checkbox-label input[type="checkbox"]:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.invitation-create-form .checkbox-label input[type="checkbox"]:checked ~ .checkmark::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid var(--white);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) translateY(-1px);
}

.invitation-create-form .btn-create {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.invitation-create-form .btn-create .btn-text {
    display: inline-block;
}

.invitation-create-form .btn-create .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.invitation-create-form .btn-create .btn-icon svg {
    display: block;
    transform: scale(1.2);
    transform-origin: center;
}

.invitation-create-form .ci-form-error {
    color: #ef4444;
    font-size: 13px;
    text-align: center;
    margin-bottom: 8px;
}

.event-schedule-form.invitation-create-form .tw-date-picker .tw-dp-value {
    color: var(--black);
    opacity: 1;
    font-weight: 400;
}

#screen-invitations .inv-rv-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    white-space: nowrap;
    border: none;
    line-height: 1.3;
}

#screen-invitations .inv-rv-pill svg {
    flex-shrink: 0;
}

#screen-invitations button.inv-rv-pill {
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

#screen-invitations button.inv-rv-pill:hover:not(:disabled) {
    background-color: var(--lightblue2);
}

#screen-invitations button.inv-rv-pill:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#screen-invitations .inv-rv--new,
#screen-invitations .inv-rv--pending {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--lighter);
}

#screen-invitations .inv-rv--done {
    background: var(--white);
    color: #15803d;
    border: 1px solid #bbf7d0;
}

#screen-invitations .inv-rv--disabled {
    background: var(--white);
    color: var(--placeholder);
    border: 1px solid var(--border-soft);
    cursor: default;
    opacity: 0.6;
}

@media (min-width: 901px) {
    .tw-dp-popover,
    .tw-time-popover {
        z-index: 200000 !important;
    }

    #screen-invitations .event-schedule-form.invitation-create-form .form-grid {
        gap: 1.5rem;
    }

    #screen-invitations .event-schedule-form.invitation-create-form .form-group {
        gap: 4px;
    }

    #screen-invitations .invitations-table-card {
        position: relative;
        overflow: visible !important;
    }

    .card.invitations-table-card .table {
        padding: 0;
        position: relative;
        overflow: visible !important;
    }

    #screen-invitations .table-scroll-wrapper {
        overflow: visible;
    }

    #screen-invitations .table-body {
        overflow: visible;
    }

    #screen-invitations {
        --table-head-pad-y: 10px;
        --table-row-pad-y: 10px;
        --table-cell-pad-x: 12px;
        --table-head-font-size: clamp(13px, 2.3vw, 14px);
    }

    #screen-invitations .table-head,
    #screen-invitations .table-row {
        display: grid;
        grid-template-columns: .35fr 1.5fr 1fr 1fr .9fr .75fr .95fr .55fr .55fr .71fr .71fr .9fr;
    }

    #screen-invitations .table-head > [data-label="שם המתחם"],
    #screen-invitations .table-row > [data-label="שם המתחם"] {
        display: none;
    }

    #screen-invitations.has-venue-col .table-head,
    #screen-invitations.has-venue-col .table-row {
        grid-template-columns: .35fr 1.5fr 1fr 1fr .9fr .75fr .95fr .85fr .55fr .55fr .71fr .71fr .9fr;
    }

    #screen-invitations.has-venue-col .table-head > [data-label="שם המתחם"],
    #screen-invitations.has-venue-col .table-row > [data-label="שם המתחם"] {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #screen-invitations .table-head {
        color: #94a3b8;
        font-weight: 700;
        letter-spacing: 0.05em;
        font-size: 0.75rem;
        line-height: 1rem;
        padding: 0;
        background: #fafbfb;
        border-bottom: 1px solid #f1f5f9;
        border-radius: var(--table-radius) var(--table-radius) 0 0;
    }

    #screen-invitations .table-head > div {
        text-align: center;
        justify-content: center;
    }

    #screen-invitations .table-row > div {
        text-align: center;
        justify-content: center;
    }

    #screen-invitations .table-row {
        position: relative;
        z-index: 1;
        overflow: visible;
    }

    #screen-invitations .table-head > div:nth-child(1),
    #screen-invitations .table-row > div[data-label="לינק ניהול"] {
        justify-content: center;
        align-items: center;
        position: relative;
        z-index: 2;
        overflow: visible;
    }

    #screen-invitations .table-row > div > .inline-editable-container {
        justify-content: center;
    }

    #screen-invitations .table-row > div .inline-editable-display {
        text-align: center;
    }

    #screen-invitations .table-row > div[data-label="נייד"] .inline-editable-display,
    #screen-invitations .table-row > div[data-label="נייד נוסף"] .inline-editable-display {
        overflow: visible;
        text-overflow: unset;
        white-space: nowrap;
    }

    #screen-invitations .table-body {
        display: grid;
        grid-auto-rows: minmax(44px, auto);
    }

    #screen-invitations .table-head > div:nth-child(9),
    #screen-invitations .table-head > div:nth-child(10),
    #screen-invitations .table-head > div:nth-child(11),
    #screen-invitations .table-row > div[data-label="שליחת הזמנה"],
    #screen-invitations .table-row > div[data-label="SMS למשוב"] {
        justify-content: center;
    }

    #screen-invitations .inv-manage-link-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 16px;
        height: 16px;
        color: #000;
        text-decoration: none;
    }

    #screen-invitations .inv-manage-link-icon svg {
        width: 16px;
        height: 16px;
        display: block;
    }

    #screen-invitations .inv-manage-link-icon[data-tooltip]::before,
    #screen-invitations .inv-manage-link-icon[data-tooltip]::after {
        z-index: 999999 !important;
    }

    #screen-invitations .table-scroll-wrapper {
        overflow: visible !important;
    }
}

@media (min-width: 901px) {
    #screen-invitations .inv-rv-pill {
        min-width: 40px;
        min-height: 40px;
        padding: 0;
        border-radius: 8px;
        gap: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #screen-invitations .inv-rv-pill .inv-rv-label {
        display: none;
    }

    #screen-invitations .inv-rv-pill svg {
        width: 18px;
        height: 18px;
    }
}

.invitations-list-scroll-top-btn,
.invitations-bottom-section {
    margin-top: 1rem;
}

.invitations-bottom-section {
    grid-column: span 2;
}

.invitations-mobile-nav {
    display: none;
}

#screen-invitations .invitations-reviews-card .rating-dashboard {
    background: var(--bg-app);
    border: none;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

#screen-invitations .invitations-reviews-card .rating-score-box {
    text-align: center;
    min-width: 140px;
    border: none;
    background: var(--bg-app);
    padding-left: 1.5rem;
}

#screen-invitations .invitations-reviews-card .big-score {
    font-size: 3.25rem;
    font-weight: 800;
    color: var(--text1);
    line-height: 1;
}

#screen-invitations .invitations-reviews-card .total-reviews {
    font-size: 0.875rem;
    color: var(--text2);
    opacity: 0.9;
    margin-top: 0.25rem;
    font-weight: 600;
}

#screen-invitations .invitations-reviews-card .stars-big {
    color: #fbbf24;
    font-size: 1rem;
    margin-top: 0.5rem;
    letter-spacing: 0.125rem;
}

#screen-invitations .invitations-reviews-card .rating-bars {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

#screen-invitations .invitations-reviews-card .bar-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.875rem;
    color: var(--text2);
}

#screen-invitations .invitations-reviews-card .label-group {
    width: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    font-weight: 700;
    color: var(--text1);
}

#screen-invitations .invitations-reviews-card .label-group i {
    color: rgba(0, 0, 0, 0.25);
    font-size: 0.75rem;
}

#screen-invitations .invitations-reviews-card .bar-track {
    flex: 1 1 auto;
    height: 10px;
    background: var(--border-soft);
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    direction: rtl;
}

#screen-invitations .invitations-reviews-card .bar-fill {
    height: 100%;
    width: 0;
    background: #fbbf24;
    border-radius: 999px;
    transition: width 2s cubic-bezier(0.22, 1, 0.36, 1);
}

#screen-invitations .invitations-reviews-card .count-label {
    width: 2rem;
    font-size: 0.8125rem;
    color: var(--text2);
    opacity: 0.9;
    text-align: left;
}

@media (max-width: 768px) {
    #screen-invitations .invitations-reviews-card .rating-dashboard {
        flex-direction: column-reverse;
        text-align: center;
        gap: 1.25rem;
        align-items: stretch;
        border: none;
        background: var(--white);
    }

    #screen-invitations .invitations-reviews-card .rating-score-box {
        border: none;
        background: var(--white);
        padding-left: 0;
        padding-top: 1rem;
        width: 100%;
    }
}

#screen-invitations .invitations-reviews-card {
    display: flex;
    flex-direction: column;
}

#screen-invitations .invitations-reviews-card .reviews-list {
    flex: 1 1 0;
    max-height: none;
    overflow-y: auto;
    padding-left: 0;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

#screen-invitations .invitations-reviews-card .reviews-list::-webkit-scrollbar {
    width: 0;
}

#screen-invitations .invitations-reviews-card .reviews-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}

#screen-invitations .invitations-reviews-card .review-item {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease;
    position: relative;
}

#screen-invitations .invitations-reviews-card .review-item-skeleton {
    overflow: hidden;
}

#screen-invitations .invitations-reviews-card .review-item-skeleton .action-bar {
    margin-top: 14px;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-line,
#screen-invitations .invitations-reviews-card .invitations-review-skeleton-dot,
#screen-invitations .invitations-reviews-card .invitations-review-skeleton-switch {
    background: linear-gradient(90deg, rgba(25, 84, 141, 0.08) 25%, rgba(25, 84, 141, 0.16) 50%, rgba(25, 84, 141, 0.08) 75%);
    background-size: 200% 100%;
    animation: invitations-review-skeleton-shimmer 1.5s infinite linear;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-name {
    width: 132px;
    max-width: 60%;
    height: 16px;
    border-radius: 999px;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-date {
    width: 74px;
    height: 12px;
    border-radius: 999px;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-stars {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-body .invitations-review-skeleton-line {
    width: 100%;
    height: 13px;
    border-radius: 999px;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-line-short {
    width: 68%;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-button {
    width: 112px;
    height: 34px;
    border-radius: 10px;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-publish {
    width: 52px;
    height: 13px;
    border-radius: 999px;
}

#screen-invitations .invitations-reviews-card .invitations-review-skeleton-switch {
    width: 36px;
    height: 20px;
    border-radius: 999px;
}

@keyframes invitations-review-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

#screen-invitations .invitations-reviews-card .review-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

#screen-invitations .invitations-reviews-card .review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

#screen-invitations .invitations-reviews-card .user-info h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

#screen-invitations .invitations-reviews-card .review-date {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 2px;
}

#screen-invitations .invitations-reviews-card .stars {
    color: #fbbf24;
    font-size: 13px;
    margin-top: 2px;
    letter-spacing: 0.0625rem;
}

#screen-invitations .invitations-reviews-card .stars .star-empty {
    opacity: 0.25;
}

#screen-invitations .invitations-reviews-card .review-body {
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
    margin-bottom: 10px;
}

#screen-invitations .invitations-reviews-card .action-bar,
#screen-invitations .invitations-reviews-card .review-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    margin-top: 10px;
}

#screen-invitations .invitations-reviews-card .action-bar.only-publish {
    justify-content: flex-end;
}

#screen-invitations .invitations-reviews-card .publish-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

#screen-invitations .invitations-reviews-card .publish-text {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

#screen-invitations .invitations-reviews-card .switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

#screen-invitations .invitations-reviews-card .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

#screen-invitations .invitations-reviews-card .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.4s;
    border-radius: 34px;
}

#screen-invitations .invitations-reviews-card .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    transition: 0.4s;
    border-radius: 50%;
}

#screen-invitations .invitations-reviews-card .switch input:checked + .slider {
    background-color: #10b981;
}

#screen-invitations .invitations-reviews-card .switch input:checked + .slider:before {
    transform: translateX(16px);
}

#screen-invitations .invitations-reviews-card .owner-reply-box {
    background-color: #eff6ff;
    border-right: 4px solid var(--primary);
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    position: relative;
}

#screen-invitations .invitations-reviews-card .reply-title {
    font-weight: 700;
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-start;
}

#screen-invitations .invitations-reviews-card .reply-content {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

#screen-invitations .invitations-reviews-card .edit-reply-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--white);
    border: 1px solid #cbd5e1;
    color: #64748b;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 11px;
    opacity: 1;
}

#screen-invitations .invitations-reviews-card .edit-reply-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    background-color: var(--white);
}

#screen-invitations .invitations-reviews-card .btn-add-reply {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #dcfce7;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

#screen-invitations .invitations-reviews-card .btn-add-reply:hover {
    background-color: #166534;
    color: var(--white);
    border-color: #166534;
}

#screen-invitations .invitations-reviews-card .reply-editor {
    margin-top: 10px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

#screen-invitations .invitations-reviews-card .reply-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-height: 70px;
    outline: none;
    box-sizing: border-box;
    background: var(--white);
}

#screen-invitations .invitations-reviews-card .reply-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 78, 132, 0.1);
}

#screen-invitations .invitations-reviews-card .reply-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

#screen-invitations .invitations-reviews-card .btn-save-reply {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

#screen-invitations .invitations-reviews-card .btn-cancel-reply {
    background-color: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel-reply {
    background: none;
    color: var(--text1);
    border: none;
    padding: 0.3125rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.invitations-table-toolbar {
    padding: 0.9375rem 1.5rem;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
}

.table-title-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.card-header-inner {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.1rem;
    border-bottom: 1px solid var(--lightblue2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-container-inline {
    position: relative;
    width: 320px;
}

input.search-input-inline {
    width: 100%;
    padding: 0.5rem 3rem 0.5rem 0.9375rem;
    border: 1px solid var(--border-soft);
    border-radius: 1.25rem;
    background: var(--white);
    font-family: inherit;
    font-size: 0.875rem;
    box-sizing: border-box;
    transition: 0.2s;
}

input.search-input-inline:focus {
    border-color: var(--primary);
    outline: none;
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-1);
}

.search-icon-inline {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text1);
    opacity: 0.5;
    pointer-events: none;
}

.table-scroll-wrapper {
    overflow-x: auto;
}

button.mobile-scroll-top-btn {
    display: none;
}

@media (max-width: 787px) {
    button.mobile-scroll-top-btn {
        position: fixed;
        left: 14px;
        bottom: 92px;
        z-index: 10020;
        width: 50px;
        height: 50px;
        border: 0 none;
        border-radius: 14px;
        background-color: var(--primary);
        color: var(--white);
        box-shadow: 0 8px 25px rgba(30, 70, 117, 0.3);
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        transform: translateY(30px) scale(0.9);
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        font-family: inherit;
        line-height: 1;
        -webkit-appearance: none;
        appearance: none;
    }

    button.mobile-scroll-top-btn .scroll-top-icon {
        font-size: 18px;
        line-height: 1;
        color: var(--white);
        transition: transform 0.3s ease;
    }

    button.mobile-scroll-top-btn .scroll-top-label {
        font-size: 10px;
        font-weight: 700;
        margin-top: 2px;
        letter-spacing: 0.5px;
        color: var(--white);
    }

    button.mobile-scroll-top-btn.is-visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    button.mobile-scroll-top-btn:hover {
        background-color: #2a5d9a;
        box-shadow: 0 12px 30px rgba(30, 70, 117, 0.4);
        transform: translateY(-5px);
    }

    button.mobile-scroll-top-btn:hover .scroll-top-icon {
        transform: translateY(-3px);
    }

    button.mobile-scroll-top-btn:active {
        transform: scale(0.95);
    }

    button.mobile-scroll-top-btn::after {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        border-radius: 16px;
        border: 2px solid rgba(255, 255, 255, 0.1);
        pointer-events: none;
    }

    #screen-invitations {
        padding-bottom: 150px;
    }

    #screen-invitations .invitations-mobile-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        margin: calc(0.75rem - 65px) 0 calc(1rem + 20px);
    }

    #screen-invitations .invitations-mobile-nav .invitations-mobile-nav-btn {
        border: none;
        background: var(--white);
        color: var(--text1);
        font-weight: 700;
        font-size: 0.8125rem;
        width: auto;
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0.5rem 9px;
        border-radius: 999px;
        white-space: nowrap;
    }

    #screen-invitations .invitations-mobile-nav .invitations-mobile-nav-btn.active {
        background: var(--primary);
        border: none;
        color: var(--white);
    }

    .tw-dp-popover.tw-dp-popover--inv-mobile {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) scale(1.04) !important;
        transform-origin: top center !important;
        max-width: calc(100vw - 16px);
    }

    .invitations-list-scroll-top-btn {
        position: fixed;
        left: 14px;
        bottom: 92px;
        z-index: 10020;
        width: 50px;
        height: 50px;
        border: none;
        border-radius: 14px;
        background: var(--primary);
        color: var(--white);
        box-shadow: 0 8px 25px rgba(30, 70, 117, 0.3);
        opacity: 0;
        visibility: hidden;
        transform: translateY(30px) scale(0.9);
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .invitations-list-scroll-top-btn.is-visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    #screen-invitations .invitations-top-section {
        display: contents;
    }

    #screen-invitations[data-mobile-section="new"] .invitations-top-section {
        display: block;
    }

    #screen-invitations .invitations-mobile-panel {
        display: none;
    }

    #screen-invitations[data-mobile-section="new"] .invitations-mobile-panel[data-mobile-panel="new"],
    #screen-invitations[data-mobile-section="reviews"] .invitations-mobile-panel[data-mobile-panel="reviews"],
    #screen-invitations[data-mobile-section="list"] .invitations-mobile-panel[data-mobile-panel="list"] {
        display: block;
    }

    #screen-invitations .invitations-reviews-card .reviews-list {
        max-height: none;
        overflow: visible;
    }

    #screen-invitations .invitations-reviews-card .card-header-inner > span {
        display: none;
    }

    .invitations-table-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.625rem;
    }

    #screen-invitations .invitations-table-toolbar .table-title-text {
        display: none;
    }

    .search-container-inline {
        width: 100%;
    }

    #screen-invitations .invitations-bottom-section > .invitations-table-card {
        display: contents;
    }

    #screen-invitations[data-mobile-section="reviews"] .invitations-top-section > .invitations-reviews-card {
        display: contents;
    }

    .card-header-inner {
        justify-content: center;
        margin: auto;
        border: none;
    }

    .invitations-form-card,
    .invitations-reviews-card,
    .invitations-table-card {
        padding: 1rem;
    }

    #screen-invitations .invitations-form-card {
        padding-bottom: 1.75rem;
        min-height: calc(100dvh - 235px);
    }

    #screen-invitations[data-mobile-section="new"] .invitations-form-card {
        min-height: auto;
    }

    #screen-invitations .card.invitations-form-card.invitations-mobile-panel {
        border: none;
    }

    #screen-invitations .invitations-form-card .event-schedule-form.invitation-create-form .btn-create {
        margin-top: 1rem;
        margin-bottom: 14px;
        min-height: 57px;
    }

    #screen-invitations .invitations-form-card .event-schedule-form.invitation-create-form .form-grid > .form-group:last-of-type {
        margin-bottom: 1rem;
    }

    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .form-grid {
        width: 100%;
        margin: 0 auto;
        padding: 0;
        touch-action: pan-y;
    }

    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .form-full:last-child {
        margin-bottom: 20px;
    }

    #screen-invitations .invitations-form-card .event-schedule-form.invitation-create-form .form-full.checkbox-wrapper {
        margin-top: 0.2rem;
        margin-bottom: -0.2rem;
        gap: 10px;
        padding-right: 10px;
    }

    .invitations-table-toolbar {
        padding: 0;
        margin: 1rem auto;
        text-align: center;
        background: none;
        border: none;
    }

    #screen-invitations .table {
        background: transparent;
        border: none;
        padding: 0;
    }

    #screen-invitations .table-head {
        display: none;
    }

    #screen-invitations .table-body {
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 16px;
        grid-auto-rows: unset;
    }

    #screen-invitations .inv-card {
        background: var(--white);
        border-radius: 16px;
        overflow: hidden;
        border: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        display: flex;
        flex-direction: column;
    }

    #screen-invitations .inv-card-top {
        padding: 16px 16px 12px 16px;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    #screen-invitations .inv-client-name {
        font-size: 16px;
        font-weight: 800;
        color: #1E4E84;
        line-height: 1.2;
        max-width: 70%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #screen-invitations .inv-top-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #screen-invitations .inv-event-badge {
        display: none;
        background: #e0f2fe;
        color: #0284c7;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #screen-invitations .inv-edit-main-btn {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        background: #f8fafc;
        color: var(--table-row-text);
        border: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: 0.2s;
    }

    #screen-invitations .inv-edit-main-btn .fa-pen {
        font-size: 13px;
        transform: scaleX(0.9);
        display: inline-block;
    }

    #screen-invitations .inv-edit-main-btn.active,
    #screen-invitations .inv-edit-main-btn:hover {
        background: #1E4E84;
        color: #fff;
        border: none;
    }

    #screen-invitations .inv-edit-main-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    #screen-invitations .inv-details-view {
        padding: 12px 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    #screen-invitations .inv-detail-row {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 15px;
        color: var(--text1);
        min-height: 24px;
    }

    #screen-invitations .inv-detail-icon {
        width: 20px;
        text-align: center;
        color: var(--table-row-text);
        opacity: 0.8;
        font-size: 14px;
    }

    #screen-invitations .inv-detail-text {
        font-weight: 500;
        color: var(--text1);
    }

    #screen-invitations .inv-detail-link {
        text-decoration: none;
        color: var(--text1);
    }

    #screen-invitations .inv-add-mobile2-btn {
        font-size: 13px;
        color: #1E4E84;
        background: none;
        border: 1px dashed #bfdbfe;
        padding: 6px 10px;
        border-radius: 8px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        width: fit-content;
    }

    #screen-invitations .inv-add-mobile2-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    #screen-invitations .inv-details-edit {
        display: none;
        padding: 12px 16px 16px 16px;
        flex-direction: column;
        gap: 12px;
        background: #fdfdfd;
        border-top: 1px solid rgba(0,0,0,0.04);
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    #screen-invitations .inv-edit-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    #screen-invitations .inv-edit-label {
        font-size: 12px;
        color: var(--table-row-text);
        font-weight: 600;
    }

    #screen-invitations .inv-edit-input,
    #screen-invitations .inv-edit-select {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid var(--border-soft);
        border-radius: 10px;
        font-size: 14px;
        background: #fff;
        box-sizing: border-box;
    }

    #screen-invitations .inv-edit-datetime {
        display: flex;
        gap: 10px;
        flex-direction: row;
    }

    #screen-invitations .inv-edit-dt-col {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    #screen-invitations .inv-edit-actions {
        display: flex;
        gap: 10px;
        margin-top: 4px;
    }

    #screen-invitations .inv-edit-cancel-btn,
    #screen-invitations .inv-edit-save-btn {
        flex: 1;
        border: none;
        padding: 10px 12px;
        border-radius: 12px;
        font-weight: 700;
        cursor: pointer;
    }

    #screen-invitations .inv-edit-cancel-btn {
        background: #e2e8f0;
        color: var(--text1);
        font-weight: 600;
    }

    #screen-invitations .inv-edit-save-btn {
        background: #1E4E84;
        color: #fff;
    }

    #screen-invitations .inv-edit-cancel-btn:disabled,
    #screen-invitations .inv-edit-save-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    #screen-invitations .inv-stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 0 16px 16px 16px;
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    #screen-invitations .inv-stat-box {
        background: #f8fafc;
        border-radius: 12px;
        padding: 10px;
        text-align: center;
        border: 1px solid var(--border-soft);
    }

    #screen-invitations .inv-stat-label {
        font-size: 12px;
        color: var(--table-row-text);
        display: block;
        margin-bottom: 2px;
        font-weight: 600;
    }

    #screen-invitations .inv-stat-val {
        font-size: 18px;
        font-weight: 800;
        color: #1E4E84;
    }

    #screen-invitations .inv-stat-manage-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--table-row-text);
        text-decoration: none;
        line-height: 1;
    }

    #screen-invitations .inv-stat-manage-link svg {
        width: 18px;
        height: 18px;
        display: block;
        transform: translateY(3px);
    }

    #screen-invitations .inv-stat-manage-link.inv-stat-manage-link--disabled {
        color: var(--placeholder);
    }

    #screen-invitations .inv-stat-val[data-role="approvals-text"] {
        color: var(--table-row-text);
    }

    #screen-invitations .inv-card-actions {
        padding: 12px 16px 16px 16px;
        background: #fff;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #screen-invitations .inv-sms-btn {
        width: 100%;
        background: #1E4E84;
        color: #fff;
        border: none;
        padding: 14px;
        border-radius: 14px;
        font-size: 16px;
        font-weight: 400;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    #screen-invitations .inv-sms-btn .fa-comment-alt {
        font-size: 0.85em;
    }

    #screen-invitations .inv-sms-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    #screen-invitations .inv-sms-btn:active {
        transform: scale(0.99);
    }

    #screen-invitations .inv-rv-pill--mobile {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 0.875rem;
        border-radius: 14px;
    }

    #screen-invitations .table-row {
        background: var(--white);
        border: 1px solid var(--border-soft);
        border-radius: 1rem;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        gap: .5rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        min-height: auto;
    }

    #screen-invitations .table-row:hover {
        background: var(--white);
    }

    #screen-invitations .table-row > div {
        padding: 0;
        border: none;
        display: grid;
        grid-template-columns: 35% 65%;
        gap: .5rem;
        align-items: center;
        font-size: 14px;
    }

    #screen-invitations .table-row > div::before {
        content: attr(data-label);
        font-size: 14px;
        color: var(--table-row-text);
        font-weight: 600;
    }

    #screen-invitations .table-row > div[data-label="שם החוגג/ים"] .inline-editable-display {
        font-weight: 600;
        text-align: right;
    }

    #screen-invitations .table-row > div[data-label="נייד נוסף"],
    #screen-invitations .table-row > div[data-label="מועד יצירה"],
    #screen-invitations .table-row > div[data-label="SMS למשוב"] {
        display: none;
    }

    #screen-invitations .table-row > div[data-label="שליחת הזמנה"] {
        display: flex;
    }

    #screen-invitations .table-row > div[data-label="שליחת הזמנה"]::before {
        display: none;
    }

    #screen-invitations .table-row > div[data-label="שליחת הזמנה"] .btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    #screen-invitations .table-row .btn.icon-only.inline-edit-icon {
        display: none;
    }

    #screen-invitations .table-row > div .inline-editable-container {
        justify-content: flex-start;
    }

    .invitations-bottom-section .inline-editable-display {
        text-align: right;
    }

    .table-scroll-wrapper {
        overflow-x: visible;
    }
}

.switch-user-header svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

#screen-customers .filters-grid,
#screen-orders .filters-grid {
    display: none;
    overflow: hidden;
    background: var(--white);
    padding: 1rem;
    border-radius: 1rem;
    justify-content: flex-end;
    transition: opacity 0.3s ease;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-top: 1rem;
}

#screen-orders > .table {
    margin-top: 2rem;
    padding: 0;
}

#screen-customers > .table {
    margin-top: 2rem;
    padding: 0;
}

#screen-tasks > .table {
    margin-top: 2rem;
}

#screen-customers .filters-grid.is-open,
#screen-orders .filters-grid.is-open {
    display: flex;
}

#screen-customers .filters-grid.is-open + .table,
#screen-orders .filters-grid.is-open + .table {
    margin-top: 2rem;
}

#screen-customers .filters-grid .field,
#screen-orders .filters-grid .field {
    display: flex;
    width: 100%;
}

#screen-customers .filters-grid .field input,
#screen-orders .filters-grid .field input {
    border: 1px solid var(--border-soft) !important;
    padding: .35rem .75rem;
    border-radius: .5rem !important;
    font-size: 14px;
    background-color: var(--white);
    transition: 0.2s;
}

#customers-overlay.ui-overlay,
#orders-overlay.ui-overlay {
    background-color: rgba(30, 78, 132, 0.85);
    z-index: 2050;
}

.customers-editor-container,
.orders-editor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    background: var(--bg-app);
    z-index: 2100;
    pointer-events: none;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.customers-editor-container.is-open,
.orders-editor-container.is-open {
    transform: translateY(0);
    pointer-events: auto;
    overflow-y: auto;
    padding-bottom: 4rem;
}

.crm-fullscreen-overlay-close {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 56px;
    height: 56px;
    border: 0;
    background: transparent;
    color: var(--primary);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2125;
}

.crm-fullscreen-overlay-close svg {
    width: 53px;
    height: 53px;
    stroke-width: 1.5px;
}

.crm-fullscreen-overlay-close.is-active {
    display: flex;
}

.customers-editor-body,
.orders-editor-body {
    padding: 1rem;
}

.customer-detail-root {
    max-width: 1100px;
    margin: 0 auto;
}

.customer-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}

.customer-stat-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 4px solid var(--primary);
}

.customer-stat-card[data-accent="blue"] { border-right-color: var(--primary); }
.customer-stat-card[data-accent="green"] { border-right-color: var(--lbl1); }
.customer-stat-card[data-accent="orange"] { border-right-color: var(--lbl4); }
.customer-stat-card[data-accent="purple"] { border-right-color: var(--lbl3); }

.customer-stat-label {
    color: var(--text1);
    font-size: 13px;
}

.customer-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--black);
}

.customer-stat-value[data-accent="green"] { color: var(--lbl1); }
.customer-stat-value[data-accent="orange"] { color: var(--lbl4); }

.customer-columns {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.customer-info-card,
.customer-orders-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 1rem;
}

.customer-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 10px;
    margin-bottom: 1rem;
}

.customer-section-header i {
    font-size: 14px;
}

.customer-info-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.customer-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px;
}

.customer-info-row:last-child {
    border-bottom: none;
}

.customer-info-label {
    color: var(--text1);
}

.customer-info-value {
    font-weight: 500;
    color: var(--black);
}

.customer-info-value a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.customer-field-input {
    max-width: 200px;
    text-align: left;
}

.customer-info-actions {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
    justify-content: flex-end;
}

.customer-save-btn {
    background: var(--lbl1);
}

.customer-orders-table .table-head {
    grid-template-columns: repeat(4, 1fr);
}

.customer-orders-table .table-row {
    grid-template-columns: repeat(4, 1fr);
}

.customer-order-status {
    display: inline-block;
    background: var(--lbl7);
    color: var(--lbl1);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

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

    .customer-columns {
        grid-template-columns: 1fr;
    }
}

.order-detail-root {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-summary-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 1rem;
    border-top: 4px solid var(--primary);
}

.order-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

.order-summary-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 1rem;
    border-left: 1px solid var(--border-soft);
}

.order-summary-col:last-child {
    border-left: none;
    padding-left: 0;
}

.order-summary-label {
    color: var(--text1);
    font-size: 12px;
    margin: 0;
}

.order-summary-main {
    font-weight: 700;
    color: var(--black);
    font-size: 15px;
    margin: 0;
}

.order-summary-sub {
    font-size: 13px;
    color: var(--text1);
    margin: 0;
}

.order-summary-sub a {
    color: var(--primary);
    text-decoration: none;
}

.order-summary-total {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    margin: 0;
}

.order-section-card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
}

.order-section-header {
    background: var(--lightblue2);
    padding: 12px 1.5rem;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-section-title {
    font-weight: 700;
    color: var(--text2);
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-section-title i {
    color: var(--primary);
    font-size: 13px;
}

.order-section-card .order-section-title i.fa-credit-card {
    color: var(--lbl1);
}

.order-section-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.order-empty-icon {
    font-size: 3rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.order-section-empty p {
    color: var(--text1);
    margin: 0;
    font-size: 14px;
}

.order-lines-table .table-head,
.order-lines-table .table-row {
    grid-template-columns: 2fr 1fr 1fr 1fr;
}

.order-payments-table .table-head,
.order-payments-table .table-row {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.order-section-card .table {
    border-radius: 0;
}

@media (max-width: 768px) {
    .order-summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .order-summary-col {
        border-left: none;
        padding-left: 0;
        border-bottom: 1px solid var(--border-soft);
        padding-bottom: 12px;
    }

    .order-summary-col:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

.switch-user-card.selected {
    border-color: var(--primary);
    background: var(--lightblue);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    margin-bottom: 1rem;
}

.switch-user-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.switch-user-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.switch-user-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 1rem;
}

.switch-user-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text1);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.switch-user-card-email {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.switch-user-password-container {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
    overflow: hidden;
    display: none;
    transition: opacity 0.3s ease;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    } 
    to {
        opacity: 1;
        transform: translateY(0) scale(1); 
    }
}

.switch-user-card.selected .switch-user-password-container {
    grid-template-rows: 1fr;
    display: grid;
    margin-top: 1rem;
    gap: 1rem;
}

.switch-user-password-inner {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
}

.switch-user-password-container input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    background: #fdfdfd;
    font-family: inherit;
    box-sizing: border-box;
    font-size: 14px;
}

.switch-user-password-container input[type="password"]:focus {
    border-color: var(--brand-blue, var(--primary));
    outline: none;
    background: var(--white)
}

.switch-user-password-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.btn-switch-user-submit,
.btn-switch-user-cancel {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-switch-user-submit {
    background: var(--primary);
    color: var(--white);
}

.btn-switch-user-submit:hover:not(:disabled) {
    background: var(--primary-dark, #163a63);
}

.btn-switch-user-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-switch-user-cancel {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text1);
}

.btn-switch-user-cancel:hover {
    background: var(--white);
}

.switch-user-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Navigation User Profile */
.nav-user-profile {
    position: relative;
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
    padding-top: .5rem;
    border-top: 1px solid var(--border, rgba(0,0,0,0.1));
}

.nav-user-profile-trigger {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 0;
    border-radius: 0.5rem;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
    text-align: right;
}

.nav-user-profile-trigger:hover {
    background: var(--hover-bg, rgba(0,0,0,0.05));
}

.nav-user-profile-trigger:active {
    transform: scale(0.98);
}

.nav-user-profile-avatar {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: var(--lightblue);
    border-radius: 50%;
}

.nav-user-profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    pointer-events: none;
}

.nav-user-profile-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
    pointer-events: none;
}

.nav-user-profile-name {
    font-size: calc(14px * 1.05);
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.nav-user-profile-role {
    font-size: calc(12px * 1.05);
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.nav-user-profile-arrow {
    margin-right: auto;
    color: var(--white);
    transition: transform 0.2s;
    pointer-events: none;
    margin-left: 4px;
}

.nav-user-profile.is-open .nav-user-profile-arrow {
    transform: rotate(180deg);
}

.nav-user-profile-dropdown {
    position: absolute;
    right: 0;
    width: 100%;
    margin: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: .5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
    top: -110px;
}

.nav-user-profile-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-user-profile-dropdown .user-menu-link {
    display: block;
    padding: .5rem 1rem;
    color: var(--text1);
    text-decoration: none;
    transition: background 0.15s;
    font-size: calc(14px * 1.05);
}

.nav-user-profile-dropdown .user-menu-link:hover {
    background: var(--hover-bg, rgba(0,0,0,0.05));
}

.nav-user-profile-dropdown .user-menu-link:first-child {
    border-radius: 8px 8px 0 0;
}

.nav-user-profile-dropdown .user-menu-link:last-child {
    border-radius: 0 0 8px 8px;
}

/* Business Logo in Header */
.business-logo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: var(--white);
    border-radius: .5rem;
}

.business-logo-header img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

/* Business Logo in Sidebar */
.sidebar-business-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.sidebar-business-logo img {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

/* Invitations: compact mode for short mobile viewports */
@media (max-width: 787px) and (max-height: 940px) {
    #screen-invitations {
        padding-bottom: 20px;
    }

    #screen-invitations[data-mobile-section="new"] {
        padding-bottom: 0;
    }

    #screen-invitations[data-mobile-section="new"] .invitations-top-section {
        margin: 0.75rem 0 0;
        min-height: auto;
    }

    #screen-invitations[data-mobile-section="new"] .invitations-form-card {
        min-height: auto;
    }

    #screen-invitations .invitations-mobile-nav {
        gap: 0.375rem;
        margin: 0 0 calc(1rem + 20px);
    }

    #screen-invitations .invitations-mobile-nav .invitations-mobile-nav-btn {
        font-size: 0.81rem;
        padding: 0.5rem 9px;
    }

    #screen-invitations[data-mobile-section="new"] .invitations-form-card {
        padding: 0.75rem;
    }

    #screen-invitations[data-mobile-section="new"] .invitations-form-card .card-header-inner {
        margin-bottom: 0.5rem;
    }

    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .form-group {
        margin-bottom: 5px;
    }

    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .form-label {
        font-size: 13px;
        margin-bottom: 4px;
    }

    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .form-input,
    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .form-select {
        min-height: 42px;
        padding: 9px 10px;
        font-size: 14.5px;
    }

    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .form-full.checkbox-wrapper {
        margin-top: 0.2rem;
        margin-bottom: -0.2rem;
        gap: 10px;
        padding-right: 10px;
    }

    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .form-grid > .form-group:last-of-type {
        margin-bottom: 0.95rem;
    }

    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .checkbox-label {
        font-size: 14.5px;
    }

    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .checkbox-label .checkmark {
        width: 20px;
        height: 20px;
        margin-left: 2px;
    }

    #screen-invitations[data-mobile-section="new"] .event-schedule-form.invitation-create-form .btn-create {
        margin-top: 1rem;
        margin-bottom: 2px;
        padding: 12px 14px;
        min-height: 57px;
    }
}

/* ===== Alert Modal (logout/confirm) ===== */
.modal-overlay.alert-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 78, 132, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.modal-overlay.alert-overlay.open {
    display: flex;
    opacity: 1;
}

.alert-modal {
    background: var(--white);
    width: min(320px, calc(100vw - 32px));
    border-radius: 24px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transform: scale(0.98);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}

.modal-overlay.alert-overlay.open .alert-modal {
    transform: scale(1);
}

.alert-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 5px;
}

.alert-icon.icon-info {
    background: color-mix(in srgb, var(--primary) 10%, var(--white));
    color: var(--primary);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--lightblue2) 65%, var(--white));
}

.alert-icon.icon-danger {
    background: color-mix(in srgb, var(--delete) 14%, var(--white));
    color: var(--delete);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--lightgray) 60%, var(--white));
}

.alert-icon.icon-success {
    background: color-mix(in srgb, var(--lbl1) 18%, var(--white));
    color: var(--lbl1);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--lightgray) 60%, var(--white));
}

.alert-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--black);
    margin: 0;
}

.alert-desc {
    font-size: 14px;
    color: var(--text1);
    margin: 0;
    line-height: 1.4;
}

.alert-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
}

.alert-btn {
    border: none;
    padding: 10px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    transition: 0.2s;
}

.alert-btn.primary {
    background: var(--primary);
    color: var(--white);
}

.alert-btn.primary:hover {
    background: var(--btn-pr-hover);
}

.alert-btn.secondary {
    background: var(--white);
    border: 1px solid var(--border-soft);
    color: var(--black);
}

.alert-btn.secondary:hover {
    background: var(--lightgray);
}

#crm-inline-toast-container {
    position: fixed;
    top: 60px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.crm-inline-toast {
    min-width: 360px;
    max-width: 504px;
    background: #fff8f0;
    border-radius: 14px;
    border-right: 5px solid var(--lbl4);
    padding: 17px 19px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-77px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: auto;
}

.crm-inline-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.crm-inline-toast.closing {
    opacity: 0;
    transform: translateY(-43px);
}

.crm-inline-toast-icon-box {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff0e0;
    color: var(--lbl4);
}

.crm-inline-toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.crm-inline-toast-content {
    flex: 1;
    min-width: 0;
}

.crm-inline-toast-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text1);
    margin-bottom: 4px;
}

.crm-inline-toast-message {
    font-size: 16px;
    line-height: 1.45;
    color: var(--text2);
    word-break: break-word;
}

.crm-inline-toast-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: transparent;
    border: 0;
    color: var(--text2);
    opacity: 0.65;
    cursor: pointer;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-with-icon {
    gap: 8px;
}

.btn-with-icon > .btn-with-icon__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    flex-shrink: 0;
}

.btn-with-icon > .btn-with-icon__icon svg {
    display: block;
}

.btn-with-icon > .btn-with-icon__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

/* ===== Invitations SMS confirm modal ===== */
.modal-overlay.inv-sms-confirm-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 59, 93, 0.3);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.modal-overlay.inv-sms-confirm-overlay.open {
    display: flex;
    opacity: 1;
}

#gs-system-alert-overlay.gs-system-reminder-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 59, 93, 0.32);
    backdrop-filter: blur(3px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

#gs-system-alert-overlay.gs-system-reminder-overlay.visible {
    display: flex;
    opacity: 1;
}

#gs-system-alert-overlay .lead-reminder-popup {
    background: var(--white);
    width: min(420px, calc(100vw - 32px));
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    cursor: default;
}

#gs-system-alert-overlay .popup-body {
    padding: 24px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#gs-system-alert-overlay .bell-icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--lightblue);
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

#gs-system-alert-overlay svg {
    width: 24px;
    height: 24px;
    display: block;
    position: static;
    inset: auto;
    transform: none;
    fill: none;
    stroke: currentColor;
}

#gs-system-alert-overlay .popup-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#gs-system-alert-overlay .task-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--black);
    line-height: 1.35;
    margin: 0;
    word-break: break-word;
}

#gs-system-alert-overlay .popup-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
    margin-top: 6px;
}

#gs-system-alert-overlay .btn-primary-done {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(30, 78, 132, 0.3);
}

#gs-system-alert-overlay .secondary-actions-row {
    display: flex;
    gap: 10px;
}

#gs-system-alert-overlay .btn-secondary-action {
    flex: 1;
    background: var(--white);
    border: 1px solid #e5e7eb;
    color: var(--black);
    border-radius: 12px;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.app-confirm-modal {
    background: #ffffff;
    width: min(400px, calc(100vw - 32px));
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    box-sizing: border-box;
    cursor: default;
}

.inv-sms-confirm-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px auto;
    border-radius: 50%;
    background: #f0f7ff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay.inv-sms-confirm-overlay .app-confirm-modal .inv-sms-confirm-icon-wrap svg {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    display: block;
    position: static;
    inset: auto;
    transform: none;
    fill: #1a3b5d;
}

.modal-overlay.inv-sms-confirm-overlay .app-confirm-modal .inv-sms-confirm-icon-wrap svg path {
    fill: #1a3b5d;
}

.inv-sms-confirm-title {
    margin: 0 0 10px 0;
    color: #1a3b5d;
    font-size: 24px;
    font-weight: 700;
}

.inv-sms-confirm-desc {
    margin: 0 0 32px 0;
    color: #7d8da6;
    font-size: 16px;
    line-height: 1.5;
}

.inv-sms-confirm-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.inv-sms-confirm-btn {
    flex: 1;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}

.inv-sms-confirm-btn--primary {
    background: #1a3b5d;
    color: #ffffff;
    border: none;
}

.inv-sms-confirm-btn--primary:hover {
    background: #132e4a;
}

.inv-sms-confirm-btn--secondary {
    background: #ffffff;
    color: #1a3b5d;
    border: 1px solid #e0e0e0;
}

.inv-sms-confirm-btn--secondary:hover {
    background: #f9f9f9;
    border-color: #d0d0d0;
}

.app-confirm-modal--danger {
    width: min(320px, calc(100vw - 32px));
    padding: 30px 24px;
    border-radius: 20px;
}

.app-confirm-modal--danger .inv-sms-confirm-icon-wrap {
    width: 64px;
    height: 64px;
    margin-bottom: 4px;
    background: color-mix(in srgb, var(--delete) 12%, var(--white));
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--delete) 8%, var(--white));
    color: var(--delete);
}

.modal-overlay.inv-sms-confirm-overlay .app-confirm-modal--danger .inv-sms-confirm-icon-wrap svg {
    width: 30px;
    height: 30px;
    max-width: 30px;
    max-height: 30px;
    fill: none;
    color: var(--delete);
}

.modal-overlay.inv-sms-confirm-overlay .app-confirm-modal--danger .inv-sms-confirm-icon-wrap svg path {
    fill: none;
    stroke: currentColor;
}

.app-confirm-modal--danger .inv-sms-confirm-title {
    color: var(--delete);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.app-confirm-modal--danger .inv-sms-confirm-desc {
    color: var(--delete);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 12px;
}

.app-confirm-modal--danger .inv-sms-confirm-actions {
    margin-top: 12px;
    gap: 12px;
}

.app-confirm-modal--danger .inv-sms-confirm-btn {
    min-height: 46px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
}

.app-confirm-modal--danger .inv-sms-confirm-btn--danger {
    background: var(--delete);
    color: var(--white);
    border: none;
}

.app-confirm-modal--danger .inv-sms-confirm-btn--secondary {
    background: var(--white);
    border: 1px solid var(--delete);
    color: var(--delete);
}

@media (max-width: 560px) {
    .app-confirm-modal {
        padding: 28px 20px;
    }

    .inv-sms-confirm-title {
        font-size: 21px;
    }

    .inv-sms-confirm-desc {
        font-size: 15px;
        margin-bottom: 24px;
    }
}

@media (max-width: 767px) {
    .nav {
        gap: 0.8rem;
    }

    .nav-link {
        gap: 0.4rem;
        padding: 0.2rem 0.4rem;
        font-size: 80%;
    }

    .nav-link > span {
        font-size: calc(100% - 4px);
    }

    .nav-link svg {
        width: calc(20px * 0.84);
        height: calc(20px * 0.84);
    }

    #mainNav .nav-link[data-route="event-card"] svg {
        width: 19.2px;
        height: 19.2px;
        margin-top: 2px;
    }

    .app-main.is-closed #mainNav .nav-link[data-route="event-card"] svg {
        width: 19.2px;
        height: 19.2px;
        margin-top: 2px;
    }

    .nav-link.nav-separator-top {
        margin-top: 48px;
    }

    .nav-user-profile-trigger,
    .nav-user-profile-name,
    .nav-user-profile-role,
    .nav-user-profile-arrow {
        color: var(--white);
    }

    .crm-fullscreen-overlay-close svg {
        width: 64px;
        height: 64px;
    }
}

/* Quick pill tabs (reusable) */
.quick-pill-tabs-host {
    margin-bottom: 14px;
}

.quick-pill-tabs-title {
    text-align: center;
    color: var(--text2);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.quick-pill-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-pill-tab {
    border: 1px solid var(--border-soft);
    background: var(--white);
    color: var(--text1);
    border-radius: 999px;
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-pill-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quick-pill-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.quick-pill-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.monitor-table-compact th,
.monitor-table-compact td {
    font-size: calc(var(--table-head-font-size) - 2px);
}

#screen-reports .reports-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

#screen-reports .reports-page-header {
    align-items: flex-start;
    padding-bottom: 0;
}

#screen-reports .reports-heading {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

#screen-reports .reports-global-filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--white);
}

#screen-reports .reports-global-filters .tw-date-picker {
    width: 100%;
}

#screen-reports .reports-filter-field,
#screen-reports .reports-inline-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    flex: 0 1 10rem;
}

#screen-reports .reports-filter-field > span,
#screen-reports .reports-inline-field > span {
    color: var(--text1);
    font-size: 0.82rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#screen-reports .reports-global-filters .input {
    min-height: 42px;
}

#screen-reports .reports-filter-field--date {
    flex-basis: 10.5rem;
    max-width: 12.3rem;
}

#screen-reports .reports-filter-field--business {
    display: none;
}

#screen-reports .reports-filter-field--select {
    flex-basis: 10.5rem;
    max-width: 12rem;
}

#screen-reports .reports-filter-field--search {
    flex: 0 1 10.8rem;
    min-width: 9rem;
    max-width: 10.8rem;
}

#screen-reports .reports-filter-field--owner {
    display: none;
}

#screen-reports .reports-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    flex: 0 0 auto;
}

#screen-reports .reports-filter-actions .btn {
    min-height: 42px;
    padding: 0 1rem;
}

#screen-reports .reports-info-strip {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: var(--lightblue);
    color: var(--text1);
    border: 1px solid var(--border);
}

#screen-reports .reports-tabs-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

#screen-reports .reports-tabs-nav .form-tab-btn {
    min-height: 42px;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: var(--text1);
    font-weight: 600;
    line-height: 1.1;
}

#screen-reports .reports-tabs-nav .form-tab-btn.active {
    background: var(--lightblue2);
    border-color: var(--border);
    color: var(--black);
    box-shadow: 0 2px 8px var(--primary-4);
}

#screen-reports .reports-tabs-nav .form-tab-btn::after {
    display: none;
}

#screen-reports .reports-tabs-content {
    padding-bottom: 0;
}

#screen-reports .reports-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

#screen-reports .reports-panel-toolbar--stack {
    align-items: stretch;
    gap: 0.9rem;
}

#screen-reports .reports-panel-meta {
    color: var(--text1);
}

#screen-reports .reports-local-filters,
#screen-reports .reports-panel-actions,
#screen-reports .reports-inline-filters,
#screen-reports .reports-pagination-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#screen-reports .reports-checkbox-group {
    gap: 0.6rem;
}

#screen-reports .reports-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--black);
    font-size: 0.95rem;
    position: relative;
    direction: rtl;
}

#screen-reports .reports-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

#screen-reports .reports-toggle.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    color: var(--text1);
    font-size: 0.92rem;
    line-height: 1;
    user-select: none;
}

#screen-reports .reports-toggle .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-soft);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#screen-reports .reports-toggle .checkbox-text {
    color: inherit;
    white-space: nowrap;
}

#screen-reports .reports-toggle .checkmark::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid var(--white);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) translateY(-1px) scale(0);
    transition: transform 0.2s ease;
}

#screen-reports .reports-toggle input[type="checkbox"]:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

#screen-reports .reports-toggle input[type="checkbox"]:checked ~ .checkmark::after {
    transform: rotate(45deg) translateY(-1px) scale(1);
}

#screen-reports .reports-toggle:has(input[type="checkbox"]:checked) {
    border-color: var(--primary);
    background: var(--lightblue2);
    color: var(--black);
}

#screen-reports .reports-toggle input[type="checkbox"]:focus-visible ~ .checkmark {
    box-shadow: 0 0 0 3px var(--primary-4);
}

#screen-reports .reports-state-note {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: var(--lightblue2);
    color: var(--text1);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

#screen-reports .reports-state-note.is-error {
    background: var(--lbl9);
    color: var(--lbl8);
    border-color: var(--lbl12);
}

#screen-reports .reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

#screen-reports .reports-kpi-grid--primary {
    margin-bottom: 0.85rem;
}

#screen-reports .reports-kpi-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

#screen-reports .reports-kpi-card--accent {
    background: var(--lightblue);
}

#screen-reports .reports-kpi-label {
    color: var(--text1);
    font-size: 0.92rem;
}

#screen-reports .reports-kpi-value {
    color: var(--black);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

#screen-reports .reports-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1rem;
}

#screen-reports .reports-inline-filters {
    align-items: flex-end;
}

#screen-reports .reports-inline-field--supplier,
#screen-reports .reports-inline-field--supplier-type {
    flex: 0 1 14rem;
    min-width: 12rem;
}

#screen-reports .reports-inline-field--supplier .input,
#screen-reports .reports-inline-field--supplier-type .input {
    min-height: 42px;
}

#screen-reports [data-panel-key="suppliers"] .reports-panel-toolbar--stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(11.5rem, 13rem) minmax(11.5rem, 13rem) auto;
    align-items: flex-end;
    justify-content: stretch;
    column-gap: 0.75rem;
    row-gap: 0.75rem;
}

#screen-reports [data-panel-key="suppliers"] .reports-local-filters,
#screen-reports [data-panel-key="suppliers"] .reports-inline-filters {
    align-items: flex-end;
}

#screen-reports [data-panel-key="suppliers"] .reports-local-filters {
    grid-column: 1;
    min-width: 0;
}

#screen-reports [data-panel-key="suppliers"] .reports-inline-filters {
    grid-column: 2 / 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
}

#screen-reports [data-panel-key="suppliers"] .reports-panel-actions {
    grid-column: 4;
    margin-inline-start: 0;
}

#screen-reports [data-panel-key="suppliers"] .reports-inline-field--supplier,
#screen-reports [data-panel-key="suppliers"] .reports-inline-field--supplier-type {
    flex: 0 1 13rem;
    min-width: 11.5rem;
}

#screen-reports .reports-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    min-width: 0;
    overflow: hidden;
}

#screen-reports .reports-card--full {
    grid-column: 1 / -1;
}

#screen-reports .reports-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

#screen-reports .reports-card-head strong {
    color: var(--black);
}

#screen-reports .reports-card-head span {
    color: var(--text1);
    font-size: 0.92rem;
}

#screen-reports .reports-dashboard-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#screen-reports .reports-dashboard-summary-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: var(--lightblue2);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#screen-reports .reports-dashboard-summary-head,
#screen-reports .reports-dashboard-summary-foot,
#screen-reports .reports-dashboard-summary-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#screen-reports .reports-dashboard-summary-main,
#screen-reports .reports-dashboard-summary-side {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

#screen-reports .reports-dashboard-summary-side {
    align-items: flex-start;
}

#screen-reports .reports-dashboard-summary-title,
#screen-reports .reports-dashboard-summary-subtitle,
#screen-reports .reports-dashboard-summary-meta,
#screen-reports .reports-dashboard-summary-caption,
#screen-reports .reports-dashboard-summary-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#screen-reports .reports-dashboard-summary-title,
#screen-reports .reports-dashboard-summary-value {
    color: var(--black);
}

#screen-reports .reports-dashboard-summary-title {
    font-size: 1rem;
    font-weight: 700;
}

#screen-reports .reports-dashboard-summary-subtitle,
#screen-reports .reports-dashboard-summary-meta,
#screen-reports .reports-dashboard-summary-caption {
    color: var(--text1);
    font-size: 0.88rem;
}

#screen-reports .reports-dashboard-summary-value {
    font-size: 1.05rem;
    font-weight: 700;
}

#screen-reports .reports-dashboard-empty {
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 1rem;
    background: var(--lightblue2);
    color: var(--text1);
    text-align: center;
}

#screen-reports .reports-table {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    padding: 0;
}

#screen-reports .reports-table .table-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fafbfb;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    line-height: 1rem;
    padding: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

#screen-reports .reports-table .table-body {
    display: grid;
    grid-auto-rows: minmax(48px, auto);
}

#screen-reports .reports-table .table-row {
    border-bottom: 1px solid var(--border-soft);
}

#screen-reports .reports-table .table-row:last-child {
    border-bottom: 0;
}

#screen-reports .reports-table .table-head > div,
#screen-reports .reports-table .table-row > div {
    min-width: 0;
}

#screen-reports .reports-table .table-head > div {
    padding: var(--table-head-pad-y) var(--table-cell-pad-x);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-direction: row;
}

#screen-reports .reports-table--collections,
#screen-reports .reports-table--profitability,
#screen-reports .reports-table--suppliers {
    min-width: 1100px;
}

#screen-reports .reports-table--collections-compact,
#screen-reports .reports-table--suppliers-compact,
#screen-reports .reports-table--upcoming {
    min-width: 100%;
}

#screen-reports .reports-table--collections .table-head,
#screen-reports .reports-table--collections .table-row {
    display: grid;
    grid-template-columns: .8fr 1.15fr 1fr .9fr .95fr .95fr .95fr .85fr .95fr .6fr .85fr .85fr;
}

#screen-reports .reports-table--profitability .table-head,
#screen-reports .reports-table--profitability .table-row {
    display: grid;
    grid-template-columns: .75fr 1.05fr .95fr .85fr .95fr .95fr .95fr .95fr .95fr .95fr .95fr .8fr .85fr;
}

#screen-reports .reports-table--suppliers .table-head,
#screen-reports .reports-table--suppliers .table-row {
    display: grid;
    grid-template-columns: 1fr .75fr .7fr 1fr .85fr .95fr .85fr .9fr .85fr .95fr .6fr 1.05fr;
}

#screen-reports .reports-table--collections-compact .table-head,
#screen-reports .reports-table--collections-compact .table-row {
    display: grid;
    grid-template-columns: 1fr .9fr .8fr .75fr .75fr;
}

#screen-reports .reports-table--suppliers-compact .table-head,
#screen-reports .reports-table--suppliers-compact .table-row {
    display: grid;
    grid-template-columns: 1fr 1fr .8fr .75fr .75fr;
}

#screen-reports .reports-table--upcoming .table-head,
#screen-reports .reports-table--upcoming .table-row {
    display: grid;
    grid-template-columns: 1fr .95fr .8fr .8fr .75fr;
}

#screen-reports .reports-table--collections-compact .table-head,
#screen-reports .reports-table--suppliers-compact .table-head,
#screen-reports .reports-table--upcoming .table-head {
    position: static;
}

#screen-reports .reports-upcoming-mobile-label {
    display: none;
}

#screen-reports .reports-upcoming-primary {
    color: var(--black);
    font-size: 0.98rem;
    font-weight: 700;
}

#screen-reports .reports-sort-btn {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: inherit;
}

#screen-reports .reports-sort-btn.is-active,
#screen-reports .reports-inline-link {
    color: var(--primary);
}

#screen-reports .reports-inline-link {
    text-decoration: none;
    font-weight: 600;
}

#screen-reports .reports-actions-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

#screen-reports .reports-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.85rem;
    flex-wrap: wrap;
}

#screen-reports .reports-pagination-label {
    color: var(--text1);
}

@media (hover: hover) {
    .app-main.is-closed > aside #mainNav .nav-link[data-tooltip]:hover::before {
        visibility: visible;
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    .app-main.is-closed > aside #mainNav .nav-link[data-tooltip]:hover::after {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
    }

    #screen-reports .reports-tabs-nav .form-tab-btn:hover {
        background: var(--lightblue2);
        color: var(--black);
        border-color: var(--border);
    }

    #screen-reports .reports-toggle.checkbox-label:hover {
        border-color: var(--primary);
        background: var(--lightblue2);
    }

    #screen-reports .reports-toggle.checkbox-label:hover .checkmark {
        border-color: var(--primary);
    }
}

@media (max-width: 1180px) {
    #screen-reports .reports-global-filters {
        gap: 0.6rem;
    }

    #screen-reports .reports-filter-field--search {
        flex-basis: 14rem;
        min-width: 13rem;
    }

    #screen-reports .reports-filter-field--owner {
        flex-basis: 14rem;
        min-width: 12rem;
        max-width: none;
    }

    #screen-reports .reports-filter-actions {
        min-width: max-content;
    }

    #screen-reports .reports-panel-toolbar--stack {
        gap: 0.75rem;
    }

    #screen-reports .reports-inline-filters {
        width: 100%;
    }

    #screen-reports [data-panel-key="suppliers"] .reports-inline-filters {
        grid-column: 1 / 3;
        width: 100%;
        flex: none;
    }

    #screen-reports [data-panel-key="suppliers"] .reports-local-filters {
        grid-column: 1 / 3;
        flex: none;
    }

    #screen-reports [data-panel-key="suppliers"] .reports-panel-actions {
        grid-column: 3;
        flex: none;
    }

    #screen-reports [data-panel-key="suppliers"] .reports-panel-toolbar--stack {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    }

    #screen-reports .reports-inline-field--supplier,
    #screen-reports .reports-inline-field--supplier-type {
        flex: 1 1 12rem;
    }
}

@media (max-width: 767px) {
    body[data-manage-token] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
    body[data-manage-token] select,
    body[data-manage-token] textarea,
    body[data-manage-token] .input,
    body[data-manage-token] .control,
    body[data-manage-token] .form-control,
    body[data-manage-token] .tw-dp-trigger,
    body[data-manage-token] .tw-time-input {
        font-size: 16px !important;
    }

    #screen-reports .reports-page {
        gap: 1rem;
    }

    #screen-reports .reports-global-filters {
        padding: 0.9rem;
        gap: 0.75rem;
    }

    #screen-reports .reports-filter-field,
    #screen-reports .reports-filter-field--date,
    #screen-reports .reports-filter-field--business,
    #screen-reports .reports-filter-field--select,
    #screen-reports .reports-filter-field--search,
    #screen-reports .reports-filter-field--owner {
        flex: 1 1 100%;
        min-width: 0;
        max-width: none;
    }

    #screen-reports .reports-filter-actions {
        flex: 1 1 100%;
        justify-content: stretch;
    }

    #screen-reports .reports-filter-actions .btn {
        flex: 1 1 0;
    }

    #screen-reports .reports-tabs-nav {
        width: 100%;
        justify-content: stretch;
    }

    #screen-reports .reports-tabs-nav .form-tab-btn {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
        text-align: center;
    }

    #screen-reports .reports-toggle.checkbox-label {
        width: 100%;
        justify-content: flex-start;
        border-radius: 14px;
    }

    #screen-reports .reports-inline-filters {
        width: 100%;
    }

    #screen-reports .reports-inline-field--supplier,
    #screen-reports .reports-inline-field--supplier-type {
        flex: 1 1 100%;
        min-width: 0;
    }

    #screen-reports [data-panel-key="suppliers"] .reports-panel-toolbar--stack {
        display: flex;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    #screen-reports [data-panel-key="suppliers"] .reports-inline-filters {
        display: flex;
        grid-column: auto;
        width: 100%;
    }

    #screen-reports [data-panel-key="suppliers"] .reports-local-filters,
    #screen-reports [data-panel-key="suppliers"] .reports-panel-actions {
        grid-column: auto;
    }

    #screen-reports .reports-table--upcoming {
        padding: 0.85rem;
    }

    #screen-reports .reports-table--upcoming .table-head {
        display: none;
    }

    #screen-reports .reports-table--upcoming .table-body {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    #screen-reports .reports-table--upcoming .reports-upcoming-row {
        display: flex;
        flex-direction: column;
        gap: 0.7rem;
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 0.9rem 1rem;
        background: var(--lightblue2);
    }

    #screen-reports .reports-table--upcoming .reports-upcoming-cell {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
        padding: 0;
    }

    #screen-reports .reports-table--upcoming .reports-upcoming-cell--title {
        padding-bottom: 0.45rem;
        border-bottom: 1px solid var(--border-soft);
    }

    #screen-reports .reports-table--upcoming .reports-upcoming-cell--actions {
        padding-top: 0.2rem;
    }

    #screen-reports .reports-upcoming-mobile-label {
        display: block;
        color: var(--text1);
        font-size: 0.8rem;
        line-height: 1.2;
    }
}
